by Do Tien Dung, September, 2022
Blendyn is one of post-processing tools of MBDyn - multibody simulation engine. Blendyn is built as an Add-ons of Blender which allow user to visualise MBDyn output datas with 3D animations. Blendyn was first implemented in 2017. However, there are some rooms for improvement and some parts of current Blendyn was out of date. In this project, I focus on developing some of them:
- Improving graph plotting function and adding two new plotting engines into Blendyn
matplotlibandbokehbesidepygal - Visualising two MBDyn elements:
beam sliderandmodal - Visualising internal force and internal moment for deformable elements:
beam2,beam3,shell4,membrane4 - Improving UI
The most challenging section for visualising modal element is extract modal node data from different files and put them together in one formula
to make the motion paths. The image below show how I extract and use the file data to get the modal location.
I prefer using shader nodes to visualise internal properties of all deformable elements. The most simple one is beam2 element. beam2 have only one evaluation point in its central. Therefore, I design shader node for beam2 same as the image bellow. For each internal property value, I turn them
into corresponding color in RGB shader node to set the same color for the whole beam2 object.
beam3 element has two evaluation points in the middle of the first and second parts. They have their own internal properties values in each time point.
Therefore, design beam3 shader node as bellow using Texture Coordinate and ColorRamp with linear interpolation method to show the change of internal properties along beam3 element. In addition, I use middle node object (_RF2) for source of coordinate in Texture Coordinate shader node.
shell4 and membrane4 elements have upto 4 evaluation points in middle of their edges. Therefore, I have to use 2 ColorRamp shader nodes with linear interpolation. In addition, I also create one hidden empty object named elem.name + _ctr which have average location and rotation of the visualising element. The object is used as source of coordinate in Texture Coordinate shader node.
Currently, internal force and internal moment outputs for shell4 and membrane4 elements haven't implemented in MBDyn yet. I could only make some manual demo for the visualisation as the image bellow.
- Step1: Load MBDyn output file (
.ncfile) - Step2: Select Scene Properties> MBDyn Data Plot
- Step3: Choose plotting variale (For example:
node.struct.1.X) - Step4: Choose plotting engine (Matplotlib), ploting dimension, plot frequency and plot type
- Step5: Click on
Plot variable - Step6: Open
Image EditerWindow and open the latest image to see the graph results
- Step1: Load MBDyn output file (
.ncfile) - Step2: Select
Scene Properties>MBDyn Data Plot - Step3: Choose plotting variale (For example:
node.struct.1.X) - Step4: Choose plotting engine (Bokeh), ploting dimension, plot frequency, plot type and output format (
show in localhostorsave as png) - Step5: Click on
Plot variableIf you chooseshow in localhost, one localhost would appear on your browser with the graph - (If you choose
save as png) Step6: OpenImage Editerwindow and open the latest image to see the graph results
- Step1: Load MBDyn output file (Make sure to have
.modfile in the same directory) - Step2:
Standard Import - Step3: Select
Scene Properties>MBDyn Components>Add new component - Step4: Choose elements for the component (start with "modal_")
- Step5: Choose
.femfile for this modal - Step6:
Load fem file>Import all modal nodes>Add elementRepeat step 4,5,6 if there is more than one modal - Step7: Choose
Mesh Object - Step8:
Confirm
- Step1: Load MBDyn output file (
.ncfile) - Step2: Tick on
Import internal property - Step3: Choose
Type(internal property type),Dim(dimension),Min(Lower boundary),Max(Upper boundary) - Step4:
Standard Import - Step5:
Animate Scene - Step6: Choose
Material PreviewinViewport Shading
- Finishing internal force and internal moment visualisation for
shell4andmembrane4elements when their MBDyn outputs are available. - Eventhough I have successed in visualising internal force and internal moment for
beam2andbeam3, choosing correct value forMinandMaxboundary is challenge.Autosetup Boundarycan't solve that problem effectively. I hope that, we can have a better way to implement it in the future. - Making 3D ploting for 'trajectory' plot type and show it in a
localhostwhen ploting withbokeh




