Re: [Yade-users] [Question #406621]: How to apply a constant force value

2016-12-13 Thread Jan Stránský
Question #406621 on Yade changed:
https://answers.launchpad.net/yade/+question/406621

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Felipe

upBox = O.bodies[540]
> O.forces.addF(upBox.id)
> O.forces.setPermF(upBox.id,(0,10,0))
> upBox.dynamic = True # [4]
> upBox.state.mass = 10
> upBox.state.inertia =(0,1,0)
>
> is it correct?


sorry, I did a typo in te first answer, addF amd setParmF has the same
arguments (id,forceVector). Choose only one of them (depending on if you
want to change the value often, then choode addF, if you want to have
constant value, setPermF is preferable).

I guess state.inertia should not have any zero (not tested)

otherwise I think it could work..

cheers
Jan

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406621]: How to apply a constant force value

2016-12-13 Thread Felipe
Question #406621 on Yade changed:
https://answers.launchpad.net/yade/+question/406621

Status: Answered => Open

Felipe is still having a problem:
Hello Jan,

thanks for all comments that you provided me.

By the way, i did not get to apply your solution on my  program. Maybe,
I am putting some incorrect values. Due to this information, i would
like to ask to you how can i define the values to:

upBox = O.bodies[540]

O.forces.addF(upBox.id) 
O.forces.setPermF(upBox.id,(0,10,0))
upBox.dynamic = True # [4]
upBox.state.mass = 10
upBox.state.inertia =(0,1,0)


is it correct?


# Def of the Imported Bodies #
rod1 = O.bodies.append(ymport.stl(mesh1+'.stl',wire=True,material='caixasup'))
rod2 = O.bodies.append(ymport.stl(mesh2+'.stl',wire=False,material='caixainf'))

# Def of the Plan #
upBox = box( center=(0,255,-25), extents=(50,1,50) ,fixed=True,wire=False)

O.bodies.append([upBox])

# Def of the Particles #
sp=pack.SpherePack()
sp.makeCloud((-35,-45,-35),(35,250,35),rMean=5,periodic=False,porosity=0.8,distributeMass=False,seed=0)
sp.toSimulation()

# Def of the Engines #
O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7, gravity=[0,-9.81,0]),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
]


# Def of the Force #
upBox = O.bodies[540]

O.forces.addF(upBox.id) 
O.forces.setPermF(upBox.id,(0,10,0))
upBox.dynamic = True # [4]
upBox.state.mass = 10
upBox.state.inertia =(0,1,0)


# Def of the Plots #
from yade import plot
qt.Controller()

O.run(3000,True)
qt.View()
O.run(3000)

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp