Re: [Yade-users] [Question #683710]: Initial position Particle
Question #683710 on Yade changed: https://answers.launchpad.net/yade/+question/683710 Status: Answered => Solved Jinny Kim 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 #683706]: contact law between bodies with different materials
Question #683706 on Yade changed: https://answers.launchpad.net/yade/+question/683706 Status: Open => Solved Leonard confirmed that the question is solved: Thanks Jan, I will look at how to use MatchMaker to achieve this. cheers Leonard -- 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 #683706]: contact law between bodies with different materials
Question #683706 on Yade changed: https://answers.launchpad.net/yade/+question/683706 Leonard confirmed that the question is solved: Thanks Jan Stránský, 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 #683706]: contact law between bodies with different materials
Question #683706 on Yade changed: https://answers.launchpad.net/yade/+question/683706 Jan Stránský posted a new comment: I don't think there is an automatic way.. maybe using just CohFrictMat/CohFrictPhys and using MatchMaker for sand- sand contacts to behave like FrictPhys? 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
[Yade-users] [Question #683710]: Initial position Particle
New question #683710 on Yade: https://answers.launchpad.net/yade/+question/683710 Dear All, I have a questions if I can create the packing of particles with the given position data. I actually saved the position of particles at the static state from my simulation and I want to set this position as an initial position of particles in my new simulation. Is there way if I can create the sphere packing with the given position data? Thank you for your help in advance Jinny Kim -- 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 #683488]: saving data
Question #683488 on Yade changed: https://answers.launchpad.net/yade/+question/683488 Status: Answered => Solved Jinny Kim confirmed that the question is solved: Dear Jan Stránský, Thank you so much for your comments. That solved my problem!!! I finally success to save all data and visualize them in Paraview! Thank you! -- 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 #683708]: Elastic potential energy of polyhedra
Question #683708 on Yade changed: https://answers.launchpad.net/yade/+question/683708 Status: Open => Answered Jan Stránský proposed the following answer: Hi Vasileios, good point. The equations [2,3,4] are wrong. In general, elastic energy is int F(u) du in case F=k*u, int F du = int k*u du = 0.5*k*u^2 = 0.5*F^2/k But it is not the case of polyhedrons interaction, where the function F(u) is actually unknown. But probably some estimation could be done, e.g. F=k*V and assume V being proportional to u^3. Or the approaches mentioned by you (today is too late for me to investigate them :-) > Btw, looking at the calculation of the equivalentPenetrationDepth [5,6], is the exact "area" calculated or is an estimation made? estimation [7] cheers Jan [7] https://gitlab.com/yade- dev/trunk/blob/master/pkg/dem/Polyhedra_Ig2.cpp#L116 -- 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 #683706]: contact law between bodies with different materials
Question #683706 on Yade changed: https://answers.launchpad.net/yade/+question/683706 Status: Open => Answered Jan Stránský proposed the following answer: Hi, > what kind of contact law yade uses for dealing with sand-cement interaction? Ip2_FrictMat_FrictMat_FrictPhys Because CohFrictMat is derived from FrictMat and if CohFrictMat-FrictMat Ip2 is not found, Yade tries it with base classes (FrictMat-FrictMat in this case). You can try on a simple 3 sphere example: ### sand = FrictMat(label='sand') cement = CohFrictMat(label='cement') O.materials.append(sand) O.materials.append(cement) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()]), InteractionLoop( [ Ig2_Sphere_Sphere_ScGeom(), Ig2_Sphere_Sphere_ScGeom6D() ], [ Ip2_FrictMat_FrictMat_FrictPhys(), Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow = True,setCohesionOnNewContacts = True) ], [ Law2_ScGeom_FrictPhys_CundallStrack(), Law2_ScGeom6D_CohFrictPhys_CohesionMoment() ], ), NewtonIntegrator(damping=0.4), ] s1 = sphere((0.0,0,0),1,material=sand) s2 = sphere((0.1,0,0),1,material=sand) c1 = sphere((0.2,0,0),1,material=cement) c2 = sphere((0.3,0,0),1,material=cement) O.bodies.append((s1,s2,c1,c2)) O.step() for intr in O.interactions: i1,i2 = intr.id1,intr.id2 b1,b2 = [O.bodies[i] for i in (i1,i2)] m1,m2 = [b.mat.label for b in (b1,b2)] print(m1,m2,intr.phys) ### 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
[Yade-users] [Question #683708]: Elastic potential energy of polyhedra
New question #683708 on Yade: https://answers.launchpad.net/yade/+question/683708 Hi, Following the discussion in [1], the normal stiffness "kn" in the Law2_PolyhedraGeom_PolyhedraPhys_Volumetric can have different units depending on the value of "volumePower"; e.g. for the default value volumePower=1, kn is in [N/m^3]. When calculating the elastic potential energy, we currently use [2,3,4]: scene->energy->add(0.5*(normalForce.squaredNorm()/phys->kn+shearForce.squaredNorm()/phys->ks), "elastPotential",elastPotentialIx,true); where "kn" should be in [N/m] for the units to give energy values [Joules=N*m]. I think the energy calculation in the normal direction should change either as 0.5*(normalForce.squaredNorm()/(phys->kn*phys->area), where area the projection of the overlapping volume perpendicularly to the normal direction (this would work only if volumePower=1), or more safely, use the equivalentPenetrationDepth to begin with (which works regardless of the units of kn). Btw, looking at the calculation of the equivalentPenetrationDepth [5,6], is the exact "area" calculated or is an estimation made? Cheers, Vasileios [1] https://answers.launchpad.net/yade/+question/681383 [2] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Polyhedra.cpp#L517 [3] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Polyhedra.cpp#L584 [4] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Polyhedra.cpp#L589 [5] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Polyhedra_Ig2.cpp#L121 [6] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Polyhedra_Ig2.cpp#L219 -- 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 #683706]: contact law between bodies with different materials
New question #683706 on Yade: https://answers.launchpad.net/yade/+question/683706 Hi, I am confused about the contact between two bodies with different materials. for example, My assembly consists of two kinds of material: 1. sand which is FrictMat; 2. cement which is CohFrichMat: sand = FrictMat(young=30e9,poisson=0.3,frictionAngle=radians(30),density=2650.0,label='sand') cement = CohFrictMat(young=30e9,poisson=0.3,frictionAngle=radians(30),density=2650.0,isCohesive=True,normalCohesion=1e8, shearCohesion=1e8,label='cement') O.materials.append(sand) O.materials.append(cement) In the simulation, there will be sand-sand contact, sand -cement contact and sand-cement contact. what I am confused is how to define the engines, I guess it should be: # O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Sphere_Sphere_ScGeom6D()], [Ip2_FrictMat_FrictMat_FrictPhys(), Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow = True,setCohesionOnNewContacts = True)], [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment()] ), NewtonIntegrator(damping=0.4), ] # I wonder if it covers all the interactions? that is, I guess (1)for sand-sand contact, "Ip2_FrictMat_FrictMat_FrictPhys()" and "Law2_ScGeom_FrictPhys_CundallStrack()" cover it; (2) for cement-cement contact, " Ip2_CohFrictMat_CohFrictMat_CohFrictPhys" and "Law2_ScGeom6D_CohFrictPhys_CohesionMoment()" cover it; (3) then what is for sand-cement contact? It seems that there is not something like "Ip2_FrictMat_CohFrictMat_somePhys()" . So if the engines have already covered all the interactions, what kind of contact law yade uses for dealing with sand-cement interaction? Many thanks, Leonard -- 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 #683687]: Unable to save/reload FlowEngine scene
Question #683687 on Yade changed: https://answers.launchpad.net/yade/+question/683687 Status: Answered => Open Robert Caulk is still having a problem: Hmmm, your example doesn't include a triangulation. Maybe it is a triangulation serialization problem since CGAL is involved? If we consider the least special case that includes a triangulation it still doesnt work: from __future__ import print_function from builtins import range from yade import pack num_spheres=1000# number of spheres young=1e6 compFricDegree = 3 # initial contact friction during the confining phase finalFricDegree = 30 # contact friction during the deviatoric loading mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing 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')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) import os.path savedState = os.path.exists('oedometer_state.yade.gz') if not savedState: sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1) #"seed" make the "random" generation always the same sp.toSimulation(material='spheres') 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()],label="iloop" ), FlowEngine(dead=1,label="flow"), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), NewtonIntegrator(damping=0.2,label='newton') ] if not savedState: #B. Activate flow engine and set boundary conditions in order to get permeability flow.dead=0 flow.defTolerance=-1 flow.meshUpdateInterval=-1 flow.useSolver=3 flow.permeabilityFactor=1 flow.viscosity=10 flow.bndCondIsPressure=[0,0,1,1,0,0] flow.bndCondValue=[0,0,1,0,0,0] flow.boundaryUseMaxMin=[0,0,0,0,0,0] O.dt=0.1e-3 O.dynDt=False newton.damping=0 O.run(1000,1) print('saving oedometer state with pore pressure at',flow.getPorePressure((0.5,0.5,0.5))) O.save('oedometer_state.yade.gz') else: O.load('oedometer_state.yade.gz') print('loaded oedometer state with pore pressure at',flow.getPorePressure((0.5,0.5,0.5))) O.run(100,1) from yade import plot def history(): plot.addData(t=O.time,p=flow.getPorePressure((0.5,0.5,0.5))) O.engines=O.engines+[PyRunner(iterPeriod=200,command='history()',label='recorder')] from yade import 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 #683687]: Unable to save/reload FlowEngine scene
Question #683687 on Yade changed: https://answers.launchpad.net/yade/+question/683687 Status: Open => Answered Chareyre proposed the following answer: Hi Robert, it seems you are somehow in a special case since the following works: :~$ yade Welcome to Yade 1.20.0 ... Yade [1]: O.engines=O.engines+[FlowEngine(label="flow")] Yade [2]: flow.useSolver=3 Yade [3]: O.save("test.yade") Yade [4]: Do you really want to exit ([y]/n)? :~$ yade Yade [1]: O.load("test.yade") Yade [2]: flow.useSolver -> [2]: 3 -- 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 #683687]: Unable to save/reload FlowEngine scene
New question #683687 on Yade: https://answers.launchpad.net/yade/+question/683687 Hey Yade community, I am unable to save and reload a FlowEngine based scene. I reproduce the error here using the save-then-reload.py [1] as an example for modifying oedometer.py [2]. ___The error is as follows:___ >> GS : j=0 p_moy=-nan dp_moy=-nan GS iterations : 0 totalForce = 0 0 0 >> This error suggests that the scene is improperly loaded, considering these GS errors are associated with flow.useSolver=0 [3] (meanwhile the script defines flow.useSolver=3). Further, I've tried re-defining all the flow properties, such as flow.useSolver=3, again after O.load() and before O.run(), but the error does not change. My first thought is that FlowBoundingSphere/Linsolv is not serializable, and therefore we lose all information from the solver class during save/reload. Any ideas? The MWE is as follows: from __future__ import print_function from builtins import range from yade import pack num_spheres=1000# number of spheres young=1e6 compFricDegree = 3 # initial contact friction during the confining phase finalFricDegree = 30 # contact friction during the deviatoric loading mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing 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')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) import os.path savedState = os.path.exists('oedometer_state.yade.gz') if not savedState: sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1) #"seed" make the "random" generation always the same sp.toSimulation(material='spheres') 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()],label="iloop" ), FlowEngine(dead=1,label="flow"), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), TriaxialStressController(maxMultiplier=1.+2e4/young, finalMaxMultiplier=1.+2e3/young, thickness = 0,stressMask = 7,max_vel = 0.005,internalCompaction=True,label='triax'), NewtonIntegrator(damping=0.2,label='newton') ] triax.goal1=triax.goal2=triax.goal3=-1 if not savedState: while 1: O.run(1000, True) unb=unbalancedForce() if unb<0.001 and abs(-1-triax.meanStress)/1<0.001: break setContactFriction(radians(finalFricDegree)) #B. Activate flow engine and set boundary conditions in order to get permeability flow.dead=0 flow.defTolerance=0.3 flow.meshUpdateInterval=200 flow.useSolver=3 flow.permeabilityFactor=1 flow.viscosity=10 flow.bndCondIsPressure=[0,0,1,1,0,0] flow.bndCondValue=[0,0,1,0,0,0] flow.boundaryUseMaxMin=[0,0,0,0,0,0] O.dt=0.1e-3 O.dynDt=False O.run(1,1) Qin = flow.getBoundaryFlux(2) Qout = flow.getBoundaryFlux(3) permeability = abs(Qin)/1.e-4 #size is one, we compute K=V/∇H print("Qin=",Qin," Qout=",Qout," permeability=",permeability) #C. now the oedometer test, drained at the top, impermeable at the bottom plate flow.bndCondIsPressure=[0,0,0,1,0,0] flow.bndCondValue=[0,0,0,0,0,0] flow.updateTriangulation=True #force remeshing to reflect new BC immediately newton.damping=0 triax.goal2=-11000 O.run(1000,1) print('saving oedometer state with pore pressure at',flow.getPorePressure((0.5,0.1,0.5))) O.save('oedometer_state.yade.gz') else: O.load('oedometer_state.yade.gz') print('loaded oedometer state with pore pressure at',flow.getPorePressure((0.5,0.1,0.5))) O.run(100,1) from yade import plot def history(): plot.addData(t=O.time,p=flow.getPorePressure((0.5,0.1,0.5)),s22=-triax.stress(3)[1]-1) O.engines=O.engines+[PyRunner(iterPeriod=200,command='history()',label='recorder')] from yade import plot plot.plots={'t':('p')} plot.plot() [1]https://gitlab.com/yade-dev/trunk/blob/master/examples/simple-scene/save-then-reload.py [2]https://gitlab.com/yade-dev/trunk/blob/master/examples/FluidCouplingPFV/oedometer.py [3]https://gitlab.com/yade-dev/trunk/blob/master/lib/triangulation/FlowBoundingSphereLinSolv.ipp#L598 -- You received this question notification because your team yade-users is an answer contact for Yade. ___
Re: [Yade-users] [Question #683488]: saving data
Question #683488 on Yade changed: https://answers.launchpad.net/yade/+question/683488 Jan Stránský proposed the following answer: Hello, > save particle's physical data such as velocity, position, angular velocity ... Is it possible? of course. The way how to save it depends on how you want to see it, what you want to do with it, how often you want to save the data, if you have some limit on file size . Some options: - using O.save(...), then you can O.load(...) the saved file and see it directly in Yade - using VTKReorder or VTKExporter to save data in .vtk format to be displayed e.g. by Paraview - saving data "manually" - you can then convert them to .vtk files - you can load data from them into Yade and see them in Yade - whataver else.. > If it is possible to save all data of particles, can I see particle motions > in 3D rendering window by using the saved data? > saving the data and showing the result in the 3D rendering window. Yes, it is possible. BUT do you have any particular reason to use "the 3D rendering window"? Consider using a different software dedicated for data visuaization, like Paraview. > what kinds of parameters that I have to save? I am thinking to save positions, velocities, angular velocities, and orientation of all particles. Is it enough to see the result in the 3D rendering window? depends on what "the result" is. position and orientation (orientation is not needed for spherical particles) is enough to see current state. E.g. for velocity field visualization you need velocity, for strain visualizations you need displacement . > Anyone knows any examples related to this work? yes, anyone using yade seriously knows examples related to this work. 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 #683488]: saving data
Question #683488 on Yade changed: https://answers.launchpad.net/yade/+question/683488 Status: Open => Answered Jérôme Duriez proposed the following answer: Hi, I am not sure I understand the question. The 3D rendering window = qt.View() = the first image you can see at https://yade-dem.org/doc/tutorial-examples.html#bouncing-sphere does not need any saved data to work. You just have to make this window appear and you will see the discrete elements making your simulation (except special cases.. First, let us know more about your problem) -- 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