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

It can be used by the function init_velcoity_pressure to initialize the pressure.

This function defines a pressure for one given Fourier mode, one given component (cosine or sine) on a number of nodes, denoted nb_node, of the finite element mesh. We denote by pp_mesh the finite element mesh used to approximate the velocity field.

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,nb_node). The tabular rr(1,:) contains the radial cylindrical coordinate of each nodes considered. Respectively, rr(2,:) contains the vertical coordinates of these nodes. We note that the integer nb_node is generally equal to the total number of node pp_mesh%np.
  3. m is the Fourier mode considered. It is an integer.
  4. t is the time at which thei initialization is computed. It is a real number.

The output of this function is a real valued tabular vv of dimension SIZE(rr,2).


Here is an exemple where we use this function to initalize a pressure to \(p(r,\theta,z,t=0)=r^2 + 3z\sin(\theta)\)

The corresponding code lines are written as follows.

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

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