yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #17294
Re: [Question #668998]: Relative velocity for DragEngine()
Question #668998 on Yade changed:
https://answers.launchpad.net/yade/+question/668998
Klaus Thoeni posted a new comment:
To start with, you could also do it in Pyhton, simply create your own
engine and run it as a PyRunner, e.g.
O.engines=[ # define your engines first
ForceResetter(),
InsertionSortCollider(...), # define
InteractionLoop(...)
PyRunner(initRun=True,iterPeriod=1,command='myDragEngine()',label='mydrag'),
# this is your drag engine defined below
NewtonIntegrator(),
]
#### define myDragEngine here:
def myDragEngine():
b = 6.*pi*viscosity*radius # defene relevant equations here
drag = -b*O.bodies[someid].state.vel
O.forces.addF(someid,drag) # add the force
Note that this will be fine if you don't have many particles.
HTH Klaus
On Mon, May 14, 2018 at 9:27 PM, Nicolas Godet <
question668998@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Question #668998 on Yade changed:
> https://answers.launchpad.net/yade/+question/668998
>
> Status: Answered => Solved
>
> Nicolas Godet confirmed that the question is solved:
> Thank you Klaus !
>
> I will have a look but it seems that the only solution is to modify the
> C code.
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>
--
You received this question notification because your team yade-users is
an answer contact for Yade.