← Back to team overview

yade-users team mailing list archive

Re: [Question #658514]: plot of surface displacement, total displacement and force at left of box

 

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

    Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

state.disp() is a vector [1] representing the current position -
reference position.

You probably want the magnitude of the displacement:

import numpy.linalg as la
tDispl = la.norm(O.bodies[1].state.displ())

or maybe you are only interested in one of the components:

tDispl = O.bodies[1].state.displ()[0]

Best,

Robert

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.State.displ

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