← Back to team overview

yade-users team mailing list archive

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

 

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.