Apply force only once
Hi guys!
I try to study the displacement of various spheres ( with different weight ) when they apply the same force, on a surface which previously has been created and is composed of other spheres.
My problem is the IterPeriod of the PyRunner function that I create for apply the force on the sphere that I want, in this case, green spheres.
If I put the period = 1 , the force is constantly applied .How I can apply the force only once? PyRunner(
¿?¿?¿
My first choice was to put a high period (100000000 for example), but this way , the green sphere falls on the surface of spheres before the force was applied . What I need is to apply a force on green particle when it is "in the air " to describe a parabolic movement to fall on the surface and stop.
The second PyRunner is to store the position data ( x , y, z) and the green particle velocity .
Thanks in advance =)
the code:
O.load(
#//////
#////////////////// materials \\\\\\\
#//////
MatBal=
young=
frictionAngle=
#//////
#////////////////// green sphere\
#//////
### green sphere
O.bodies.
#//////
#//////////////// force on green sphere\\\\\\\\\\\\
#//////
def force():
piedraensayo=[]
###force on green sphere
for i in range(0,
b=O.bodies[i]
if O.bodies[
piedraensayo
id_ball=i
fx=1
fy=0
fz=0
O.forces.
#//////
#///////save position and velocity \\\\\\\\\\\\\\\\\
#//////
def guardar():
if O.iter==0:
global paso
matriz1=[]
for i in range(0,
b=O.bodies[i]
if O.bodies[
matriz1.
np.
paso=1
if paso==1 and O.time>0.2:
matriz2=[]
for i in range(0,
b=O.bodies[i]
if O.bodies[
matriz2.
np.
paso=paso+1
if paso==2 and O.time>0.4:
matriz3=[]
for i in range(0,
b=O.bodies[i]
if O.bodies[
matriz3.
np.
paso=paso+1
#//////
#//////
#//////
O.engines=[
ForceResetter(),
InsertionSortC
[Bo1_
Bo1_
Bo1_Box_Aabb(),
Bo1_
InteractionLoop(
[Ig2_
Ig2_
Ig2_
Ig2_
[Ip2_
[Law2_
),
PyRunner(
iterPeriod=
PyRunner(
iterPeriod=
NewtonIntegrat
yade.qt.
]
O.dt=utils.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- rayolau
- Solved:
- Last query:
- Last reply: