← Back to team overview

yade-users team mailing list archive

[Question #670608]: rotate all the simulation

 

New question #670608 on Yade:
https://answers.launchpad.net/yade/+question/670608

hi i'm new on yade. I have a little problem that i 'm not able to fix and a question:

i created a particles deposition in a Box and i saved the particles positions. I would like to save also the Box position (is built with facets (geom.facetbox) .In this way i should  have a file where is texted the particles and box positions.

After this , i would like to rotate everything of 45°  along Z axes in another script. Any idea of how can i do it? I mean , i want to paste box and particles positions rotate of 45° before the simulation starts. Does exist any function that allow me to do it?

this is the script, but i think you don't need it, becouse is only a particles deposition. From this script i want to save particles and box positions. These i 'll rotate after in another script. 
Thanks for your time.
 
from yade import pack, plot
from yade import export, ymport


# create rectangular box from facets
O.bodies.append(geom.facetBox((0,0,0.6),(1.5,1.075,0.6),wallMask=31)) 

pred=pack.inAlignedBox((-1.5,-1.075,0),(1.5,1.075,1.2))

idSoil=FrictMat(density=1550,frictionAngle=radians(28),label='soil',young=10787315,poisson=0.2)

O.materials.append(idSoil)

spheres=pack.randomDensePack(pred,radius=0.08,color=(0,0,1),spheresInCell=500,material='soil',returnSpherePack=True)

spheres.toSimulation()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0),
   #PyRunner(command='checkUnbalanced()',iterPeriod=10),
]



############################################################################
######################### DEFINING FUNCTIONS ###############################
############################################################################


#def checkUnbalanced():
#   if O.time > 2.5 :
#      O.pause()
#      export.textExt('cassone.txt',format='x_y_z_r',comment='Final state of the spheres')


O.dt=.8*PWaveTimeStep()
O.run()
#O.stopAtIter=maxIt;
O.saveTmp()


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.