Re: [Yade-users] [Question #707516]: How to obtain the stress of a particle
Question #707516 on Yade changed: https://answers.launchpad.net/yade/+question/707516 Status: Needs information => Open 孙灿 gave more information on the question: I have set up a model box to study the stress magnitude of soil particles in shield tunneling, and the lining segment is composed of a circle of particles. In my code, I added a section of code from the YADE official website to calculate the stress magnitude of particles: #'b' being a body TW=TessellationWrapper() TW. setState() TW. computeVolumes () S=bodyStressTensors() Stress=s [b. id] * 4. * pi/3. * b. shape. radius * * 3/TW. volume (b. id) At present, there seems to be no problem with the code, but I need to visualize it. What else do I need to do? in addition -- 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 #707516]: How to obtain the stress of a particle
Question #707516 on Yade changed: https://answers.launchpad.net/yade/+question/707516 Status: Answered => Open 孙灿 is still having a problem: I am trying this string of code and it has been successfully inserted into my code. Now I have a problem. I only read the stress size of the particles, but I will not visualize it. What else do I need to do? -- 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 #704138]: Can JCFpmMat set cohesion?
Question #704138 on Yade changed: https://answers.launchpad.net/yade/+question/704138 孙灿 posted a new comment: Sticky can be understood as cohesion. Cohesion refers to the mutual attraction between adjacent parts of the same material. This mutual attraction is the expression of molecular force between molecules of the same material. For example, sand has no cohesion, and there is no attraction between each particle; Clay is cohesive and attractive between particles. I just want to simulate cohesive particles mentioned in soil mechanics. -- 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 #704138]: Can JCFpmMat set cohesion?
New question #704138 on Yade: https://answers.launchpad.net/yade/+question/704138 Hello, I need to set up some sticky particles and I found that the introduction of JCFpmMat is "Possibly jointed, cohesive frictional material, for use with other JCFpm classes". Can it set the viscosity of the particles? If so, [1] can be set? [1]https://yade-dem.org/doc/yade.wrapper.html?highlight=material#yade.wrapper.JCFpmMat.cohesion -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 Status: Answered => Solved 孙灿 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: >ArgumentError: Python argument types in >None.None(Body, int) >did not match C++ signature: >None(yade::Body {lvalue}, boost::shared_ptr) Yes, that's the error, I don't have a way to solve it. -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: Sorry, I know why my published code always has indentation errors. The code is as follows (it should work this time): #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Material constants(23) Density23 = 2000 FrictionAngle23 = 27 PoissonRatio23 = 0.35 Young23 = 1e9 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT mat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) mat2 = O.materials.append(FrictMat(young = Young23, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 15, 15), (0.5, 15, 15), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,30,30), rMean=0.3, rRelFuzz=0) sp.toSimulation(material = mat1) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(0,0,1.) circleRadius=2 circleCenter = Vector3(0.05,15,6) circleRadius1=2.5 #myEngine.dead = True O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .0001: O.pause() zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) ceng = zMax-0.4 for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) if b.state.pos[2]>ceng: print(b.id,b.state.pos) #a=int(b.id) #print(type(b.id)) shuzu.append(b.id) print(type(b.id)) #selectedSpheres+=(b,) print(shuzu) li() def printInfo(): print("=") print("step",O.iter) for i,body in enumerate(O.bodies): print("body",i,"young",body.mat.young) for i,intr in enumerate(O.interactions): print("interaction",intr.id1,intr.id2,"kn",intr.phys.kn) O.step() printInfo() def li(): for body in shuzu: print(type(body)) #body.mat = mat2 O.bodies[body].material = mat2 for intr in body.intrs(): O.interactions.erase(intr.id1,intr.id2) printInfo() def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) O.saveTmp() from yade import qt qt.Controller() qt.View() >Isn't the error different? like "AttributeError: 'int' object has no attribute >'intrs'"? No, it will still report errors mentioned above. >compare your current code (levels of the for loops) with #4 Yes, I found an error (for intr in body. intrs():) with indentation error. I changed it in the code mentioned above. -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: >It says, that O.bodies[arg] expects "arg" to be int, but actually it is Body. >To solve it, put arg.id (Body.id as int) I try to output b The type of id is found to be 'int' instead of 'body'. When using the li() function, I output the type of the body in for body in shuzu: again, which is still 'int'. Why does' that O. bodies [arg] expect "arg" to be int, but actually it is Body. 'still occur. >Moreover, I have no problem with both codes you have posted.. In the previous code, I put the functions outside checkUnbalanced() (I manually input the functions). Because the error is in li(), you can't find an error by clicking Run. Now I have readjusted the code as follows: #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Material constants(23) Density23 = 2000 FrictionAngle23 = 27 PoissonRatio23 = 0.35 Young23 = 1e9 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT mat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) mat2 = O.materials.append(FrictMat(young = Young23, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 15, 15), (0.5, 15, 15), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,30,30), rMean=0.3, rRelFuzz=0) sp.toSimulation(material = mat1) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(0,0,1.) circleRadius=2 circleCenter = Vector3(0.05,15,6) circleRadius1=2.5 #myEngine.dead = True O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .0001: O.pause() zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) ceng = zMax-0.4 for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) if b.state.pos[2]>ceng: print(b.id,b.state.pos) #a=int(b.id) #print(type(b.id)) shuzu.append(b.id) print(type(b.id)) #selectedSpheres+=(b,) print(shuzu) #zMax = max(b.state.pos[2] for b in O.bodies) #zMax = max(b.state.pos[2] for b in O.bodies) #print("Z ",zMax) #(xdim,ydim,zdim)= aabbDim() #print("Height is ",zdim) li() def printInfo(): print("=") print("step",O.iter) for i,body in enumerate(O.bodies): print("body",i,"young",body.mat.young) for i,intr in enumerate(O.interactions): print("interaction",intr.id1,intr.id2,"kn",intr.phys.kn) O.step() printInfo() def li(): for body in shuzu: print(type(body)) #body.mat = mat2 O.bodies[body].material = mat2 for intr in body.intrs(): O.interactions.erase(intr.id1,intr.id2) printInfo() def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) def duqu(): for i in shuzu: b = O.bodies[i] print("voila",i,b.state.pos) def wadong1(): for b in O.bodies: d = (b.state.pos - circleCenter).norm() if d < circleRadius: O.bodies.erase(b.id) O.saveTmp() from yade import qt qt.Controller() qt.View() -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: >'Omega' object has no attribute 'bodise'? What's the meaning of this? Does "Omega" here refer to the Greek letter Ω? What I add to the list is the particle ID (shuzu. append (b.id)), and I use O. bodies [I] Material=mat2, which cannot solve this problem. The code is as follows: #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Material constants(23) Density23 = 2000 FrictionAngle23 = 27 PoissonRatio23 = 0.35 Young23 = 1e9 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT mat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) mat2 = O.materials.append(FrictMat(young = Young23, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 15, 15), (0.5, 15, 15), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,30,30), rMean=0.3, rRelFuzz=0) sp.toSimulation(material = mat1) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(0,0,1.) circleRadius=2 circleCenter = Vector3(0.05,15,6) circleRadius1=2.5 #myEngine.dead = True O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .0001: O.pause() zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) ceng = zMax-0.4 for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) if b.state.pos[2]>ceng: print(b.id,b.state.pos) shuzu.append(b.id) #selectedSpheres+=(b,) print(shuzu) #zMax = max(b.state.pos[2] for b in O.bodies) #zMax = max(b.state.pos[2] for b in O.bodies) #print("Z ",zMax) #(xdim,ydim,zdim)= aabbDim() #print("Height is ",zdim) def printInfo(): print("=") print("step",O.iter) for i,body in enumerate(O.bodies): print("body",i,"young",body.mat.young) for i,intr in enumerate(O.interactions): print("interaction",intr.id1,intr.id2,"kn",intr.phys.kn) O.step() printInfo() def li(): for i in shuzu: #i.mat = mat2 O.bodies[i].material = mat2 for intr in body.intrs(): O.interactions.erase(intr.id1,intr.id2) printInfo() def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) def duqu(): for i in shuzu: b = O.bodies[i] print("voila",i,b.state.pos) def wadong1(): for b in O.bodies: d = (b.state.pos - circleCenter).norm() if d < circleRadius: O.bodies.erase(b.id) O.saveTmp() from yade import qt qt.Controller() qt.View() The code is as follows: Error will be reported: ArgumentError: Python argument types in BodyContainer.__getitem__(BodyContainer, Body) did not match C++ signature: __getitem__(pyBodyContainer {lvalue}, int) When I directly add the particles themselves to the list (shuzu. append (b)), and use i mat=mat2, error will still be reported: ArgumentError: Python argument types in BodyContainer.__getitem__(BodyContainer, Body) did not match C++ signature: __getitem__(pyBodyContainer {lvalue}, int) The code is as follows: #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Material constants(23) Density23 = 2000 FrictionAngle23 = 27 PoissonRatio23 = 0.35 Young23 = 1e
Re: [Yade-users] [Question #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: So how can I fix this?I'm not quite sure how to fix it. 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: shuzu=[] circleRadius=2 circleCenter = Vector3(0.05,15,6) for b in O.bodies: d = (b.state.pos - circleCenter).norm() if d < circleRadius: shuzu.append(b.id) def printInfo(): print("=") print("step",O.iter) for i,body in enumerate(O.bodies): print("body",i,"young",body.mat.young) for i,intr in enumerate(O.interactions): print("interaction",intr.id1,intr.id2,"kn",intr.phys.kn) O.step() printInfo() def li(): for i in shuzu: O.bodies[i].mat = Mat2 for intr in body.intrs(): O.interactions.erase(intr.id1,intr.id2) printInfo() I have changed the relevant code, but there is still the error 'Omega' object has no attribute 'bodise'. -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: shuzu.append(? ) means I'm not quite sure what to fill in () to add the particles themselves to the list. Or I add the id of the particle to the list, body.mat = Mat2 in the position of body I need to replace it with, otherwise an error will be reported in the line body.mat = Mat2, "'int' object has no attribute 'mat'" -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: I know what you mean. But while I'm using this code, I don't know how to call the grain itself. The relevant code is as follows (not all of it): shuzu=[] circleRadius=2 circleCenter = Vector3(0.05,15,6) for b in O.bodies: d = (b.state.pos - circleCenter).norm() if d < circleRadius: shuzu.append(?) def printInfo(): print("=") print("step",O.iter) for i,body in enumerate(O.bodies): print("body",i,"young",body.mat.young) for i,intr in enumerate(O.interactions): print("interaction",intr.id1,intr.id2,"kn",intr.phys.kn) O.step() printInfo() def li(): for body in shuzu: body.mat = Mat2 for intr in body.intrs(): O.interactions.erase(intr.id1,intr.id2) printInfo() I want to add eligible particles in the list shuzu[] using a for loop, and will change their material later using li(), I don't know how to call the particles themselves directly (put in the list shuzu[]), as I wrote shuzu.append(?). Maybe it's a very simple problem, but I don't know how to fix it. -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
Question #703571 on Yade changed: https://answers.launchpad.net/yade/+question/703571 孙灿 posted a new comment: #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 15, 15), (0.1, 15, 15), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,30,30), rMean=0.1, rRelFuzz=0) sp.toSimulation(material = SphereMat1) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(0,0,1.) circleRadius=2 circleCenter = Vector3(0.05,15,6) #myEngine.dead = True O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100), PyRunner(command='li()', realPeriod=2) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True def checkUnbalanced(): if unbalancedForce() < .0001: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) for b in O.bodies: d = (b.state.pos - circleCenter).norm() if d < circleRadius: O.bodies.erase(b.id) O.saveTmp() from yade import qt qt.Controller() qt.View() I just need this hole to have a strong stiffness so that it doesn't collapse immediately. -- 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 #703571]: How to reset the stiffness of the particles at a later stage?
New question #703571 on Yade: https://answers.launchpad.net/yade/+question/703571 Imagine that I am in a two-dimensional simulation box full of particles, and their materials are set, and the Young's modulus is also set, and we all know that the size of the Young's modulus affects the size of the stiffness, so the stiffness is also set at this time. Under dead weight conditions, these particles will pile together, after reaching equilibrium, I delete a circle range of particles between these particles, and then apply gravity again, this circular hole will collapse, but all I need is that this hole will deform without collapsing, can I change the particle stiffness (Young's modulus) around this hole so that this hole deforms without collapsing. -- 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 #703553]: Can I simulate water in Yade?
Question #703553 on Yade changed: https://answers.launchpad.net/yade/+question/703553 Status: Answered => Open 孙灿 is still having a problem: I just need to set up groundwater in nature and use water to fill the gap between the particles, just like the soil, the soil particles are filled with water and groundwater. -- 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 #703553]: Can I simulate water in Yade?
Question #703553 on Yade changed: https://answers.launchpad.net/yade/+question/703553 Status: Answered => Open 孙灿 is still having a problem: Suppose I add particles in the range ((0,0,0),(2,3,4)), how do I generate water to reach a height of 2m? -- 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 #703553]: Can I simulate water in Yade?
New question #703553 on Yade: https://answers.launchpad.net/yade/+question/703553 Can I generate water in the simulation? -- 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 #703498]: Young's modulus or the effect of the wall on the test
Question #703498 on Yade changed: https://answers.launchpad.net/yade/+question/703498 孙灿 posted a new comment: Since makeCloud is not completely symmetrical, is there a way to generate particles as symmetrically as possible? If makeCloud is not symmetrical, then every simulation result will have a deviation, or even a large deviation, is this correct? -- 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 #703498]: Young's modulus or the effect of the wall on the test
Question #703498 on Yade changed: https://answers.launchpad.net/yade/+question/703498 Status: Needs information => Open 孙灿 gave more information on the question: The code is as follows: #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Material constants(23) Density23 = 2000 FrictionAngle23 = 27 PoissonRatio23 = 0.35 Young23 = 1e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Material constants(28) Density28 = 2142 FrictionAngle28 = 1 PoissonRatio28 = 0.3 Young28 = 1e8 Damp = 0.5 AvgRadius = 0.05 N_particles = 1 #Material constants(37) Density37 = 2244 FrictionAngle37 = 1 PoissonRatio37 = 0.3 Young37 = 1e9 Damp = 0.5 AvgRadius = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat37 = O.materials.append(FrictMat(young = Young37, poisson = PoissonRatio37, frictionAngle = radians(FrictionAngle37), density = Density37)) SphereMat28 = O.materials.append(FrictMat(young = Young28, poisson = PoissonRatio28, frictionAngle = radians(FrictionAngle28), density = Density28)) SphereMat23 = O.materials.append(FrictMat(young = Young23, poisson = PoissonRatio23, frictionAngle = radians(FrictionAngle23), density = Density23)) SphereMat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 30, 30), (0.3, 30, 30), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,60,46), rMean=0.08, rRelFuzz=0) sp.toSimulation(material = SphereMat37) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,46),Vector3(0.05,60,51), rMean=0.06, rRelFuzz=0) sp.toSimulation(material = SphereMat28) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,51),Vector3(0.05,60,57), rMean=0.03, rRelFuzz=0) sp.toSimulation(material = SphereMat23) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,57),Vector3(0.05,60,60), rMean=0.05, rRelFuzz=0) sp.toSimulation(material = SphereMat1) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(0,0,1.) circleRadius=3.14 circleCenter = Vector3(0.05,30,12) #myEngine.dead = True O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True def ranse(): for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) if b.state.pos[2]<=23: b.shape.color=(0,1,1.) if b.state.pos[2]>23 and b.state.pos[2]<=25.5: b.shape.color=(2.,2.,1.) if b.state.pos[2]>28.5 : b.shape.color=(1,1,0) if b.state.pos[2]>30: O.bodies.erase(b.id) def shuju(): zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) ceng = zMax-0.2 for b in O.bodies: if b.state.pos[2]>ceng: print(b.id,b.state.pos) shuzu.append(b.id) print(shuzu) def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) def duqu(): for i in shuzu: b = O.bodies[i] print("voila",i,b.state.pos) def wadong1(): for b in O.bodies: d = (b.state.pos - circleCenter).norm() if d < circleRadius: O.bodies.erase(b.id) O.saveTmp() from yade import qt qt.Controller() qt.View() I want to know if Young's modulus and walls cause asymmetry in the simulation results. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users
[Yade-users] [Question #703498]: Young's modulus or the effect of the wall on the test
New question #703498 on Yade: https://answers.launchpad.net/yade/+question/703498 Hello, I completed a left-right symmetrical simulation, adding walls to the left, right, and bottom, and changing the default Young's modulus (1e9). According to the real situation, the symmetric simulation, its result must also be symmetrical, but in my recent simulation results, it is not very good to conform to this symmetry law, the left result and the right result deviation. Does this have anything to do with me changing Young's modulus? Or is it a wall? -- 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 #703292]: How to set the weight of particles?
Question #703292 on Yade changed: https://answers.launchpad.net/yade/+question/703292 Status: Answered => Solved 孙灿 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 #703292]: How to set the weight of particles?
Question #703292 on Yade changed: https://answers.launchpad.net/yade/+question/703292 孙灿 posted a new comment: I get it. If I need to achieve uniform loads, then I have to apply a concentration force to multiple particles. So how is the magnitude of the force determined?Is it done by (1,0,0) force vector? I'm a little unsure how to set the size of a force through a force vector. -- 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 #703292]: How to set the weight of particles?
Question #703292 on Yade changed: https://answers.launchpad.net/yade/+question/703292 孙灿 posted a new comment: >what does "range of applied force" mean? force varying in time? No, I mean I only apply force in the designated area (other than gravity) and the rest of the area uses only gravity. For example, there is a 30m box, I only apply one force in the area of 0 to 15m, and all these 30m will receive the action of gravity. Also, in O.forces.setPermF(0,(1,0,0)), does 0 refer to the magnitude of the set force? (1, 0, 0) is the position of the applied force? If I'm right, then it's just applying a concentrated load, not the uniform load I need. Maybe I can use O.forces.setPermF(0,((1,0,0),(2,0,0)))? -- 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 #703428]: How to get a stress map?
New question #703428 on Yade: https://answers.launchpad.net/yade/+question/703428 Hello. Imagine a model box filled with particles and piled up under the action of gravity. Then I remove some particles from the particles and apply gravity again, which is, the stress of these particles will change, how can I get these stress sizes, is there a way to get the stress map of these particles directly? -- 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 #703292]: How to set the weight of particles?
Question #703292 on Yade changed: https://answers.launchpad.net/yade/+question/703292 孙灿 posted a new comment: Sorry, I didn't respond in time. I think both of the lines you mentioned will solve my problem. However I think the method mentioned in [5] is more suitable. [5] Can the O.forces.setPermF(0,(1,0,0)) mentioned specify the range of applied force? For example, I need to apply force within the interval of (2,3). Also, how to understand "The only way is to place PyRunner in a simulated loop.", I need to set a permanent force, set a function PerpetualPower(), and add PyRunner (command='PerpetualPower()', realPeriod=2) to the engines, is this feasible? -- 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 #703292]: How to set the weight of particles?
New question #703292 on Yade: https://answers.launchpad.net/yade/+question/703292 Now I need to apply uniform load in the simulation. I have two ideas: the first is to generate some particles and then give them weight, but this involves a material, but I can't find it; The second is to apply load directly, but I don't know how to write specific code. -- 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 #703209]: How to use different materials in one simulation?
Question #703209 on Yade changed: https://answers.launchpad.net/yade/+question/703209 Status: Needs information => Solved 孙灿 confirmed that the question is solved: Thank you, my problem solved -- 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 #703122]: Why, after adding particle properties, the simulation results are inaccurate
Question #703122 on Yade changed: https://answers.launchpad.net/yade/+question/703122 Status: Needs information => Solved 孙灿 confirmed that the question is solved: Problem solved -- 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 #703243]: Installation failed
Question #703243 on Yade changed: https://answers.launchpad.net/yade/+question/703243 Status: Answered => Solved 孙灿 confirmed that the question is solved: Thanks Janek Kozicki, 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
[Yade-users] [Question #703243]: Installation failed
New question #703243 on Yade: https://answers.launchpad.net/yade/+question/703243 When I install yade on a new computer, I enter sudo apt-get install yade in the terminal, it will report an error and show that the package cannot be located, how do I solve it? -- 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 #703209]: How to use different materials in one simulation?
Question #703209 on Yade changed: https://answers.launchpad.net/yade/+question/703209 Status: Needs information => Open 孙灿 gave more information on the question: #Material constants(1) Density1 = 1836 FrictionAngle1 = 5 PoissonRatio1 = 0.4 Young1 = 5e8 Damp = 0.5 AvgRadius1 = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) SphereMat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) O.bodies.append(geom.facetBox((0.05, 9,15), (0.1, 9, 15), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,15), rMean=0.05, rRelFuzz=0) sp.toSimulation(material = SphereMat) sp.makeCloud(Vector3(0.05,0,15),Vector3(0.05,18,30), rMean=0.05, rRelFuzz=0) sp.toSimulation(material = SphereMat1) -- 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 #703209]: How to use different materials in one simulation?
Question #703209 on Yade changed: https://answers.launchpad.net/yade/+question/703209 Summary changed to: How to use different materials in one simulation? -- 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 #703209]: 如何在一个模拟中使用不同的材料?
New question #703209 on Yade: https://answers.launchpad.net/yade/+question/703209 Now I need to simulate a box with a height of 30m, and the particles at the bottom 15m and the upper 15m need to use different materials. At present, I use the following code to complete it, but it seems to be wrong. SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) SphereMat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) O.bodies.append(geom.facetBox((0.05, 9,15), (0.1, 9, 15), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,15), rMean=0.05, rRelFuzz=0) sp.toSimulation(material = SphereMat) sp.makeCloud(Vector3(0.05,0,15),Vector3(0.05,18,30), rMean=0.05, rRelFuzz=0) sp.toSimulation(material = SphereMat1) -- 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 #703122]: Why, after adding particle properties, the simulation results are inaccurate
Question #703122 on Yade changed: https://answers.launchpad.net/yade/+question/703122 Status: Needs information => Open 孙灿 gave more information on the question: I use my code to simulate ground settlement. When I use the default material, the result is in line with the law of ground settlement, but when I add the material, the settlement of the particles becomes very chaotic and does not conform to the actual law. Code using raw material: from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.08, rRelFuzz=0) sp.toSimulation() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .005: O.pause() zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) ceng = zMax-0.3 for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) if b.state.pos[2]>ceng: print(b.id,b.state.pos) shuzu.append(b.id) print(shuzu) #zMax = max(b.state.pos[2] for b in O.bodies) #zMax = max(b.state.pos[2] for b in O.bodies) #print("Z ",zMax) #(xdim,ydim,zdim)= aabbDim() #print("Height is ",zdim) def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) O.saveTmp() from yade import qt qt.Controller() qt.View() Code to add material: #Material constants Density = 2630 FrictionAngle = 2.1 PoissonRatio = 0.5 Young = 300e6 Damp = 0.5 AvgRadius = 0.05 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.08, rRelFuzz=0) sp.toSimulation(material = SphereMat) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .005: O.pause() zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) ceng = zMax-0.3 for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) if b.state.pos[2]>ceng: print(b.id,b.state.pos) shuzu.append(b.id) print(shuzu) #zMax = max(b.state.pos[2] for b in O.bodies) #zMax = max(b.state.pos[2] for b in O.bodies) #print("Z ",zMax) #(xdim,ydim,zdim)= aabbDim() #print("Height is ",zdim) def addPlotData(): plot.addDa
[Yade-users] [Question #703122]: Why, after adding particle properties, the simulation results are inaccurate
New question #703122 on Yade: https://answers.launchpad.net/yade/+question/703122 Before I added the granular material (using the default material), the simulation worked well and the results were in line with the actual law, but when I added the material, the result was wrong, was my method of setting the material wrong? The relevant code is as follows: SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle))) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.05, rRelFuzz=0) sp.toSimulation(material = SphereMat) -- 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 #703041]: How do I set the stiffness of FrictMat?
Question #703041 on Yade changed: https://answers.launchpad.net/yade/+question/703041 Status: Answered => Solved 孙灿 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 #703041]: How do I set the stiffness of FrictMat?
Question #703041 on Yade changed: https://answers.launchpad.net/yade/+question/703041 孙灿 posted a new comment: So as long as the Young's modulus is set, the stiffness is actually set. So how to find the Young's modulus according to the required stiffness, can I use the formula to calculate? -- 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 #703041]: How do I set the stiffness of FrictMat?
Question #703041 on Yade changed: https://answers.launchpad.net/yade/+question/703041 孙灿 posted a new comment: Do you mean to set the stiffness indirectly by setting the Young's modulus? Is it only necessary to set the Young's modulus to complete the stiffness setting? -- 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 #703041]: How do I set the stiffness of FrictMat?
New question #703041 on Yade: https://answers.launchpad.net/yade/+question/703041 I need a material that has friction, but is non-sticky, and can set the stiffness. FrictMat most likely met my request. In [1], kn can set the stiffness, but in [2] it means that the stiffness cannot be set in FrictMat, why? If FrictMat does not meet my requirements, what materials can meet my requirements? [1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Ip2_FrictMat_FrictMat_FrictPhys.kn [2]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FrictMat -- 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 #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 孙灿 posted a new comment: Now there's a question, when does the simulation stop the second time I run the code after disabling PyRunner? Checkunbalanced() has been disabled at this point. -- 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 #702962]: How to disable function in PyRunner
New question #702962 on Yade: https://answers.launchpad.net/yade/+question/702962 How can I disable the pyrunner function during the simulation? -- 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 #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 Status: Answered => Solved 孙灿 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 #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 孙灿 posted a new comment: Do you mean to disable checkunbalanced() before the second run and do not use this function again? How can I disable it? -- 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 #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 孙灿 posted a new comment: Before my email was sent, I checked the code and it was error-free, but the email was sent to you and there was an indentation error, I don't know where the error occurred... >What does "immediately" mean? before next iteration? after very first >iteration? after two seconds? When I enter O.run(), the particles will have a tendency to move, but that's all, and then it will stop, it's not after an iteration, or a few seconds later, just for a moment, and I think it's running for no more than 0.5 seconds. >Check if the pausing is due to the checkUnbalanced function called in the >PyRunner. I don't think it's the mistake, because in the previous simulation, it was all good. 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 #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 孙灿 posted a new comment: #Material constants Density = 2630 FrictionAngle = 2.1 PoissonRatio = 0.5 Young = 300e6 Damp = 0.5 AvgRadius = 0.1 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(JCFpmMat(young = WYoung, poisson = WPoissonRatio,label='JCFmat', frictionAngle = radians(WFrictionAngle), density =WDensity,jointNormalStiffness=2e8,jointShearStiffness=1.5e8)) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=0) sp.toSimulation(material = SphereMat) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .01: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() d1 = (b.state.pos - circleCenter1).norm() if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) O.bodies.append(sphere(center=(0.05,7.25703095107543,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.21040962828884,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.13398400333454,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.029635928741,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.89993480041612,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.74807429059263,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.57779370901852,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.393285928741,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.1990941436567,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6,7.1727), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.8009058563433,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.606714071259,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.42220629098148,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.25192570940737,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.10006519958388,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.970364071259,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.86601599666546,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.78959037171116,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.74296904892457,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.7273,5.9), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphe
Re: [Yade-users] [Question #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 Status: Needs information => Open 孙灿 gave more information on the question: #Material constants Density = 2630 FrictionAngle = 2.1 PoissonRatio = 0.5 Young = 300e6 Damp = 0.5 AvgRadius = 0.1 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(JCFpmMat(young = WYoung, poisson = WPoissonRatio,label='JCFmat', frictionAngle = radians(WFrictionAngle), density =WDensity,jointNormalStiffness=2e8,jointShearStiffness=1.5e8)) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=0) sp.toSimulation(material = SphereMat) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .01: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() d1 = (b.state.pos - circleCenter1).norm() if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) O.bodies.append(sphere(center=(0.05,7.25703095107543,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.21040962828884,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.13398400333454,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.029635928741,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.89993480041612,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.74807429059263,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.57779370901852,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.393285928741,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.1990941436567,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6,7.1727), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.8009058563433,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.606714071259,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.42220629098148,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.25192570940737,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.10006519958388,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.970364071259,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.86601599666546,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.78959037171116,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.74296904892457,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.7273,5.9), radius=.12, fixed=True,co
Re: [Yade-users] [Question #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 Status: Needs information => Open 孙灿 gave more information on the question: Sorry, there was an indentation error in the copied code, the code is as follows: #Material constants Density = 2630 FrictionAngle = 2.1 PoissonRatio = 0.5 Young = 300e6 Damp = 0.5 AvgRadius = 0.1 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(JCFpmMat(young = WYoung, poisson = WPoissonRatio,label='JCFmat', frictionAngle = radians(WFrictionAngle), density =WDensity,jointNormalStiffness=2e8,jointShearStiffness=1.5e8)) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=0) sp.toSimulation(material = SphereMat) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .01: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() d1 = (b.state.pos - circleCenter1).norm() if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) O.bodies.append(sphere(center=(0.05,7.25703095107543,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.21040962828884,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.13398400333454,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.029635928741,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.89993480041612,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.74807429059263,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.57779370901852,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.393285928741,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.1990941436567,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6,7.1727), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.8009058563433,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.606714071259,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.42220629098148,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.25192570940737,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.10006519958388,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.970364071259,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.86601599666546,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.78959037171116,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.74296904892457,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.b
Re: [Yade-users] [Question #702934]: After you add some code, it does not work correctly
Question #702934 on Yade changed: https://answers.launchpad.net/yade/+question/702934 Summary changed to: After you add some code, it does not work correctly Description changed to: In my checkUnbalanced() function, I use a lot of O.bodies.append(). Before using O.bodies.append(), the particles can run again through O.run() after stabilization, but when I add the O.bodies.append() code, I can't run my code again, why? The code is as follows: #Material constants Density = 2630 FrictionAngle = 2.1 PoissonRatio = 0.5 Young = 300e6 Damp = 0.5 AvgRadius = 0.1 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(JCFpmMat(young = WYoung, poisson = WPoissonRatio,label='JCFmat', frictionAngle = radians(WFrictionAngle), density =WDensity,jointNormalStiffness=2e8,jointShearStiffness=1.5e8)) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=0) sp.toSimulation(material = SphereMat) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .01: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() d1 = (b.state.pos - circleCenter1).norm() if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) O.bodies.append(sphere(center=(0.05,7.25703095107543,6.0990941436567), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.21040962828884,6.293285928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.13398400333454,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.029635928741,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.89993480041612,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.74807429059263,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.57779370901852,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.393285928741,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.1990941436567,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6,7.1727), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.8009058563433,7.15703095107543), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.606714071259,7.11040962828884), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.42220629098148,7.03398400333454), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.25192570940737,6.929635928741), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.10006519958388,6.79993480041612), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.970364071259,6.64807429059263), radius=.12, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.86601599666546,6.47779370901852), radius=.12, fixed=True,color=(1.,1.,1.)))
[Yade-users] [Question #702934]: Why is it not possible to run the code a second time after setting the material of the particles and walls?
New question #702934 on Yade: https://answers.launchpad.net/yade/+question/702934 Initially, my simulation used the default materials and didn't deliberately set the characteristics of the particles and walls. After adding these features, I found that after the particle stabilized, the input O.run() could not run the code again, why is this? The code is as follows: #Material constants Density = 2630 FrictionAngle = 2.1 PoissonRatio = 0.5 Young = 300e6 Damp = 0.5 AvgRadius = 0.1 N_particles = 1 #Wall constants WDensity = 0 WFrictionAngle = 0.0 WPoissonRatio = 0.1 WYoung = 50e9 #time calculation startT = O.time endT = O.time timeSpent = endT - startT SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, frictionAngle = radians(FrictionAngle), density = Density)) WallMat = O.materials.append(JCFpmMat(young = WYoung, poisson = WPoissonRatio,label='JCFmat', frictionAngle = radians(WFrictionAngle), density =WDensity,jointNormalStiffness=2e8,jointShearStiffness=1.5e8)) from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63,material=WallMat)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=0) sp.toSimulation(material = SphereMat) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True shuzu=[] def checkUnbalanced(): if unbalancedForce() < .01: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() d1 = (b.state.pos - circleCenter1).norm() if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) O.saveTmp() from yade import qt qt.Controller() qt.View() -- 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 #702877]: How do I correspond to the coordinates of particles and particles?
Question #702877 on Yade changed: https://answers.launchpad.net/yade/+question/702877 Status: Answered => Solved 孙灿 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 #702877]: How do I correspond to the coordinates of particles and particles?
Question #702877 on Yade changed: https://answers.launchpad.net/yade/+question/702877 孙灿 posted a new comment: My code is as follows: from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=1/3) sp.toSimulation() (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True def checkUnbalanced(): if unbalancedForce() < .05: O.pause() plot.saveDataTxt('bbb.txt.bz2') zMax = max(b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)) print("Z ",zMax) layer = zMax-0.25 for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() d1 = (b.state.pos - circleCenter1).norm() if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) #print(b.state.pos) if b.state.pos[2]>layer: print(b.id,b.state.pos) #zMax = max(b.state.pos[2] for b in O.bodies) #zMax = max(b.state.pos[2] for b in O.bodies) #print("Z ",zMax) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) O.saveTmp() from yade import qt #qt.Controller() qt.View() I use print (b.id, b.state.pos) to output the id and coordinates of the particle. For example, the id of a particle is 1, in the print (b.id, b.state.pos) I know its coordinates at this time, and then I run the code again, the coordinates of the particle will change, at this time I can directly call the particle with id 1, get the coordinates after running it? -- 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 #702877]: How do I correspond to the coordinates of particles and particles?
New question #702877 on Yade: https://answers.launchpad.net/yade/+question/702877 I want to know, when I use b.state.pos to get the coordinates of the particles, is the coordinate order of the console output random? How do I match the coordinates of the output to the particles in the simulation? -- 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 #702852]: How do I use the numerical blanket?
Question #702852 on Yade changed: https://answers.launchpad.net/yade/+question/702852 Status: Answered => Solved 孙灿 confirmed that the question is solved: Just now, I have solved this problem and got the coordinates of the top few layers. Thank you for your help. 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 #702852]: How do I use the numerical blanket?
Question #702852 on Yade changed: https://answers.launchpad.net/yade/+question/702852 孙灿 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 #702852]: How do I use the numerical blanket?
Question #702852 on Yade changed: https://answers.launchpad.net/yade/+question/702852 孙灿 posted a new comment: Thank you for your reply. >It was just a brainstorming, what could be done, without any guarantee that it >is easy or feasible or gives satisfactory results.. I think I could think of it a different way and try to solve it using coordinates. >After quick search of "python simulation cloth falling on sphere", I have >found e.g. [2]. Unfortunately, I don't know why I can't open it.[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 #702852]: How do I use the numerical blanket?
New question #702852 on Yade: https://answers.launchpad.net/yade/+question/702852 Now I need to use a numerical blanket, drop it on the package, and define the particles I touch as the topmost particles, but I don't find the relevant usage of the numerical blanket on the official website, how do I use it? -- 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 #702750]: How to detect the coordinates of each particle?
Question #702750 on Yade changed: https://answers.launchpad.net/yade/+question/702750 Status: Answered => Solved 孙灿 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 #702750]: How to detect the coordinates of each particle?
Question #702750 on Yade changed: https://answers.launchpad.net/yade/+question/702750 孙灿 posted a new comment: I see what you mean. But how can I strictly define particles as belonging to the top layer, I don't seem to have a train of thought. My first thought was to use coordinates to define the uppermost particles, but the coordinates of these particles are also unknown quantities, and I can't use unknown quantities to solve for unknown quantities. 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 #702750]: How to detect the coordinates of each particle?
Question #702750 on Yade changed: https://answers.launchpad.net/yade/+question/702750 Status: Answered => Open 孙灿 is still having a problem: Yes, I added zMax = max(b.state.pos[2] for b in O.body if isinstance(b.shape, Sphere)) to the checkUnbalanced() function, z-values can get the output, but only one zMax output, zMAX is the highest z-value, and I need to output the z-value of each particle in the uppermost layer. -- 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 #702750]: How to detect the coordinates of each particle?
Question #702750 on Yade changed: https://answers.launchpad.net/yade/+question/702750 Status: Answered => Open 孙灿 is still having a problem: My code is as follows: from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=1/3) sp.toSimulation() (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() O.trackEnergy = True def checkUnbalanced(): if unbalancedForce() < .05: O.pause() #coords = [b.state.pos for b in O.bodies] #print(b.state.pos) #zMax = max(b.state.pos[2] for b in O.bodies) zMax = max(b.state.pos[2] for b in O.bodies) print("Z ",zMax) (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) def addPlotData(): plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) O.saveTmp() from yade import qt qt.Controller() #qt.View() >This code throw IndentationError: unexpected indent This may be due to an indentation error caused by copying over. >what do you mean by "no z-value output"? Yes, I found this problem, I did not set the print for output. But the zMax = max(b.state.pos[2] for b in O.bodies) string of code didn't solve my problem. It can only get the z-value of the highest particle before the run, and I need to get the z-value of the uppermost particles after gravity. -- 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 #702750]: How to detect the coordinates of each particle?
Question #702750 on Yade changed: https://answers.launchpad.net/yade/+question/702750 孙灿 posted a new comment: I tried it and found that the code had no errors, but no z-value output for the uppermost particles. My code is as follows: from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=1/3) sp.toSimulation() (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) # O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( # handle sphere+sphere and facet+sphere collisions [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), # call the checkUnbalanced function (defined below) every 2 seconds PyRunner(command='checkUnbalanced()', realPeriod=2), # call the addPlotData function every 200 steps PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() # enable energy tracking; any simulation parts supporting it # can create and update arbitrary energy types, which can be # accessed as O.energy['energyName'] subsequently O.trackEnergy = True # if the unbalanced forces goes below .05, the packing # is considered stabilized, therefore we stop collected # data history and stop def checkUnbalanced(): if unbalancedForce() < .05: O.pause() plot.saveDataTxt('bbb.txt.bz2') for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b" d1 = (b.state.pos - circleCenter1).norm() # distance of circleCenter and center of "b" if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) #coords = [b.state.pos for b in O.bodies] #print(b.state.pos) #zMax = max(b.state.pos[2] for b in O.bodies) O.bodies.append(sphere(center=(0.05,7.38276367683319,6.11900825105632), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.33147912281321,6.33262379212493), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.24740913386372,6.53558669963537), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.13262379212493,6.72289935320946), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.98994949366117,6.88994949366117), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.82289935320946,7.03262379212493), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.63558669963537,7.14740913386372), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.43262379212493,7.23147912281322), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.21900825105632,7.28276367683319), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6,7.3), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.78099174894368,7.28276367683319), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.56737620787507,7.23147912281322), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.36441330036463,7.14740913386372), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.17710064679054,7.03262379212493), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.01005050633883,6.88994949366117), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.86737620787507,6.72289935320946), radius=.1019, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.75259086613629,6.53558669963537),
[Yade-users] [Question #702750]: How to detect the coordinates of each particle?
New question #702750 on Yade: https://answers.launchpad.net/yade/+question/702750 How do I get the coordinates of each particle? For example, in my simulation, I apply gravity in the z-axis direction, and after stabilization, how do I know the z-value of the uppermost particle? -- 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 #702665]: How to calculate the height of particle accumulation?
Question #702665 on Yade changed: https://answers.launchpad.net/yade/+question/702665 Status: Answered => Solved 孙灿 confirmed that the question is solved: Thanks Karol Brzezinski, 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 #702665]: How to calculate the height of particle accumulation?
Question #702665 on Yade changed: https://answers.launchpad.net/yade/+question/702665 孙灿 posted a new comment: Yes, I added these two lines of code again, and zdim got the output. What does zdim mean? Is it the highest point? Nadir? Or is it an average? -- 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 #702665]: How to calculate the height of particle accumulation?
Question #702665 on Yade changed: https://answers.launchpad.net/yade/+question/702665 孙灿 posted a new comment: I tried the code again and there was no output from zdim. The code is as follows: from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.1, rRelFuzz=1/3) sp.toSimulation() (xdim,ydim,zdim)= aabbDim() print("Height is ",zdim) for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(3.,2.,1.) circleRadius=1.5 circleCenter = Vector3(0.05,6,6) circleRadius1=1.5 circleCenter1 = Vector3(0.05,12,6) # O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( # handle sphere+sphere and facet+sphere collisions [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), # call the checkUnbalanced function (defined below) every 2 seconds PyRunner(command='checkUnbalanced()', realPeriod=2), # call the addPlotData function every 200 steps PyRunner(command='addPlotData()', iterPeriod=100) ] O.dt = 0.5 * PWaveTimeStep() # enable energy tracking; any simulation parts supporting it # can create and update arbitrary energy types, which can be # accessed as O.energy['energyName'] subsequently O.trackEnergy = True # if the unbalanced forces goes below .05, the packing # is considered stabilized, therefore we stop collected # data history and stop def checkUnbalanced(): if unbalancedForce() < .05: O.pause() plot.saveDataTxt('bbb.txt.bz2') for b in O.bodies: if isinstance(b.shape,Sphere): #b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b" d1 = (b.state.pos - circleCenter1).norm() # distance of circleCenter and center of "b" if d < circleRadius: O.bodies.erase(b.id) if d1 < circleRadius1: O.bodies.erase(b.id) O.bodies.append(sphere(center=(0.05,7.378730854,6.1431074487337), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.315569669,6.37882820065594), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.212435565,6.6), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,7.07246222,6.79990265356116), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.899902654,6.97246222036657), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.7,7.11243556529821), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.478828201,7.21556966910027), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6.243107449,7.27873085421709), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,6,7.3), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.756892551,7.27873085421709), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.521171799,7.21556966910027), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.3,7.11243556529822), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,5.100097346,6.97246222036657), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.92753778,6.79990265356116), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.787564435,6.6), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.684430331,6.37882820065594), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.621269146,6.1431074487337), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.6,5.9), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.621269146,5.6568925512663), radius=.1274, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,4.684430331,5.421171799344
Re: [Yade-users] [Question #702665]: How to calculate the height of particle accumulation?
Question #702665 on Yade changed: https://answers.launchpad.net/yade/+question/702665 孙灿 posted a new comment: I just tried it and I found that the code works, but there is no zdim output in the console, why is that? -- 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 #702665]: How to calculate the height of particle accumulation?
Question #702665 on Yade changed: https://answers.launchpad.net/yade/+question/702665 孙灿 posted a new comment: For example: O.bodies.append(geom.facetBox((0.05, 3, 4), (0.1, 3, 4), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,6,8), rMean=0.05, rRelFuzz=0) sp.toSimulation() (xmin,ymin,zmin),(xmax,ymax,zmax) = aabbDim() height = zmax-zmin print("Height is ",height) Is that okay? Is there something wrong with the code? -- 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 #702665]: How to calculate the height of particle accumulation?
Question #702665 on Yade changed: https://answers.launchpad.net/yade/+question/702665 孙灿 posted a new comment: My code for generating particles is as follows: O.bodies.append(geom.facetBox((0.05, 3, 4), (0.1, 3, 4), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,6,8), rMean=0.05, rRelFuzz=0) sp.toSimulation() What I understand is that o.bodies.append (geom. Facetbox ((,), (,), wallmask =) is used to create faces and generate six faces, that is, a cuboid or other shaped objects with a certain size. Then I can fill them with sp.makecloud. I don't know whether this understanding is correct. -- 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 #702665]: How to calculate the height of particle accumulation?
New question #702665 on Yade: https://answers.launchpad.net/yade/+question/702665 First, I use o.bodies.append (geom.facetbox ((,), (,), wallmask=)) to generate particles in the specified area. These particles are not next to each other. There is a gap between these particles. After I run, these particles will sink under the action of gravity, the gap will be reduced, and finally accumulate together. How do I know the height of the stack? -- 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 #702505]: How to solve particle overlap?
Question #702505 on Yade changed: https://answers.launchpad.net/yade/+question/702505 Status: Answered => Solved 孙灿 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 #702505]: How to solve particle overlap?
Question #702505 on Yade changed: https://answers.launchpad.net/yade/+question/702505 Status: Answered => Open 孙灿 is still having a problem: Thank you for pointing out the indentation error. I modified the code and still found some problems (the particle deletion mentioned above is not clean) >I have tried you code. I clearly see a circular hole in the packing and newly added particles. Please define what you mean by "not completely removed". Particles are either removed or not. If you do not carefully observe the circular hole in the simulation, you will think that there is no problem. Blue particles are old particles and white particles are newly added particles. Through the 3D rendering of the console, it is found that blue particles (i.e. old particles) still exist in the circular hole, and white particles (new particles) coincide with the surrounding blue particles. >If your concerns are that the newly added particles are overlapping with the existing particles, you have two options Because of my simulation requirements, I can't put the new particles closer to the hole. I need to distribute the new particles along the periphery of the circular hole. For example, the radius of the circular hole is 5mm, and the radius of the new particles is 0.5mm, so the distance from the center of the circular hole to the center of the new particle is 4.5mm -- 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 #702505]: How to solve particle overlap?
Question #702505 on Yade changed: https://answers.launchpad.net/yade/+question/702505 Status: Needs information => Open 孙灿 gave more information on the question: I didn't make myself clear. In a two-dimensional rectangular plane composed of particles, I need to delete particles in a circular range first, And fix the remaining particles. I use b.state blockedDOFs='zxy',b.state. vel=(0,0,0),b.state. Angvel= (0,0,0) to fix. In the second step, you need to add some particles, using o.bodies Append adds some particles. >the particles to be deleted were not completely removed I observed it through the 3D rendering in the console. When there are many deleted particles, and after adding new particles, the deleted particles are still not completely deleted. The code is as follows: from yade import pack,plot O.bodies.append(geom.facetBox((0.05, 3, 4), (0.1, 3, 4), wallMask=63)) sp = pack.SpherePack() sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,6,8), rMean=0.05, rRelFuzz=0) sp.toSimulation() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='ZxY' b.shape.color=(0.,0.,1.) circleRadius=0.52 circleCenter = Vector3(0.05,1.5,2) circleRadius1=0.52 circleCenter1 = Vector3(0.05,4.5,2) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( # handle sphere+sphere and facet+sphere collisions [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), # call the checkUnbalanced function (defined below) every 2 seconds PyRunner(command='checkUnbalanced()', realPeriod=2), # call the addPlotData function every 200 steps PyRunner(command='addPlotData()', iterPeriod=100), ] O.dt = 0.5 * PWaveTimeStep() # enable energy tracking; any simulation parts supporting it # can create and update arbitrary energy types, which can be # accessed as O.energy['energyName'] subsequently O.trackEnergy = True # if the unbalanced forces goes below .05, the packing # is considered stabilized, therefore we stop collected # data history and stop def checkUnbalanced(): if unbalancedForce() < .05: O.pause() plot.saveDataTxt('bbb.txt.bz2') for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b" d1 = (b.state.pos - circleCenter1).norm() # distance of circleCenter and center of "b" if d < circleRadius : O.bodies.erase(b.id) qiyong() qiyong1() def addPlotData(): # each item is given a names, by which it can be the unsed in plot.plots # the **O.energy converts dictionary-like O.energy to plot.addData arguments plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy) def qiyong(): O.bodies.append(sphere(center=(0.05,1.5,2.451), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.5,1.549), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.049,2), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.951,2), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.9423,2.0880), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.9167,2.1726), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.8750,2.2506), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.8189,2.3189), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.7506,2.3750), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.6726,2.4167), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.5880,2.4423), radius=.049, fixed=True,color=(1.,1.,1.))) def qiyong1(): O.bodies.append(sphere(center=(0.05,1.0577,2.0880), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.0833,2.1726), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.1250,2.2506), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.1
[Yade-users] [Question #702505]: How to solve particle overlap?
New question #702505 on Yade: https://answers.launchpad.net/yade/+question/702505 O.bodies. Erase can delete particles in a given area, I use O.bodies. Erase removes particles from a designated area, fixes them, and then uses O.bodies. Appnd added some particles, but I found that the experiment could not be completed, the particles to be deleted were not completely removed, and the remaining particles overlapped with the new particles. Is this because the particles were deleted too slowly and the particles were added too quickly? Is there a code that deletes particles faster? Or how can I solve this 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
Re: [Yade-users] [Question #701936]: Why do particles intersect?
Question #701936 on Yade changed: https://answers.launchpad.net/yade/+question/701936 Status: Needs information => Open 孙灿 gave more information on the question: I'm sorry I didn't express it very well. Some of my related codes are as follows: def checkUnbalanced(): if unbalancedForce() < .02: #O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='zxy' b.state.vel=(0,0,0) b.state.angVel=(0,0,0) d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b" if d < circleRadius : #for i in range(1,2): #b.shape.radius=b.shape.radius-0.02 O.bodies.erase(b.id) qiyong() def qiyong(): O.bodies.append(sphere(center=(0.05,1.5,2.451), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.5,1.549), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.049,2), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.951,2), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.9423,2.0880), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.9167,2.1726), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.8750,2.2506), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.8189,2.3189), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.7506,2.3750), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.6726,2.4167), radius=.049, fixed=True,color=(1.,1.,1.))) O.bodies.append(sphere(center=(0.05,1.5880,2.4423), radius=.049, fixed=True,color=(1.,1.,1.))) I use checkUnbalanced() to check the balance of the particles, before this string of code, I have set up some particles (you can call it the first part of the code), qiyong() is the function I use to generate the second part of the particles, in the checkUnbalanced() function, after some conditions are met, qiyong() will be called, which will generate the second part of the particles. But when generating the second part of the particles, some particles will intersect with the first part of the particles and cause the subsequent simulations to not run as I expected, how do I solve it? -- 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 #701936]: Why do particles intersect?
Question #701936 on Yade changed: https://answers.launchpad.net/yade/+question/701936 Status: Needs information => Open 孙灿 gave more information on the question: I used not only b.state.blockedDOFs='zxy', but b.state.vel = (0,0,0),b.state.angVel = (0,0,0) I've set up both the degree of freedom and the speed, so why is this happening? -- 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 #701936]: Why do particles intersect?
New question #701936 on Yade: https://answers.launchpad.net/yade/+question/701936 I want to add some other particles using O.bodies.append() on the basis of having some particles (which we call it with the first part of the particles), we call it with the second part of the particles, and I use b.state.vel = (0,0,0) b.state.angVel = (0,0,0) fixes the first part of the particles, but I found that some of the particles of the first part fall down and intersect with the particles of the second part, why is this? -- 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 #701934]: How do I keep the particles still?
Question #701934 on Yade changed: https://answers.launchpad.net/yade/+question/701934 Status: Answered => Open 孙灿 is still having a problem: I tried adding b.state.vel = (0,0,0), b.state.angVel = (0,0,0) and the particles did stay still, but new problems arose. I wanted to use O.boides.append() to add some particles while the original particles remained stationary, but I don't know why, some particles may fall down and partially overlap with the particles added by O.boides.append(). -- 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 #701934]: How do I keep the particles still?
New question #701934 on Yade: https://answers.launchpad.net/yade/+question/701934 I needed to keep all the particles in the simulation still, so I used the following code: def checkUnbalanced(): if unbalancedForce() < .02: O.pause() for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='zxy' checkUnbalanced() is a function I define. But I found that the particles are not fixed, why is that? Is there any other code that keeps particles immobile? -- 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 #701308]: How to set a circle?
Question #701308 on Yade changed: https://answers.launchpad.net/yade/+question/701308 Status: Answered => Open 孙灿 is still having a problem: > O.bodies.append is for adding already generated particles to simulation, not the command for generating. Although it could be accepted that adding to simulation is a part of generating. I can see what you mean, but I find that I don't use O.bodies.append. In the run just now, I found that there was an error in my code, and this part of the code is as follows: O.bodies.append(geom.facetCylinder(center(0,0,0),radius=1,height=2,orientation=Quaternion((0,1,0),segmentsNumber=10,wallMask=7) sp = pack.SpherePack() sp.makeCloud((0, 0, 0), (1, 1, 1), rMean=.05, rRelFuzz=0) sp.toSimulation() I think there's something wrong with my code. -- 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 #701308]: How to set a circle?
Question #701308 on Yade changed: https://answers.launchpad.net/yade/+question/701308 Status: Answered => Open 孙灿 is still having a problem: Can I use 0.bodies.append() for Generating ring. I think of facet.In addition,Can I use facetCylinder to generate a cylinder. -- 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 #701308]: How to set a circle?
Question #701308 on Yade changed: https://answers.launchpad.net/yade/+question/701308 孙灿 gave more information on the question: The display result is: invalid syntax -- 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 #701308]: How to set a circle?
Question #701308 on Yade changed: https://answers.launchpad.net/yade/+question/701308 Status: Answered => Open 孙灿 is still having a problem: I saw another problem, but it wasn't solved very well and it turned out to not work. -- 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 #701308]: How to set a circle?
Question #701308 on Yade changed: https://answers.launchpad.net/yade/+question/701308 Status: Needs information => Open 孙灿 gave more information on the question: In a two-dimensional context, I need to use particles to form a ring, as if it were a tire. The particle radius is 0.05, now I need to use these particles with a radius of 0.05 to form a circle with a radius of 1, note that only a circle with a radius of 1 is composed, and there are no particles inside this circle, just like the tire, the material makes up the outer part of the tire, but not inside. -- 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 #701308]: How to set a circle?
New question #701308 on Yade: https://answers.launchpad.net/yade/+question/701308 I want to use particles to form a circle, and these particles are combined along the circumference of the circle. How do I set it? -- 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 #700903]: How to call the set function again
Question #700903 on Yade changed: https://answers.launchpad.net/yade/+question/700903 Status: Needs information => Open 孙灿 gave more information on the question: I'm sorry the information I provided is not accurate enough. Relevant codes are as follows: def Output(): e22=-triax1.strain[1] #particle info f = open('./pdata/pInfo'+'{:.5f}'.format(e22-ini_e22a), 'w') print (('Particle information at Iter %d' % O.iter),file=f) f.write('Box position: \n') print (('left wall: %.5f %.5f %.5f' % (O.bodies[2].state.pos[0], O.bodies[2].state.pos[1], O.bodies[2].state.pos[2])),file=f) print (('right wall: %.5f %.5f %.5f' % (O.bodies[3].state.pos[0], O.bodies[3].state.pos[1], O.bodies[3].state.pos[2])),file=f) print (('top wall: %.5f %.5f %.5f' % (O.bodies[1].state.pos[0], O.bodies[1].state.pos[1], O.bodies[1].state.pos[2])),file=f) print (('bottom wall: %.5f %.5f %.5f' % (O.bodies[0].state.pos[0], O.bodies[0].state.pos[1], O.bodies[0].state.pos[2])),file=f) print (('front wall: %.5f %.5f %.5f' % (O.bodies[5].state.pos[0], O.bodies[5].state.pos[1], O.bodies[5].state.pos[2])),file=f) print (('back wall: %.5f %.5f %.5f' % (O.bodies[4].state.pos[0], O.bodies[4].state.pos[1], O.bodies[4].state.pos[2])),file=f) f.write('ID x y z radius disx disy disz rotx roty rotz \n') for b in O.bodies: if isinstance(b.shape, Sphere): print (b.id,b.state.pos[0],b.state.pos[1],b.state.pos[2],b.shape.radius,b.state.displ()[0],b.state.displ()[1],b.state.displ()[2],b.state.rot()[0],b.state.rot()[1],b.state.rot()[2],file=f) f.close() #contact info g = open('./cdata/cInfo'+'{:.5f}'.format(e22-ini_e22a), 'w') print (('Contact information at Iter %d' % O.iter),file=g) g.write('ctype id1 id2 nfx nfy nfz tfx tfy tfz \n') for k in O.interactions: if isinstance(O.bodies[k.id1].shape,Sphere) and isinstance(O.bodies[k.id2].shape,Box): print ('01',k.id1,k.id2,k.phys.normalForce[0], k.phys.normalForce[1],k.phys.normalForce[2],k.phys.shearForce[0],k.phys.shearForce[1],k.phys.shearForce[2],file=g) elif isinstance(O.bodies[k.id1].shape,Box) and isinstance(O.bodies[k.id2].shape,Sphere): print ('10',k.id1,k.id2,k.phys.normalForce[0], k.phys.normalForce[1],k.phys.normalForce[2],k.phys.shearForce[0],k.phys.shearForce[1],k.phys.shearForce[2],file=g) elif isinstance(O.bodies[k.id1].shape,Sphere) and isinstance(O.bodies[k.id2].shape,Sphere): print ('00',k.id1,k.id2,k.phys.normalForce[0], k.phys.normalForce[1],k.phys.normalForce[2],k.phys.shearForce[0],k.phys.shearForce[1],k.phys.shearForce[2],file=g) g.close() Output() This string of code can get the particle information (ID, radius and coordinates). I only use it to get the particle information before the code runs, and I don't know how to use this string of code again to get the particle information (coordinates). -- 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 #700903]: How to call the set function again
Question #700903 on Yade changed: https://answers.launchpad.net/yade/+question/700903 Status: Needs information => Open 孙灿 gave more information on the question: I used the function output () in my code. I want to get the height difference between the particles before and after operation, so I need to use output twice to get the height before and after the particles. Is that right? The first time I used def output() to get the height of particles, what should I do next? -- 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 #700903]: How to call the set function again
New question #700903 on Yade: https://answers.launchpad.net/yade/+question/700903 How to call the set function again? -- 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 #700904]: How to call the set function again
New question #700904 on Yade: https://answers.launchpad.net/yade/+question/700904 How to call the set function again? -- 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 #700865]: On the usage of run
New question #700865 on Yade: https://answers.launchpad.net/yade/+question/700865 I need to use run in my code, but I don't know about it. For some time reasons, I didn't find the relevant content on Yade's website. -- 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 #700754]: How are the monitoring points arranged
Question #700754 on Yade changed: https://answers.launchpad.net/yade/+question/700754 孙灿 posted a new comment: I've probably found a solution. I want to use the output function to get the height difference of particles before and after operation. Is this OK? -- 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 #700754]: How are the monitoring points arranged
Question #700754 on Yade changed: https://answers.launchpad.net/yade/+question/700754 Status: Needs information => Open 孙灿 gave more information on the question: For example, what I want to do is the simulation of surface subsidence. From this simulation, I need to get the value of surface subsidence. Whether Yade has monitoring points, which can be distributed in particles to obtain the value of surface settlement. -- 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 #700754]: How are the monitoring points arranged
Question #700754 on Yade changed: https://answers.launchpad.net/yade/+question/700754 Status: Needs information => Open 孙灿 gave more information on the question: What I want to do now is to simulate the shield construction. Shield construction will cause soil settlement. Now my code has been completed, except that I don't know how to get the data of soil settlement. I don't know if Yade has any monitoring points. I just need to get the data of code operation. -- 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 #700754]: How are the monitoring points arranged
New question #700754 on Yade: https://answers.launchpad.net/yade/+question/700754 How can I set some monitoring points to get simulated data. -- 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 #700369]: Circular setting
Question #700369 on Yade changed: https://answers.launchpad.net/yade/+question/700369 孙灿 posted a new comment: Hello! I tried your code, but I found it couldn't run. The reason for the error is: non ASCII character '\ XC2' in file yuan py on line 11, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details. In this sentence, yuan Py is the name of the run file I defined. -- 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 #700369]: Circular setting
Question #700369 on Yade changed: https://answers.launchpad.net/yade/+question/700369 Status: Needs information => Open 孙灿 gave more information on the question: Hello! I'm sorry I didn't explain myself clearly. I want to simulate a hollow circle. A hollow circle means that there are many particles whose center lies on the circumference of another circle. The particles form a new circle. -- 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 #700369]: Circular setting
Question #700369 on Yade changed: https://answers.launchpad.net/yade/+question/700369 Status: Answered => Open 孙灿 is still having a problem: I tried this string of code. The simulated figure is very close to what I want, but the outermost figure I need is smooth, like a circle. The outermost up, down, left and right directions of the graphics simulated by this string of code are not smooth. Cheer sun -- 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 #700369]: Circular setting
Question #700369 on Yade changed: https://answers.launchpad.net/yade/+question/700369 Status: Needs information => Open 孙灿 gave more information on the question: Sorry, I may not know the terminology very well. I think what I'm talking about is annulus.I'm a beginner and don't know much about terms. cheer sun -- 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 #700348]: Treatment of particle radius
Question #700348 on Yade changed: https://answers.launchpad.net/yade/+question/700348 Status: Open => Solved 孙灿 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 #700369]: Circular setting
Question #700369 on Yade changed: https://answers.launchpad.net/yade/+question/700369 Status: Needs information => Open 孙灿 gave more information on the question: My consciousness is that I need to use 2D spherical particles to form a circle. Like a tire, it is a 2D hollow circle. -- 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