Page 1 of 1

from freecad .fcstd format to Elmer

Posted: 27 Sep 2017, 04:13
by Gary R
I just finished a plate with a hole in it that on which I wish to run a temperature distribution analysis. I produced the plate in freecad and used the gmsh plugin to mesh the plate. Unfortunately, the file is still in the native .fcstd format that freefem uses. How do I get the file into ElmerGUI in a form that will be accepted.

Gary R.

Re: from freecad .fcstd format to Elmer

Posted: 27 Sep 2017, 10:24
by raback
Hi

You can use the gmsh format and translate the mesh into Elmer format. The CAD interface of ElmerGUI is quite limited.

-Peter

Re: from freecad .fcstd format to Elmer

Posted: 31 Oct 2017, 00:01
by smselver
Hello,

The only success I've had in trying to do something similar (FreeCad into Elmer) is as follows:

(1) Export from FreeCAD in .IGES format
(2) Import your .IGES version into GMSH, and create your mesh
(3) Export from GMSH in .msh format
(4) Open your .msh from Elmer

Unfortunately, IGES seems to be the only format (at least from what I tried) that will work to get into GMSH

Best
Steve Selverston

Re: from freecad .fcstd format to Elmer

Posted: 03 Nov 2017, 11:21
by mzenker
Hi,

STEP format should also work, and is even more common AFAIK.

HTH,

Matthias

Re: from freecad .fcstd format to Elmer

Posted: 10 Nov 2017, 10:20
by Wil
Gary R wrote:Unfortunately, the file is still in the native .fcstd format
Hi Gary,

You can use FreeCAD to define all groups in the mesh and simply export your (with-freecad-generated) GMSH mesh as .unv and import it into ElmerGui after transferring it with ElmerGrid.
Alternatively, you can use the current development branch of the Elmer-FreeCAD-Integration ... https://forum.freecadweb.org/viewtopic. ... 63#p198431 ... which has to be compiled.

BR,
HoWil

Re: from freecad .fcstd format to Elmer

Posted: 10 Nov 2017, 20:06
by Wil
I used the unstable 0.17 version of FreeCAD for the shown example (daily ppa on ubuntu; or use the https://github.com/FreeCAD/FreeCAD/rele ... g/0.17_pre if you are on windows)

If you want to construct and mesh you plate in FreeCAD and do the model set-up and simulation in ElmerGUI here is a short description how to do it.
Design you plate. I did a simple example.
Screenshot from 2017-11-10 18-01-37.png
Screenshot from 2017-11-10 18-01-37.png (152.85 KiB) Viewed 10745 times
Use the 'Gmesh-mesher' elements to control the mesh-size (Mesh-Regions) and the elments of your mesh groups (MeshGroups).
Screenshot from 2017-11-10 18-01-44.png
Screenshot from 2017-11-10 18-01-44.png (285.37 KiB) Viewed 10745 times
Export the mesh by selecting the main FEMMeshGMSH element and select "File->Export". Export it as e.g. "FreeCAD_ElmerGUI_demo.unv" before transferring it with ElmerGrid "ElmerGrid 8 2 FreeCAD_ElmerGUI_demo.unv -autoclean" to a ElmerGUI compatible mesh.
Screenshot from 2017-11-10 18-02-11.png
Screenshot from 2017-11-10 18-02-11.png (82.23 KiB) Viewed 10745 times
Now you can import this mesh into ElmerGUI ("File->Load mesh...") and have all groups defined in FreeCAD available. Setting up the model should be quite easy now.

Re: from freecad .fcstd format to Elmer

Posted: 10 Nov 2017, 20:10
by Wil
And here is the outcome simulated with ElmerGUI and visualized in Paraview:
Screenshot from 2017-11-10 18-01-50.png
Screenshot from 2017-11-10 18-01-50.png (135.15 KiB) Viewed 10745 times
The FreeCAD file, the .unv mesh and the elemer project can be found here
FreeCAD_ElmerGUI_demo.zip
(663.47 KiB) Downloaded 494 times

BR,
Wil

Created with:
OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12570 (Git)
Build type: None
Branch: master
Hash: b01c503c2cb37b2ed4fb848b0f495f599a7b179f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

Re: from freecad .fcstd format to Elmer

Posted: 10 Nov 2017, 20:26
by Wil
Also consider to use the built in Calculix thermomechanical solver (displacement caused by the temp-change are also computed) for comparison. With Calculix in FreeCAD the results look like
Screenshot from 2017-11-10 18-18-23.png
Screenshot from 2017-11-10 18-18-23.png (123.55 KiB) Viewed 10745 times
And here the results computed using Elmer compined with FreeCAD:
Screenshot from 2017-11-10 18-23-46.png
Screenshot from 2017-11-10 18-23-46.png (142.61 KiB) Viewed 10745 times
See also.... https://forum.freecadweb.org/viewtopic.php?f=18&t=22576
BR,
Wil

Re: from freecad .fcstd format to Elmer

Posted: 15 Nov 2017, 01:32
by Christoph2
It's already a bit outdated, but here you can see how to transfer a mesh from FreeCAD to Elmergui using unv. Especially if one would like to have different materials, quite a nice way.

https://www.youtube.com/watch?v=ZYtoB-CBxhU