← Back to team overview

yade-users team mailing list archive

Re: [Question #295301]: calculate external work in Uniaxial Strainer

 

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

Jan Stránský proposed the following answer:
>
>
> Your alternative work but it doesn't resolve my problem because the
> external work obtained is underestimated (i compare it with the elastic
> energy).
>

Do you have some values? for example
https://github.com/yade/trunk/blob/master/pkg/dem/UniaxialStrainer.cpp#L106
changes the value to half, but if you compute work from it, you should
multiply it by 2 again.. Could you also post a script you use?


> I tried a second alternative which based on the difference of the total
> displacement between iteration "i" and "i+1".
> The problem is that in UniaxialStrainer.cpp i can't do this difference
> because we can't control the
> I tried these lines of code but it doesn't work:
>
> Real displacement; Real S;
> S=axialLength-originalLength;
> displacement=(axialLength-originalLength)-S;


> I obtained displacement=0. May be this solution is stupid but i don't know
> how to do the get the difference in
> UniaxialStrainer.cpp
>

of course :-)  displacement=(axialLength-originalLength)-S
= (axialLength-originalLength) - (axialLength-originalLength) = 0 for any
values of axisLength and originalLength

the solution is to store the previous value inside the class

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.