yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #28777
[Question #704311]: How can I control the variables in the Partial engine during the simulation?
New question #704311 on Yade:
https://answers.launchpad.net/yade/+question/704311
I want to move the facet in a sinusoidal motion.
So, I used the Partial engine(Rotation Engine) and changed angular velocity with virtual time.
For example, O.engines is defined as follows;
O.engines=O.engines+[RotationEngine(rotateAroundZero=True, zeroPoint=(0,0,0), rotationAxis=(1, 0, 0), angularVelocity=rad_vel, ids=- -)]
And the angularVelocity is changed by function, cal_wall_rot()
def cal_wall_rot():
global rad_vel
rad_vel = "function of sine(O.time)"
Finally, the function, "cal_wall_rot()" is called in every step.
O.engines=O.engines+[PyRunner(command='cal_wall_rot()', iterPeriod=1)]
However, the variable "rad_vel" is not changed during the simulation.
Anyway, I have found another way to change the velocity of the facet using b.state.
Is this the only way to control the motion of bodies with time?
--
You received this question notification because your team yade-users is
an answer contact for Yade.