Elmer Transient Simulation

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
kdarte
Posts: 9
Joined: Fri Nov 11, 2022 7:47 pm

Elmer Transient Simulation

Post by kdarte »

Hi all,

I spend this morning trying to get some transient simulation of the heat equation with Elmer run from the FEM-Workbench.
I found that only the very last snapshot of the transient simulation is saved. As there is no way to set the output frequency within the GUI, I am not quite sure whether it is desired at all to have intermediate outputs for transient simulations in FreeCAD?

But the following might help if someone else wants to follow some transient phenomena in freeCAD-Elmer-Simulations:

I think the missing output has several reasons
  • The Simulation section in the ".sif" file has to contain the item "Post File = foo.vtu"; otherwise Elmer does not save any file.
  • In "src/Mod/Fem/femsolver/elmer/writer.py" line 346, the Output interval is set equal to Timestep interval. I think this makes Elmer saving a file at the beginning and at the end of the simulation (but not in between)
    git.png
    git.png (52.13 KiB) Viewed 752 times
    . Is this desired?
  • The method "def _addOutputSolver(self)" in "writer.py" line 1710 creates an additional "solver" in the .sif file which, I guess, is supposed to save the last time step. This, however, somehow affects the naming scheme of Elmer. Even if "Post File" and the "output interval" are set properly, elmer will not create files like "foo_t0001.vtu, foo_t0002.vtu" but instead just creates a single "foo.vtu" file which is overwritten each time step. The final file is then created correctly after the simulation.

So,

1: manually adding the "Post file" entry
2: fixing the output interval
3: removing the additional "solver"

allows one to get also intermediate states of the simulation.

This is some random example I just created with FreeCAD+Elmer
heating.gif
heating.gif (451.99 KiB) Viewed 752 times

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Post Reply