Elmer Integration (GSoC) - Activity Log

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Post by thschrader »

HoWil wrote: Sat Mar 31, 2018 5:08 pm As I remember there is a limitation of Elmer-FC-FEM regarding 2D-Meshes. I think it is a limitation of Elmer-Grid, but I am not 100% sure. So, it is not possible to simply recreate the original 2D-model from the Elmer-tutorials.
You are right, I used a 3D-FC-model too. Its the same in the cfd-of-wb (openfoam), you must "construct"
the original 2D-case as 3D. I aborted the calculation after more than 1 hour runtime, it seems that the elmer-solver does not
converge on the 3D-calculation (the 2D-case converges after 5 min...). It would be helpful to see the residuals when running elmer
in FC like in the cfd-of-wb. However, I am not very familiar with elmer, maybe I did something wrong. On the other hand:
in the tutorial itself they talk about convergence problems...
I will use a "real world problem" (3D-flow around a cylinder) as I did in cfd-wb with openfoam.
it's a long long way to tipperary :)
For me the most interesting tutorial is nr. 9:
FluidStructureInteraction.JPG
FluidStructureInteraction.JPG (58.77 KiB) Viewed 2424 times
noConvergence.JPG
noConvergence.JPG (49.58 KiB) Viewed 2424 times
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Post by thschrader »

Did some testing with different meshes.
gmsh: the solution in fem-wb/elmer only converges when using 1st-order elements
(like gmsh does in cfd-wb by default).
I only get the solution from the tutorial when using hex-meshes (cfmesh/snappyhexmesh).
When using tetrahedrons, the velocity-field is completely different and I
have no idea why.
test.JPG
test.JPG (83.72 KiB) Viewed 2387 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

thschrader wrote: Sat Mar 31, 2018 6:37 pm I aborted the calculation after more than 1 hour runtime, it seems that the elmer-solver does not
converge on the 3D-calculation (the 2D-case converges after 5 min...).
Firstly, please check your solver settings like the Preconditioning, Solver-Type or order of the solvers (priorities). There are many important things which can be forgotten/overseen. I attached some quick screenshots of the most interesting parts.
Secondly, always double-check the material-properties in python console as listed in the code-box here https://forum.freecadweb.org/viewtopic. ... 10#p223408 . I had several times problems with the material-dialogue and I am still not sure if everything is solved jet (check "App.ActiveDocument.FluidMaterial.Material").
thschrader wrote: Sat Mar 31, 2018 6:37 pmIt would be helpful to see the residuals when running elmer
in FC like in the cfd-of-wb.
There is no plot implemented jet, but you can see the residuals in the solver-output as text. This is in 99% of my cases enough to get an idea if everything runs fine.
BR,
HoWil
Attachments
Bildschirmfoto von »2018-04-01 21-00-24«.png
Bildschirmfoto von »2018-04-01 21-00-24«.png (96.51 KiB) Viewed 2385 times
Bildschirmfoto von »2018-04-01 21-00-29«.png
Bildschirmfoto von »2018-04-01 21-00-29«.png (128.57 KiB) Viewed 2385 times
Bildschirmfoto von »2018-04-01 21-00-33«.png
Bildschirmfoto von »2018-04-01 21-00-33«.png (128.4 KiB) Viewed 2385 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

thschrader wrote: Sun Apr 01, 2018 6:58 pm Did some testing with different meshes.
gmsh: the solution in fem-wb/elmer only converges when using 1st-order elements
(like gmsh does in cfd-wb by default).
I only get the solution from the tutorial when using hex-meshes (cfmesh/snappyhexmesh).
When using tetrahedrons, the velocity-field is completely different and I
have no idea why.
test.JPG
One reason could be that in the tutorial a flow profile is used for the input (Velocity 1 = Variable Coordinate 2; Real MATC "6*(tx-1)*(2-tx)") .
But there has to be something else missing! Please compare the screenshot form my previous post https://forum.freecadweb.org/viewtopic. ... 10#p223408 (and the attached one). It fits in my opinion the cfd-wb plots very well. My tip... wrong material or too coarse mesh.
BR,
HoWil
Bildschirmfoto von »2018-04-01 21-39-27«.png
Bildschirmfoto von »2018-04-01 21-39-27«.png (207.67 KiB) Viewed 2379 times
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Post by thschrader »

HoWil, thanks for the hints.
I used the solver settings from your post above,
but without simulating the heatflow. In openfoam you can
run multiphysics, but (at the moment) it is not possible to do this
with cfd-wb in FC. One reason could be, that my model is much bigger.
When loading the tutorial file step.grd in elmer-GUI, you can see at the bounding box,
that the channel is 12 m long and 2 m high. Your model is 1,4 m long. But it does not
explain, why I get different results when using hex-mesh / tetra-mesh in cfd-wb alone.
I will have a look at it
Thomas
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Post by thschrader »

thschrader wrote: Sun Apr 01, 2018 10:07 pm But it does not
explain, why I get different results when using hex-mesh / tetra-mesh in cfd-wb alone.
Aaaah...
Because it makes sense to set the output to the last calculated time-step,
not to the first... :oops: :lol:
Elmer-gmsh: should be the same "problem". I get only one result-file, not a iteration
series like in cfd-wb. Seems I have wrong settings in the output-solver.
first.JPG
first.JPG (39.64 KiB) Viewed 2349 times
last.JPG
last.JPG (39.13 KiB) Viewed 2349 times
elmer_sif.JPG
elmer_sif.JPG (22.58 KiB) Viewed 2349 times
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Post by thschrader »

@HoWil:
OK, I got it. I rebuild your 1,4 m channel and did a elmer run without heat,
using your solver setting. I checked the result with cfd-wb (gmsh). Nice.
It is no problem to use a constant velocity inlet, after 300 mm you have
a parabolic velocity-profile.
I will try to rebuild elmer tutorial nr.8 (fluid interaction
with elastic obstacle) in FC.
Thomas
elmer.JPG
elmer.JPG (144.2 KiB) Viewed 2282 times
cfd_wb_gmsh.JPG
cfd_wb_gmsh.JPG (176.28 KiB) Viewed 2282 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

thschrader wrote: Wed Apr 04, 2018 12:47 pm @HoWil:
OK, I got it. I rebuild your 1,4 m channel and did a elmer run without heat,
using your solver setting. I checked the result with cfd-wb (gmsh). Nice.
It is no problem to use a constant velocity inlet, after 300 mm you have
a parabolic velocity-profile.
I will try to rebuild elmer tutorial nr.8 (fluid interaction
with elastic obstacle) in FC.
Thomas
Great :!:
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Post by thschrader »

OK, I tried to rebuild elmer tutorial nr. 8 (fluid-structure interaction)
with FC, but I have problems with the tutorial itself.
How must I interpret the mesh elastic modulus in the sif?
I found nothing in the tutorials or using google.
The tutorial does not run when using physically reasonable values for the structure,
for instance using the values for concrete. The solver does not converge.
mesh.JPG
mesh.JPG (23.7 KiB) Viewed 2161 times
elmer_tutorial8.JPG
elmer_tutorial8.JPG (56.15 KiB) Viewed 2161 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

thschrader wrote: Sat Apr 28, 2018 9:38 am OK, I tried to rebuild elmer tutorial nr. 8 (fluid-structure interaction)
with FC, but I have problems with the tutorial itself.
How must I interpret the mesh elastic modulus in the sif?
I found nothing in the tutorials or using google.
The tutorial does not run when using physically reasonable values for the structure,
for instance using the values for concrete. The solver does not converge.
mesh.JPG
elmer_tutorial8.JPG
Hi Thomas,
I am not familiar with this problem/tutorial, but it could be that these settings are related to an "moving"/adaptive mesh.
If it is so that this is not supported by Elmer in FC jet.
BR,
HoWil
Post Reply