Thermal FEM Analysis

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Thermal FEM Analysis

Post by makkemal »

Firstly absolute great job done by anybody working on free-cad this is really becoming a great tool.
Personally I am a mechanical engineer who has been doing FEA analysis for the last 15 years using a large number of commercial packages.
The FEM workbench has the potential of becoming very powerful very quickly.
Calculix is a powerful non-linear FEA solver and the extra functionality only needs be included in Free-cad

We are looking at including thermal structural coupled analysis:

The first step would be constraint
1. Temperature constraint (similar to displacement)
2. Convection constraint (similar to pressure)

The we would need to add thermal material properties to the materials.
Then we would need to bring the result back into the display.(this I still have to do some digging on)

With very little coding experience this may take us a while.
But with the examples for the other code we should get it done

Regards
Michael
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Thermal FEM Analysis

Post by PrzemoF »

Welcome to the forum Michael! I think I have some good news for you about the visualisation part :) I'll be sending a pull request soon for some important FEM result object changes [1] and there will be a result type agnostic way of visualising. Whatever you can provide as a list of float values (i.e. temperature or heat flux) or a list of vectors can be shown as colour or displacement of the mesh.

[1] viewtopic.php?f=18&t=11402
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Thermal FEM Analysis

Post by bernd »

makkemal wrote:... We are looking at including thermal structural coupled analysis: ...
Hi Michael, welcome to FreeCAD forum.

What kind of FEM Elemtent would you like to use?
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Thermal FEM Analysis

Post by makkemal »

Since the mesher only supports TET elements at this stage I will be working with them. High order TET elements are perfectly fine for most analysis.
In most packages any element supports thermal conduction. (I have not dug into the Calculix manual for the element name yet).

Calculix supports direct coupled structural thermal transient analysis.
I have mad a few test models using just Calculix and the results compare well to the Ansys results.
But Calculix is directly coupled (solves temperature and thermal field in one step)
Ansys is weak coupled. (solves thermal field and then solves structural field)

Right now just getting the code compiled is a bit steeper leaning curve than I expected.

Thanks
Michael
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Thermal FEM Analysis

Post by PrzemoF »

The setNodeColourByScalars function is now in the master branch [1], so if you can read the results into a python list you can show them on the mesh. Example usage [2]

[1] https://github.com/FreeCAD/FreeCAD_sf_m ... mp.cpp#L60
[2] https://github.com/FreeCAD/FreeCAD_sf_m ... is.py#L592
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Thermal FEM Analysis

Post by makkemal »

Thanks PrzemoF
I did see your post for results that help allot :)
I made basic constraint file's but nothing is working yet

Regards
Michael
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Thermal FEM Analysis

Post by bernd »

makkemal wrote:...High order TET elements are perfectly fine for most analysis.
...
Calculix supports direct coupled structural thermal transient analysis.
I have mad a few test models using just Calculix and the results compare well to the Ansys results.
But Calculix is directly coupled (solves temperature and thermal field in one step)
Ansys is weak coupled. (solves thermal field and then solves structural field)...
Would you mind posting a simple sample CalculiX input file for such an analysis?
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Thermal FEM Analysis

Post by PrzemoF »

bernd, there should be some examples here: http://www.dhondt.de/cgx_2.8.exa.tar.bz2
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Thermal FEM Analysis

Post by makkemal »

Except for node, elements, etc. This is what goes into the caculix input deck for steady state analysis
To change it to a transient coupled analysis
Change the following lines
** Coupled Temperature Solves Temperature and Stress field simultaneously
*COUPLED TEMPERATURE-DISPLACEMENT
0.2,3000.0

Code: Select all

** Material properties definition specific to thermal structural analysis. Name defined as STEEL
*MATERIAL,NAME=STEEL
** Elastic Properties of material defined
*ELASTIC
210000000000.0,0.3
** Expansion coefficient of material defined
*EXPANSION
1.2e-05
** Thermal Conductivity of material defined
*CONDUCTIVITY
5.0
** specific heat and density specificed for transient analysis
*SPECIFIC HEAT
446.0
*DENSITY
8050.0

** Element specified to behave as solids.
*SOLID SECTION,Elset = Eall,MATERIAL = STEEL

** Initial condition sets all initial temperature of all nodes, in this case, to 300K
*INITIAL CONDITIONS,TYPE=TEMPERATURE
Nall,300.

** Initiate Solution
*STEP,INC=2000

** Coupled Temperature Solves Temperature and Stress field simultaneously
*COUPLED TEMPERATURE-DISPLACEMENT, STEADY STATE
**0.2,3000.0

** Assigns convective heat transfer coefficients and ambient temperatures to their respective element sets
*FILM
EInnerPipeSurfaceSetInsideTheta,F1,1000.0,50.0
EInnerPipeSurfaceSetOutsideTheta,F1,500.0,60.0
EOuterPipeSurfaceSet,F2,300.0,40.0

** Assignment of pressuresure loading normal to face of inner diameter of pipe
*DLOAD
EInnerPipeSurfaceSetOutsideTheta,P1,200000000.0,
EInnerPipeSurfaceSetInsideTheta,P1,200000000.0,

** Used to generate data file
*NODE PRINT,NSET=Nall
** NT refers to nodal temperatures
NT
** Generates CXX Results File contating calculated temperature field.
*NODE FILE
NT
** Generates CXX Results File contating calculated Stress (S) and Strain (U) fields.
*El File
S, U
*END STEP
Regards
Michael
Thermalstructuralpipe.7z
Input file
(42.2 KiB) Downloaded 173 times
Last edited by makkemal on Wed Jul 29, 2015 12:08 pm, edited 1 time in total.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Thermal FEM Analysis

Post by bernd »

@przemo, thanks for the link

@makkemal, thanks for the file and code.

BTW: @makkemal, if you would use the code tags around the CalculiX code it would look much better. Just mark the code and press the icon code. You could even still edit your post in this regard.

Code: Select all

some sample calculix code
looks much better
if it is inside code tags --> [code]  
[/code]
Post Reply