Elmer/FreeCAD disappears when running simulation

About the development of the FEM module/workbench.

Moderator: bernd

thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Elmer/FreeCAD disappears when running simulation

Post by thschrader »

Here is a test file from @uwestoehr:
FEM_thermomechUweStoehr.FCStd
(17.4 KiB) Downloaded 23 times
When I run the simulation with Elmer, the HEAT/STRESS solvers are running.
At first HEAT (20 iteration), then STRESS.
When the sim seems to come to an end, suddenly FC disappears completely.
It seems this happen shortly before writing the results, as far as I can see it in the output window.
I ran Tutorial 7 from the Elmer-GUI-manual, the 3D elastic beam example, directly with Elmer GUI.
This works, no crash.
Any ideas?

My system (with newest patch from Uwe)
https://forum.freecadweb.org/viewtopic.php?f=18&t=71058

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)
Installed mods: 
  * BIM
  * CfdOF 1.17.6
  * Curves 0.3.0
  * Defeaturing_WB
  * dodo
  * Fasteners
  * FEM_FrontISTR 0.1.0
  * Manipulator 1.4.3
  * Plot
  * Reinforcement
  * WorkFeature
Elmer_heat_solver_crash.JPG
Elmer_heat_solver_crash.JPG (110.57 KiB) Viewed 1199 times
Elmer_GUI_Example7_3Dbeam.JPG
Elmer_GUI_Example7_3Dbeam.JPG (118.5 KiB) Viewed 1199 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer/FreeCAD disappears when running simulation

Post by thschrader »

This pcb-example ran on FC0.18 on another machine. And worked.
pcb_elmer.fcstd
(41.63 KiB) Downloaded 35 times
https://forum.freecadweb.org/viewtopic. ... p&start=10

When rerunning with FC0.20.1, the same crash happens, FC disappears.
Strange...
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer/FreeCAD disappears when running simulation

Post by thschrader »

@uwestoehr:
Please have a look at this easy example.
beam.FCStd
(10.95 KiB) Downloaded 21 times
When changing the output execution from "after simulation" to "allways",
FC still crashes, but I can catch the result. Matches with ccx and theory (-0,95 mm z-deflection).
I guess there must be an issue with FC shortly after writing the result. Then the crash happens.


I ran the elmer-GUI tutorials 19+20 (Navier-Stokes) from elmer-GUI.
This works.
resultoutput.JPG
resultoutput.JPG (38.59 KiB) Viewed 1138 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer/FreeCAD disappears when running simulation

Post by thschrader »

thschrader wrote: Sun Aug 14, 2022 1:29 pm When changing the output execution from "after simulation" to "allways",
FC still crashes, but I can catch the result.
Not with this model.
Strebenanschluss_Mast.FCStd
(40.82 KiB) Downloaded 18 times
The output file is too big, the crash interrupts writing. My guess... ;)

The pipeline results are now written in SI-Units, right?
In steel engineering we use MPa as stress result.
But for a general-purpose FEM it is ok.
new_units.JPG
new_units.JPG (51.16 KiB) Viewed 1104 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Elmer/FreeCAD disappears when running simulation

Post by uwestoehr »

thschrader wrote: Sun Aug 14, 2022 10:01 am Here is a test file from @uwestoehr:
FEM_thermomechUweStoehr.FCStd

When I run the simulation with Elmer, the HEAT/STRESS solvers are running.
At first HEAT (20 iteration), then STRESS.
When the sim seems to come to an end, suddenly FC disappears completely.
This must be a problem with your graphics card then. I tested with FC 0.20.1 and the latest patch collection: https://forum.freecadweb.org/viewtopic. ... 23#p617823

When it crashes for you, the result pipeline is created. Do you also get a crash when you create a an empty result pipeline manually or by creating a pipeline from a CCX result?

You wrote that you have problems with your computer or did you test with your PC from your work?

------------------------

Concerning the thermomech example file, when you set there for the heat a relaxation factor of 0.9, the preconditioner to ILU1 and the Idrs method, you only need about 8 heat solver runs instead of about 17. Here is the file where these optimal parameters are used:
FEM_thermomechUweStoehr.FCStd
(28.97 KiB) Downloaded 20 times
(requires the above linked patch collection)

For the stress solver, however, Elmer is strange: When I use several CPU to solve, the direct solver delivers a result in few seconds but with only one CPU, it fails. Since FC 0.20 can only handle 1 CPU core for Elmer, I therefore used now also an iterative solver -> which needs ages, but succeeds.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer/FreeCAD disappears when running simulation

Post by thschrader »

uwestoehr wrote: Sun Aug 14, 2022 7:42 pm When it crashes for you, the result pipeline is created. Do you also get a crash when you create a an empty result pipeline manually or by creating a pipeline from a CCX result?
You wrote that you have problems with your computer or did you test with your PC from your work?
Your cfd-example (with latest FEM-patch) runs fine, no crash.
When deleting the result objects from model tree and rerun ==> crash.
I tried to use dummy result objects in the beam example, before starting elmer.
Crash still happens, maybe the names are wrong.
However, I expect a new laptop in the next 14 days (from my company).
At the moment I use a HP ProBook 650 G2 with Intel i5-6300U CPU, 16GB RAM,
with onboard graphics card.
Maybe you can prepare a elmer-FEM dummy simulation with output as reference,
like your cfd example.
elmer2Dcfd_example.JPG
elmer2Dcfd_example.JPG (87.79 KiB) Viewed 1000 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Elmer/FreeCAD disappears when running simulation

Post by uwestoehr »

thschrader wrote: Mon Aug 15, 2022 8:45 am Your cfd-example (with latest FEM-patch) runs fine, no crash.
When deleting the result objects from model tree and rerun ==> crash.
So it crashes when the result VTK model is loaded. Do you get the crash when you load the .vtu file from your simulation directly to FC? If so, yor graphics card in combination with VTK 8.2 is the reason.

Since there are reported issues with VTK 9.x, we purposely stay with VTK 8.x and to my knowledge you are the first one reporting issues with this.
thschrader wrote: Mon Aug 15, 2022 8:45 am At the moment I use a HP ProBook 650 G2 with Intel i5-6300U CPU, 16GB RAM,
with onboard graphics card.
Did you check for updates if the graphics driver? I also have a business HP laptop and about a year a go a driver update made FC completely unusable.
I reported that to the IT guys and before they reacted, a new graphics driver was released and upgrading to that fixed it directly.
thschrader wrote: Mon Aug 15, 2022 8:45 am Maybe you can prepare a elmer-FEM dummy simulation with output as reference,
like your cfd example.
Sure. What simulation do you need/like as dummy?
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer/FreeCAD disappears when running simulation

Post by thschrader »

uwestoehr wrote: Mon Aug 15, 2022 9:28 am Sure. What simulation do you need/like as dummy?
Statics would be nice.
I will check graphics driver / Vtu-import tomorrow.
Heavy workload at the moment...
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Elmer/FreeCAD disappears when running simulation

Post by uwestoehr »

thschrader wrote: Mon Aug 15, 2022 2:06 pm Statics would be nice.
I already posted a statics analysis: https://forum.freecadweb.org/viewtopic. ... 35#p617835
Anything else?
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer/FreeCAD disappears when running simulation

Post by thschrader »

uwestoehr wrote: Mon Aug 15, 2022 2:45 pm I already posted a statics analysis: https://forum.freecadweb.org/viewtopic. ... 35#p617835
Anything else?
No, thats ok. Now I have a Statics/CFD analysis for elmer to play with.

Reloading the vtu works, no problem.
My workflow:
Create sim, run sim, lets crash FC.
Reopen FC, load result.
Life should be fun...
vtu_result_import.JPG
vtu_result_import.JPG (51.73 KiB) Viewed 909 times
Post Reply