← Back to team overview

yade-users team mailing list archive

Re: Engines Python

 

> I define the function as:
> def shearForce():
>     if (O.iter>300):
>         i=O.interactions[0,1]
>         ForceEngine(force=(0,1e5,0),subscribedBodies=[0])
>         plot.addData(fs=i.phys.shearForce[1],it=O.iter)

> But it does not apply such force (I have checked through the plot).
You never asked for application of that force, though. This just creates
engine object (which will be destructed when the local scope is left):
>         ForceEngine(force=(0,1e5,0),subscribedBodies=[0])
But you would need extra () to call it.

You can also use O.forces.addF(id) instead of the engine, if you need
just one or few bodies.

v





References