Feature #5966 - Export transient FEM results to vtk/vtu for ParaView
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 4
- Joined: Thu Jul 11, 2019 2:12 pm
- Location: Halle (Saale)
Feature #5966 - Export transient FEM results to vtk/vtu for ParaView
Hi everybody,
I'm using FreeCAD for almost two years now for CAD and FEM applications. First of all a big thank you to all the developers who dedicate their time to improving the software! Keep the good work going
To give a little back to the community, I would like to share my macro with you: I used to perform quite a lot FEM analyses with FreeCAD, however, I prefer to export the results to VTK and then to visualise them using ParaView, which has a lot more options for that. Unfortunately, FreeCAD can only export one VTK file at a time, so I came up with a little macro that I use for transient analyses. The macro exports the FEM results and also writes a VTU file in the same folder. The VTU file can be simply opened in ParaView, and that way you directly have the transient results with the correct timestamps.
Tested with FreeCAD 0.18.16117 and ParaView 5.6.0 on Windows 10. Doesn't work with ä/ö/ü/ß in the file path or name (I think that's still an issue with the FEM workbench, too?).
Best Regards,
Thomas
I'm using FreeCAD for almost two years now for CAD and FEM applications. First of all a big thank you to all the developers who dedicate their time to improving the software! Keep the good work going
To give a little back to the community, I would like to share my macro with you: I used to perform quite a lot FEM analyses with FreeCAD, however, I prefer to export the results to VTK and then to visualise them using ParaView, which has a lot more options for that. Unfortunately, FreeCAD can only export one VTK file at a time, so I came up with a little macro that I use for transient analyses. The macro exports the FEM results and also writes a VTU file in the same folder. The VTU file can be simply opened in ParaView, and that way you directly have the transient results with the correct timestamps.
Tested with FreeCAD 0.18.16117 and ParaView 5.6.0 on Windows 10. Doesn't work with ä/ö/ü/ß in the file path or name (I think that's still an issue with the FEM workbench, too?).
Best Regards,
Thomas
- Attachments
-
- metal_rod_example.FCStd
- (155.84 KiB) Downloaded 97 times
-
- ExportMultipleVTK_190711a.FCMacro
- (2.75 KiB) Downloaded 115 times
Last edited by Kunda1 on Sat Dec 03, 2022 4:37 pm, edited 1 time in total.
Reason: Added GH ticket number to thread title
Reason: Added GH ticket number to thread title
Re: Export transient FEM results to vtk/vtu for ParaView
hi welcome
thanks for sharing your macro
if you want i create (or create your account How to get wiki editing permissions) one page for the wiki in the section Fem (create your ToolBar icon)
mario
thanks for sharing your macro
if you want i create (or create your account How to get wiki editing permissions) one page for the wiki in the section Fem (create your ToolBar icon)
mario
Last edited by mario52 on Fri Jul 12, 2019 3:34 pm, edited 1 time in total.
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: Export transient FEM results to vtk/vtu for ParaView
Cool, can you make some screenshots or screencast demonstrating the macro ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Export transient FEM results to vtk/vtu for ParaView
wow, someone who uses FreeCAD FEM for two years and never had a question FEM in FreeCAD FreeCAD FEM seams to get more and more stable and userfriendly
Thanks for sharing. What you could do too is make a feature report on mantis assign it to me and make a link to this topic. IMHO it is worth to integrating this into main FreeCAD FEM. But ATM I am overwhelmed with other stuff.
cheers bernd
PS hopefully it will not take another two years to your second post
Thanks for sharing. What you could do too is make a feature report on mantis assign it to me and make a link to this topic. IMHO it is worth to integrating this into main FreeCAD FEM. But ATM I am overwhelmed with other stuff.
cheers bernd
PS hopefully it will not take another two years to your second post
-
- Posts: 4
- Joined: Thu Jul 11, 2019 2:12 pm
- Location: Halle (Saale)
Re: Export transient FEM results to vtk/vtu for ParaView
Hi everyone,
glad you like the macro and I would certainly like too see it becoming part of the FEM workbench I'm out of office the next two weeks, but when I get back I'll be happy to add something to the wiki and do the feature report.
Best regards,
Thomas
glad you like the macro and I would certainly like too see it becoming part of the FEM workbench I'm out of office the next two weeks, but when I get back I'll be happy to add something to the wiki and do the feature report.
Best regards,
Thomas
Re: Export transient FEM results to vtk/vtu for ParaView
I created issue #4060 JIC.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Export transient FEM results to vtk/vtu for ParaView
happy holidays
-
- Posts: 4
- Joined: Thu Jul 11, 2019 2:12 pm
- Location: Halle (Saale)
Re: Export transient FEM results to vtk/vtu for ParaView
Hi everyone,
sorry it took a longer time - I should have known that I have to catch up with a lot of work after the holidays I just asked the wiki admins to create an account for me to write a short how-to - I'll let you know when it's there...
Best,
Thomas
sorry it took a longer time - I should have known that I have to catch up with a lot of work after the holidays I just asked the wiki admins to create an account for me to write a short how-to - I'll let you know when it's there...
Best,
Thomas
-
- Posts: 4
- Joined: Thu Jul 11, 2019 2:12 pm
- Location: Halle (Saale)
Re: Export transient FEM results to vtk/vtu for ParaView
Hi,
the tutorial is now in the wiki:
https://www.freecadweb.org/wiki/Transient_FEM_analysis
https://www.freecadweb.org/wiki/Macro_e ... EM_results
Hope it helps!
Edit: I'd like to add the tutorial to the FEM workbench page https://www.freecadweb.org/wiki/FEM_Module#Tutorials - in the source code I see some numbers after the "T". Are the tutorials numbered in any way? I'm not (yet) used to Wiki editing at all
Best,
Thomas
the tutorial is now in the wiki:
https://www.freecadweb.org/wiki/Transient_FEM_analysis
https://www.freecadweb.org/wiki/Macro_e ... EM_results
Hope it helps!
Edit: I'd like to add the tutorial to the FEM workbench page https://www.freecadweb.org/wiki/FEM_Module#Tutorials - in the source code I see some numbers after the "T". Are the tutorials numbered in any way? I'm not (yet) used to Wiki editing at all
Best,
Thomas
Re: Export transient FEM results to vtk/vtu for ParaView
hi
good now the toolbar icon (same name of the macro (see)) and copy the complete link of the icon in section "Download" all info write in the section Description is visible in the AddonManager (maybe adding the creator name ?)
you must also adding the macro link in the page Macros_recipes (done) AddonManager load the macro list in this page
mario
good now the toolbar icon (same name of the macro (see)) and copy the complete link of the icon in section "Download" all info write in the section Description is visible in the AddonManager (maybe adding the creator name ?)
you must also adding the macro link in the page Macros_recipes (done) AddonManager load the macro list in this page
<!--T:xx--> this code is created by the translate system "not touch" you adding your comment with one line space by paragraphLuftschraube wrote: ↑Fri Aug 30, 2019 12:20 pm Edit: I'd like to add the tutorial to the FEM workbench page https://www.freecadweb.org/wiki/FEM_Module#Tutorials - in the source code I see some numbers after the "T". Are the tutorials numbered in any way? I'm not (yet) used to Wiki editing at all
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.