Re: [Yade-users] [Question #401682]: Problem with angular velocity
Question #401682 on Yade changed: https://answers.launchpad.net/yade/+question/401682 Status: Answered => Solved Jonathan Pergoli 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 #401682]: Problem with angular velocity
Question #401682 on Yade changed: https://answers.launchpad.net/yade/+question/401682 Jonathan Pergoli posted a new comment: Hi Jan, sorry I have made a mess with the code :) I have used O.bodies.append(body). Anyway, I have solved the problem using angMom :) Thank you, Jonathan -- 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 #401682]: Problem with angular velocity
Question #401682 on Yade changed: https://answers.launchpad.net/yade/+question/401682 Jonathan Pergoli posted a new comment: Hi Jan, sorry I will provide the working script: E1=1e+8 E2=5e+7 mat=FrictMat(density=643,frictionAngle=0.1489,label="MLI",young=E2) MLI=O.materials.append(mat) a=.2754 b=.2822 c=.1963 aa=a/2 bb=b/2 cc=c/2 h=.65 dist=0 theta=0 thetav=0 v1=(aa,bb,c) v2=(aa,-bb,c) v3=(-aa,-bb,c) v4=(-aa,bb,c) v5=(aa,bb,0) v6=(aa,-bb,0) v7=(-aa,-bb,0) v8=(-aa,bb,0) V=[v1,v2,v3,v4,v5,v6,v7,v8] vz=.19 R=[[m.cos(theta),0,m.sin(theta)],[0,1,0],[-m.sin(theta),0,m.cos(theta)]] v1=(R[0][0]*V[0][0]+R[0][1]*V[0][1]+R[0][2]*V[0][2],R[1][0]*V[0][0]+R[1][1]*V[0][1]+R[1][2]*V[0][2],R[2][0]*V[0][0]+R[2][1]*V[0][1]+R[2][2]*V[0][2]) v2=(R[0][0]*V[1][0]+R[0][1]*V[1][1]+R[0][2]*V[1][2],R[1][0]*V[1][0]+R[1][1]*V[1][1]+R[1][2]*V[1][2],R[2][0]*V[1][0]+R[2][1]*V[1][1]+R[2][2]*V[1][2]) v3=(R[0][0]*V[2][0]+R[0][1]*V[2][1]+R[0][2]*V[2][2],R[1][0]*V[2][0]+R[1][1]*V[2][1]+R[1][2]*V[2][2],R[2][0]*V[2][0]+R[2][1]*V[2][1]+R[2][2]*V[2][2]) v4=(R[0][0]*V[3][0]+R[0][1]*V[3][1]+R[0][2]*V[3][2],R[1][0]*V[3][0]+R[1][1]*V[3][1]+R[1][2]*V[3][2],R[2][0]*V[3][0]+R[2][1]*V[3][1]+R[2][2]*V[3][2]) v5=(R[0][0]*V[4][0]+R[0][1]*V[4][1]+R[0][2]*V[4][2],R[1][0]*V[4][0]+R[1][1]*V[4][1]+R[1][2]*V[4][2],R[2][0]*V[4][0]+R[2][1]*V[4][1]+R[2][2]*V[4][2]) v6=(R[0][0]*V[5][0]+R[0][1]*V[5][1]+R[0][2]*V[5][2],R[1][0]*V[5][0]+R[1][1]*V[5][1]+R[1][2]*V[5][2],R[2][0]*V[5][0]+R[2][1]*V[5][1]+R[2][2]*V[5][2]) v7=(R[0][0]*V[6][0]+R[0][1]*V[6][1]+R[0][2]*V[6][2],R[1][0]*V[6][0]+R[1][1]*V[6][1]+R[1][2]*V[6][2],R[2][0]*V[6][0]+R[2][1]*V[6][1]+R[2][2]*V[6][2]) v8=(R[0][0]*V[7][0]+R[0][1]*V[7][1]+R[0][2]*V[7][2],R[1][0]*V[7][0]+R[1][1]*V[7][1]+R[1][2]*V[7][2],R[2][0]*V[7][0]+R[2][1]*V[7][1]+R[2][2]*V[7][2]) body=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) body.state.angVel=(0,0,0.1) r=m.sqrt(aa**2+bb**2) Rj=m.sqrt(r**2+cc**2) Ri=0.05 Rr=Rj*Ri/(Rj+Ri) mu_rM=0.05 mu_rG=1.08 KN=E1*2*Ri*E1*2*Ri/(E1*2*Ri+E1*2*Ri) KR=3*Ri**2*mu_rG**2*KN/4 O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Polyhedra_Aabb()]), InteractionLoop( [Ip2_FrictMat_FrictMat_MindlinPhys(en=.45,es=.45,krot=KR,frictAngle=.7853)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=0), ] The script is the same and also the version of yadedaily. I'll try with angMom. Thank you, Jonathan -- 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 #401682]: Problem with angular velocity
New question #401682 on Yade: https://answers.launchpad.net/yade/+question/401682 Hi everybody! I'm trying to set an initial value of the angular velocity for a body. I set the angular velocity: body.state.angVel=(0,0,0.1) Then when I start yadedaily at the beginning of the simulation the angular velocity is correct but when I write O.run() I don't know why the angular velocity is set to (0,0,0). This happen when I use yadedaily for ubuntu server 14.04 LTS whereas when I run the simulation with ubuntu 14.04 on my laptop it works well and this problem is not present. Any solutions? Thank you in advance, Jonathan -- 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 #401682]: Problem with angular velocity
Question #401682 on Yade changed: https://answers.launchpad.net/yade/+question/401682 Description changed to: Hi everybody! I'm trying to set an initial value of the angular velocity for a body. I set the angular velocity: body=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="mat",wire=False) body.state.angVel=(0,0,0.1) wx=body.state.angVel[0] wy=body.state.angVel[1] wz=body.state.angVel[2] Then when I start yadedaily at the beginning of the simulation the angular velocity is correct but when I write O.run() I don't know why the angular velocity is set to (0,0,0). This happen when I use yadedaily for ubuntu server 14.04 LTS whereas when I run the simulation with ubuntu 14.04 on my laptop it works well and this problem is not present. Any solutions? Thank you in advance, Jonathan -- 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 #401682]: Problem with angular velocity
Question #401682 on Yade changed: https://answers.launchpad.net/yade/+question/401682 Description changed to: Hi everybody! I'm trying to set an initial value of the angular velocity for a body. I set the angular velocity: body=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) body.state.angVel=(0,0,0.1) wx=body.state.angVel[0] wy=body.state.angVel[1] wz=body.state.angVel[2] Then when I start yadedaily at the beginning of the simulation the angular velocity is correct but when I write O.run() I don't know why the angular velocity is set to (0,0,0). This happen when I use yadedaily for ubuntu server 14.04 LTS whereas when I run the simulation with ubuntu 14.04 on my laptop it works well and this problem is not present. Any solutions? Thank you in advance, Jonathan -- 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 #341304]: Landing of a satellite
Question #341304 on Yade changed: https://answers.launchpad.net/yade/+question/341304 Status: Answered => Solved Jonathan Pergoli 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
[Yade-users] [Question #341304]: Landing of a satellite
New question #341304 on Yade: https://answers.launchpad.net/yade/+question/341304 Hi guys, I am performing simulation in which a satellite lands on the soil. The simulation deal with more than 70.000 particles and take a week to make 10 seconds of simulations using 10 cores. I'd like to know if it is possible to speed it up. This is the code: from yade import utils,ymport,export,plot import math as m # Material E1=1e+8 E2=5e+7 mli=FrictMat(density=643,frictionAngle=0.1489,label="MLI",young=E2) MLI=O.materials.append(mli) gravel=FrictMat(density=1700,frictionAngle=0.7853,label="gravel",young=E1) GRAVEL=O.materials.append(gravel) # Ground s=ymport.textExt('1cm_0g2.txt',format='x_y_z_r') sphere=O.bodies.append(s) # Create a vector o spheres to eliminate those that have COG above the container for i in O.bodies: if isinstance(i.shape,Sphere): if i.state.pos[2]>.30: O.bodies.erase(i.id) print i.state.mass for i in O.bodies: if isinstance(i.shape,Sphere): if i.state.pos[2]<0: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): x=i.state.pos[0] y=i.state.pos[1] r=m.sqrt(x**2+y**2) if r>.75: O.bodies.erase(i.id) aa=[] for i in O.bodies: if isinstance(i.shape,Sphere): aa.append(i.id) print len(aa) # Cylinder hc=.30 c=geom.facetCylinder((0,0,.15),radius=.75,height=hc,segmentsNumber=100,wallMask=6,material="gravel") O.bodies.append(c) # SAT a=.2774 b=.2922 c=.1973 aa=a/2 bb=b/2 cc=c/2 h=.65 dist=0 theta=0 thetav=0 v1=(aa,bb,c) v2=(aa,-bb,c) v3=(-aa,-bb,c) v4=(-aa,bb,c) v5=(aa,bb,0) v6=(aa,-bb,0) v7=(-aa,-bb,0) v8=(-aa,bb,0) V=[v1,v2,v3,v4,v5,v6,v7,v8] vz=.19 R=[[m.cos(theta),0,m.sin(theta)],[0,1,0],[-m.sin(theta),0,m.cos(theta)]] v1=(R[0][0]*V[0][0]+R[0][1]*V[0][1]+R[0][2]*V[0][2],R[1][0]*V[0][0]+R[1][1]*V[0][1]+R[1][2]*V[0][2],R[2][0]*V[0][0]+R[2][1]*V[0][1]+R[2][2]*V[0][2]) v2=(R[0][0]*V[1][0]+R[0][1]*V[1][1]+R[0][2]*V[1][2],R[1][0]*V[1][0]+R[1][1]*V[1][1]+R[1][2]*V[1][2],R[2][0]*V[1][0]+R[2][1]*V[1][1]+R[2][2]*V[1][2]) v3=(R[0][0]*V[2][0]+R[0][1]*V[2][1]+R[0][2]*V[2][2],R[1][0]*V[2][0]+R[1][1]*V[2][1]+R[1][2]*V[2][2],R[2][0]*V[2][0]+R[2][1]*V[2][1]+R[2][2]*V[2][2]) v4=(R[0][0]*V[3][0]+R[0][1]*V[3][1]+R[0][2]*V[3][2],R[1][0]*V[3][0]+R[1][1]*V[3][1]+R[1][2]*V[3][2],R[2][0]*V[3][0]+R[2][1]*V[3][1]+R[2][2]*V[3][2]) v5=(R[0][0]*V[4][0]+R[0][1]*V[4][1]+R[0][2]*V[4][2],R[1][0]*V[4][0]+R[1][1]*V[4][1]+R[1][2]*V[4][2],R[2][0]*V[4][0]+R[2][1]*V[4][1]+R[2][2]*V[4][2]) v6=(R[0][0]*V[5][0]+R[0][1]*V[5][1]+R[0][2]*V[5][2],R[1][0]*V[5][0]+R[1][1]*V[5][1]+R[1][2]*V[5][2],R[2][0]*V[5][0]+R[2][1]*V[5][1]+R[2][2]*V[5][2]) v7=(R[0][0]*V[6][0]+R[0][1]*V[6][1]+R[0][2]*V[6][2],R[1][0]*V[6][0]+R[1][1]*V[6][1]+R[1][2]*V[6][2],R[2][0]*V[6][0]+R[2][1]*V[6][1]+R[2][2]*V[6][2]) v8=(R[0][0]*V[7][0]+R[0][1]*V[7][1]+R[0][2]*V[7][2],R[1][0]*V[7][0]+R[1][1]*V[7][1]+R[1][2]*V[7][2],R[2][0]*V[7][0]+R[2][1]*V[7][1]+R[2][2]*V[7][2]) p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) SAT=O.bodies.append(p) p.state.vel=(vz*m.sin(thetav),0,-vz*m.cos(thetav)) p.state.ori=((0,-1,0),theta) p.state.pos=(-dist,0,h) Ixx=0.081026 Iyy=0.10031 Izz=0.12116 p.state.inertia=(Ixx,Iyy,Izz) M=p.id r=m.sqrt(aa**2+bb**2) Rj=m.sqrt(r**2+cc**2) Ri=0.05 Rr=Rj*Ri/(Rj+Ri) mu_rM=0.016 mu_rG=2.05 KN=E1*2*Ri*E1*2*Ri/(E1*2*Ri+E1*2*Ri)#6.5e+4 KR=3*Ri**2*mu_rG**2*KN/4 print "SAT's mass = ",p.state.mass print "SAT's position = ",p.state.pos print "SAT's orientation = ",p.state.ori print "SAT's inertia = ",p.state.inertia print "Timestep = ",O.dt # Functions def forces(): # rotation of axis q1=p.state.ori[0] q2=p.state.ori[1] q3=p.state.ori[2] q4=p.state.ori[3] RR=[[q1**2-q2**2-q3**2+q4**2,2*(q1*q2+q3*q4),2*(q1*q3-q2*q4)],[2*(q1*q2-q3*q4),-q1**2+q2**2-q3**2+q4**2,2*(q2*q3+q1*q4)],[2*(q1*q3+q2*q4),2*(q2*q3-q1*q4),-q1**2-q2**2+q3**2+q4**2]] e1=(RR[0][0],RR[0][1],RR[0][2]) e2=(RR[1][0],RR[1][1],RR[1][2]) e3=(RR[2][0],RR[2][1],RR[2][2]) massa1=0 massa2=0 massa3=0 for i in O.bodies: if isinstance(i.shape,Sphere): if i.state.vel[2]>.001: massa1+=i.state.mass if i.state.pos[2]>.4: massa2+=i.state.mass if i.state.vel[2]>.01: massa3+=i.state.mass # forces #Fx=utils.sumForces([MASCOT],e1) #Fy=utils.sumForces([MASCOT],e2) #Fz=utils.sumForces([MASCOT],e3) #Tx=utils.sumTorques([MASCOT],axis=e1,axisPt=(p.state.pos[0]-aa,p.state.pos[1],p.state.pos[2]))
Re: [Yade-users] [Question #295170]: Problem with MatchMaker
Question #295170 on Yade changed: https://answers.launchpad.net/yade/+question/295170 Status: Answered => Solved Jonathan Pergoli confirmed that the question is solved: Thanks Anton Gladky, 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 #295170]: Problem with MatchMaker
Question #295170 on Yade changed: https://answers.launchpad.net/yade/+question/295170 Jonathan Pergoli posted a new comment: Thank you! -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #295170]: Problem with MatchMaker
Question #295170 on Yade changed: https://answers.launchpad.net/yade/+question/295170 Description changed to: Hi everybody! I'm using YADE to simulate an impact between two body with differents material's properties. Untill few days ago my code worked perfectly. Now it gives me the following problem: terminate called after throwing an instance of 'std::invalid_argument' what(): MatchMaker: no match for (1,0), and values required for algo computation 'avg' not specified. Aborted (core dumped) The code is: # Material mli=FrictMat(density=643,frictionAngle=0.1489,label="MLI") mat1=O.materials.append(mli) gravel=FrictMat(density=1700,frictionAngle=0.9188,label="gravel") mat2=O.materials.append(gravel) # Ground s=ymport.textExt('rest',format='x_y_z_r') sphere=O.bodies.append(s) print len(O.bodies) # Create a vector o spheres to eliminate those that have COG above the container for i in O.bodies: if isinstance(i.shape,Sphere): print i.state.mass if i.state.pos[2]>.4: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): if i.state.pos[2]<0: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): x=i.state.pos[0] y=i.state.pos[1] r=m.sqrt(x**2+y**2) if r>.75: O.bodies.erase(i.id) print len(O.bodies) # Cylinder h=.4 c=geom.facetCylinder((0,0,.2),radius=.75,height=h,segmentsNumber=100,wallMask=6,material="gravel") O.bodies.append(c) p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) # Engines O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),es=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),krot=3)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=0.0) ] O.trackEnergy=True O.dt=.5*PWaveTimeStep() I use yadedaily on Ubuntu 14.04 LTS server. But on my PC with the same versione of yade and Ubuntu 14 it works normally. Cheers, Jonathan -- 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 #295170]: Problem with MatchMaker
New question #295170 on Yade: https://answers.launchpad.net/yade/+question/295170 Hi everybody! I'm using YADE to simulate an impact between two body with differents material's properties. Untill few days ago my code worked perfectly. Now it gives me the following problem: terminate called after throwing an instance of 'std::invalid_argument' what(): MatchMaker: no match for (1,0), and values required for algo computation 'avg' not specified. Aborted (core dumped) The code is: # Material mli=FrictMat(density=643,frictionAngle=0.1489,label="MLI") mat1=O.materials.append(mli) gravel=FrictMat(density=1700,frictionAngle=0.9188,label="gravel") mat2=O.materials.append(gravel) # Ground s=ymport.textExt('rest',format='x_y_z_r') sphere=O.bodies.append(s) print len(O.bodies) # Create a vector o spheres to eliminate those that have COG above the container for i in O.bodies: if isinstance(i.shape,Sphere): print i.state.mass if i.state.pos[2]>.4: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): if i.state.pos[2]<0: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): x=i.state.pos[0] y=i.state.pos[1] r=m.sqrt(x**2+y**2) if r>.75: O.bodies.erase(i.id) print len(O.bodies) # Cylinder h=.4 c=geom.facetCylinder((0,0,.2),radius=.75,height=h,segmentsNumber=100,wallMask=6,material="gravel") O.bodies.append(c) p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) # Engines O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),es=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),krot=3)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=0.0) ] O.trackEnergy=True O.dt=.5*PWaveTimeStep() I use yadedaily on Ubuntu 14.04 LTS server. But on my PC with the same versione of yade and Ubuntu 14 it works normally. Cheers, Jonathan -- You received this question notification because your team yade-users is an answer contact for Yade.
[Yade-users] [Question #295169]: Problem with MatchMaker
New question #295169 on Yade: https://answers.launchpad.net/yade/+question/295169 Hi everybody! I'm using YADE to simulate an impact between two body with differents material's properties. Untill few days ago my code worked perfectly. Now it gives me the following problem: terminate called after throwing an instance of 'std::invalid_argument' what(): MatchMaker: no match for (1,0), and values required for algo computation 'avg' not specified. Aborted (core dumped) The code is: # Material mli=FrictMat(density=643,frictionAngle=0.1489,label="MLI") mat1=O.materials.append(mli) gravel=FrictMat(density=1700,frictionAngle=0.9188,label="gravel") mat2=O.materials.append(gravel) # Ground s=ymport.textExt('rest',format='x_y_z_r') sphere=O.bodies.append(s) print len(O.bodies) # Create a vector o spheres to eliminate those that have COG above the container for i in O.bodies: if isinstance(i.shape,Sphere): print i.state.mass if i.state.pos[2]>.4: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): if i.state.pos[2]<0: O.bodies.erase(i.id) for i in O.bodies: if isinstance(i.shape,Sphere): x=i.state.pos[0] y=i.state.pos[1] r=m.sqrt(x**2+y**2) if r>.75: O.bodies.erase(i.id) print len(O.bodies) # Cylinder h=.4 c=geom.facetCylinder((0,0,.2),radius=.75,height=h,segmentsNumber=100,wallMask=6,material="gravel") O.bodies.append(c) p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) # Engines O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),es=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),krot=3)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=0.0) ] O.trackEnergy=True O.dt=.5*PWaveTimeStep() I use yadedaily on Ubuntu 14.04 LTS server. Cheers, Jonathan -- 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 :
Re: [Yade-users] [Question #293635]: Problem with visualization of boxes in ParaView 4.0.1
Question #293635 on Yade changed: https://answers.launchpad.net/yade/+question/293635 Status: Answered => Solved Jonathan Pergoli 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 #293635]: Problem with visualization of boxes in ParaView 4.0.1
Question #293635 on Yade changed: https://answers.launchpad.net/yade/+question/293635 Jonathan Pergoli posted a new comment: ahahahah lol # Ground s=ymport.textExt('Prova3',format='x_y_z_r') sphere=O.bodies.append(s) # Container c=geom.facetCylinder((0,0,.2),radius=.75,height=.4,segmentsNumber=100,wallMask=6,material="gravel") O.bodies.append(c) # Polyhedra p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False) O.bodies.append(p) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),es=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),krot=3)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-9.81),damping=.2), PyRunner(command='vtkExporter.exportFacets()',iterPeriod=2500) PyRunner(command='vtkExporter.exportPolyhedra()',iterPeriod=2500), PyRunner(command='vtkExporter.exportSpheres()',iterPeriod=2500) ] O.dt=.5*PWaveTimeStep() -- 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 #293635]: Problem with visualization of boxes in ParaView 4.0.1
Question #293635 on Yade changed: https://answers.launchpad.net/yade/+question/293635 Jonathan Pergoli posted a new comment: Hi Jan! I have installed both yadedaily from package and yade-1.07.0 from source. Maybe I have solved the problem using VTKExport from the export module: - in the engine PyRunner(command='vtkExporter.exportPolyhedra()',iterPeriod=2500), PyRunner(command='vtkExporter.exportSpheres()',iterPeriod=2500), PyRunner(command='vtkExporter.exportFacets()',iterPeriod=2500), - out of the engine Prova="prova" vtkExporter = export.VTKExporter(Prova) vtkExporter.exportSpheres(ids="all",what=[('pos','b.state.pos')]) vtkExporter.exportFacets(ids="all",what=[('pos','b.state.pos')]) vtkExporter.exportPolyhedra(ids="all",what=[('orientation','b.state.se3')]) Now it seems to work correcttly since it is the same in the View. But maybe you can confirm it to me and help to write it in a smarter way if what I have written above is incorrect. P.S. As you can notice I have to use polyhedra instead of box Cheers Jonathan -- 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Status: Answered => Solved Jonathan Pergoli confirmed that the question is solved: Now I can distinguish between interactions: def rollingfriction(): for i in sphere: try: O.interactions[m,sphere[i]].phys.kr=.15 print "Interaction between",m,sphere[i] except: print "No interaction exists",m,sphere[i] Thank you guys for helping me. :) -- 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 #293635]: Problem with visualization of boxes in ParaView 4.0.1
New question #293635 on Yade: https://answers.launchpad.net/yade/+question/293635 Hi everybodi! I cannot see rotation of my box when I postprocess it with paraview. If I open the contreller I can see the box star rotating after bouncing on the ground, but when I open it with paraview I the box is always in horizontal position. The problem is that I cannot use SnapshotEngine because I have to run my simuations on vesion without the graphic interface. Can someone help me? 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: Sorry I wrote the wrong code. I did this: O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),es=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),krot=MatchMaker(matches=((gravel,MLI,.15),(gravel,gravel,3], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1) ] -- 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: In this way the simulation distinguishes between en and es, but for the rolling friction coefficient krot it doesn't 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: What about this: gravel=FrictMat(density=1700,frictionAngle=.9188,label="gravel") O.materials.append(gravel) MLI=FrictMat(density=1280,frictionAngle=0.1489,label="MLI") O.materials.append(MLI) ... O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1) ] It gives me this error: No registered converter was able to produce a C++ rvalue of type Eigen::Matrix<double, 3, 1, 0, 3, 1> from this Python object of type tuple -- 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: Hi Jérome, you mean this: O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(en=.55,es=.55,krot=3)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=.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
Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: P.S. I'm new to YADE :-) -- 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: Thanks Jan, but I mean how can i modifie Ip2_FrictMat_FrictMat_MindlinPhys in order to distinguish between sphere-sphere and sphere box? :-) I'm using box now instead of polyhedra but the problem is the same. -- 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 #293247]: Physic interaction betweem particles and polyhedra
Question #293247 on Yade changed: https://answers.launchpad.net/yade/+question/293247 Jonathan Pergoli posted a new comment: Hi Jan, How can be modified? I have only one box. -- 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 #293247]: Physic interaction betweem particles and polyhedra
New question #293247 on Yade: https://answers.launchpad.net/yade/+question/293247 Hi everybody! I'm trying to simulate a box falling on a cylindrical pack of spheres. The spheres have coefficient of restitution = .1 and the box has a COR = .6. For the spheres I have used Ip2_FrictMat_FrictMat_MindlinPhys(en=.1,es=.1) . As regard the box, I would like to use the same but if I write: ... [p2_FrictMat_FrictMat_MindlinPhys(en=.1,es=.1),p2_FrictMat_FrictMat_MindlinPhys(en=.6,es=.6)] the former properties are overwritten by the latter. The box is made using utils.polyhedron(). I have also used Ip2_FrictMat_PolyhedraMat_CundallStrack(), but I cannot set the COR. Can someone help me,please? Thank you :) -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #292015]: Controller on yade 1.07.0
Question #292015 on Yade changed: https://answers.launchpad.net/yade/+question/292015 Jonathan Pergoli posted a new comment: I launch yade but the error tells me "do not import qt when in batch mode". I don't know why.Maybe it happens because I launch yade on other PC using remote control. -- 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 #292014]: Error opening the inspector on Ubuntu 15.10 using yade 1.20.0
Question #292014 on Yade changed: https://answers.launchpad.net/yade/+question/292014 Jonathan Pergoli posted a new comment: Thank you guys, at the end I decided to remove ubuntu 15.10 and install 14.04. Now yade works perfectly. -- 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 #292015]: Controller on yade 1.07.0
Question #292015 on Yade changed: https://answers.launchpad.net/yade/+question/292015 Jonathan Pergoli posted a new comment: I have to underline that I'm using yade in batch mode. -- 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 #292015]: Controller on yade 1.07.0
Question #292015 on Yade changed: https://answers.launchpad.net/yade/+question/292015 Jonathan Pergoli posted a new comment: Hello, I have only clear screen, kills line and F8 plot. I tried to import qt from yade but it doesn't 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 #292014]: Error opening the inspector on Ubuntu 15.10 using yade 1.20.0
Question #292014 on Yade changed: https://answers.launchpad.net/yade/+question/292014 Jonathan Pergoli posted a new comment: Hi Jerome! I used gedit but it is not capable of reading the content. I didn't consider Microsoft Word :D. I'll try the other programs. 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
[Yade-users] [Question #292015]: Controller on yade 1.07.0
New question #292015 on Yade: https://answers.launchpad.net/yade/+question/292015 Hi! Is there a controller on yade-1.07.0 like in yade-1.20.0? If yes, how to open it and the inspector? I have read the documentation but I cannot find any command. Thank you. P.S. I'm new in yade so, sorry for my several questions. -- 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 #292014]: Error opening the inspector on Ubuntu 15.10 using yade 1.20.0
New question #292014 on Yade: https://answers.launchpad.net/yade/+question/292014 Hi! I was trying to open the inspector and yade gives me back the same error as in the question #274036 with a difference. The file to be modified is __init__.pyc instead of __init.py, and I don't know how to open a file.pyc so I can't replace grid.SetMargin(0) with grid.setContentsMargin(0,0,0,0). Thank you. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #290497]: Impact dynamic for landing scenario
Question #290497 on Yade changed: https://answers.launchpad.net/yade/+question/290497 Status: Answered => Solved Jonathan Pergoli 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