from freecad .fcstd format to Elmer

Mesh generators, CAD programs, and other tools

from freecad .fcstd format to Elmer

Postby Gary R » 27 Sep 2017, 04:13

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.
Gary R
 
Posts: 48
Joined: 12 Apr 2012, 07:23
Location: Long Beach CA

Re: from freecad .fcstd format to Elmer

Postby raback » 27 Sep 2017, 10:24

Hi

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

-Peter
raback
Site Admin
 
Posts: 3139
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

Re: from freecad .fcstd format to Elmer

Postby smselver » 31 Oct 2017, 00:01

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

Re: from freecad .fcstd format to Elmer

Postby mzenker » 03 Nov 2017, 11:21

Hi,

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

HTH,

Matthias
mzenker
 
Posts: 1615
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: from freecad .fcstd format to Elmer

Postby Wil » 10 Nov 2017, 10:20

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: 61
Joined: 10 Jan 2014, 13:26
Location: Austria

Re: from freecad .fcstd format to Elmer

Postby Wil » 10 Nov 2017, 20:06

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 235 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 235 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 235 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: 61
Joined: 10 Jan 2014, 13:26
Location: Austria

Re: from freecad .fcstd format to Elmer

Postby Wil » 10 Nov 2017, 20:10

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 235 times


The FreeCAD file, the .unv mesh and the elemer project can be found here
FreeCAD_ElmerGUI_demo.zip
(663.47 KiB) Downloaded 17 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: 61
Joined: 10 Jan 2014, 13:26
Location: Austria

Re: from freecad .fcstd format to Elmer

Postby Wil » 10 Nov 2017, 20:26

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 235 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 235 times

See also.... https://forum.freecadweb.org/viewtopic.php?f=18&t=22576
BR,
Wil
Wil
 
Posts: 61
Joined: 10 Jan 2014, 13:26
Location: Austria

Re: from freecad .fcstd format to Elmer

Postby Christoph2 » 15 Nov 2017, 01:32

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
Christoph2
 
Posts: 1
Joined: 15 Nov 2017, 01:26


Return to External tools

Who is online

Users browsing this forum: No registered users and 2 guests