← Back to team overview

yade-users team mailing list archive

Re: [Question #226370]: get python-access to energy information of Hertz-Mindlin contact model

 

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

    Status: Open => Answered

Anton Gladky proposed the following answer:
Does it work without brackets?

 norm_damp_dissip = Mindlin.normDampDissip
 shear_damp_dissip = Mindlin.shearDampDissip

Anton


2013/4/10 Christian Jakob <question226370@xxxxxxxxxxxxxxxxxxxxx>:
> New question #226370 on Yade:
> https://answers.launchpad.net/yade/+question/226370
>
> Hi,
>
> I want to investigate energy dissipation by damping and friction with Hertz-Mindlin model. I modified examples/simple-scene/simple-scene-energy-tracking.py a little bit:
>
> ...
> O.trackEnergy=True
> O.engines=[
>  ...
>                 [Ip2_FrictMat_FrictMat_MindlinPhys(betan=0.9,betas=0.9,label='ContactModel')],
>                 [Law2_ScGeom_MindlinPhys_Mindlin(neverErase=False,label='Mindlin')]#,calcEnergy=True)]
>         ),
>  ...
> ]
>
> ...
>
> Mindlin.calcEnergy=True
> def myAddPlotData():
>         normal_Work       = Mindlin.normElastEnergy()
>         shear_Work        = Mindlin.shearEnergy()
>         norm_damp_dissip        = Mindlin.normDampDissip()
>         shear_damp_dissip       = Mindlin.shearDampDissip()
>         fric_dissip                     = Mindlin.frictionDissipation()
>
> ...
>
> Now I am facing a TypeError:  'float' object is not callable
>
> Looking at the source code [1] gives me the hint, that these informations are not defined as usual ...
>
> ((OpenMPAccumulator<Real>,frictionDissipation,,Attr::noSave,"Energy dissipation due to sliding"))
> ((OpenMPAccumulator<Real>,shearEnergy,,Attr::noSave,"Shear elastic potential energy"))
> ((OpenMPAccumulator<Real>,normDampDissip,,Attr::noSave,"Energy dissipated by normal damping"))
> ((OpenMPAccumulator<Real>,shearDampDissip,,Attr::noSave,"Energy dissipated by tangential damping"))
>
> [1] https://github.com/yade/trunk/blob/master/pkg/dem/HertzMindlin.hpp#L146
>
> Regards,
>
> christian
>
> --
> 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     : yade-users@xxxxxxxxxxxxxxxxxxx
> 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.