← Back to team overview

yade-users team mailing list archive

Re: [Question #233232]: F

 

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

Christian Jakob posted a new comment:
Just to be sure, we are talking about the same script.

This part is working fine:

F_buo = -1*(pi/3)*dh*dh*(3*rad - dh)*rho_f*integrator.gravity # = -V*rho*g
#apply buoyancy force (will overwrite old forces applied with addF command)
if b.isStandalone and isinstance(b.shape,Sphere):
O.forces.addF(b.id,F_buo,permanent=True)
if b.isClump:
keys = O.bodies[b.id].shape.members.keys()
for ii in range(0,len(keys)):
O.forces.addF(keys[ii],(O.bodies[keys[ii]].state.mass/b.state.mass)*F_buo,permanent=True)

But this affects only spheres (no clumps):

F_buo = -1*(pi/3)*dh*dh*(3*rad - dh)*rho_f*integrator.gravity # = -V*rho*g
#apply buoyancy force (will overwrite old forces applied with addF command)
O.forces.addF(b.id,F_buo,permanent=True)

I can imagine, that you used this (which explains differences between
your and my results):

F_buo = -1*(pi/3)*dh*dh*(3*rad - dh)*rho_f*integrator.gravity # = -V*rho*g
#apply buoyancy force (will overwrite old forces applied with addF command)
if b.isStandalone and isinstance(b.shape,Sphere):
O.forces.addF(b.id,F_buo,permanent=True)

#indents are lost, sorry!

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.