← Back to team overview

yade-users team mailing list archive

Re: [Question #685862]: About transverse strain

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
1) I have no problem running the script, plot.data shows the saved data.

2) Python/Yade reads the script and executes it line by line. In your case, it loops over the bodies and computes the d and dnew ONLY once at the beginning, then the value is unchanged during the whole simulation.
Put the code inside a function and call that function inside recorder() before plot.addData()

3) furthermore, d and dnew are just values form the last single body.
You want probably some average (maybe wighted?) of the values.

4) expressions for d and dnew does not differ, probably dnew should be
computed using state.pos instead of state.refPos?

cheers
Jan

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