# 7.2. MHD Equations¶

## 7.2.1. Introduction¶

The magnetohydrodynamics (MHD) equations are:

(7.2.1.1) (7.2.1.2) (7.2.1.3) (7.2.1.4) assuming is constant. See the next section for a derivation. We can now apply the following identities (we use the fact that ): So the MHD equations can alternatively be written as:

(7.2.1.5) (7.2.1.6) (7.2.1.7) (7.2.1.8) One can also introduce a new variable , that simplifies (7.2.1.6) a bit.

## 7.2.2. Derivation¶

The above equations can easily be derived. We have the continuity equation: Navier-Stokes equations (momentum equation) with the Lorentz force on the right-hand side: where the current density is given by the Maxwell equation (we neglect the displacement current ): and the Lorentz force: from which we eliminate : and put it into the Maxwell equation: so we get: assuming the magnetic diffusivity is constant, we get: where we used the Maxwell equation: ## 7.2.3. Finite Element Formulation¶

We solve the following ideal MHD equations (we use , but we drop the star):

(7.2.3.1) (7.2.3.2) (7.2.3.3) (7.2.3.4) If the equation (7.2.3.4) is satisfied initially, then it is satisfied all the time, as can be easily proved by applying a divergence to the Maxwell equation (or the equation (7.2.3.2), resp. (7.2.1.3)) and we get , so is constant, independent of time. As a consequence, we are essentially only solving equations (7.2.3.1), (7.2.3.2) and (7.2.3.3), which consist of 5 equations for 5 unknowns (components of , and ).

We discretize in time by introducing a small time step and we also linearize the convective terms:

(7.2.3.5) (7.2.3.6) (7.2.3.7) Testing (7.2.3.5) by the test functions , (7.2.3.6) by the functions and (7.2.3.7) by the test function , we obtain the following weak formulation:

(7.2.3.8) (7.2.3.9) (7.2.3.10) To better understand the structure of these equations, we write it using bilinear and linear forms, as well as take into account the symmetries of the forms. Then we get a particularly simple structure: where: E.g. there are only 4 distinct bilinear forms. Schematically we can visualize the structure by:

 A -X -B A -Y -B X Y -B A -B A

In order to solve it with Hermes, we first need to write it in the block form: comparing to the above, we get the following nonzero forms: where: and , …, are the same as above.