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

It is used to define the source term $$\textbf{j}$$. It represents the action of an externally imposed distribution of current. It can also be used when approximated a perturbation of a basic state solution of the Maxwell equations.

This function defines the source term for one given Fourier mode, one given component (radial cosine, radial sine, azimuthal cosine, azimuthal sine, vertical cosine or vertical sine) on given node or gauss point of the finite element mesh.

### 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. rr is a list of two real numbers. The tabular rr(1) contains the radial cylindrical coordinate of the node or the gauss point considered. Respectively, rr(2) contains the vertical coordinates of this node or gauss point.
3. m is the Fourier mode $$m$$ considered. It is an integer.
4. mu_phi is the magnetic perbeability in the insulating region.
5. sigma is the magnetic Reynolds number multiplied by the electrical conductivity of the domain that contains the node/gauss point considered.
6. mu_H_field is the magnetic permeability of the domain that contains the node/gauss point considered.
7. t is the time at which this term is computed. It is a real number.
8. mesh_id is the label of the domain where this source term is computed. It is an interger.
9. opt_B_ext is the component of the Fourier mode m of the magnetic field extrapolated at time t. This input optional.

The output of this function is a real number vv.

### Exemple

Here is an exemple where we approximate the pertubation of the basic state $$\bH_b=r\textbf{e}_\theta$$ of the Maxwell equations. We denote $$\textbf{e}_\theta$$ the unit vector in the azimuthal direction and $$\textbf{e}_z$$ the unit vector in the vertical direction. As a consequence, the source term has to satisfy the relation $$\textbf{j}=-\ROT \bH_b$$. So we set $$\textbf{j}= -2 \textbf{e}_z$$.

The corresponding code lines are written as follows.

IF (TYPE==5.AND.m==0) THEN
vv = -2.d0
ELSE
vv = 0.d0
END IF
RETURN

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