Re: [Yade-users] [Question #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Answered => Open Paul Pircher is still having a problem: Hi there, currently I am not sure whether to keep that question open or if I should close it. Apparently, there are several issues with PFacets that will be worked on by the dev team. So how may I proceed? Was there already an update that I missed for PFacets? Cheers, Paul -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Paul Pircher posted a new comment: Hi there, now I got some details and screenshots ( https://imgur.com/a/3CQHT1G ). I was right: All interactions were real. I plotted O.interactions.countReal() and it showed either 18 or 21 interactions. 18 for no external interaction is clear as the cube I used should have 18 interactions since each gridConnection enables one gridNode-gridNode interaction. Hence, the sphere contact leads to 3 interactions at that edge position. Also as seen on the screenshots, the interacting bodies are only PFacets with one not even close to the contact. I only did very few changes in the script but for completeness in paste the script I used to generate these screenshots. Please note the iteration period for the plot is an odd number. ### from yade import plot, qt import os, sys, time from yade.gridpfacet import * import numpy as np, math """ All manual entries for the simulation """ O.dt = 1e-8 # timestep node_mat_name = 'gridNodeMat' node_r = 10 * 1e-3 # radius for the nodes, cylinders and pfacets node_E = 52.*1e9 # (concrete) node_poisson = 0.167 node_rho = 2750 node_phi = 35. node_normal_coh = 3e1000 # high values to not lose node interactions. total elasticity, no plasticity node_shear_coh = 3e1000 pfacet_mat_name = 'pFacetMat' # this material has no influence on the beam stiffness, only for contacts pfacet_E = node_E pfacet_poisson = node_poisson pfacet_rho = node_rho pfacet_phi = node_phi color = [0, 0, 1] # color for certain bodies (PFacets) sphere_mat_name = 'sphereMat' sphere_poisson = 0.2 sphere_phi = 24. sphere_E = 30.*1e6 sphere_rho = 2660 sphere_r = 40 * 1e-3 # radius of the penetrationg sphere sphere_v = -0.1*100 # velocity of the penetrating sphere dim_x = 0.5 # length in x-direction of the cuboid dim_y = 0.6 # width of the cuboid dim_z = 0.7 # height of the cuboid # initial position of the penetrating sphere sphere_x = (1/2) * dim_x sphere_y = 0 sphere_z = dim_z + sphere_r + node_r engine_gravity = (0,0,0)# gravity acceleration engine_damping = 0.0# general damping factor plot_label = "plotter" plotData_period = 51# iterations, uneven for changing nr of interactions The simulation engine """ O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Node_Aabb(), Bo1_GridConnection_Aabb(), Bo1_PFacet_Aabb(), ]), InteractionLoop( [Ig2_GridNode_GridNode_GridNodeGeom6D(), Ig2_GridConnection_GridConnection_GridCoGridCoGeom(), Ig2_Sphere_PFacet_ScGridCoGeom(), Ig2_PFacet_PFacet_ScGeom(), Ig2_Sphere_GridConnection_ScGridCoGeom(), Ig2_Sphere_Sphere_ScGeom(), ], [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True), Ip2_FrictMat_FrictMat_FrictPhys() ], [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), Law2_ScGeom_FrictPhys_CundallStrack(), Law2_ScGridCoGeom_FrictPhys_CundallStrack(), Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(), ] ), NewtonIntegrator( gravity=engine_gravity, damping=engine_damping), PyRunner( command = 'addPlotData()', iterPeriod = plotData_period), ] """ Materials """ O.materials.append( CohFrictMat( young = node_E, poisson = node_poisson, density = node_rho, frictionAngle = radians(node_phi), normalCohesion = node_normal_coh, shearCohesion = node_shear_coh, momentRotationLaw = True, label = node_mat_name ) ) O.materials.append( FrictMat( young = pfacet_E, poisson = pfacet_poisson, density = pfacet_rho, frictionAngle = radians(pfacet_phi), label = pfacet_mat_name ) ) O.materials.append( FrictMat( young = sphere_E , poisson = sphere_poisson, density = sphere_rho, frictionAngle = radians(sphere_phi), label = sphere_mat_name ) ) """ Bodies """ # adding the 8 corner nodes of the cuboid nodesIds = [] # holds all gridnode ids nodesIds.append( O.bodies.append( gridNode( [0,0,0], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [dim_x,0,0], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [0,dim_y,0], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [dim_x,dim_y,0], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [0,0,dim_z], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [dim_x,0,dim_z], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [0,dim_y,dim_z], node_r, wire=False, fixed=True, material='gridNodeMat' ) ) ) nodesIds.append( O.bodies.append( gridNode( [dim_x,dim_y,dim_z
Re: [Yade-users] [Question #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Paul Pircher posted a new comment: Hi Bruno, thanks for your answer! Only a short response from my side as well. The last time I checked all 3 interactions were real at the contact. The corresponding bodies in contact with the penetrating sphere were only pfacets. One of the pfacet wasn't even close to the contact location. No interaction with a grid-connection that might be expected. I found out that the case for zero interactions is more complex. At even iteration numbers there were 0 interactions, at odd iteration numbers there were 3 interactions. I noticed the post where general PFacet problems are discussed and had a look at it. The thing is that I am often not sure if I found something of serious interest (bug, unintended feature, etc.) or my limited knowledge is the issue. I am not a software engineer and therefore I struggle with too complex code especially with C++. So I rather post general questions here. I will prepare my examples, get some screenshots and post them here again. Maybe that helps. > From the top of my head: if you assign another material to the PFacets and to the spheres, and if you use the corresponding functors (just like for changing the sphere-sphere contact model) then it should change the contact model. I need to try that again. If this works it would save me a ton of work. Although I am using a contact model that was developed at my departement. So it isn't implemented in YADE straight away and therefore might cause some issues. Best regards, Paul -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Open => Answered Bruno Chareyre proposed the following answer: Hi Paul, I did not check all details but here are quick answers. I would say the excess interactions you see are just virtual interactions. Try filtering them out by checking "interaction.isReal", if it does solve the issue let us know. The zero-interaction case sounds like a real issue though. Probably linked to a couple issues we identified recently. I hope we can fix them soon. I may use your example to try and understand the problem. > change the PFacet - external particles interactions >From the top of my head: if you assign another material to the PFacets and to >the spheres, and if you use the corresponding functors (just like for changing >the sphere-sphere contact model) then it should change the contact model. Regards 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Expired => Open Paul Pircher is still having a problem: Can someone give me more insight here? :) -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Paul Pircher gave more information on the question: Since I just had a look at more positions: It seems like that only the contact of the sphere at the position of a gridconnection at the edge of the cuboid is an issue. Depending from what direction the sphere penetrates the cuboid I either get zero or three interactions. At any other position on the cuboid (somewhere in the middle of a side of the cuboid or even at the corner) I receive the expected 1 interaction. I am still clueless about that edge contact though. With zero interactions I don't know where my wanted data is stored (e.g. penetration depth). With 3 interactions I don't know what interaction is the "right" one or how those multiple but similar contacts are handled. As always: The contact behaviour according to position and velocity of the sphere works perfectly fine at every location. 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Answered => Open Paul Pircher is still having a problem: Hi and thanks for your input! I know how I am supposed to receive parameters of interactions. In my case, as can be seen in the code in the "PyRunner Function" - section, I am using len( O.bodies[idSphere].intrs() ) to count the number of interactions (which should return the number of all interactions with the sphere). Furthermore I am extracting the phys-norm-force from the first interaction with the sphere via O.bodies[idSphere].intrs()[0].phys.normalForce.norm(). Same method for the penetrationDepth. I also had a look at O.forces.f(idSphere)[2] to obtain the force on the sphere in Z-direction with a different method. However, the problem that I am facing in this particular example with PFacets is, that using this approach does NOT provide correct data that are in accordance with the visual observations. NO INTERACTION can be found in here. Which is why I do not receive a penetrationDepth parameter. Since I am using the same approach and functions as you mentioned, I assume that I the data mining itself would be correct, but my data is found somewhere else. And I don't know where. Since the observation of position and velocity does show correct behaviour, somewhere the contact has to be computed. Although there seems to be no interaction for that. I hope that this is understandable. > I do not see one that would properly fit YADE design. Alright, thank you. This is also what I concluded. Seems like I am going to have a look at the pfacet source code in order to know what I need to adapt or add to obtain the behaviour of a different contact model. Since the pfacet approach works fine for me so far (except that data mining issue mentioned above) I think, that only few adaptations need to be done to change the physical computations of the contact itself. Thanks! -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Status: Open => Answered Jérôme Duriez proposed the following answer: Hi > How can I correctly mine the contact parameters like penetration depth, force on the sphere and number of interactions for my penetration tests? for cont being some contact interaction (eg cont = O.interactions[0,1]) with a ScGeom geom, cont.geom.penetrationDepth would give you penetration depth. Resultant force on a bodie with id i are obtained through O.forces.f(i) and number of (real) interaction is O.interactions.countReal() See also https://yade-dem.org/doc/tutorial-data-mining.html and the rest of the doc (User s manual and Class Reference) ;-) > Since it will be needed in the future: If there is an "easy" way (only changing python code, not c++ source code) to change the contact law I do not see one that would properly fit YADE design. DEM operations in YADE are executed from the C++ side, through C++ source of Engines and LawFunctors, for instance. Python is "just" for designing and interrogating what's going on, and that is already something marvelous. You could still always rewrite all DEM operations in pure Python but that would be slower. -- 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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 Paul Pircher posted a new comment: I assume that this is just spam, but I find nothing to report it. Hopefully that message will get attention .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 #696480]: PFacet model - contact data mining
Question #696480 on Yade changed: https://answers.launchpad.net/yade/+question/696480 david John posted a new comment: Hey, are you an expert web developer? I have got a question for you. Can i download all the novels and books from this site with a single click or have to https://readlightnovel.info/";>readlightnovel.info -- 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 #696480]: PFacet model - contact data mining
New question #696480 on Yade: https://answers.launchpad.net/yade/+question/696480 Hello there! Recently I've been working a lot with the PFacet approach to obtain an elastic model for bigger but simple bodies in DEM simulations. I managed to obtain correct mechanical behaviour of my elastic body. Now I am researching the contact with external particles. I made up a simple example of a PFacet cuboid that is penetrated by a sphere. The goal is to do that at every different position on the cuboid (edge, corner, intersection...) to verify that at all positions the same contact behaviour (penetration depth, force etc.) appears. I do this in order to get a better understanding of how exactly the model works (coding wise) as I want to change the contact model to an adapted hertz-mindlin model afterwards. When I perform this penetration test e.g. within the area of a PFacet and on the intersection of 2 PFacets (so directly on a cylinder connection) I can see that the behaviour is according to the Cundall Strack law, which was expected, and that I only have 1 interaction on the sphere. However, if I perform this test on the very edge of the cuboid, like the following script shows, I get unexpected results. Mostly there is no interaction with the sphere, but according to the position and velocity of the sphere it behaves correctly and identical to other sphere positions (as mentioned before). If I go through the simulation step by step, at some timesteps 3 interactions are found. Those 3 interactions are between the sphere and 3 different PFacets, one of them should be not even close to the sphere. If 3 interactions are found, I would have expected that there are 2 interactions with PFacets and 1 with the cylindrical connection. Still, this isn't in accordance with the other tests where the sphere is at a different position and I am still not able to extract the wanted data. So my question is: How can I correctly mine the contact parameters like penetration depth, force on the sphere and number of interactions for my penetration tests? Am I using the wrong functions or am I looking at the wrong spot? Thanks in advance! P.S.: Since it will be needed in the future: If there is an "easy" way (only changing python code, not c++ source code) to change the contact law for the PFacet - external particles interactions, I would be happy to receive hints. Working with YADE 2020.01a on Ubuntu 20.04.2 LTS ## from yade import plot, qt import os, sys, time from yade.gridpfacet import * import numpy as np, math """ All manual entries for the simulation """ O.dt = 1e-8 # timestep node_mat_name = 'gridNodeMat' node_r = 10 * 1e-3 # radius for the nodes, cylinders and pfacets node_E = 52.*1e9 # (concrete) node_poisson = 0.167 node_rho = 2750 node_phi = 35. node_normal_coh = 3e1000 # high values to not lose node interactions. total elasticity, no plasticity node_shear_coh = 3e1000 pfacet_mat_name = 'pFacetMat' # this material has no influence on the beam stiffness, only for contacts pfacet_E = node_E pfacet_poisson = node_poisson pfacet_rho = node_rho pfacet_phi = node_phi color = [0, 0, 1] # color for certain bodies (PFacets) sphere_mat_name = 'sphereMat' sphere_poisson = 0.2 sphere_phi = 24. sphere_E = 30.*1e6 sphere_rho = 2660 sphere_r = 40 * 1e-3 # radius of the penetrationg sphere sphere_v = -0.1*100 # velocity of the penetrating sphere dim_x = 0.5 # length in x-direction of the cuboid dim_y = 0.6 # width of the cuboid dim_z = 0.7 # height of the cuboid # initial position of the penetrating sphere sphere_x = (1/2) * dim_x sphere_y = 0 sphere_z = dim_z + sphere_r + node_r engine_gravity = (0,0,0)# gravity acceleration engine_damping = 0.0# general damping factor plot_label = "plotter" plotData_period = 50# iterations The simulation engine """ O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Node_Aabb(), Bo1_GridConnection_Aabb(), Bo1_PFacet_Aabb(), ]), InteractionLoop( [Ig2_GridNode_GridNode_GridNodeGeom6D(), Ig2_GridConnection_GridConnection_GridCoGridCoGeom(), Ig2_Sphere_PFacet_ScGridCoGeom(), Ig2_PFacet_PFacet_ScGeom(), Ig2_Sphere_GridConnection_ScGridCoGeom(), Ig2_Sphere_Sphere_ScGeom(), ], [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True), Ip2_FrictMat_FrictMat_FrictPhys() ], [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), Law2_ScGeom_FrictPhys_CundallStrack(), Law2_ScGridCoGeom_FrictPhys_CundallStrack(), Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(), ] ), NewtonIntegrator( gravity=engine_gravity, damping=engine_damping), PyRunner( command = 'addPlotData()', iterPeriod = plotData_period), ] """ Materials """ O.materials.append( CohFrictMat( young = node_E, poisson = node_poisson, density = node_rho, frictionAngle = r