from freecad .fcstd format to Elmer

Mesh generators, CAD programs, and other tools
Post Reply
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

from freecad .fcstd format to Elmer

Post 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.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: from freecad .fcstd format to Elmer

Post 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
smselver
Posts: 1
Joined: 30 Oct 2017, 23:56
Antispam: Yes

Re: from freecad .fcstd format to Elmer

Post 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
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: from freecad .fcstd format to Elmer

Post by mzenker »

Hi,

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

HTH,

Matthias
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: from freecad .fcstd format to Elmer

Post 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
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: from freecad .fcstd format to Elmer

Post 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 10740 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 10740 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 10740 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.
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: from freecad .fcstd format to Elmer

Post 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 10740 times
The FreeCAD file, the .unv mesh and the elemer project can be found here
FreeCAD_ElmerGUI_demo.zip
(663.47 KiB) Downloaded 493 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)
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: from freecad .fcstd format to Elmer

Post 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 10740 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 10740 times
See also.... https://forum.freecadweb.org/viewtopic.php?f=18&t=22576
BR,
Wil
Christoph2
Posts: 1
Joined: 15 Nov 2017, 01:26
Antispam: Yes

Re: from freecad .fcstd format to Elmer

Post 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
Post Reply