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

It is used to define the penalty function \(\chi\). We remind this function is a scalar function equal to 0 in the solid obstacle and 1 in the fluid region. We refer to the section Extension to non axisymmetric geometry for more information on the formulation of the Navier-Stokes equations in SFEMaNS.

This function defines a scalar function in the physical space for a number of angles, denoted nb_angles, on a number of nodes of the finite element mesh. We denote by mesh the finite element mesh used to approximate the velocity field.

Inputs and outputs

The inputs of this function are the following:

  1. mesh is the mesh where the velocity field is approximated.
  2. angles is the list of the angles where the penalty function is computed. These reals numbers are in the interval \([0,2\pi[\).
  3. nb_angles is the number of angles considered. It is an interger.
  4. nb is the label of the first node considered. It is an integer.
  5. ne is the label of the last node considered. It is an integer.
  6. rr_gauss is a real valued tabular that contains two columns with dimensions (2,ne-nb+1). 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 we usually use ne=1 and nb=mesh%np.
  7. time is the time at which this term is computed. It is a real number.

The output of this function is a real valued tabular vv with two columns of dimension (nb_angles,ne-nb+1).


Here is an exemple where the solid obsctable is the domain \(\Omega_\text{obs} = \{(r,\theta,z)\in [0,1]\times[0,\pi]\times[-0.1,0.1] \}\).

The corresponding code lines are written as follows.

DO i = 1, nb_angles
DO n = 1, SIZE(rr,2)
IF ((r.LE.1).AND.(theta.LE.ACOS(-1.d0)).AND.(ABS(z).LE.0.1d0)) THEN

We note that it is better to use a smooth penalty function and not a discontinuous one as above.

We refer to the sections Examples with manufactured solutions (see test 24) and Examples on physical problems for more examples.