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

It is used to extend the velocity field approximated with the Navier-Stokes equations to a velocity field on a larger domain. It is only used when the temperature or the magnetic field equations are approximated in addition of the Navier-Stokes equations.

This function defines a velocity field for one given Fourier mode, one given component (radial cosine, radial sine, azimuthal cosine, azimuthal sine, vertical cosine or vertical sine) on all the nodes of the finite element mesh considered.

Inputs and outputs

The inputs of this function are the following:

  1. TYPE is the component of the source term that is computed (radial cosine, radial sine, etc.) It is an integer between one and six.
  2. H_mesh is the mesh where the velocity field is defined. It has H_mesh%np nodes and the radial and vertical cylindrical coordinates are in the tabular H_mesh%rr.
  3. mode is the Fourier mode considered. It is an integer.
  4. t 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 of dimension H_mesh%np.

Remark: The extension_velocity defines a velocity on the whole temperature or magnetic field domain. However only its value outside the Navier-Stokes domain are used.


Here is an exemple where we extend the velocity field of Navier-Stokes domain to a region where the velocity field is \(\bu=(r-z)\cos(t)\textbf{e}_\theta\). We by \(\textbf{e}_\theta\) the unit vector in the azimuthal direction.

The corresponding code lines are written as follows.

IF (TYPE==3.AND.m==0)
vv = (H_mesh%rr(1,:)-H_mesh%rr(2,:))COS(t)
vv = 0.d0


  1. The divergence of the velocity has to be zero.
  2. The velocity on the interface between the Navier-Stokes domains and the othert domains needs to match. It means that the outputs of the function vv_exact and extension_velocity have to match on the interfaces.

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