Re: [Yade-users] [Question #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Status: Answered => Solved Mahdeyeh 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 #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Mahdeyeh posted a new comment: Dear Jan Stránský > the saved data has only 3 decimal digits (probably it it not the problem, but > try with more precise values) > polyhedrons in Yade are convex. Dos your geometry contains only convex shapes? They were two important points that solved my problem, some of particles were in concave shape. you are so great and wonderful. Best regards, Mahdeyeh -- 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 #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Status: Open => Answered Jan Stránský proposed the following answer: > they had very small penetrationVolume "very small" is very relative :-) the value it far above rounding error and (as mentioned above) the result of "explosion" > The situation of particles before running the script are correct and they are > loaded quite correctly. > But when I load model in YADE without running, unbelievably I see visually > some particles overlap!!! That was my point. So the polyhedrons are NOT loaded quite correctly :-) There might be several reasons: - first, the saving / loading phase, double check your implementation (you cen use some toy data like two rectangles) - the saved data has only 3 decimal digits (probably it it not the problem, but try with more precise values) - polyhedrons in Yade are convex. Dos your geometry contains only convex shapes? - ... > 1- Is that possible this overlap is because of very small distance between particles? no, if there is very small distance between particles in your input data, the same very small distance but no overlap should exist in loaded data cheers Jan -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Status: Answered => Open Mahdeyeh is still having a problem: Thanks a lot Jan Stránský for your time and reply. >Try before O.run(): >### >O.step() >for i in O.interactions: > print(i.geom.penetrationVolume) I did it and I Saw they had very small penetrationVolume, I really confused;when I check the geometry in AutoCad the particles are quite seperate from each other. Between the edge of neighbour polygons is distance, of course their distance is very very small but it exists. But when I load model in YADE without running, unbelievably I see visually some particles overlap!!! 1- Is that possible this overlap is because of very small distance between particles? 2- Is there any solution for this problem instead of changing their geometry? -- 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 #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Status: Open => Answered Jan Stránský proposed the following answer: Hi, > they are near each other. not only they are near each other, they DOES overlap, which generates repulsive forces and results in "they have moved far from each other" Try before O.run(): ### O.step() for i in O.interactions: print(i.geom.penetrationVolume) ### Visually, you can try: ### for b in O.bodies: b.shape.wire = True b.shape.color = randomColor() ### which reveals significant overlaps in the initial geometry cheers Jan -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Mahdeyeh gave more information on the question: Dear Jan Stránský > Please also investigate the situation BEFORE running the script, just after > loading the polyhedrons (or after one iteration to be able to investigate > interactions - if there are some, what are the overlaps etc.). Are they loaded correctly? The situation of particles before running the script are correct and they are loaded quite correctly. they are near each other. -- 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 #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Status: Needs information => Open Mahdeyeh gave more information on the question: Thank you Jan Stránský for reply. This is the content of polyline.txt file: *LWPOLYLINE 5.250,17.171 5.355,17.216 5.396,17.308 5.494,17.349 5.464,17.149 5.405,17.079 5.358,17.140 5.250,17.171 *LWPOLYLINE 5.685,17.037 5.719,17.000 5.814,17.000 5.842,17.109 5.813,17.140 5.760,17.113 5.728,17.088 5.685,17.037 5.719,17.000 *LWPOLYLINE 5.016,17.593 5.211,17.560 5.270,17.458 5.351,17.502 5.330,17.736 5.313,17.918 5.203,17.972 5.118,17.880 5.063,17.830 5.016,17.593 5.211,17.560 *LWPOLYLINE 5.351,17.502 5.440,17.484 5.494,17.517 5.500,17.519 5.634,17.726 5.601,17.879 5.489,17.964 5.342,17.898 5.351,17.502 *LWPOLYLINE 5.500,17.502 5.634,17.726 5.779,17.678 5.673,17.500 5.500,17.502 *LWPOLYLINE 3.984,18.388 3.803,18.388 3.963,18.209 3.784,18.022 3.967,17.894 4.278,17.770 4.506,17.901 4.586,18.146 4.547,18.286 4.411,18.547 3.984,18.388 *LWPOLYLINE 4.877,17.257 4.962,17.281 5.112,17.225 5.254,17.354 5.211,17.560 5.016,17.593 4.872,17.593 4.872,17.362 4.877,17.257 4.962,17.281 *LWPOLYLINE 5.013,19.593 5.208,19.560 5.267,19.458 5.348,19.502 5.326,19.736 5.310,19.918 5.200,19.972 5.115,19.880 5.059,19.830 5.013,19.593 5.208,19.560 *LWPOLYLINE 5.511,20.321 5.699,20.201 5.798,20.289 5.846,20.531 5.746,20.623 5.482,20.506 5.511,20.321 *LWPOLYLINE 5.598,19.885 5.735,19.971 5.694,20.192 5.511,20.309 5.491,19.966 5.598,19.885 *LWPOLYLINE 5.497,21.000 5.626,20.885 5.747,20.629 5.476,20.509 5.288,20.487 5.227,20.840 5.227,20.994 5.497,21.000 *LWPOLYLINE 4.872,20.203 5.165,20.203 5.283,20.487 5.222,20.840 5.222,20.989 4.872,20.995 4.872,20.203 *LWPOLYLINE 5.352,19.506 5.436,19.489 5.488,19.521 5.494,19.523 5.625,19.727 5.593,19.876 5.485,19.958 5.344,19.895 5.352,19.506 *LWPOLYLINE 5.504,19.505 5.633,19.720 5.768,19.675 5.667,19.505 5.504,19.505 *LWPOLYLINE 5.618,19.342 5.663,19.495 5.497,19.497 5.438,19.479 5.271,19.454 5.255,19.352 5.116,19.225 5.307,19.007 5.457,19.152 5.618,19.342 5.618,19.342 *LWPOLYLINE 4.878,19.264 4.959,19.286 5.108,19.231 5.245,19.356 5.204,19.555 5.012,19.588 4.874,19.588 4.874,19.362 4.878,19.264 *LWPOLYLINE 4.874,19.598 5.009,19.598 5.055,19.833 5.195,19.974 5.164,20.193 4.872,20.193 4.872,20.019 4.874,19.598 *LWPOLYLINE 5.307,19.000 5.109,19.225 5.061,19.228 4.929,19.054 4.929,18.999 5.307,19.000 *LWPOLYLINE 5.628,19.339 5.673,19.494 5.831,19.451 5.866,19.354 5.811,19.313 5.747,19.252 5.628,19.339 *LWPOLYLINE 5.869,19.163 5.745,19.241 5.620,19.320 5.466,19.147 5.501,19.006 5.654,19.038 5.806,19.006 5.869,19.163 *LWPOLYLINE 5.303,19.004 5.261,18.963 5.365,18.878 5.503,18.996 5.463,19.158 5.303,19.004 *LWPOLYLINE 5.500,18.993 5.625,18.882 5.743,18.631 5.478,18.514 5.295,18.492 5.235,18.841 5.235,18.984 5.365,18.878 5.500,18.993 *LWPOLYLINE 4.875,18.203 5.168,18.203 5.286,18.487 5.225,18.840 5.225,18.986 5.050,18.908 4.875,18.992 4.875,18.203 *LWPOLYLINE 5.514,18.321 5.702,18.201 5.801,18.289 5.850,18.531 5.749,18.623 5.485,18.506 5.514,18.321 *LWPOLYLINE 5.177,18.197 5.295,18.482 5.475,18.503 5.504,18.317 5.485,17.967 5.314,17.923 5.208,17.975 5.177,18.197 *LWPOLYLINE 5.601,17.885 5.738,17.971 5.698,18.192 5.514,18.309 5.494,17.966 5.601,17.885 *LWPOLYLINE 4.877,17.598 5.012,17.598 5.058,17.833 5.198,17.974 5.167,18.193 4.875,18.193 4.875,18.018 4.877,17.598 *LWPOLYLINE 4.860,17.088 4.860,17.188 4.881,17.253 4.961,17.275 5.057,17.227 4.950,17.086 4.931,17.060 4.860,17.088 *LWPOLYLINE 4.941,17.056 5.066,17.223 5.110,17.220 5.187,17.144 5.187,17.070 5.119,17.043 5.066,17.006 4.941,17.056 *LWPOLYLINE 5.196,17.150 5.120,17.225 5.202,17.287 5.255,17.348 5.350,17.305 5.350,17.219 5.248,17.176 5.196,17.150 *LWPOLYLINE 5.083,17.005 5.124,17.034 5.187,17.059 5.187,17.005 5.083,17.005 *LWPOLYLINE 5.197,17.005 5.308,17.005 5.398,17.080 5.355,17.136 5.250,17.166 5.197,17.143 5.197,17.005 *LWPOLYLINE 5.461,17.138 5.409,17.076 5.324,17.005 5.495,17.005 5.461,17.138 *LWPOLYLINE 5.507,16.995 5.533,16.885 5.746,16.867 5.715,16.995 5.576,16.995 5.507,16.995 *LWPOLYLINE 5.583,17.008 5.607,17.107 5.659,17.177 5.742,17.177 5.724,17.090 5.682,17.041 5.583,17.008 *LWPOLYLINE 5.505,17.005 5.572,17.005 5.597,17.108 5.541,17.205 5.469,17.147 5.505,17.005 *LWPOLYLINE 5.660,17.187 5.743,17.187 5.746,17.243 5.632,17.325 5.660,17.187 *LWPOLYLINE 5.603,17.118 5.651,17.183 5.621,17.332 5.501,17.343 5.547,17.215 5.603,17.118 *LWPOLYLINE 5.631,17.339 5.676,17.494 5.834,17.451 5.870,17.354 5.815,17.313 5.750,17.252 5.631,17.339 *LWPOLYLINE 5.736,17.100 5.758,17.118 5.814,17.146 5.841,17.118 5.869,17.168 5.816,17.301 5.756,17.243 5.753,17.181 5.736,17.100 *LWPOLYLINE 5.004,16.894 4.850,17.083 4.850,17.189 4.867,17.356 4.410,17.253 4.144,17.253 4.054,17.047 4.454,17.047 4.649,16.894 5.004,16.894 *LWPOLYLINE 4.453,17.034 4.377,16.920 4.291,16.804 4.419,16.738 4.639,16.890 4.453,17.034 *LWPOLYLINE 4.135,17.256 4.015,17.327 3.970,17.432 3.803,17.039 4.043,17.046 4.135,
Re: [Yade-users] [Question #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Description changed to: Hi there I drew my whole polygons in Autocad (2D) and exported the vertices of them (of AutoCad) as text for using in YADE and creating polyhedra. I did that because I want pack of many polyhedrons with very small void and certain shape and size. Here is my code: import numpy as np from numpy import * RawVer=np.genfromtxt('polyline.txt',names=True,dtype=None) # ListVer is list of all the vertices of all the polygons Ver=() ListVer=[] for b in RawVer: if b[0]=='*LWPOLYLINE': ListVer.append(Ver) Ver=() continue Cordn=b[0] Cordn=np.fromstring(Cordn, sep=',') Cordn=tuple(Cordn.tolist()) Cordn1=Cordn+(0.1,) # add z vertex to coordinates Cordn2=Cordn+(0.3,) # add z vertex to coordinates if not Cordn1 in Ver: Ver=Ver+(Cordn1,Cordn2) ListVer.append(Ver) from yade import plot, polyhedra_utils Dolomite = PolyhedraMat() Dolomite.density = 2870 Dolomite.young = 24.36e9 Dolomite.poisson = 0.2 Dolomite.frictionAngle = radians(55.12) for ii in ListVer: O.bodies.append(polyhedra_utils.polyhedra(Dolomite,v=ii,fixed=True, color=(1,0.5,1), mask=3)) for b in O.bodies: b.state.blockedDOFs='zXYZ' O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Polyhedra_Aabb(),]), InteractionLoop( [Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),], [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()] ), NewtonIntegrator(damping=0.6,gravity=(0,-9.81,0)), ] O.engines=O.engines+[PyRunner(iterPeriod=20,command='calm()',label="calmRunner")] O.dt=10e-6 O.run(5,True) print(O.dt) After run script, when I see graphical interface, particles are not near each other and they have moved far from each other. If I decrease young module, particles will be near each other same as initial model in AutoCad. But I don`t want to decrease young module. I thought this distance and exploding between particles is because of overlapping of polyhedra vertices and then with Offset in AUTOCAD I moved polygons vertices so they hadn`t overlapping any more but the problem didn`t solve. I should mention; after this step, I should allow particles move down under gravity. Now please help me Why the particles move and aren`t near each other? How I should fix 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 #684492]: Model particles (polyhedra) have moved far from each other from the first
Question #684492 on Yade changed: https://answers.launchpad.net/yade/+question/684492 Status: Open => Needs information Jan Stránský requested more information: Hello, please provide the content of polyline.txt file [1] > Why the particles move and aren`t near each other? there must be some interaction between them pushing them from each other. Gravity applies the same force (i.e. the same acceleration) to all bodies, so it has no effect on this behavior. > After run script Please also investigate the situation BEFORE running the script, just after loading the polyhedrons (or after one iteration to be able to investigate interactions - if there are some, what are the overlaps etc.). Are they loaded correctly? cheers Jan [1] https://www.yade-dem.org/wiki/Howtoask -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #684492]: Model particles (polyhedra) have moved far from each other from the first
New question #684492 on Yade: https://answers.launchpad.net/yade/+question/684492 Hi there I drew my whole polygons in Autocad (2D) and exported the vertices of them (of AutoCad) as text for using in YADE and creating polyhedra. I did that because I want pack of many polyhedrons with very small void and certain shape and size. Here is my code: import numpy as np from numpy import * RawVer=np.genfromtxt('polyline.txt',names=True,dtype=None) # ListVer is list of all the vertices of all the polygons Ver=() ListVer=[] for b in RawVer: if b[0]=='*LWPOLYLINE': ListVer.append(Ver) Ver=() continue Cordn=b[0] Cordn=np.fromstring(Cordn, sep=',') Cordn=tuple(Cordn.tolist()) Cordn1=Cordn+(0.1,) # add z vertex to coordinates Cordn2=Cordn+(0.3,) # add z vertex to coordinates if not Cordn1 in Ver: Ver=Ver+(Cordn1,Cordn2) ListVer.append(Ver) from yade import plot, polyhedra_utils Dolomite = PolyhedraMat() Dolomite.density = 2870 #kg/m^3 Dolomite.young = 24.36e9 #Pa Dolomite.poisson = 0.2 Dolomite.frictionAngle = radians(55.12) #rad for ii in ListVer: O.bodies.append(polyhedra_utils.polyhedra(Dolomite,v=ii,fixed=True, color=(1,0.5,1), mask=3)) for b in O.bodies: b.state.blockedDOFs='zXYZ' O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Polyhedra_Aabb(),]), InteractionLoop( [Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),], [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics" [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()] # contact law -- apply forces ), NewtonIntegrator(damping=0.6,gravity=(0,-9.81,0)), ] O.engines=O.engines+[PyRunner(iterPeriod=20,command='calm()',label="calmRunner")] # because we need to calm only on the first few steps in our model. O.dt=10e-6 O.run(5,True) print(O.dt) After run script, when I see graphical interface, particles are not near each other and they have moved far from each other. If I decrease young module, particles will be near each other same as initial model in AutoCad. But I don`t want to decrease young module. I thought this distance and exploding between particles is because of overlapping of polyhedra vertices and then with Offset in AUTOCAD I moved polygons vertices so they hadn`t overlapping any more but the problem didn`t solve. I should mention; after this step, I should allow particles move down under gravity. Now please help me Why the particles move and aren`t near each other? How I should fix 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