← Back to team overview

yade-users team mailing list archive

[Question #688078]: Assinging a mass to a particle and applying displacment BC

 

New question #688078 on Yade:
https://answers.launchpad.net/yade/+question/688078

Hi,
I am new to YADE. My code currently has on,ly two particles that just stay there. I have few questions:

1. How do I define a mass to my particle?
2. I want to apply a velocity boundary condition on my second ball. Lets say 0.005t .

Thank you for your help!

My CODE:

# DATA COMPONENTS

# add 2 particles to the simulation
# they the default material (utils.defaultMat)
O.bodies.append([
	# fixed: particle's position in space will not change (support)
	sphere(center=(0,0,0),radius=.5,fixed=True),
	# this particles is free, subject to dynamics
	sphere((0,0,2),radius=.5)
])

# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom()],        # collision geometry
		[Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
		[Law2_ScGeom_FrictPhys_CundallStrack()]   # contact law -- apply forces
	),
	
]

# set timestep to a fraction of the critical timestep
# the fraction is very small, so that the simulation is not too fast
# and the motion can be observed
O.dt=.5e-4*PWaveTimeStep()

# save the simulation, so that it can be reloaded later, for experimentation
O.saveTmp()

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.