SFEMaNS  version 4.1 (work in progress) Reference documentation for SFEMaNS
The function Hexact

It is used to define the boundary condition $$\bH_\text{bdy}$$. It can also be used by the function init_maxwell so initial conditions match the boundary conditions.

This function defines boundary conditions for one given Fourier mode, one given component (radial cosine, radial sine, azimuthal cosine, azimuthal sine, vertical cosine or vertical sine) on a number of nodes, denoted nb_node, of the finite element mesh. We denote by H_mesh the finite element mesh used to approximate the magnetic field.

Inputs and outputs

The inputs of this function are the following:

1. H_mesh is the finite element mesh used to approximate the magnetic field.
2. TYPE is the component of the source term that is computed (radial cosine, radial sine, etc.). It is an integer between one and six.
3. 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 H_mesh%np or the number of nodes where Dirichlet boundary conditions are applied.
4. m is the Fourier mode $$m$$ considered. It is an integer.
5. mu_H_field is a list of real that contains the magnetic permeability of each conducting domains.
6. 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 SIZE(rr,2).

Exemple

Here is an exemple where we set $$\bH_\text{bdy}= z\textbf{e}_r + 3r\sin(2\theta)\textbf{e}_z$$ with $$\textbf{e}_r$$, respectively $$\textbf{e}_z$$, the unit vector in the radial direction, respectively in the vertical direction.

The corresponding code lines are written as follows.

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

Remark: The magnetic field $$\mu\textbf{H}$$ has a zero divergence so the divergence of the boundary data $$\bH_\text{bdy}$$ has to be zero.

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