Question #249243 on Yade changed:
https://answers.launchpad.net/yade/+question/249243

Jan Stránský proposed the following answer:
Hi Luis,
what version of Yade do you use and how do you run the simulation (writing
commands one by one to the console or writing the script and then run that
script)?
Thanks
Jan


2014-05-25 16:41 GMT+02:00 Luis Barbosa <
[email protected]>:

> Question #249243 on Yade changed:
> https://answers.launchpad.net/yade/+question/249243
>
>     Status: Answered => Open
>
> Luis Barbosa is still having a problem:
> Hi Jan, thank you for attention.
>
> I'm trying plot data from this script:
> #Law2_ScGeom_MindlinPhys_Mindlin
> # import yade modules that we will use below
>
> from yade import plot
>
> #Definir material
> # create rectangular box from facets nao coesiva
>
> O.materials.append(FrictMat(young=15e6,poisson=.4,frictionAngle=radians(20),density=4000,))
> O.bodies.append(utils.geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))
> # Criar a esfera coesiva
>
> O.materials.append(CohFrictMat(young=15e6,poisson=0.3,density=2600,frictionAngle=radians(30),isCohesive=True,normalCohesion=1e10,shearCohesion=1e10,momentRotationLaw=True,etaRoll=0.1,label='spheres'))
> #O.bodies.append([utils.sphere(center=(0.5,0.5,1),radius=.07)])
> O.bodies.append([utils.sphere(center=(0.5,0.6,0.5),radius=.07)])
> # Criar interacoes
> O.engines=[
>    ForceResetter(),
>    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_MindlinPhys(en=0.1,es=0.1,label='damping'),
> Ip2_CohFrictMat_CohFrictMat_CohFrictPhys
> (setCohesionNow=True,label="cohesiveIp")],
>
> [Law2_ScGeom_MindlinPhys_Mindlin(label='contactLaw'),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,
> always_use_moment_law=True,label='cohesiveLaw')]
> ),
>
>    GravityEngine(gravity=(0,0,-9.81)),
>    NewtonIntegrator(damping=0.0),
>    PyRunner(command='myAddData()',iterPeriod=10),
> ]
> #______________________________________________________________________
> damping.useDamping=True
>
> O.dt=.5e-2*utils.PWaveTimeStep()
>
> def myAddData():
>          i=O.interactions[9,10]
>          plot.addData(Fn=i.phys.normalForce[9],v1=b.state.vel.norm(),
> i=O.iter, t=O.time)
>
> plot.plots={
>         't':('Fn','v1')
> }
>
> plot.plot()
>
> O.saveTmp()
>
> But occurs this error:
>
> NameError                                 Traceback (most recent call last)
> /home/luis/<string> in <module>()
>
> NameError: name 'myAddData' is not defined
>
> But in the same way I've ploted the position and velocity, without
> problem. I think that I'm not doing the def correctly to normalForce.
> What is the problem
>
> Thanks a lot!
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to