yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04097
[Branch ~yade-dev/yade/trunk] Rev 2176: 1. Adjust interpolating-force.py script; present for Chia
------------------------------------------------------------
revno: 2176
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-04-23 13:48:45 +0200
message:
1. Adjust interpolating-force.py script; present for Chia
modified:
scripts/test/interpolating-force.py
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'scripts/test/interpolating-force.py'
--- scripts/test/interpolating-force.py 2010-04-23 11:43:58 +0000
+++ scripts/test/interpolating-force.py 2010-04-23 11:48:45 +0000
@@ -8,7 +8,7 @@
from numpy import arange
-nPulses=10 # run for total of 2 pulses
+nPulses=4 # run for total of 4 pulses
freq=10. # 5 pulses per second
times=arange(0,1/freq,.01/freq) # generate 100 points equally distributed over the period (can be much more)
maxMag=1e5 # maximum magnitude of applied force
@@ -33,7 +33,7 @@
# without damping, the interaction never stabilizes and oscillates wildly⦠try it
NewtonIntegrator(damping=0.01),
# collect some data to plot periodically (every 50 steps)
- PeriodicPythonRunner(iterPeriod=10,command='myAddPlotData()')
+ PeriodicPythonRunner(iterPeriod=1,command='myAddPlotData()')
]
O.bodies.append([
@@ -42,12 +42,12 @@
])
# elastic timestep
-O.dt=utils.PWaveTimeStep()
+O.dt=.5*utils.PWaveTimeStep()
# callback for plotDataCollector
import yade.plot as yp
def myAddPlotData():
- yp.addData(t=O.time,F_applied=forcer.force,supportReaction=O.forces.f(0)[2])
+ yp.addData(t=O.time,F_applied=forcer.force[2],supportReaction=O.forces.f(0)[2])
O.saveTmp()