← Back to team overview

yade-users team mailing list archive

Re: Python force - plot

 

Yes, I used:
InteractionDispatchers(
        [Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],
        [Law2_Dem3DofGeom_FrictPhys_Basic()],
    ),

because your contact law is not in a trunk.
______________________________

Anton Gladkyy


2010/2/22 chiara modenese <c.modenese@xxxxxxxxx>

>
>
> On 22 February 2010 12:48, Anton Gladky <gladky.anton@xxxxxxxxx> wrote:
>
>> Hi,
>>
>> 2) your script works normally for me. At least this string:
>>        plot.addData(fn=inter.phys.normalForce,step=O.iter)
>>  I needed to delete the last parameter, because: AttributeError:
>> 'FrictPhys' object has no attribute 'contactpoint'
>>
>> Hi Anton,
>
> oh yes I typed that wrong, the last parameter should be
> un=s0.shape['radius']-2*inter.geom.contactpoint[0]
> But I am still getting that error, you don't? So you can see the plot?
> Using another contact law, I mean (since I do not yet have commit the one I
> am testing).
>
> Chiara
>
>
>
>> ______________________________
>>
>> Anton Gladkyy
>>
>>
>> 2010/2/22 chiara modenese <c.modenese@xxxxxxxxx>
>>
>>>  Hi Vaclav,
>>>
>>> two simple questions on python:
>>>
>>> 1) How do I apply a force (not the gravity) to the bodies? Which engine
>>> should I call?
>>>
>>> 2) I get this error using the PeriodicPythonRunner engine to create some
>>> plots:
>>>
>>> NameError: name 'myAddPlotData' is not defined
>>>
>>> But I defined the function in the python script so I do not understand
>>> why it is giving me an error. Moreover if I try to access the data as
>>> plot.data['fn'] it gives me an error, too.
>>> I attach the python script.
>>>
>>> Cheers,
>>> Chiara
>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>>> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References