# Export thermal simulations in .frd file?

**URL:** <https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296>\
**Category:** General Questions\
**Created:** [November 30, 2023, 12:32am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296 "2023-11-30T00:32:36Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![dapineau](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@dapineau](https://prepomax.discourse.group/u/dapineau)\
**Post date:** [November 30, 2023, 12:32am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/1 "2023-11-30T00:32:36Z")

</div>

I succeed in doing a simple mechanical simulation with two materials. I export in .vtk by passing the .frd file with freecad. Then I open with paraview. But the same approach does not work for a thermal simulation. Does Prepomax allow this?

---

<div class="post-metadata">

**Author:** ![lucas\_bueno](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/lucas_bueno/32/1168_2.png) [@lucas\_bueno](https://prepomax.discourse.group/u/lucas_bueno)\
**Post date:** [November 30, 2023, 1:19am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/2 "2023-11-30T01:19:49Z")

</div>

What about using the built-in visualization module of PrePoMax? Does it not fit your purpose?

---

<div class="post-metadata">

**Author:** ![dapineau](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@dapineau](https://prepomax.discourse.group/u/dapineau)\
**Post date:** [November 30, 2023, 1:31am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/3 "2023-11-30T01:31:57Z")

</div>

Good question! Probably prepomax is enough for analysis and visualization. On the other hand, paraview allows a very neat presentation. However, I forgot to admit that I know paraview better. I haven’t finished exploring the possibilities of prepomax, it’s my second day today!

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [November 30, 2023, 7:57am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/4 "2023-11-30T07:57:30Z")

</div>

FreeCAD doesn’t support thermal analyses, only thermo-mechanical ones. You can use other converters listed here: [Converting results to ParaView format](https://prepomax.discourse.group/t/converting-results-to-paraview-format/453)

I would recommend the second one (ccx2paraview).

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [November 30, 2023, 11:31am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/5 "2023-11-30T11:31:32Z")

</div>

It would be good to know what is missing in PrePoMax for the visualization purposes.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [November 30, 2023, 12:13pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/6 "2023-11-30T12:13:17Z")

</div>

For me, the biggest advantage of ParaView for FEA results postprocessing is its Calculator filter that creates field output based on equations using existing results. Path plots (Plot Over Line filter) can also be very useful.

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [November 30, 2023, 1:56pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/7 "2023-11-30T13:56:59Z")

</div>

Is it possible to create stress linearization in ParaView? I would need it for one of our projects, and I am considering adding it to PrePoMax if I find the time.

---

<div class="post-metadata">

**Author:** ![dapineau](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@dapineau](https://prepomax.discourse.group/u/dapineau)\
**Post date:** [November 30, 2023, 2:41pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/8 "2023-11-30T14:41:51Z")

</div>

THANKS! I will look at it!

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [November 30, 2023, 2:59pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/9 "2023-11-30T14:59:39Z")

</div>

> [@Matej](#):
>
> Is it possible to create stress linearization in ParaView? I would need it for one of our projects, and I am considering adding it to PrePoMax if I find the time.

Not really, it would require some tedious workarounds (likely involving the aforementioned filters). But FreeCAD can do it: [FEM PostFilterLinearizedStresses - FreeCAD Documentation](https://wiki.freecad.org/FEM_PostFilterLinearizedStresses)

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [November 30, 2023, 4:53pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/10 "2023-11-30T16:53:31Z")

</div>

I saw that, but newer used it. If I find their code it will help me a lot 🙂

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [November 30, 2023, 5:31pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/11 "2023-11-30T17:31:31Z")

</div>

> [@Matej](#):
>
> If I find their code it will help me a lot

I think it’s coded here: [https://github.com/FreeCAD/FreeCAD/blob/391d08e6d54b37e1d6e03bb354b747ba72082ce0/src/Mod/Fem/Gui/Command.cpp#L1992](https://github.com/FreeCAD/FreeCAD/blob/391d08e6d54b37e1d6e03bb354b747ba72082ce0/src/Mod/Fem/Gui/Command.cpp#L1992)

---

<div class="post-metadata">

**Author:** ![dapineau](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@dapineau](https://prepomax.discourse.group/u/dapineau)\
**Post date:** [November 30, 2023, 11:56pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/12 "2023-11-30T23:56:59Z")

</div>

ccx2paraview…Super! ca fonctionne, Thank you!

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [December 13, 2023, 7:57am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/13 "2023-12-13T07:57:08Z")

</div>

> [@FEAnalyst](#):
>
> I think it’s coded here: [https://github.com/FreeCAD/FreeCAD/blob/391d08e6d54b37e1d6e03bb354b747ba72082ce0/src/Mod/Fem/Gui/Command.cpp#L1992](https://github.com/FreeCAD/FreeCAD/blob/391d08e6d54b37e1d6e03bb354b747ba72082ce0/src/Mod/Fem/Gui/Command.cpp#L1992)

I played with the Linearization tool in FreeCAD, and I don’t think it works as expected. Or maybe I do not know how to use it. I tried importing a rectangular beam loaded in bending and plotting the bending and membrane stresses using the tool. The result was not as expected. I got only membrane stresses and no bending stress.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [December 13, 2023, 9:18am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/14 "2023-12-13T09:18:37Z")

</div>

Here’s what I got (notes: not exactly the same path and the units are different - Pa in FreeCAD, MPa in Abaqus):

 ![abq1](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/e/e309e3bddf6505750f7b6cdfb487dc4cbee715b2.png)

 ![freecad1](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/c/cf33b6d9b57c456af51bb0d0f3dda4d872339259.png)

 ![abq2](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/5/5f7ccfe46fad44babf89d00c99f41cf0168ec50b.png)

 ![freecad2](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/4/44a6a0c12514a3c51d20ecc10c9439eb3b2acbe9.png)

It can be hard to compare it though. As you can see, Abaqus computes it in a more comprehensive way. In FreeCAD, it’s not well documented and we can only examine the source code to see what formulas are used.

---

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [December 13, 2023, 10:09am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/15 "2023-12-13T10:09:00Z")

</div>

I have a test based on a well-documented reference (\*).  
It could be used here to check the tool once is implemented.  
Deviation with Mecway + ccx end up below 0.17%.  
Deviation with Freecad + ccx is exposed in the webpage.  
To compare with the analytical solution, one should look at

sxx\_total / ( sxx\_Membrane + Bending )

Expected value= 3.

> **[SAE\_keyhole.pmx](https://wetransfer.com/downloads/a45d08854a1ebf8995d39276ceaa591020231213100423/833e95)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

(\*) [FreeCAD FEM results in Fatlab – fatigue.pro](https://fatigue.pro/2023/02/freecad-fem-results-in-fatlab/#LinearizedStress)

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [December 13, 2023, 10:17am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/16 "2023-12-13T10:17:57Z")

</div>

Abaqus’ result is divided into components, and one must compute the equivalent stress out of it at the end.

However, the FreeCAD result shows no bending in the Membrane and Bending curve. The curve is the same as for Membrane only. It probably works on von Mises stress in the background where the sign of the stress is lost.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [December 13, 2023, 10:41am UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/17 "2023-12-13T10:41:19Z")

</div>

It takes the results of the previously created Line clip filter and, from what I understand when looking at the source code, it can use the following stress measures if they are plotted with that Line clip filter first:

- Mises
- Tresca
- max principal
- mid principal
- min principal

Only stress tensor components are not supported. But I got this when I switched to major principal:

![new plot](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/4/4db2efa284f9db64cf672e815d3817a799ed44dd.png)

Here are the formulas from Abaqus: [https://classes.engineering.wustl.edu/2009/spring/mase5513/abaqus/docs/v6.6/books/stm/default.htm?startat=ch02s17ath56.html](https://classes.engineering.wustl.edu/2009/spring/mase5513/abaqus/docs/v6.6/books/stm/default.htm?startat=ch02s17ath56.html)

The ones used by FreeCAD can be extracted from the source code if needed. They start around here: [FreeCAD/src/Mod/Fem/Gui/Command.cpp at 1e212c32bc8ddf13443c1d61c1e403a9c5d6a5b6 · FreeCAD/FreeCAD · GitHub](https://github.com/FreeCAD/FreeCAD/blob/1e212c32bc8ddf13443c1d61c1e403a9c5d6a5b6/src/Mod/Fem/Gui/Command.cpp#L1722C24-L1722C24)

P.S. I updated the FreeCAD wiki documentation for this tool to include the stress measures it can use.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [December 19, 2023, 12:53pm UTC](https://prepomax.discourse.group/t/export-thermal-simulations-in-frd-file/1296/18 "2023-12-19T12:53:21Z")

</div>

It turned out to be easy to allow the usage of this stress linearization filter for stress tensor components so I sent a PR, it was merged and now the dev version of FreeCAD can perform stress linearization on all the available stress measures:

![linearized zz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/2/2ed760c41dce2f1717b7da018ba6c3aef8e52481.png)
