Temperature distribution from non-uniform source

General discussion about Elmer
Post Reply
Boris-k
Posts: 2
Joined: 14 Dec 2013, 23:46
Antispam: Yes

Temperature distribution from non-uniform source

Post by Boris-k »

Dear Elmer Users,

It is my first experience in Elmer.
I would like to calculater temperature distribution in the body while heat source is not uniform (Gaussian distribution in my specific case).
I need to study two cases: (i) heat source in in the body itself; (ii) thermal flux from boundary surface.

I found examples only with body force constant and heat flux constant:

Body Force 1
Name = "BodyForce 1"
Heat Source = 0.01
End

Boundary Condition 1
Target Boundaries(1) = 1
Name = "BoundaryCondition 1"
Heat Flux = 0.03
End


How can I define non-uniform distributions?

Please refer me of post here some example.

Thank you in advance for your help.

Boris
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Temperature distribution from non-uniform source

Post by mzenker »

Hi,

you can make the heat source dependent on coordinates and use a MATC expression. In the tutorials "Navier-Stokes equation – Laminar incompressible flow passing a step" and "Thermal flow in curved pipe" you can find examples for MATC expressions. See also the MATC manual for more info. Later, if computing time is critical, you could replace the MATC expression by use a user defined function, but that is a bit more advanced since you need to write a FORTAN function (see ElmerSolver manual for more information).

HTH,

Matthias
Boris-k
Posts: 2
Joined: 14 Dec 2013, 23:46
Antispam: Yes

Re: Temperature distribution from non-uniform source

Post by Boris-k »

Thank you Matthias,

However I can't understand how to define heat source that depends on 2 or 3 coordinates (for example if it is cylinder with gaussian profile). how solver "knows" that it is fuction of x or y coordinate?
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Temperature distribution from non-uniform source

Post by annier »

Hi Boris,
I am not sure whether i will be correctly addressing your situation?
However, please let me try.
1. In Elmer, by defining

Code: Select all

Normal-Tangential Varname = Logical True     !Varname may be displacement, velocity etc. preferably vector 
, Coordinate 1 means normal to the surface or line considered and Coordinate 2 means tangential to the surface or line. (This is an edited version following the comment from Peter)

2. Sometimes, heat source can be user defined by exporting the variable in the solver section and defining those variables in the body force section. The following post illustrates about this:
viewtopic.php?f=3&t=378

Yours
Annier
Last edited by annier on 24 Dec 2013, 13:59, edited 3 times in total.
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Temperature distribution from non-uniform source

Post by raback »

Hi

Coordinate 1 is normally x (r in cylindrical) and Coordinate 2 is y (z), and Coordinate 3 is z. Only when using normal-tangential coordinates for vector valued fields are they defined in local N-T coordinates, the Coordinates are however never altered.

You can add any number of variables for a dependency list as in

Code: Select all

$coeff=1.23
Heat Conductivity = Variable Coordinate 1, Coordinate 2, time, Temperature
  Real MATC "tx(0)+2*tx(1)+3*tx(2)+coeff*tx(3)"
The tx always a vector with arguments (0:n-1) listed in the order given in the previous line.

There should be tens of various examples of using MATC in the forum and tests directory.

-Peter
Post Reply