Elmer Solver Control - Write

About the development of the FEM module/workbench.

Moderator: bernd

johnwang
Posts: 348
Joined: Sun Jan 27, 2019 12:41 am

Elmer Solver Control - Write

Postby johnwang » Fri May 01, 2020 5:39 am

Hi,

Trying the Flow past a Step test case (FlowStepCompressible3D_simplified_initial_flow_recreated.fcstd) showed here https://forum.freecadweb.org/viewtopic. ... &start=210

After I hit the Write button, It says Preparing, but no Finished. I can see the files are in the folder.

What's the Edit button for? Is it for editing the Sif file? How do I enable it?

Regards,

John

Win 10 - 20839 Git
control.jpg
control.jpg (22.83 KiB) Viewed 442 times
HoWil
Posts: 1095
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Solver Control - Write

Postby HoWil » Fri May 01, 2020 8:36 am

Dear John,

Tried it and it works as expected. At least it starts the solver, canceled it afterwards.
  • Can't tell how old your version of FC is "Win 10 - 20839 Git". Maybe you try a update.
  • Are the path to your solver binary set correctly in the Preferences->FEM->Elmer?; Where are the simulation files stored check Preferences->FEM ->General -> Working directory... ; I use here 'Beside...'
  • Did you save the file somewhere on your harddisk before starting the simulation?
johnwang wrote:
Fri May 01, 2020 5:39 am
What's the Edit button for? Is it for editing the Sif file? How do I enable it?
Yes it is was for editing the solver input files maybe something is broken.


My version of FC is:
OS: Ubuntu 19.10 (ubuntu:GNOME/ubuntu-wayland)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: bc107eacc8e020a779b2bbcb21559283ee440268
Python version: 3.7.5
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
johnwang
Posts: 348
Joined: Sun Jan 27, 2019 12:41 am

Re: Elmer Solver Control - Write

Postby johnwang » Fri May 01, 2020 8:55 am

HoWil wrote:
Fri May 01, 2020 8:36 am
Dear John,

Tried it and it works as expected. At least it starts the solver, canceled it afterwards.
  • Can't tell how old your version of FC is "Win 10 - 20839 Git". Maybe you try a update.
  • Are the path to your solver binary set correctly in the Preferences->FEM->Elmer?; Where are the simulation files stored check Preferences->FEM ->General -> Working directory... ; I use here 'Beside...'
  • Did you save the file somewhere on your harddisk before starting the simulation?

I was wondering why I got an error message saying module 'femsolver.settings' has no attribute 'BESIDE' when load that case with an old version FC. Then I downloaded the newest one (0.19.20839), it doesn't show that error. Its Working directory is set at Temporary dir. I changed the folder inside the Solver Control, then Write case files. I was wondering before why FC uses a temp dir to store data. Now I know where it came from.

I think the Write process is finished, the button label changed to re-Write. Just expecting there is an output saying it is finished. Like this:

Code: Select all

Checking analysis...
Preparing input files...
Finished.
Does there have one?

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20839 (Git)
thschrader
Posts: 1710
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Solver Control - Write

Postby thschrader » Fri May 01, 2020 9:56 am

Reactivated my old pc with FC0.17 version.
I can run Howils example without problems.
A little bit time consuming in comparison to openfoam.
However, I have no experience with elmer.
Some more elmer-stuff (maybe Maurice will jump in... :) )
https://forum.freecadweb.org/viewtopic. ... 3&start=10

John, do you know this?
http://www.mastan2.com/screenshots.html
elmer_runs.JPG
elmer_runs.JPG (50.55 KiB) Viewed 393 times
johnwang
Posts: 348
Joined: Sun Jan 27, 2019 12:41 am

Re: Elmer Solver Control - Write

Postby johnwang » Fri May 01, 2020 10:04 am

thschrader wrote:
Fri May 01, 2020 9:56 am
John, do you know this?
http://www.mastan2.com/screenshots.html
Don't know mastan. There are so many.
RatonLaveur
Posts: 739
Joined: Wed Mar 27, 2019 10:45 am

Re: Elmer Solver Control - Write

Postby RatonLaveur » Fri May 01, 2020 1:55 pm

thschrader wrote:
Fri May 01, 2020 9:56 am
Reactivated my old pc with FC0.17 version.
I can run Howils example without problems.
A little bit time consuming in comparison to openfoam.
Hi thschrader, the time consuming aspect of Elmer vs. OpenFoam is most likely due to your selection of convergence criteria. Elmer uses very exacting default values while OpenFoam default at more reasonable levels of accuracy. Changing that can drastically reduce your time to solution.

https://forum.freecadweb.org/viewtopic. ... 10#p393307

This particular post on my messy other thread may help you optimize quickly for rapid testing :)

Of course, you have to note that the Elmer case you simulate on your machine is a Thermo-Fluidic analysis. In my case I compare apple to apples by going Fluidic only in both solvers.
thschrader
Posts: 1710
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Solver Control - Write

Postby thschrader » Fri May 01, 2020 3:50 pm

RatonLaveur wrote:
Fri May 01, 2020 1:55 pm
...
This particular post on my messy other thread may help you optimize quickly for rapid testing :)
...
New run with fluid alone and reduced tolerance
1700 vs 2000 sec.
elmer_fluid_alone.JPG
elmer_fluid_alone.JPG (72.33 KiB) Viewed 341 times
RatonLaveur
Posts: 739
Joined: Wed Mar 27, 2019 10:45 am

Re: Elmer Solver Control - Write

Postby RatonLaveur » Fri May 01, 2020 3:56 pm

Mesh too fine? I used a 1.5 mm mesh size in gmsh for a flow step roughly 50 by 150 by 5 mm.

Also why did you put bubbles true?

Also linear iterative and 250 iterations limit. Allowed tolerance of 10e-15 (yeah i know...but it reached it haha) and convergence of 10e-4
thschrader
Posts: 1710
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Solver Control - Write

Postby thschrader » Fri May 01, 2020 4:38 pm

RatonLaveur wrote:
Fri May 01, 2020 3:56 pm
Mesh too fine? I used a 1.5 mm mesh size in gmsh for a flow step roughly 50 by 150 by 5 mm.

Also why did you put bubbles true?

Also linear iterative and 250 iterations limit. Allowed tolerance of 10e-15 (yeah i know...but it reached it haha) and convergence of 10e-4
meshing: max cell size 10 mm with gmsh
bubbles: no idea. As I said above: I have no experience with elmer :shock:
Installed elmer on my much faster office-pc. First run of Howils file gives no convergence (???)
Can you tell me how to refine mesh in elmer-gui?
elmer_gui.JPG
elmer_gui.JPG (74.68 KiB) Viewed 327 times
RatonLaveur
Posts: 739
Joined: Wed Mar 27, 2019 10:45 am

Re: Elmer Solver Control - Write

Postby RatonLaveur » Fri May 01, 2020 5:52 pm

Yeah your surface mesh is definitely not showing such good things.
But do it in FreeCAD using gmsh (i only say this because i know FreeCAD gui, not Elmer yet).
Double click the mesh object in the tree. This will open gmesh and allow you to refine the mesh a little. Don't go over board. 1 to 3 mm will be enough for your first test.

I don't fully understand bubbles yet but they are a supplementary degree of freedom (vertex, edge, face, bubble). It seems for most linear iterative steady state systems calculating them is not absolutely necessary and therefore false reduces computation time. False was ok for me.

EDIT: here my test file, it computes in about 60s on my computer.
Test_Elmer.FCStd
Simple_Fast_Solved_Elmer_Step_CFD
(645.64 KiB) Downloaded 3 times