GSoC2020, FEM: extend examples

About the development of the FEM module/workbench.

Moderator: bernd

HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

BTW: regarding the models using 'heat' equation.... The material parameter 'specific heat' should be renamed to the correct expresseion 'specific heat capacity' (https://en.wikipedia.org/wiki/Specific_heat_capacity).
'Specific heat' alone makes no sense :!:

The 'Constraint body heat source' has to be made aware of units I simply scaled the value given in the tutorial which is "Heat Source = 0.01" to 10000 to get the same result values:!:
I think the model is set-up correctly since I opened the original model found in https://www.nic.funet.fi/pub/sci/physic ... GUI.tar.gz and the FC model both in paraview and both results look the same.

But obviously one has to know what this value has as units.

EDIT:
The .pdf tells us that the units are as follows "...internal heat generation is ,h= 0.01W/kg, and use the material properties of aluminium..." which is a bit odd. I expected J/m³ as unit for internally generated heat!! "W/kg" has to be recomputed internally using the density.

@Raback Is it possible to change/adopt the unit of the heat source to a bit more physically/technically correct unit like J/m³ (generated energy per unit volume)?

Furthermore for documentation (still not completely clear why has "Heat Source = Real 10000.0" in the .sif if ISO is used as in my case):

Code: Select all

In [6]: import quantities as pq                        
   ...: heat_source_Wperkg = 0.01*(pq.m**2/ (pq.s**2) )  # W/kg = (kg * m^2 / s^2) /kg = m^2/s^2
   ...: print("heat_source_Wperkg_mm : "+str(heat_source_Wperkg.rescale(pq.mm**2/pq.s**2)))
heat_source_Wperkg_mm : 10000.0 mm**2/s**2
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

HoWil wrote: Fri Aug 07, 2020 7:45 pm
"7. Constraint initial flow velocity" is in the "Tutorial 9" of the GUI-Tutorials the 2D!!!-model can be found attached:
I tried making this example: https://github.com/Sudhanshu-Dubey14/Fr ... 0954ead938
It seems the geometry and constraints are fine, but the solver is giving error:

Code: Select all

CRS_IncompleteLU: ILU(1) (Real), Starting Factorization:
CRS_IncompleteLU: Allocated LU matrix of size: 36960
CRS_IncompleteLU: ILU(1) (Real), NOF nonzeros:     36961
CRS_IncompleteLU: ILU(1) (Real), filling (%) :       134
CRS_IncompleteLU: ILU(1) (Real), Factorization ready at (s):     0.00
       1        NaN
       1        NaN
ERROR:: IterSolve: Numerical Error: System diverged over maximum tolerance
I must be doing something wrong, but I can't figure out what.
Can you have a look?
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

Can you please double check all! settings for the equations like their priorities and e.g. the max. number of iterations.
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

HoWil wrote: Sat Aug 08, 2020 4:34 pm Can you please double check all! settings for the equations like their priorities and e.g. the max. number of iterations.
Yeah, they are the same as in the example given by you.
The max number of iterations of Elmer are 1.
Flow has a priority of 10 and Heat has 8.
The preconditioning for both is ILU1 and stabilize is set to False.
I wonder if setting Linear Tolerance to some value will help, though it is zero for both the equations in your file.
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

HoWil wrote: Fri Aug 07, 2020 8:33 pm Here the model for Tutorial1 for the body heat source
Is the geometry/model imported in this one?
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

Sudhanshu wrote: Sat Aug 08, 2020 5:06 pm
HoWil wrote: Sat Aug 08, 2020 4:34 pm Can you please double check all! settings for the equations like their priorities and e.g. the max. number of iterations.
Yeah, they are the same as in the example given by you.
The max number of iterations of Elmer are 1.
Flow has a priority of 10 and Heat has 8.
The preconditioning for both is ILU1 and stabilize is set to False.
I wonder if setting Linear Tolerance to some value will help, though it is zero for both the equations in your file.
Phu... this one was interesting....
Its the geometry.... don't ask my why... I deleted the wire copied over the wire form my model, assigned all conditions again and it works.....
Attachments
tmp.FCStd
(21.73 KiB) Downloaded 74 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

Sudhanshu wrote: Sat Aug 08, 2020 8:29 pm
HoWil wrote: Fri Aug 07, 2020 8:33 pm Here the model for Tutorial1 for the body heat source
Is the geometry/model imported in this one?
Yes, its the step file pump_carter_sup.stp directly imported from "ElmerTutorialFilesGUI/TemperatureFieldOfSolidObject"
Attachments
pump_carter_sup.zip
(37.9 KiB) Downloaded 48 times
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

HoWil wrote: Sat Aug 08, 2020 8:43 pm Phu... this one was interesting....
Its the geometry.... don't ask my why... I deleted the wire copied over the wire form my model, assigned all conditions again and it works.....
I can answer the 'why'. It's actually the y-coordinates of the points of the wire.
In your file, they have values in the range of 10^-11 or 10^-12 so I assumed that setting them as 0 should be more clean.
But I was wrong there. Setting the exact values did the trick.

Now for the results, there is one issue which is the import/export of the mesh.
If you generate the mesh and use it for getting the results then you get:
Results in MKS units.
Results in MKS units.
flow_step_results.png (50.52 KiB) Viewed 2109 times

This matches nicely with HoWil's and the result in the tutorial. It has mesh details:

Code: Select all

========================== Dump contents of mesh ==========================

1) Total number of nodes:      	1951
2) Total number of edges:      	130
3) Total number of faces:      	910
4) Total number of polygons:   	0
5) Total number of volumes:    	0
6) Total number of polyhedrons:	0

7) Total number of linear edges:	0
8) Total number of linear faces:	0
9) Total number of linear volumes:	0

10) Total number of quadratic edges:	130
11) Total number of quadratic faces:	910
11.1) Number of quadratic triangles:  	910
11.2) Number of quadratic quadrangles:	0
12) Total number of quadratic volumes:	0

===========================================================================
But when you export the same mesh, and import it in the example you get:
MKS units again.
MKS units again.
flow_step_no_edges.png (19.41 KiB) Viewed 2109 times
The mesh here becomes:

Code: Select all

========================== Dump contents of mesh ==========================

1) Total number of nodes:      	1951
2) Total number of edges:      	0
3) Total number of faces:      	910
4) Total number of polygons:   	0
5) Total number of volumes:    	0
6) Total number of polyhedrons:	0

7) Total number of linear edges:	0
8) Total number of linear faces:	0
9) Total number of linear volumes:	0

10) Total number of quadratic edges:	0
11) Total number of quadratic faces:	910
11.1) Number of quadratic triangles:  	910
11.2) Number of quadratic quadrangles:	0
12) Total number of quadratic volumes:	0

===========================================================================

As you can see, all the edges are lost.
In fact I checked with other examples having Tria6 mesh and all of them have no edges.
Though it has no effect on the result but only the visualisation in Elmer (no other Tria6 example is solvable by Elmer and maybe that's why we never noticed).

Also, quoting the result from the GUI tutorial:
the minimum and maximum lateral velocities are -0.1666 m/s and 1.5 m/s, respectively
Our results don't seem to match with this. :!:

Updated example: https://github.com/Sudhanshu-Dubey14/Fr ... b1f4a6a189
raback
Posts: 75
Joined: Fri May 08, 2020 4:02 pm
Location: Finland
Contact:

Re: GSoC2020, FEM: extend examples

Post by raback »

HoWil wrote: Sat Aug 08, 2020 10:30 am @Raback Is it possible to change/adopt the unit of the heat source to a bit more physically/technically correct unit like J/m³ (generated energy per unit volume)?
Yes, this has been weird choice also for me. Sometimes you learn to live with bad choices also. However, I just added an alternative keyword "Volumetric heat source" for which the SI unit is W/m^3. It is in "devel" branch of Elmer since a few minutes. The historical "Heat Source" is untouched. However, you should not have both at the same time.

-Peter
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

I cant say much regarding the mesh import.

Regarding the results.... This is mainly because we use a coarse mesh and because the boundary conditions are not exactly the same as in the tutorial where the inlet velocity is a function of the "edge-coordiante" tx:

Code: Select all

BoundaryConditionName = Inlet
Navier-Stokes
Velocity 1 = Variable Coordinate 2; Real MATC "6*(tx-1)*(2-tx)"
Velocity 2 = 0.0
This could be resolved with the freetextinputs from over here https://forum.freecadweb.org/viewtopic. ... 10#p420614 .

BTW: with merging the freetextinputs also the "Elmer static currents" model can be used after defining the material as freetextinput: https://forum.freecadweb.org/viewtopic. ... 67#p418345

EDIT BTW2: the size of the model has to be checked again.....from the tutorial: "One special result of interest is the point, on the x-axis, at whichthe direction of the flow changes. In this case its position is about 5.0 m after the step."
Post Reply