zanoni-mbdyn / blendyn

MBDyn (https://www.mbdyn.org/) graphical post-processor for blender (https://www.blender.org/)
GNU General Public License v2.0
40 stars 8 forks source link

Internal force visualization #36

Closed rafmudaf closed 5 years ago

rafmudaf commented 6 years ago

Hi @zanoni-mbdyn

If I were to try to develop the project https://github.com/zanoni-mbdyn/blendyn/projects/3, what is the path for getting the beam internal forces from MBDyn?

Thanks Rafael

zanoni-mbdyn commented 6 years ago

Hi @rafmudaf and thanks for your interest in Blendyn and in the project.

To get the internal forces from the MBDyn output, look at the NetCDF output for the single element (for example for rod and beams, as a starting point). There is a standard syntax, particularly for joints, that is overridden by the element if needed. For example, the internal force in the local frame of a joint element is by default stored in elem.#.joint.f where # is the label.

I was thinking about this very project lately and the way I would approach this, at least initally, is more general: I would prepare an interface that lets the user add any MBDyn variable contained in the NetCDF output as a driver variable (see for example the tutorial here, if you're not familiar with Blender drivers). This would be a very easy modification to the Blendyn code, and would open up a gazillion possibilities.

Then, building upon that setup, we could develop more specific and high-level operators and interfaces to automate the creation of specific visualizations. One example would be the automatic setup of the visualization of a beam (or, better still, a group of beams representing a single mechanical component) based on the selection of one or more cross-section profiles, that lets the user decide if they want the internal forces to be visualized through the material color of the resulting swept Blender Object.

If you decide to go on with this, I'll gladly help you through your progress, of course :)

Cheers Andrea

rafmudaf commented 5 years ago

Thanks for the info @zanoni-mbdyn. I'm still trying to fully understand everything here but I will get in touch if I do think I'm able to take this on.

zanoni-mbdyn commented 5 years ago

Unfortunately, I'm closing this issue for the time being.