yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #08994
Re: [Question #244203]: How to read data from external file
Question #244203 on Yade changed:
https://answers.launchpad.net/yade/+question/244203
Klaus Thoeni proposed the following answer:
Maybe use a PyRunner:
def addForces():
for b in O.bodies: # if the force is only applied to specific forces use a defined list instead of O.bodies
f=... # your force vector, you can calculate it here
O.forces.addF(b.id,f,True)
O.engines=[
PyRunner(initRun=True,iterPeriod=100000,command='addForces()'), # will be called every 100000 time steps
ForceResetter(),
... # your engines
]
etc.
Klaus
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.