jgerstmayr / EXUDYN

Multibody Dynamics Simulation: Rigid and flexible multibody systems
https://www.youtube.com/channel/UCsQD2bIPBXB_4J23WtqKkVw/playlists
Other
166 stars 23 forks source link

Question: LoadForceVector-Function (UserFunction) #14

Closed csas8682 closed 2 years ago

csas8682 commented 2 years ago

Hello,

I have a two questions regarding the LoadForceVector-Function:

I am asking, because I tried to leave the loadVector empty, the simulation and calculation worked, but no Load was displayed on my mbs. The load was certainly applied, because it was still moving...

Thank you very much in advance 🙏🏼I hope my questions are clear!

Kind regards!

jgerstmayr commented 2 years ago

Python user function can currently not be called within the visualization; therefore, the loadVector cannot be updated during drawing. Add a sensor, which shows the currently computed value by the user function. If you want to update the value during visualization, use a preStepUserFunction (which will just update during simulation), or use a graphicsDataUserFunction - e.g. on a GroundObject - which can draw globally and synchronized with visualization states.