SFEMaNS  version 4.1 (work in progress)
Reference documentation for SFEMaNS
 All Classes Files Functions Variables Groups Pages
The function source_in_temperature

It is used to define the source term \(f_T\) of the temperature equation. We refer to the section Heat equation's weak formulation for more information on the formulation of the temperature equation in SFEMaNS.

This function defines the source term for one given Fourier mode, one given component (cosine or sine) on all the gauss points of the finite element mesh. We denote by temp_mesh the finite element mesh used to approximate the temperature.

Inputs and outputs

The inputs of this function are the following:

  1. TYPE is the component of the source term that is computed (cosine or sine). It is an integer between one and two.
  2. rr is a real valued tabular that contains two columns with dimensions (2,temp_mesh%gauss%l_G*temp_mesh%me). We remind that me is the number of cells of the mesh and that l_G is the number of gauss points per cell. The tabular rr(1,:) contains the radial cylindrical coordinate of each gauss points of temp_mesh. Respectively, rr(2,:) contains the vertical coordinates of these gauss points.
  3. m is the Fourier mode \(m\) considered. It is an integer.
  4. t is the time at which the source term is computed. It is a real number.

The output of this function is a real valued tabular vv of dimension SIZE(rr,2) which is equal to the number of gauss points in temp_mesh.


Here is an exemple where the source term \(f_T\) is set to \( z + 2r\cos(\theta) + rz \sin(2\theta)\).

IF (TYPE==1.AND.m==0) THEN
vv = rr(2,:)
vv = 2.d0*rr(1,:)
vv = r(1,:)*rr(2,:)
vv = 0.d0

We refer to the sections Examples with manufactured solutions and Examples on physical problems for more examples.