yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #09472
[Question #247963]: a simple plot
New question #247963 on Yade:
https://answers.launchpad.net/yade/+question/247963
Hi,
I have a problem in plotting. The following script is a very simple scene of two contacting spheres. I cannot arrive in plotting the the unbalanced force on sphere 1, or 0 which for sure will be a horizontal line.
O.forces.f(1) and O.forces.f(0) give the corresponding unbalanced forces(+-1e7) but I just cannot plot it!
I appreciate any helps.
Thanks,
Behzad
===========
O.reset()
from yade import utils, plot
from yade import pack, qt
id_Mat1=O.materials.append(FrictMat(young=1e8,poisson=0.3,density=1000,frictionAngle=1))
Mat=O.materials[id_Mat1]
s1=utils.sphere([0.0,0.0,0.5],1.0,fixed=True,material=Mat)
s2=utils.sphere([0.0,0.0,2.4],1.0,fixed=True,material=Mat)
O.bodies.append(s1)
O.bodies.append(s2)
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,0]),
PyRunner(command='AutoData()',iterPeriod=1,initRun=True)
]
def AutoData():
plot.addData(t=O.iter,F=O.forces.f(1))
plot.plots={'t':('F')}
plot.plot()
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.