How to use FEM workbench to draw my own calculation data?

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
freecadlzh
Posts: 138
Joined: Fri Mar 06, 2020 12:52 pm

How to use FEM workbench to draw my own calculation data?

Post by freecadlzh »

I hope to draw a three-dimensional rendering with thermal map effect and color bar effect of data range in the following figure.
ff.jpg
ff.jpg (105.49 KiB) Viewed 1625 times
I built a workbench and wrote a calculation program in Python code in the workbench, which can calculate the audible noise distribution of an area. Drawing is too laggy to draw the result, but it can be very nice to load the model in the drawing window by Matplotlib. It is found that the drawing efficiency of the results calculated by the FEM module of freecad is very high. My problem is, how to give the results calculated by me to the drawing module in the FEM module to draw?

Hope to provide ideas or existing case websites, thanks a lot.
User avatar
johnwang
Veteran
Posts: 1345
Joined: Sun Jan 27, 2019 12:41 am

Re: How to use FEM workbench to draw my own calculation data?

Post by johnwang »

FC's post processing objects is at here:

https://github.com/FreeCAD/FreeCAD/blob ... em.py#L602

You can make a ResultMechanical, then write your data into it. But FC can't draw the vector plot now. The surface temperature should be ok.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
freecadlzh
Posts: 138
Joined: Fri Mar 06, 2020 12:52 pm

Re: How to use FEM workbench to draw my own calculation data?

Post by freecadlzh »

johnwang wrote: Tue Nov 30, 2021 10:43 pm FC's post processing objects is at here:

https://github.com/FreeCAD/FreeCAD/blob ... em.py#L602

You can make a ResultMechanical, then write your data into it. But FC can't draw the vector plot now. The surface temperature should be ok.
Thank you for your help, but I don't know how to start. Can you give me an example? For example, I have calculated the noise value above a rectangular area of 100 * 100 area. Now I want to draw a thermal diagram with the function of freecad, and the figure contains numerical color bars to indicate the data range. How to coding?
Attachments
dd.jpg
dd.jpg (444.51 KiB) Viewed 1489 times
Post Reply