[Yade-users] [Question #697578]: Import VTK
New question #697578 on Yade: https://answers.launchpad.net/yade/+question/697578 Hi, I simulated the compaction process of spheres, and have saved them in VTK files along with files with info on interparticle forces. I want do simulation on the compact (such liquid flow in pore structure, swelling of the particles), I don't want do compaction simulation each time before I do the liquid flow simulation . Is there a method to import the VTK file of the compact into YADE, such I can do the liquid flow simulation on the compacts. Best, Mithu -- 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 #697526]: CHOLMOD warning: matrix not positive definite
Question #697526 on Yade changed: https://answers.launchpad.net/yade/+question/697526 Status: Open => Answered Bruno Chareyre proposed the following answer: Hi, It can happen that LDL fails for numerical reason, then the solver switches to LDLt, which is more stable. I _could_ be a safe warning. That said, I'm struggling to understand why you would use periodic FlowEngine with (it seems) a non-periodic problem. Also this makes no sense in periodic conditions since there are no boundaries: flow.bndCondIsPressure=[0,0,1,1,0,0] I hope it helps. Bruno -- 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Jan Stránský posted a new comment: Yes, sorry, I forgot about [7]. Nice you fixed the solution yourself :-) Cheers Jan [7] https://gitlab.com/yade-dev/trunk/-/issues/105 -- 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Liu Changdong posted a new comment: Hi Jan: I have tried the second method you gave me ‘using the pack.inHalfSpace’ . However, the 'predicate(pos,r)' shows an error. After my trial and error, I found the following method should to be used: halfSpace1 = pack.inHalfSpace((0.4,0.4,.4),Vector3(1,1,1)) # pack.inHalfSpace(point,normal direction) halfSpace2 = pack.inHalfSpace((0.6,0.6,.6),Vector3(-1,-1,-1)) #predicate0 = halfSpace1 & halfSpace2 # intersection def isSoftRockParticle(b): pos = b.state.pos r = b.shape.radius return halfSpace1(pos,r) and halfSpace2(pos,r) Thanks again! changdong Liu -- 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Liu Changdong 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Status: Answered => Solved Liu Changdong confirmed that the question is solved: Hi Jan: Thanks a lot。 That solves my 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Jan Stránský proposed the following answer: The posted code was meant to present one option how to do it, with very easy isSoftRockParticle condition. You can substitute whatever instead of this "z in (1.5;2.5) range". If your region is bounded by two parallel planes [2], you can easily do something like: ### normal = Vector3(1,0,4) def plane(x,y,z,d): nx,ny,nz = normal return nx*x + ny*y + nz*z + d def plane1(x,y,z): # equation of "lower" plane return plane(x,y,z,2) def plane2(x,y,z): # equation of "upper" plane return plane(x,y,z,3) def isSoftRockParticle(b): x,y,z = b.state.pos p1 = plane1(x,y,z) p2 = plane2(x,y,z) return p1 > 0 and p2 < 0 # p1 > 0 ... (x,y,z) is "above" the "lower" plane # p2 < 0 ... (x,y,z) is "below" the "upper" plane ### For more complicated situations (or to make your solution easier to extend / maintain / read / ...), you can use Yade predicates [3,4], e.g. pack.inHalfSpace [5]: ### normal = Vector3(1,0,4) halfSpace1 = pack.inHalfSpace((0,0,3),+normal) # pack.inHalfSpace(point,normal direction) halfSpace2 = pack.inHalfSpace((0,0,3),-normal) predicate = halfSpace1 & halfSpace2 # intersection def isSoftRockParticle(b): pos = b.state.pos r = b.shape.radius return predicate(pos,r) ### As a predicate, you can also use more fancy pack.inGtsSurface [6]. Cheers Jan [2] https://en.wikipedia.org/wiki/Plane_(geometry) [3] https://yade-dem.org/doc/user.html#constructive-solid-geometry-csg [4] https://yade-dem.org/doc/yade.pack.html [5] https://yade-dem.org/doc/yade.pack.html#yade.pack.inHalfSpace (poor documentation) [6] https://yade-dem.org/doc/yade.pack.html#yade._packPredicates.inGtsSurface -- 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Liu Changdong posted a new comment: Hi Jan: Thank you for your answer. Problem 2 has been solved. But I have some questions about question 1. Here are my questions: According to your answer, I can only create soft rocks with zero dip angle. How can i create a soft rock layer with 30 dip angle? Thanks changdong Liu -- 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 #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed: https://answers.launchpad.net/yade/+question/697545 Jan Stránský proposed the following answer: > 1. How to select particles representing soft rock (different thickness and dip angle). e.g.: ### # return true if z-coordinate is between 1.5 and 2.5 # adjust the condition to your needs def isSoftRockParticle(b): x,y,z = b.state.pos return z > 1.5 and z < 2.5 softRockParticles = [b for b in O.bodies if isSoftRockParticle(b)] ### > 2.About changing the material, can i use the following method: in general yes, BUT > for i in 'softrock': >O.bodies[i].mat.cohesion=softMat.cohesion does probably something different than you want, better use ### sp.toSimulation(material=mat1) for b in softRockParticles: b.mat = mat2 ### i.e. change material entirely. The reason is that material is (usually) shared among (many) particles and changing b.mat.property of one particle applies to the other particles, too (because b.mat is the same Material). Have a try: ### mat1 = FrictMat(young=3) b1 = sphere((0,0,0),1,material=mat1) b2 = sphere((2,0,0),1,material=mat1) print(b1.mat.young) print(b2.mat.young) b1.mat.young = 7 print(b1.mat.young) print(b2.mat.young) # !!! ### compared to ### mat1 = FrictMat(young=4) mat2 = FrictMat(young=5) b1 = sphere((0,0,0),1,material=mat1) b2 = sphere((2,0,0),1,material=mat1) print(b1.mat.young) print(b2.mat.young) b1.mat = mat2 print(b1.mat.young) print(b2.mat.young) # OK ### Cheers Jan -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp