How to add RadialForceEngine
Hi, all
I want to add RadialForceEngine to one particle with ids=pmove (id=3) to overcome the gravity effect, but when I define the RadialForceEngine with ids=pmove, the particle is gone away, and form inspection, its velocity is nan, why? Here is the code,
anybody can give me some advice, thank you!
-------
# -*- coding: utf-8 -*-
# encoding: utf-8
from yade import utils, ymport, qt, plot
# basic simulation showing sphere falling ball gravity,
# bouncing against another sphere representing the support
interactionRadi
iterPeriod_
# DATA COMPONENTS
O.materials.
# 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)
utils.
utils.
# this particles is free, subject to dynamics
utils.
#utils.
])
pmove=O.
])
# FUNCTIONAL COMPONENTS
# simulation loop -- see presentation for the explanation
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
# apply gravity force to particles
#GravityEngine is deprecated
#GravityEngine
RadialForceEng
# damping: numerical dissipation of energy
NewtonIntegrat
PyRunner(
]
# 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-
#### to see it
v=qt.Controller()
v=qt.View()
rr=qt.Renderer()
rr.intrAllWire=True
# save the simulation, so that it can be reloaded later, for experimentation
def checkInteraction():
print O.iter
# if O.interactions[
# i=O.interaction
# print O.iter
# else:
# print O.iter
#run one single step
O.step()
#### initializes now the interaction detection factor
#
#aabb.aabbEnlar
#Ig2ssGeom.
O.saveTmp()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anton Gladky
- Solved:
- Last query:
- Last reply: