← Back to team overview

yade-users team mailing list archive

Re: [Question #677865]: how to apply displacement on the DEM model

 

Question #677865 on Yade changed:
https://answers.launchpad.net/yade/+question/677865

    Status: Open => Answered

Jan Stránský proposed the following answer:
>        for b in top:
>               b.state.vel[1] = displacement/ O.dt
>               O.step()

Again, O.step() should not be in the inner loop

> for b in top:
>               b.state.vel = Vector3.Zero

this was just for the case of sudden displacement, in the case of
"smooth" displacement, no need to reset the velocity (or maybe after
predefined 100000 iterations).

> b.state.vel[1] = displacement/ O.dt

I think this does not work, vel has to be set as one vector

The prescribed velocity is anyway modified by NewtonIntegrator. If you want the value to be constant, block the corresponding DOF.
In the case of constant velocity, you can just set it at the beginning and then let it run. The script after defining top and bottom could be:
####
steps=100000
totalDisplacement=-20.0 # (!) negative value = against y axis
displacement=totalDisplacement/steps
for b in top:
   b.state.blockedDOFs = 'zyXY' # (!) blocking also y direction not to be modified by interactions with other particles
   b.state.vel = Vector3(0, displacement/ O.dt, 0) # whole Vector3
O.run(steps) # or O.run(steps,True) if you do not need to interact
####

Jan

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