Re: [Yade-users] [Question #701015]: Pore size
Question #701015 on Yade changed: https://answers.launchpad.net/yade/+question/701015 Status: Answered => Open Mithushan Soundaranathan is still having a problem: Hi Robert, Thank you for your help, I implemented your suggestion and defined as PoreSize in the MWE. However, I get an empty vertices dataset. I want track the pore size change over time during swelling (radius increase) of the particle. Do I need include a flow in there over time, or can still use it by define dead=1 in the engine? How do change the name of the vertices.txt file so it differ for each iteration? Best regards, Mithu Sorry for the code, here is the new MWE: from __future__ import print_function from yade import utils, plot, timing from yade import pack o = Omega() o.dt = 1.0e-8 # Add material mat1 = O.materials.append(LudingMat(frictionAngle=fr, density=rho, k1=k1, kp=kp, ks=ks, kc=kc, PhiF=PhiF1, G0 = 0.0)) # Spheres for compression and walls sp=pack.SpherePack() sp.makeCloud((-7.5*Diameter,-7.5*Diameter,-30*Diameter),(7.5*Diameter,7.5*Diameter,5.0*Diameter), rMean=Diameter/2.0,rRelFuzz=0.18,num=round(no_p)) sp.toSimulation(material=mat1) walls=O.bodies.append(yade.geom.facetCylinder((0,0,0),radius=Tab_rad,height=Cyl_height,segmentsNumber=20,wallMask=6,material=mat1)) # Add engines o.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.05), Bo1_Wall_Aabb(), Bo1_Facet_Aabb() ]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.05), Ig2_Facet_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()], [Ip2_LudingMat_LudingMat_LudingPhys()], [Law2_ScGeom_LudingPhys_Basic()] ), NewtonIntegrator(damping=0.1, gravity=[0, 0, g]), FlowEngine(dead=1,label="flow"), PyRunner(command='checkForce()', realPeriod=1, label="fCheck"), #DeformControl(label="DefControl") ] def checkForce(): if O.iter < 300: return if unbalancedForce() > 1: return global upper_punch upper_punch=O.bodies.append(geom.facetCylinder((0,0,((-Cyl_height/2)+0.0001)+utils.aabbDim()[2]),Tab_rad-.1,0,segmentsNumber=50,wallMask=1)) for i in upper_punch: body= O.bodies[i] body.state.vel = (0,0,-0.02) global lower_punch lower_punch= O.bodies.append(geom.facetCylinder((0,0,(-Cyl_height/2)-0.0001),Tab_rad-.1,0,segmentsNumber=50,wallMask=1)) for n in lower_punch: body= O.bodies[n] body.state.vel = (0,0,0.02) O.engines = O.engines + [PyRunner(command='storeData()', iterPeriod=25000)]+ [PyRunner(command='saveData()', iterPeriod=10)] fCheck.command = 'unloadPlate()' def checkForce(): if O.iter < 300: return if unbalancedForce() > 1: return fCheck.command = 'unloadPlate()' def unloadPlate(): if ((force_up > Comp_force_up) and (force_lp > Comp_force_lp)): for i in upper_punch: body= O.bodies[i] body.state.vel = (0,0,0.04) for n in lower_punch: body= O.bodies[n] body.state.vel = (0,0,-0.04) fCheck.command = 'stopUnloading()' def stopUnloading(): if pos_up[2]> pos_lp[2]+utils.aabbDim()[2]+0.0002: for j in upper_punch: O.bodies.erase(j) fCheck.command = 'Savecheck()' def Savecheck(): if save==0: o.engines = o.engines+[PyRunner(command='PoreSize()', iterPeriod=10)] fCheck.dead = True # (!!!) storeData.dead=True saveData.dead=True def PoreSize(): flow.printVertices() if save==0: read_filename='PH101_'+str(tab_porosity)+'_'+str(tab_height)+'mm.xml' o.load(read_filename) utils.loadVars('lower_punch') from yade.params.lower_punch import * for b in O.bodies: if isinstance(b.shape, Sphere): #b.state.blockedDOFs = 'xyXY' r=b.shape.radius oldm=b.state.mass oldI=b.state.inertia m=oldm*3./4./r b.state.mass=m b.state.inertia[0] = 15./16./r*oldI[0] #inertia with respect to x and y axes are not used and the computation here is wrong b.state.inertia[1] = 15./16./r*oldI[1] #inertia with respect to x and y axes are not used and the computation here is wrong b.state.inertia[2] = 15./16./r*oldI[2] #only inertia with respect to z axis is usefull o.dt=1e-6 -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #701015]: Pore size
Question #701015 on Yade changed: https://answers.launchpad.net/yade/+question/701015 Status: Open => Answered Robert Caulk proposed the following answer: Hello, You need to first run a step with FlowEngine included in the O.engines list, then you can use any of the methods associated with that engine with: flow.printVertices() (assuming you have labeled it 'flow') Please note that what you have posted requires us to install PIL, scipy, pandas etc all just to test a very basic functionality of Yade. MWE means you narrow it down to the issue - 98% of what you posted has nothing to do with the issue at hand. -Robert -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Jan Stránský posted a new comment: Generating pores "home-made" Cheers Jan ### import scipy.spatial # https://www2.mps.mpg.de/homes/daly/CSDS/t4h/tetra.htm # https://math.stackexchange.com/questions/2820212/circumradius-of-a-tetrahedron # filter out "degenerate" tetrahedrons def delaunay2poreTetras(delaunay,limit=0.1): vertices = delaunay.points tetras = delaunay.simplices def quality(tetra): vs = v0,v1,v2,v3 = [Vector3(vertices[i]) for i in tetra] d1 = v1 - v0 d2 = v2 - v0 d3 = v3 - v0 v = d1.dot(d2.cross(d3)) / 6 v = abs(v) # volume a = d1.norm() b = d2.norm() c = d3.norm() A = (v2-v3).norm() B = (v1-v3).norm() C = (v1-v2).norm() aa,bb,cc = a*A, b*B, c*C den = (aa+bb+cc)*(aa+bb-cc)*(aa-bb+cc)*(-aa+bb+cc) den = abs(den) r = sqrt(den)/(24*v) # radius of circum sphere q = (9*sqrt(3)/8*v)**(1/3.)/r # quality in range [0,1] return q return [t for t in tetras if quality(t) > limit] # some home-made inefficient (but working :-) iterative approach def tetra2pore(tetra): bodies = [O.bodies[int(i)] for i in tetra] vertices = [b.state.pos for b in bodies] radii = [b.shape.radius for b in bodies] center = 0.25*sum(vertices,Vector3.Zero) # initial guess, center of mass of tetrahedron for i in range(100): # TODO stop condition ds = d1,d2,d3,d4 = [(center-v).norm()-r for v,r in zip(vertices,radii)] # distances from "touching" dMin,dMax = min(ds),max(ds) iMin,iMax = ds.index(dMin), ds.index(dMax) vMin,vMax = vertices[iMin],vertices[iMax] dirMin = (center - vMin).normalized() dirMax = (center - vMax).normalized() # based on min and max distance "push" the center a bit dd = (dMax - dMin) * 0.1 center += dirMin * dd - dirMax * dd radius = (center - vertices[0]).norm() - radii[0] return center,radius # testing packing, colored red O.bodies.append(( sphere((1.0,2.0,3.0),1.0,color=(1,0,0),mask=0b001), sphere((4.0,2.0,3.0),1.6,color=(1,0,0),mask=0b001), sphere((2.5,4.0,3.0),1.2,color=(1,0,0),mask=0b001), sphere((2.6,3.0,5.0),1.1,color=(1,0,0),mask=0b001), sphere((5.0,4.0,5.0),1.4,color=(1,0,0),mask=0b001), sphere((5.0,5.0,2.5),1.3,color=(1,0,0),mask=0b001), sphere((6.5,3.0,3.0),1.2,color=(1,0,0),mask=0b001), sphere((7.4,4.8,4.0),1.2,color=(1,0,0),mask=0b001), )) centers = [b.state.pos for b in O.bodies] delaunay = scipy.spatial.Delaunay(centers) # tetrahedralization tetras = delaunay2poreTetras(delaunay) # only "good" tetrahedrons pores = [tetra2pore(t) for t in tetras] # pores out of tetrahedrons # pores, colored cyan for c,r in pores: O.bodies.append(sphere(c,r,color=(0,1,1),mask=0b010)) # tetrahedrons as facets, for visualization for ii in tetras: vs = [delaunay.points[i] for i in ii] v1,v2,v3,v4 = [Vector3(list(v)) for v in vs] O.bodies.append(( facet((v1,v2,v3),mask=0b100), facet((v1,v2,v4),mask=0b100), facet((v1,v3,v4),mask=0b100), facet((v2,v3,v4),mask=0b100), )) # improve sphere display quality yade.qt.Gl1_Sphere.quality = 2 ### -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #701015]: Pore size
New question #701015 on Yade: https://answers.launchpad.net/yade/+question/701015 Hi, I am working on a similar problem as explained in the question [1]. I am trying implement the solution suggested by Robert in #7 by using print all the vertices [2]. I have compacted spherical particles into a cylinder shape, and want estimates/measure pore size in the compact. I was running the suggestion by print all vertices.. When I am using this I am getting following error message: "ArgumentError: Python argument types in FlowEngineT.printVertices() did not match C++ signature: printVertices(yade::TemplateFlowEngine_FlowEngineT >, yade::CGT::FlowBoundingSphereLinSolv >, yade::CGT::FlowBoundingSphere > > > > {lvalue}) " My question how should implement this code to extract the vertices and type of the void/pore space? What should I use as an input? Best regards, Mithu [1] https://answers.launchpad.net/yade/+question/700963 [2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.printVertices MWE: # -*- coding: utf-8 -*- """ Created on Thu Jul 15 16:29:55 2021 @author: njb18198 """ #!/usr/bin/env python #encoding: ascii # Testing of the Deformation Enginge with Luding Contact Law # Modified Oedometric Test # The reference paper [Haustein2017] from __future__ import print_function from yade import utils, plot, timing from yade import pack import pandas as pd import numpy as np from PIL import Image from yade import pack, export from scipy.interpolate import interp1d from csv import writer import os from scipy.integrate import odeint import matplotlib.pyplot as plt import csv from matplotlib.pyplot import figure from pylab import * from scipy.optimize import curve_fit readParamsFromTable(comp_press=0.54e8,h_tab=2.05,m_tab=0.1974, r_tab=5.02,tab_porosity=20,tab_height=1,save=0) from yade.params.table import * o = Omega() save=save # Physical parameters fr = 0.41 rho = 1561 Diameter = 7.9e-5 D=Diameter r1 = Diameter/2 #r2 = Diameter/2 k1 = 1 kp = 14 kc = k1 * 0.1 ks = k1 * 0.1 DeltaPMax = Diameter/3.0 Chi1 = 0.34 if save==0: g=-9.81 elif save==1: g=0 o.dt = 1.0e-8 particleMass = (4.0/3.0)*math.pi*r1*r1*r1*rho Tab_rad=0.001 r_tab=r_tab*1e-3 #real size h_tab=h_tab*1e-3 m_tab=m_tab*1e-3 v_tab=math.pi*(r_tab**2)*h_tab v_1mm=math.pi*(Tab_rad**2)*(0.4e-3) #m_tot=4e-06 m_tot=(v_1mm/v_tab)*m_tab no_p=m_tot/particleMass #no_p=8000 Vi1 = math.sqrt(k1/particleMass)*DeltaPMax*Chi1 PhiF1=0.999 #PhiF1 = DeltaPMax*(kp-k1)*(r1+r2)/(kp*2*r1*r2) Cyl_height=0.005 cross_area=math.pi*(Tab_rad**2) Comp_press_up= comp_press Comp_force_up=Comp_press_up*cross_area Comp_press_lp= comp_press Comp_force_lp=Comp_press_lp*cross_area compression_data_save=[] sc_por_15=2 #sc_por_2=2 #sc_por_1=1 data_to_save=[comp_press/1e6,round(no_p),rho] compression_data_save.append(data_to_save) # Add material mat1 = O.materials.append(LudingMat(frictionAngle=fr, density=rho, k1=k1, kp=kp, ks=ks, kc=kc, PhiF=PhiF1, G0 = 0.0)) # Spheres for compression and walls sp=pack.SpherePack() sp.makeCloud((-7.5*Diameter,-7.5*Diameter,-30*Diameter),(7.5*Diameter,7.5*Diameter,5.0*Diameter), rMean=Diameter/2.0,rRelFuzz=0.18,num=round(no_p)) sp.toSimulation(material=mat1) walls=O.bodies.append(yade.geom.facetCylinder((0,0,0),radius=Tab_rad,height=Cyl_height,segmentsNumber=20,wallMask=6,material=mat1)) vtkRecorder = VTKRecorder(fileName='vtkRecorder_'+str(tab_porosity),recorders=['all']) tab_porosity=tab_porosity tab_height=tab_height ##Single particle swelling model def model(r,t,Q_max,rho_t,rho_w,r_0,Diff): Q=((rho_w*(r**3))/(rho_t*(r_0**3)))-(rho_w/rho_t)+1; drdt =((Diff*rho_t)/(r*rho_w))*((Q_max-Q)/Q); return drdt P=[1.45,rho,1000,396.39e-12] # Add engines o.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.05), Bo1_Wall_Aabb(), Bo1_Facet_Aabb() ]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.05), Ig2_Facet_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()], [Ip2_LudingMat_LudingMat_LudingPhys()], [Law2_ScGeom_LudingPhys_Basic()] ), NewtonIntegrator(damping=0.1, gravity=[0, 0, g]), PyRunner(command='checkForce()', realPeriod=1, label="fCheck"), #DeformControl(label="DefControl") ] def checkForce(): if O.iter < 300: return if unbalancedForce() > 1: return global upper_punch upper_punch=O.bodies.append(geom.facetCylinder((0,0,((-Cyl_height/2)+0.0001)+utils.aabbDim()[2]),Tab_rad-.1,0,segmentsNumber=50,wallMask=1)) for i in upper_punch: body= O.bodies[i] body.state.vel = (0,0,-0.02) global lower_punch lower_punch= O.bodies.append(geom.facetCylinder((0,0,(-Cyl_height/2)-0.0001),Tab_rad-.1,0,segmentsNumber=50,wallMask=1)) for n in lower_punch: body= O.bodies[n] body.state.vel = (0,0,0.02) O.engines = O.engines +
Re: [Yade-users] [Question #701012]: DFN and Thermal engine
Question #701012 on Yade changed: https://answers.launchpad.net/yade/+question/701012 ahmad mostafa posted a new comment: Thank you for responding and Sorry for the unscientific description " run temperature ", I should re-read your paper to remember what have you done . However currently I am developing Mass transport engine and I am following the steps you followed in the thermal engine. I exactly need a diffusion single phase flow in the matrix which i have already done and validated it and a advection- diffusion multi-phase flow in the cleat system. As a first step I am trying to combine the Mass transport engine with the DFN engine. You already answered my question , and concerning your second question I need to run as a first step single phase advection flow in fractures with single phase diffusive flow in the matrix then develop it to advection diffusion two phase flow in the fractures. Can I find a python script that combines the DFN and the thermal engine ? -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Robert Caulk posted a new comment: Hello, >>I am working on similar problem, I thought it would be better to continue in this question instead of opening a new. It is better to open a new thread. Especially considering this one has been "solved" already. So please open a new one, and in doing so please attach a full MWE (See [1]). Thank you for helping keep this knowledge base organized and sustainable, and thanks for giving us the necessary information we need to help you. Cheers, Robert [1]https://www.yade-dem.org/wiki/Howtoask -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Mithushan Soundaranathan posted a new comment: Hi Robert and Jan, I am working on similar problem, I thought it would be better to continue in this question instead of opening a new. I am trying implement the solution suggested by Robert in #7 by using print all the vertices [4]. I have compacted spherical particles into a cylinder shape, and want estimates/measure pore size in the compact. I was running the suggestion by print all vertices. By including following MWE after my existing code: FlowEngine(dead=1,label="flow") FlowEngine.printVertices() I am getting following error message: "ArgumentError: Python argument types in FlowEngineT.printVertices() did not match C++ signature: printVertices(yade::TemplateFlowEngine_FlowEngineT >, yade::CGT::FlowBoundingSphereLinSolv >, yade::CGT::FlowBoundingSphere > > > > {lvalue}) " My question how should implement this code to extract the vertices and type of the void/pore space? [4]https://yade- dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.printVertices -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #701012]: DFN and Thermal engine
Question #701012 on Yade changed: https://answers.launchpad.net/yade/+question/701012 Status: Open => Needs information Robert Caulk requested more information: Hello, >> Can we combine between thermal engine and DFNengine, Yes. >> If i want to include a fracture in a sample and run temperature inside the whole sample excluding the fracture i inserted What does "run temperature" mean? Why don't you want heat advection in the fracture? Cheers, Robert -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #701012]: DFN and Thermal engine
New question #701012 on Yade: https://answers.launchpad.net/yade/+question/701012 Hello, Can we combine between thermal engine and DFNengine, example : If i want to include a fracture in a sample and run temperature inside the whole sample excluding the fracture i inserted (in the fracture i want to run the single phase flow which is already implemented " trickpermeability " ) , Is that possible ? cheers -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700980]: How to change the strainRate value of TriaxialCompressionEngine during the simulation period?
Question #700980 on Yade changed: https://answers.launchpad.net/yade/+question/700980 Jérôme Duriez proposed the following answer: Please do not repeat yourself in two different questions (here and https://answers.launchpad.net/yade/+question/700957) -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700957]: How to simulate the cyclic loading during the biaxial test?
Question #700957 on Yade changed: https://answers.launchpad.net/yade/+question/700957 Status: Open => Answered Jérôme Duriez proposed the following answer: Please do not repeat yourself in two different questions (here and https://answers.launchpad.net/yade/+question/700980) -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700957]: How to simulate the cyclic loading during the biaxial test?
Question #700957 on Yade changed: https://answers.launchpad.net/yade/+question/700957 Status: Answered => Open Xifan Li is still having a problem: Thank you Jérôme, I have changed the engine I use from TriaxialCompressionEngine to TriaxialStressController, My code is below. This code can run normally, but it still cannot make the cyclic loading realizable. [1] So I would like to know how to change the parameters in the TriaxialStressController engine while the simulation is running? (Like change the triax.goal1 and tiax.goal2 and the stressMask? ### from yade import pack # The following 5 lines will be used later for batch execution nRead=readParamsFromTable( num_spheres=1000,# number of spheres compFricDegree = 30, # contact friction during the confining phase key='_triax_base_', # put you simulation's name here unknownOk=True ) from yade.params import table num_spheres=table.num_spheres# number of spheres key=table.key targetPorosity = 0.43 #the porosity we want for the packing compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) finalFricDegree = 30 # contact friction during the deviatoric loading rate=-0.02 # loading rate (strain rate) damp=0.2 # damping coefficient stabilityThreshold=0.01 # we test unbalancedForce against this value in different loops (see below) young=5e6 # contact stiffness mn,mx=Vector3(0,0,0),Vector3(10,10,.1) # corners of the initial packing ## create materials for spheres and plates O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls')) ## create walls around the packing walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) ## use a SpherePack object to generate a random loose particles packing sp=pack.SpherePack() sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=0,num=2000) sp.toSimulation(material='spheres') triax=TriaxialStressController( maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth) finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth) thickness = 0, internalCompaction=False, stressMask = 1, goal1=-2e5, goal2=rate, ) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100, file='WallStresses.txt'), NewtonIntegrator(damping=damp), PyRunner(command='triaxload()',iterPeriod=1, label='triaxload'), #PyRunner(command='triaxload()',realPeriod=2, label='triaxload') ] triax.stressMask = 1 triax.goal1=-2e5 triax.goal2=rate def triaxload(): O.triax.goal1=-3e5 if abs(O.triax.stress(triax.wall_top_id)[1])> 15: O.triax.stressMask = 1 O.triax.goal1=-3e5 O.triax.goal2=rate triaxload.command=('triaxunload') def triaxunload(): if abs(triax.stress(triax.wall_top_id)[1])< 5e4: triax.stressMask = 1 triax.goal1=-1e5 triax.goal2=rate from yade import plot O.engines=O.engines[0:5]+[PyRunner(iterPeriod=20,command='history()',label='recorder')]+O.engines[5:7] def history(): plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], s11=-triax.stress(triax.wall_right_id)[0], s22=-triax.stress(triax.wall_top_id)[1], i=O.iter) plot.plots={'e11': ('s11',),'e22': ('s22',)} O.saveTmp() plot.plot() -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700980]: How to change the strainRate value of TriaxialCompressionEngine during the simulation period?
Question #700980 on Yade changed: https://answers.launchpad.net/yade/+question/700980 Xifan Li posted a new comment: Thank you Robert, I have changed the engine I use from TriaxialCompressionEngine to TriaxialStressController, My code is below. This code can run normally, but it still cannot make the cyclic loading realizable. [1] So I would like to know how to change the parameters in the TriaxialStressController engine while the simulation is running? (Like change the triax.goal1 and tiax.goal2 and the stressMask? ### from yade import pack # The following 5 lines will be used later for batch execution nRead=readParamsFromTable( num_spheres=1000,# number of spheres compFricDegree = 30, # contact friction during the confining phase key='_triax_base_', # put you simulation's name here unknownOk=True ) from yade.params import table num_spheres=table.num_spheres# number of spheres key=table.key targetPorosity = 0.43 #the porosity we want for the packing compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) finalFricDegree = 30 # contact friction during the deviatoric loading rate=-0.02 # loading rate (strain rate) damp=0.2 # damping coefficient stabilityThreshold=0.01 # we test unbalancedForce against this value in different loops (see below) young=5e6 # contact stiffness mn,mx=Vector3(0,0,0),Vector3(10,10,.1) # corners of the initial packing ## create materials for spheres and plates O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls')) ## create walls around the packing walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) ## use a SpherePack object to generate a random loose particles packing sp=pack.SpherePack() sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=0,num=2000) sp.toSimulation(material='spheres') triax=TriaxialStressController( maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth) finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth) thickness = 0, internalCompaction=False, stressMask = 1, goal1=-2e5, goal2=rate, ) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100, file='WallStresses.txt'), NewtonIntegrator(damping=damp), PyRunner(command='triaxload()',iterPeriod=1, label='triaxload'), #PyRunner(command='triaxload()',realPeriod=2, label='triaxload') ] triax.stressMask = 1 triax.goal1=-2e5 triax.goal2=rate def triaxload(): O.triax.goal1=-3e5 if abs(O.triax.stress(triax.wall_top_id)[1])> 15: O.triax.stressMask = 1 O.triax.goal1=-3e5 O.triax.goal2=rate triaxload.command=('triaxunload') def triaxunload(): if abs(triax.stress(triax.wall_top_id)[1])< 5e4: triax.stressMask = 1 triax.goal1=-1e5 triax.goal2=rate from yade import plot O.engines=O.engines[0:5]+[PyRunner(iterPeriod=20,command='history()',label='recorder')]+O.engines[5:7] def history(): plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], s11=-triax.stress(triax.wall_right_id)[0], s22=-triax.stress(triax.wall_top_id)[1], i=O.iter) plot.plots={'e11': ('s11',),'e22': ('s22',)} O.saveTmp() plot.plot() -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700953]: Oedometer test based on PSD
Question #700953 on Yade changed: https://answers.launchpad.net/yade/+question/700953 Status: Needs information => Open Soheil Safari gave more information on the question: Dear Robert; You are right. Sorry, I got distracted. It automatically plots the strain in a time-series. But I can not see any volume changes and particles structure changes in GUI. For example, in [2] there is a moving plane that pushes the sample down, changing the volume and structure is so clear. I am looking for adding something like this but without gravity deposition in the previous code [1]. [2] https://gitlab.com/yade- dev/trunk/blob/master/doc/sphinx/tutorial/03-oedometric-test.py -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700980]: How to change the strainRate value of TriaxialCompressionEngine during the simulation period?
Question #700980 on Yade changed: https://answers.launchpad.net/yade/+question/700980 Status: Open => Answered Robert Caulk proposed the following answer: Hello, I would like to help you, but will you please separate your questions so that we can answer them individually? One question per thread, thank you so much for taking the time to read [2] to understand how we are working to make this knowledge base sustainable and reusable for future users. As we point out in [1]: "Warning This engine is deprecated, please switch to TriaxialStressController if you expect long term support." So I would suggest you switch to TriaxialStressController. Cheers, Robert [1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.TriaxialCompressionEngine [2]https://www.yade-dem.org/wiki/Howtoask -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700953]: Oedometer test based on PSD
Question #700953 on Yade changed: https://answers.launchpad.net/yade/+question/700953 Status: Open => Needs information Robert Caulk requested more information: >>I am afraid to tell you that by just looking in GUI. I do not know how to check the volume in a time-series. Ok. The script you reference [1] automatically plots the strain in a time-series...so why is that not sufficient? Why do you believe a changing strain != volume change? [1]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/FluidCouplingPFV/oedometer.py -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Jan Stránský posted a new comment: > But I am not good enough in Python, also I have a short time for this task. time to improve :-) short time is not the best conditions, thought.. > There is a useful image analysis tool (PoreSpy) which is based on python. It > has a predefined function for obtaining the pore size distribution. > Can I export Yade images and use this tool? In which formats? Yes, you it is possible to do it like this, but DO NOT do it like this, it is too screwed. You have data and you can directly get what you want, data -> result. Do not go direction data -> image (already some loss) -> image analysis (uncertain results, further loss, ...) -> result. I will try to give some MWE soon Cheers Jan -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Soheil Safari confirmed that the question is solved: Thanks Robert Caulk, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Status: Answered => Solved Soheil Safari confirmed that the question is solved: Dear Robert; Thank you very much for your valuable information. I am sorry for that, It is just because I am fresh in yade. Yes, Jan read the article which is very valuable for me. I am really grateful for your kind help. Unfortunately, there is no specific definition for “pore”. I mentioned that article because they used the yade for their simulation. I wanted to know if anyone knows about any predefined function for this purpose or not. Because I could not find any through the document and website. I will ask for this function in FlowEngine on gitlab. Many thanks for your useful recommendations. Cheers, Soheil -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700953]: Oedometer test based on PSD
Question #700953 on Yade changed: https://answers.launchpad.net/yade/+question/700953 Status: Needs information => Open Soheil Safari gave more information on the question: Dear Robert; Thank you very much for your valuable information. I am sorry for my vague questions. I am afraid to tell you that by just looking in GUI. I do not know how to check the volume in a time-series. I just executed the code [1] without any changes. Yes, I want to load the specimen vertically. Unfortunately, I could not see any changes in the volume after a long time watching the GUI by running this code. I want to decrease the porosity by compaction as much as possible. Thank you once again for your kind consideration. Cheers, Soheil [1] https://gitlab.com/yade- dev/trunk/-/blob/master/examples/FluidCouplingPFV/oedometer.py -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700953]: Oedometer test based on PSD
Question #700953 on Yade changed: https://answers.launchpad.net/yade/+question/700953 Status: Open => Needs information Robert Caulk requested more information: Hello, We are happy to help you, but we cannot do so if you do not take a moment to understand how to ask a question. Please read [1] and then reformulate your question with the necessary information. <-- very important. >>Unfortunately, when I executed the code [1], I could not see any changes in >>the volume of packing. What does "see" mean? Literally looking with your eyes in the GUI? Or did you use some yade command for checking volume in a tim-series? I suspect the former. Again, we need you to communicate clearly and effectively. >>Would you please tell me how I can import the vertical load in this code? What does "import vertical load" mean? You want to load the specimen vertically? The code already has a vertical loading, why is that present loading not sufficient? It would help us to understand what you are after if you told us the commands you have already tried and failed using. --> Again, please read [1] <-- [1]https://www.yade-dem.org/wiki/Howtoask -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Status: Open => Answered Robert Caulk proposed the following answer: Hello, We would love to help you - but we really need you to make a bigger effort on your end. So far, this question is unanswerable because it all depends on your definition of a "pore" in a sphere packing. You have mentioned "pore radii" but you have not given a direct definition of a pore or the geometrical radii associated to that in a sphere packing. Maybe it is clear in your mind, but you have yet to provide this definition, 6 posts into the thread. Notice how Jan asked you directly, but finally gave up and simply did your homework for you. I will assume Jan has found the quantity that you search (his definition seems reasonable to me): the inscribed sphere radius between 4 vertices of a Delaunay triangulation. TwoPhaseFlowEngine allows you to check that value [5]. However, this is not implemented in FlowEngine (i.e. oedometer.py). If you need this function in FlowEngine, you can make a request for it on gitlab [6]. FlowEngine does, however, give you the ability to print all the vertices [4], which you can post-process (using python) in the same way as [5] to get the inscribed sphere radius distribution. >>There is a useful image analysis tool (PoreSpy) which is based on python I am unfamiliar with PoreSpy, but someone else in this forum was trying to do something similar by converting a Yade simulation to pixelated image so he could do pore geometry interpretation [1]. Cheers, Robert [1]https://answers.launchpad.net/yade/+question/695874 [4]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.printVertices [5]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.TwoPhaseFlowEngine.getCellInSphereRadius [6]https://gitlab.com/yade-dev/trunk/-/issues?sort=created_date=opened -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700963]: Pore size distribution
Question #700963 on Yade changed: https://answers.launchpad.net/yade/+question/700963 Status: Answered => Open Soheil Safari is still having a problem: Dear Jan; Thank you very much for your valuable information. I will work on it. But I am not good enough in Python, also I have a short time for this task. There is a useful image analysis tool (PoreSpy) which is based on python. It has a predefined function for obtaining the pore size distribution. Can I export Yade images and use this tool? In which formats? I would really appreciate it if you could provide me some information regarding this matter. Thank you so much in advance. cheers, Soheil -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700980]: How to change the strainRate value of TriaxialCompressionEngine during the simulation period?
Question #700980 on Yade changed: https://answers.launchpad.net/yade/+question/700980 Bret Ritchie posted a new comment: Most studies on strain rate effects on shearing behavior of saturated clay have employed quasi-static triaxial compression tests under strain-controlled conditions, potentially with either pore water pressure measurements, or impulse loading compression tests which were under stress-controlled conditions. https://www.vwcredit.me/ -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp