yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #05950
Re: [Question #197661]: on modify interactionLoop
Question #197661 on Yade changed:
https://answers.launchpad.net/yade/+question/197661
Jan Stránský proposed the following answer:
O.load('consolidated_state_'+key+'_'+str(phi)+'.xml') # we add new
materials to our material container
O.materials.append(MomentMat(eta=eyta,young=young,poisson=0.1,frictionAngle=radians(fricFinal),density=2600,label='spheres-moment'))
O.materials.append(MomentMat(eta=0.0,young=young,poisson=0.1,frictionAngle=0,density=0,label='walls-moment'))
# here we modify the material type for i_body in O.bodies: if i_body.id
< 6 : i_body.material = O.materials[3] else: i_body.material =
O.materials[2] #here we move to modify the interaction loop Interaction
= O.engines[2] Interaction = InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_MomentMat_MomentMat_MomentPhys(Knormal=knormal,Alpha =
alpha,Beta=beta,useAlphaBeta=True,userInputStiffness=True)],
[Law2_SCG_MomentPhys_CohesionlessMomentRotation()] )
Please send whole script.. what do you do with Interaction instance?
O.engines is processed differently then other python objects and must be
assigned at once, one item change has no effect [1]
Jan
[1] https://www.yade-dem.org/doc/user.html#base-engines
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.