Hydrodynamics

Mass

Total mass in volume:1
$m = \int_\Omega \rho dV$
$m$ = mass
$\rho$ = density
$\Omega$ = domain

Rate-of-change of mass:1
$\partial_t m = \int_\Omega \partial_t \rho dV$

Rate-of-change only considering boundary:1
$\partial_t m = \int_{\partial\Omega} \rho v_j dS_j$
$v_i$ = velocity

Apply Green's theorem to rate-of-change of boundary:1
$\partial_t m = -\int_\Omega \partial_j (\rho v_j) dV$

Consider rate-of-change at any point:1
Conservation of mass:
$ \partial_t \rho + \partial_j (\rho v_j) = 0 $

Momentum

Conservation of momentum:1
$\Pi^C_i = \int_\Omega \rho v_i dV$
$\partial_t \Pi^C_i$ = change in momentum due to conservation

Rate-of-change of momentum1
$\partial_t \Pi^C_i = \int_\Omega \partial_t (\rho v_i) dV$

Rate-of-chagne of only considering boundary (neglecting forces like gravity, pressure, viscosity, etc)1
$\partial_t \Pi^C_i = \int_{\partial\Omega} (\rho v_i) v_j dS_j$

Apply Green's theorem:1
$\partial_t \Pi^C_i = -\int_\Omega \partial_j (\rho v_i v_j) dV$

Consider at any point:1
$\partial_t \Pi^C_i = -\partial_j (\rho v_i v_j)$

Hydro pressure from internal energy:5
$P = (\gamma - 1) \rho e_{int} = (\gamma - 1) E_{int}$
$\gamma = $ heat capacity ratio
$P$ = hydro pressure
$e_{int}$ = specific internal energy
$E_{int}$ = internal energy

internal energy:
$E_{int} = \rho e_{int} = {P\over{(\gamma - 1)}}$

Force due to pressure:1
$\partial_t \Pi^P_i = \int_{\partial\Omega} P dS_i$
$\partial_t \Pi^P_i = -\int_\Omega \partial_i P dV$ via Green's theorem1
$\partial_t \Pi^P_i = -\partial_i P$ at any point

Total change in momemtum:1
$\partial_t \Pi_i = \partial_t \Pi^C_i + \partial_t \Pi^P_i$
$\partial_t \Pi_i = -\partial_j (\rho v_i v_j) - \partial_i P$
$\partial_t \Pi_i + \partial_j (\rho v_i v_j + \delta_{ij} P= 0$

$\partial_t \Pi_i + \partial_j (\rho v_i v_j + \delta_{ij} P) = 0$

For $\Pi_i = $ hydro momentum $ = \rho v_i$ we find
$\partial_t (\rho v_i) + \partial_j (\rho v_i v_j + \delta_{ij} P) = 0$

Energy

specific kinetic energy:
$e_{kin} = {1\over2} v^2$

kinetic energy:
$E_{kin} = \rho e_{kin} = {1\over2} \rho v^2$

Total hydro energy:
$E_{hydro} = \int_\Omega (E_{int} + E_{kin}) dV$
$E_{hydro} = \int_\Omega ({1\over2}\rho v^2 + {P\over{\gamma - 1}}) dV$

change in total energy due to conservation of hydro energy:
$\partial_t E^C_{total} = \int_\Omega \partial_t E_{hydro} dV$

consider velocity moving through boundaries:
$\partial_t E^C_{total} = \int_{\partial\Omega} E_{hydro} v_i dS_i$

apply Green's theorem:
$\partial_t E^C_{total} = -\int_\Omega \partial_j (E_{hydro} v_j) dV$

for any point:
$\partial_t E^C_{total} = -\partial_j (E_{hydro} v_j)$

Change in energy due to hydro pressure force:
$\partial_t E^P_{total} = \int_{\partial\Omega} P v_j dS_j$
$\partial_t E^P_{total} = -\int_\Omega \partial_j (P v_j) dV$ via Green's theorem
$\partial_t E^P_{total} = -\partial_j (P v_j)$ At any point

Total change in total energy:
$\partial_t E_{total} = \partial_t E^C_{total} + \partial_t E^P_{total}$
$\partial_t E_{total} = -\partial_j (E_{hydro} v_j) - \partial_j (P v_j)$
$\partial_t E_{total} + \partial_j ((E_{hydro} + P) v_j) = 0$
$\partial_t E_{total} + \partial_j (H_{hydro} v_j) = 0$
for $H_{hydro} = E_{hydro} + P$

Conservative form of Euler:

$\partial_t \rho + \partial_j (\rho v_j) = 0$
$\partial_t (\rho v_i) + \partial_j (\rho v_i v_j + \delta_{ij} P) = 0$
$\partial_t E_{hydro} + \partial_j (H_{hydro} v_j) = 0$

$\partial_t U_i + \partial_j F_{ij} = 0$

conservatives:
$U_i = \downarrow i \left[\matrix{\rho \\ \rho v_i \\ E_{hydro}}\right]$

Flux vector:
$F_{ij} = \downarrow i \left[\matrix{ \rho v_j \\ \rho v_i v_j + \delta_{ij} P \\ H_{hydro} v_j }\right]$

primitives:
$W_k = \left[\matrix{\rho \\ v_k \\ P}\right]$

$\frac{\partial E_{hydro}}{\partial \rho}$ $= \frac{\partial}{\partial \rho} ( \frac{1}{2} \rho v^2 + \frac{P}{\gamma-1})$ $= \frac{1}{2} v^2$
$\frac{\partial E_{hydro}}{\partial v_k}$ $= \frac{\partial}{\partial v_k} ( \frac{1}{2} \rho v^2 + \frac{P}{\gamma-1})$ $= \rho v_k$
$\frac{\partial E_{hydro}}{\partial P}$ $= \frac{\partial}{\partial P} ( \frac{1}{2} \rho v^2 + \frac{P}{\gamma-1})$ $= \frac{1}{\gamma-1}$

Derivative of conservatives wrt primitives:
$\frac{\partial U_i}{\partial W_j} = \downarrow i \overset{\rightarrow j}{ \left[\matrix{ 1 & 0 & 0 \\ v_i & \rho \delta_{ij} & 0 \\ \frac{1}{2} v^2 & \rho v_j & \frac{1}{\gamma-1} }\right] }$

Derivative of primitives wrt conservatives:
$\frac{\partial W_j}{\partial U_i} = \downarrow j \overset{\rightarrow i}{ \left[\matrix{ 1 & 0 & 0 \\ -\frac{v_j}{\rho} & \delta_{ij} \frac{1}{\rho} & 0 \\ \frac{1}{2} (\gamma-1) v^2 & -(\gamma-1) v_i & \gamma-1 }\right] }$

Derivative of flux with respect to primitive variables:
$\frac{\partial F_{ij}}{\partial W_k} = \downarrow i \overset{\rightarrow k}{ \left[\matrix{ v_j & \rho \delta_{jk} & 0 \\ v_i v_j & \rho (\delta_{ik} v_j + v_i \delta_{jk}) & \delta_{ij} \\ \frac{1}{2} v^2 v_j & \rho v_j v_k + H_{hydro} \delta_{jk} & \frac{\gamma}{\gamma-1} v_j }\right] }$

Derivative of flux with respect to conservative variables:
$\frac{\partial F_{ij}}{\partial U_k} = \frac{\partial F_{ij}}{\partial W_l} \frac{\partial W_l}{\partial U_k} = \downarrow i \overset{\rightarrow l}{ \left[\matrix{ v_j & \rho \delta_{jl} & 0 \\ v_i v_j & \rho (\delta_{il} v_j + v_i \delta_{jl}) & \delta_{ij} \\ \frac{1}{2} v^2 v_j & \rho v_j v_l + (E_{hydro} + P) \delta_{jl} & \frac{\gamma}{\gamma-1} v_j }\right] } \cdot \downarrow l \overset{\rightarrow k}{ \left[\matrix{ 1 & 0 & 0 \\ -\frac{v_l}{\rho} & \delta_{kl} \frac{1}{\rho} & 0 \\ \frac{1}{2} (\gamma-1) v^2 & -(\gamma-1) v_k & \gamma-1 }\right] }$
$= \downarrow i \overset{\rightarrow k}{ \left[\matrix{ 0 & \delta_{jk} & 0 \\ -v_i v_j + \frac{1}{2} \delta_{ij} (\gamma-1) v^2 & \delta_{ik} v_j + \delta_{jk} v_i - \delta_{ij} (\gamma-1) v_k & \delta_{ij} (\gamma - 1) \\ \frac{1}{2} v_j v^2 (\gamma - 1) - v_j h_{hydro} & -(\gamma-1) v_j v_k + \delta_{jk} h_{hydro} & \gamma v_j }\right] }$

for $h_{hydro} = \frac{1}{\rho} H_{hydro}$

Magnetohydrodynamics

Ampere's law:
$\nabla \times B = \mu_0 (J + \epsilon_0 \partial_t E)$
$B = $ magnetic field
$J = $ electrical current density
$E = $ electrical field
$\mu_0 = $ permeability of free space
$\epsilon_0 = $ permittivity of free space
${\epsilon_i}^{jk} \partial_j B_k = \mu_0 (J_i + \epsilon_0 \partial_t E_i)$
Assume $\partial_t E_i = 0$
$J_i = \frac{1}{\mu_0} {\epsilon_i}^{jk} \partial_j B_k$

Lorentz force law:
$F = q (E + v \times B)$
$q = $ electric charge
$F_i = q (E_i + {\epsilon_i}^{jk} v_j B_k)$
$E_i = F_i / q - {\epsilon_i}^{jk} v_j B_k $
Let $J_i / \sigma = F_i / q$
$\sigma$ = electrical conductivity
$E_i = J_i / \sigma - {\epsilon_i}^{jk} v_j B_k$

Maxwell-Faraday equation:2
$ \partial_t B = -\nabla \times E$
$ \partial_t B_i = -{\epsilon_i}^{jk} \partial_j E_k$

Magnetic Field

substitute Ampere's law into Lorentz force law:
$E_i = {1\over\sigma\mu_0} {\epsilon_i}^{jk} \partial_j B_k - {\epsilon_i}^{jk} v_j B_k$
$\eta = {1\over\sigma\mu_0} = $ magnetic diffusivity
$E_i = \eta {\epsilon_i}^{jk} \partial_j B_k - {\epsilon_i}^{jk} v_j B_k$

substitute this into Maxwell-Faraday equation:
$ \partial_t B_i = -{\epsilon_i}^{jk} \partial_j (\eta {\epsilon_k}^{lm} \partial_l B_m - {\epsilon_k}^{lm} v_l B_m)$
$ \partial_t B_i = {\epsilon_i}^{jk} {\epsilon_k}^{lm} \partial_j (v_l B_m) - {\epsilon_i}^{jk} {\epsilon_k}^{lm} \partial_j (\eta \partial_l B_m)$
Levi-Civita identity: ${\epsilon_i}^{jk} {\epsilon_k}^{lm} = \delta^{ij}_{kl} = \delta^i_k \delta^j_l - \delta^i_l \delta^j_k$
$ \partial_t B_i = (\delta^i_l \delta^j_m - \delta^i_m \delta^j_l) \partial_j (v_l B_m) - (\delta^i_l \delta^j_m - \delta^i_m \delta^j_l) \partial_j (\eta \partial_l B_m)$
assume $\eta$ is constant
$ \partial_t B_i = \partial_j (v_i B_j - v_j B_i) - \eta (\partial_i \partial_j B_j - \partial_j \partial_j B_i)$
No magnetic monopoles: $\partial_i B_i = 0$
$ \partial_t B_i = \partial_j (v_i B_j - v_j B_i) + \eta \partial_j \partial_j B_i$
assume $\eta = 0$
$ \partial_t B_i = \partial_j (v_i B_j - v_j B_i)$
$ \partial_t B_i + \partial_j (B_i v_j - B_j v_i) = 0$

Momentum

Lorentz force law:
$F_i = q (E_i + {\epsilon_i}^{jk} v_j B_k)$
assume $E_i = 0$
$\Pi^M_i = F_i =$ Magnetic force on fluid
$\Pi^M_i = {\epsilon_i}^{jk} q v_j B_k$
let $J_i = q v_i$
$\Pi^M_i = {\epsilon_i}^{jk} J_j B_k$
substitute Ampere's law approximation: $J_i = \frac{1}{\mu_0} {\epsilon_i}^{jk} \partial_j B_k$
$\Pi^M_i = {\epsilon_i}^{jk} (\frac{1}{\mu_0} {\epsilon_j}^{lm} \partial_l B_m) B_k$
$\Pi^M_i = -\frac{1}{\mu_0} {\epsilon_i}^{kj} {\epsilon^{lm}}_j B_k \partial_l B_m$
$\Pi^M_i = \frac{1}{\mu_0} (\delta^i_m \delta^k_l - \delta^i_l \delta^k_m) B_k \partial_l B_m$
$\Pi^M_i = \frac{1}{\mu_0} (B_j \partial_j B_i - B_j \partial_i B_j)$
insert additional $\partial_k B_k = 0$ terms, split $B_j \partial_i B_j$ into two halves
$\Pi^M_i = \frac{1}{\mu_0} ((\partial_j B_i) B_j + B_i (\partial_j B_j) - B_i - {1\over2} (\partial_i B_j) B_j - {1\over2} B_j (\partial_i B_j))$
un-distribute gradient:
$\Pi^M_i = \frac{1}{\mu_0} (\partial_j (B_i B_j) - {1\over2} \partial_i (B^2))$
$\Pi^M_i = \partial_j (\frac{1}{\mu_0} (B_i B_j - {1\over2} \delta_{ij} B_i B_j))$
$\Pi^M_i = \partial_j \sigma_{ij}$
$\sigma_{ij} = \frac{1}{\mu_0} (B_i B_j - {1\over2} \delta_{ij} B_i B_j) =$ Maxwell stress tensor for $E_i = 0$

Change in momentum due to magnetic field:
$\Pi^M_i = -{1\over2} \frac{1}{\mu_0} \partial_j B^2 + \frac{1}{\mu_0} \partial_j (B_i B_j)$

Total change in momemtum:1
$\partial_t \Pi_i = \partial_t \Pi^C_i + \partial_t \Pi^P_i + \partial_t \Pi^M_i$
$\partial_t \Pi_i = -\partial_j (\rho v_i v_j) - \partial_i P - \frac{1}{\mu_0} {1\over2} \partial_i B^2 + \frac{1}{\mu_0} \partial_j (B_i B_j)$
$\partial_t \Pi_i + \partial_j (\rho v_i v_j + \delta_{ij} P + \frac{1}{\mu_0} {1\over2} \delta_{ij} B^2 - \frac{1}{\mu_0} B_i B_j) = 0$

Let $P_{mag} = \frac{1}{\mu_0} {1\over2} B^2$
$\partial_t \Pi_i + \partial_j (\rho v_i v_j + \delta_{ij} (P + P_{mag}) - \frac{1}{\mu_0} B_i B_j) = 0$

Let $P_{total} = P + P_{mag}$
$\partial_t \Pi_i + \partial_j (\rho v_i v_j + \delta_{ij} P_{total} - \frac{1}{\mu_0} B_i B_j) = 0$

For $\Pi_i = $ total momentum $ = \rho v_i$ we find
$\partial_t (\rho v_i) + \partial_j (\rho v_i v_j + \delta_{ij} P_{total} - \frac{1}{\mu_0} B_i B_j) = 0$

Energy

Change in energy due to magnetic field:
$\partial_t E_{total}^M = -\int_{\partial\Omega} B_k (v_k B_j - v_j B_k) dS_j$ TODO where does this come from? I'm guessing $\partial_t B_i$
$\partial_t E_{total}^M = \int_\Omega \partial_j (B_k (v_k B_j - v_j B_k)) dV$ via Green's theorem
$\partial_t E_{total}^M = \partial_j (B_k (v_k B_j - v_j B_k))$ At any point

Total change in total energy:
$\partial_t E_{total} = \partial_t E_{total}^C + \partial_t E_{total}^P + \partial_t E_{total}^M$
$\partial_t E_{total} = -\partial_j (E_{hydro} v_j) - \partial_j (P v_j) - \partial_j \frac{1}{\mu_0} (v_j B^2 - B_k v_k B_j)$
$\partial_t E_{total} + \partial_j ((E_{hydro} + P) v_j + \frac{1}{\mu_0} (v_j B^2 - B_k v_k B_j) = 0$
$\partial_t E_{total} + \partial_j ((E_{hydro} + P) v_j + \frac{1}{\mu_0} B_k (v_j B_k - v_k B_j)) = 0$
$\partial_t E_{total} + \partial_j ((E_{hydro} + P) v_j + \frac{1}{\mu_0} B^2 v_j - \frac{1}{\mu_0} B_k v_k B_j) = 0$
$\partial_t E_{total} + \partial_j ((E_{hydro} + {1\over2} \frac{1}{\mu_0} B^2 + P + {1\over2} \frac{1}{\mu_0} B^2) v_j - \frac{1}{\mu_0} B_k v_k B_j) = 0$

Let $E_{mag} = {1\over2} \frac{1}{\mu_0} B^2$
$\partial_t E_{total} + \partial_j ((E_{hydro} + E_{mag} + P + P_{mag}) v_j - \frac{1}{\mu_0} B_k v_k B_j) = 0$

Let $E_{total} = E_{hydro} + E_{mag}$
Let $H_{total} = E_{total} + P_{total}$
$\partial_t E_{total} + \partial_j (H_{total} v_j - \frac{1}{\mu_0} B_k v_k B_j) = 0$

Conservative Form of MHD:

$\partial_t \rho + \partial_j (\rho v_j) = 0$
$\partial_t (\rho v_i) + \partial_j (\rho v_i v_j + \delta_{ij} P_{total} - \frac{1}{\mu_0} B_i B_j) = 0$
$\partial_t B_i + \partial_j (B_i v_j - B_j v_i) = 0$
$\partial_t E_{total} + \partial_j (H_{total} v_j - \frac{1}{\mu_0} B_k v_k B_j) = 0$

$\partial_t U_i + \partial_{x_j} F_{ij} = 0$

Primitive variables:
$W_i \left[\matrix{\rho \\ v_i \\ B_i \\ P}\right]$

Conservative variables:
$U_i = \left[\matrix{\rho \\ \rho v_i \\ B_i \\ E_{total}}\right]$

$\frac{\partial E_{total}}{\partial \rho}$
$= \frac{\partial E_{hydro}}{\partial \rho} + \frac{\partial E_{mag}}{\partial \rho}$
$= \frac{1}{2} v^2$
$\frac{\partial E_{total}}{\partial v_k}$
$= \frac{\partial E_{hydro}}{\partial v_k} + \frac{\partial E_{mag}}{\partial v_k}$
$= \rho v_k$
$\frac{\partial E_{total}}{\partial B_k}$
$= \frac{\partial E_{hydro}}{\partial B_k} + \frac{\partial E_{mag}}{\partial B_k}$
$= \frac{1}{\mu_0} B_k$
$\frac{\partial E_{total}}{\partial P}$
$= \frac{\partial E_{hydro}}{\partial P} + \frac{\partial E_{mag}}{\partial P}$
$= \frac{1}{\gamma-1} $

Derivative of conservative with respect to primitive:
$\frac{\partial U_i}{\partial W_j} = \downarrow i \overset{\rightarrow j}{ \left[\matrix{ 1 & 0 & 0 & 0 \\ v_i & \rho \delta_{ij} & 0 & 0 \\ 0 & 0 & \delta_{ij} & 0 \\ \frac{1}{2}v^2 & \rho v_j & \frac{1}{\mu_0} B_j & \frac{1}{\gamma-1} }\right] }$

Derivative of primitive with respect to conservative:
$\frac{\partial W_j}{\partial U_i} = \downarrow j \overset{\rightarrow i}{ \left[\matrix{ 1 & 0 & 0 & 0 \\ -\frac{1}{\rho} v_j & \frac{1}{\rho} \delta_{ij} & 0 & 0 \\ 0 & 0 & \delta_{ij} & 0 \\ \frac{1}{2} (\gamma-1) v^2 & -(\gamma-1) v_i & -(\gamma-1) \frac{1}{\mu_0} B_i & \gamma-1 }\right] }$

Flux vector:
$F_{ij} = \left[\matrix{ \rho v_j \\ \rho v_i v_j + \delta_{ij} P_{total} - \frac{1}{\mu_0} B_i B_j \\ B_i v_j - B_j v_i \\ H_{total} v_j - \frac{1}{\mu_0} B_k v_k B_j }\right]$

Derivative of flux vector with respect to primitive variables:
$\frac{\partial F_{ij}}{\partial W_k} = \downarrow i \overset{\rightarrow k}{ \left[\matrix{ v_j & \rho \delta_{jk} & 0 & 0 \\ v_i v_j & \rho (\delta_{ik} v_j + v_i \delta_{jk}) & \frac{1}{\mu_0} (\delta_{ij} B_k - \delta_{ik} B_j - \delta_{jk} B_i) & \delta_{ij} \\ 0 & B_i \delta_{jk} - B_j \delta_{ik} & \delta_{ik} v_j - \delta_{jk} v_i & 0 \\ \frac{1}{2} v^2 v_j & \rho v_j v_k + H_{total} \delta_{jk} - \frac{1}{\mu_0} B_j B_k & \frac{1}{\mu_0} (2 B_k v_j - v_k B_j - \delta_{jk} v_l B_l) & \frac{\gamma}{\gamma-1} v_j }\right] }$

Derivative of flux vector with respect to conservative variables:
$\frac{\partial F_{ij}}{\partial U_k} = \frac{\partial F_{ij}}{\partial W_l} \frac{\partial W_l}{\partial U_k}$
$= \downarrow i \overset{\rightarrow l}{ \left[\matrix{ v_j & \rho \delta_{jl} & 0 & 0 \\ v_i v_j & \rho (\delta_{il} v_j + v_i \delta_{jl}) & \frac{1}{\mu_0} (\delta_{ij} B_l - \delta_{il} B_j - \delta_{jl} B_i) & \delta_{ij} \\ 0 & B_i \delta_{jl} - B_j \delta_{il} & \delta_{il} v_j - \delta_{jl} v_i & 0 \\ \frac{1}{2} v^2 v_j & \rho v_j v_l + (E_{hydro} + \frac{1}{\mu_0} B^2 + P) \delta_{jl} - \frac{1}{\mu_0} B_j B_l & \frac{1}{\mu_0} (2 B_l v_j - v_l B_j - \delta_{jl} v_m B_m) & \frac{\gamma}{\gamma-1} v_j }\right] } \cdot \downarrow l \overset{\rightarrow k}{ \left[\matrix{ 1 & 0 & 0 & 0 \\ -\frac{1}{\rho} v_l & \frac{1}{\rho} \delta_{kl} & 0 & 0 \\ 0 & 0 & \delta_{kl} & 0 \\ \frac{1}{2} (\gamma-1) v^2 & -(\gamma-1) v_k & -(\gamma-1) \frac{1}{\mu_0} B_k & \gamma-1 }\right] }$
$= \downarrow i \overset{\rightarrow k}{ \left[\matrix{ 0 & \delta_{jk} & 0 & 0 \\ -v_i v_j + \frac{1}{2} \delta_{ij} (\gamma-1) v^2 & \delta_{ik} v_j + \delta_{jk} v_i - \delta_{ij} (\gamma-1) v_k & \frac{1}{\mu_0}(-\delta_{ij} (\gamma-2) B_k - \delta_{ik} B_j - \delta_{jk} B_i) & \delta_{ij} (\gamma-1) \\ -\frac{1}{\rho} (B_i v_j - B_j v_i) & \frac{1}{\rho} (B_i \delta_{jk} - B_j \delta_{ik}) & \delta_{ik} v_j - \delta_{jk} v_i & 0 \\ v_j (\frac{1}{2} (\gamma-1) v^2 - h_{total}) + \frac{1}{\mu_0\rho} B_j B_m v_m & -(\gamma-1) v_j v_k + (\delta_{jk} h_{total} - \frac{1}{\mu_0\rho} B_j B_k) & \frac{1}{\mu_0} (-(\gamma - 2) v_j B_k - v_k B_j - \delta_{jk} v_m B_m) & \gamma v_j }\right] }$

for $h_{total} = (E_{total} + P_{total}) / \rho$

Similarity Transforms:6

$\partial_t U_i(x,t) + \partial_{x_j} F_{ij}(U(x,t)) = 0$

substitute $\tilde{F}_{ij}$ and $\tilde{U}_i$ into conservative equations
$\partial_t \tilde{U}_i + \partial_{x_j} (\tilde{F}_{ij} + \xi_j \tilde{U}_i) = 0$

time derivative of state (in self-similar form)
$\partial_t \tilde{U}_i = {\partial\tilde{U}_i\over\partial\xi_j} {\partial\xi_j\over\partial t} = -{x_j\over t^2} \partial_{\xi_j} \tilde{U}_i$
substitute $\xi_j = {x_j\over t}$
$\partial_t \tilde{U}_i = -{1\over t} \xi_j \partial_{\xi_j} \tilde{U}_i$

spatial derivative of flux (in self-similar form)
$\partial_{x_j} F_{ij} = \partial_{x_j} (\tilde{F}_{ij} + \xi_j \tilde{U}_i)$
$= {{\partial \xi_j}\over{\partial x_j}} \partial_{\xi_j} (\tilde{F}_{ij} + \xi_j \tilde{U}_i)$
$= {1\over t} (\partial_{\xi_j} \tilde{F}_{ij} + (\partial_{\xi_j} \xi_j) \tilde{U}_i + \xi_j \partial_{\xi_j} \tilde{U}_i)$
$= {1\over t} (\partial_{\xi_j} \tilde{F}_{ij} + n \tilde{U}_i) + {1\over t} \xi_j \partial_{\xi_j} \tilde{U}_i$ for $n$ dimensions
substitute to find:
$ -{1\over t} \xi_j \partial_{\xi_j} \tilde{U}_i + {1\over t} (\partial_{\xi_j} \tilde{F}_{ij} + n \tilde{U}_i) + {1\over t} \xi_j \partial_{\xi_j} \tilde{U}_i = 0$

simplifies to
$n \tilde{U}_i + \partial_{\xi_j} \tilde{F}_{ij} = 0$

finite volume form:
$\int_\Omega (n \tilde{U}_i + \partial_{\xi_j} \tilde{F}_{ij}) dx = 0$
$\int_\Omega dx n \tilde{U}_i + \int_\Omega \partial_{\xi_j} \tilde{F}_{ij} dx = 0$
$|\Omega| n \tilde{U}_i + \int_{\partial\Omega} \tilde{F}_{ij} n_j d\sigma = 0$
discretize:
$\Delta \xi n \tilde{U}_i + \tilde{F}_{ij}(x_R) - \tilde{F}_{ij}(x_L) = 0$
$n \tilde{U}_i + {1\over\Delta \xi}(\tilde{F}_{ij}(x_R) - \tilde{F}_{ij}(x_L)) = 0$
...for $\Delta \xi = \Pi_{k=1}^n \Delta \xi_k$

Similarity Transform of MHD Equations:

$U_i = \tilde{U}_i = \left[\matrix{\rho \\ \rho v_i \\ B_i \\ E_{total} }\right]$

$F_{ij} = \left[\matrix{\rho v_j \\ \rho v_i v_j + \delta_{ij} P_{total} - \frac{1}{\mu_0} B_i B_j \\ B_i v_j - B_j v_i \\ (E_{total} + P_{total}) v_j - \frac{1}{\mu_0} B_k v_k B_j}\right]$

$\tilde{F}_{ij} = F_{ij} - \xi_j \tilde{U}_i = \left[\matrix{\rho (v_j - \xi_j) \\ \rho v_i (v_j - \xi_j) + \delta_{ij} P_{total} - \frac{1}{\mu_0} B_i B_j \\ B_i (v_j - \xi_j) - B_j v_i \\ E_{total} (v_j - \xi_j) + P_{total} v_j - \frac{1}{\mu_0} B_k v_k B_j }\right]$

Newton Method8

Nonlinear function:
$G_i(\tilde{U}) = n \tilde{U}_i + \partial_{\xi_j} \tilde{F}_{ij}$
solve for $G_i = 0$ by minimizing $\tilde{U}_j$

Taylor expansion of function to minimize:
$G_i(\tilde{U}^{k+1}) = G_i(\tilde{U}^k) + {{\partial G_i(\tilde{U}^k)}\over{\partial \tilde{U}^k_j}} (\tilde{U}_j^{k+1} - \tilde{U}_j^k) + \mathscr(O)((\tilde{U})^2)$
$\tilde{U}_i^k$ the $k$th iteration of our state vector $\tilde{U}_i$
$G_i(\tilde{U}^{k+1}) = G_i(\tilde{U}^k) + {{\partial G_i(\tilde{U}^k)}\over{\partial \tilde{U}^k_j}} (\tilde{U}_j^{k+1} - \tilde{U}_j^k) + \mathscr(O)((\tilde{U})^2)$

Rearranged, and ignoring the higher-order terms:
$||{{\partial G_i(\tilde{U}^k)}\over{\partial \tilde{U}^k_j}}||^{-1}_{ij} (G_j(\tilde{U}^{k+1}) - G_j(\tilde{U}^k)) = \tilde{U}_i^{k+1} - \tilde{U}_i^k$
$\tilde{U}_i^{k+1} = \tilde{U}_i^k + ||{{\partial G_i(\tilde{U}^k)}\over{\partial \tilde{U}^k_j}}||^{-1}_{ij} (G_j(\tilde{U}^{k+1}) - G_j(\tilde{U}^k))$
Assume that we arrive at our destination, i.e. $G_i(\tilde{U}^{k+1}) = 0$:
$\tilde{U}_i^{k+1} = \tilde{U}_i^k - ||{{\partial G_i(\tilde{U}^k)}\over{\partial \tilde{U}^k_j}}||^{-1}_{ij} G_j(\tilde{U}^k)$
This formula is equivalent to Newton's method of an n-dimensions scalar function with value equal to ${1\over2}||G||^2$

Jacobian Approximation:
${{\partial G_i(u)}\over{\partial \tilde{U}_j}} v_j \approx ( G_i (u + \epsilon v) - G_i(u) ) / \epsilon$

Evaluation of function to minimize
${{\partial G_i}\over{\partial \tilde{U}_j}} = \partial_{\tilde{U}_j} G_i$
$= \partial_{\tilde{U}_j} (n \tilde{U}_i + \partial_{\xi_k} \tilde{F}_{ik})$
$= n \delta_{ij} + \partial_{\tilde{U}_j} \partial_{\xi_k} \tilde{F}_{ik}$

Curved Space Partial of Conserved Quantities wrt Primitives


$U^I = \left[\matrix{ \rho \\ m^i \\ B^i \\ E_{total} }\right] = \left[\matrix{ \rho \\ \rho v^i \\ B^i \\ \tilde\gamma^{-1} P + \frac{1}{2} \rho v^2 + \frac{1}{2} \frac{1}{\mu_0} B^2 }\right]$

$E_{total} = E_{int} + E_{kin} + E_{mag}$
$= \tilde\gamma^{-1} P + \frac{1}{2} \rho v^2 + \frac{1}{2} \frac{1}{\mu_0} B^2$
$P = \tilde\gamma (E_{total} - \frac{1}{2} \rho v^2 - \frac{1}{2} \frac{1}{\mu_0} B^2)$
$P_{total} = P + P_{mag} = \tilde\gamma (E_{total} - \frac{1}{2} \rho v^2 - \frac{1}{2} \frac{1}{\mu_0} B^2) + \frac{1}{2} \frac{1}{\mu_0} B^2$
$= \tilde\gamma E_{total} - \frac{1}{2} \tilde\gamma \rho v^2 + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 $
$H_{total} = E_{total} + P_{total}$
$= \gamma E_{total} - \frac{1}{2} \tilde\gamma \rho v^2 + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 $

$F^{Ij}$
$= \left[\matrix{ \rho v^j \\ \rho v^i v^j + g^{ij} P_{total} - \frac{1}{\mu_0} B^i B^j \\ B^i v^j - B^j v^i \\ H_{total} v^j - \frac{1}{\mu_0} B^k v_k B^j }\right]$
$= \left[\matrix{ m^j \\ \frac{1}{\rho} m^i m^j + g^{ij} (\tilde\gamma (E_{total} - \frac{1}{2} \frac{1}{\rho} m^2 - \frac{1}{2} \frac{1}{\mu_0} B^2) + \frac{1}{2} \frac{1}{\mu_0} B^2) - \frac{1}{\mu_0} B^i B^j \\ \frac{1}{\rho} (B^i m^j - B^j m^i) \\ \frac{1}{\rho} (E_{total} + \tilde\gamma (E_{total} - \frac{1}{2} \frac{1}{\rho} m^2 - \frac{1}{2} \frac{1}{\mu_0} B^2) + \frac{1}{2} \frac{1}{\mu_0} B^2) m^j - \frac{1}{\mu_0} \frac{1}{\rho} B^k m_k B^j }\right]$
$= \left[\matrix{ m^j \\ + \frac{1}{\rho} m^i m^j - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 g^{ij} + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 g^{ij} - \frac{1}{\mu_0} B^i B^j + \tilde\gamma g^{ij} E_{total} \\ + \frac{1}{\rho} B^i m^j - \frac{1}{\rho} B^j m^i \\ - \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^2 + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^2 - \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l g_{kl} B^j + \frac{1}{\rho} \gamma m^j E_{total} }\right]$

Flux partial derivative:

${F^{Ij}}_{,j}$
$= \left[\matrix{ m^j \\ + \frac{1}{\rho} m^i m^j - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 g^{ij} + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 g^{ij} - \frac{1}{\mu_0} B^i B^j + \tilde\gamma g^{ij} E_{total} \\ + \frac{1}{\rho} B^i m^j - \frac{1}{\rho} B^j m^i \\ - \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^2 + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^2 - \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l g_{kl} B^j + \frac{1}{\rho} \gamma m^j E_{total} }\right]_{,j}$
$= \left[\matrix{ {m^j}_{,j} \\ - \frac{1}{\rho^2} \rho_{,j} m^i m^j + \frac{1}{\rho} {m^i}_{,j} m^j + \frac{1}{\rho} m^i {m^j}_{,j} + \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} \rho_{,j} m^2 g^{ij} - \tilde\gamma \frac{1}{\rho} {m^k}_{,j} m_k g^{ij} - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^k m^l g_{kl,j} g^{ij} - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 {g^{ij}}_{,j} + (2 - \gamma) \frac{1}{\mu_0} {B^k}_{,j} B_k g^{ij} + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^k B^l g_{kl,j} g^{ij} + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 {g^{ij}}_{,j} - \frac{1}{\mu_0} {B^i}_{,j} B^j - \frac{1}{\mu_0} B^i {B^j}_{,j} + \tilde\gamma {g^{ij}}_{,j} E_{total} + \tilde\gamma g^{ij} E_{total,j} \\ - \frac{1}{\rho^2} \rho_{,j} B^i m^j + \frac{1}{\rho} {B^i}_{,j} m^j + \frac{1}{\rho} B^i {m^j}_{,j} + \frac{1}{\rho^2} \rho_{,j} B^j m^i - \frac{1}{\rho} {B^j}_{,j} m^i - \frac{1}{\rho} B^j {m^i}_{,j} \\ + \tilde\gamma \frac{1}{\rho^3} \rho_{,j} m^j m^2 - \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} {m^j}_{,j} m^2 - \tilde\gamma \frac{1}{\rho^2} m^j {m^k}_{,j} m_k - \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^k m^l g_{kl,j} - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho^2} \rho_{,j} m^j B^2 + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} {m^j}_{,j} B^2 + (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j {B^k}_{,j} B_k + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^k B^l g_{kl,j} + \frac{1}{\mu_0} \frac{1}{\rho^2} \rho_{,j} B^k m^l g_{kl} B^j - \frac{1}{\mu_0} \frac{1}{\rho} {B^k}_{,j} m^l g_{kl} B^j - \frac{1}{\mu_0} \frac{1}{\rho} B^k {m^l}_{,j} g_{kl} B^j - \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l g_{kl,j} B^j - \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l g_{kl} {B^j}_{,j} - \gamma \frac{1}{\rho^2} \rho_{,j} m^j E_{total} + \gamma \frac{1}{\rho} {m^j}_{,j} E_{total} + \gamma \frac{1}{\rho} m^j E_{total,j} }\right]$
$= \left[\matrix{ 0 & \delta^j_k & 0 & 0 \\ \frac{1}{\rho^2} ( - m^i m^j + \frac{1}{2} \tilde\gamma m^2 g^{ij} ) & \frac{1}{\rho} ( m^j \delta^i_k + m^i \delta^j_k - \tilde\gamma m_k g^{ij} ) & \frac{1}{\mu_0} ( (2 - \gamma) B_k g^{ij} - B^j \delta^i_k - B^i \delta^j_k ) & \tilde\gamma g^{ij} \\ \frac{1}{\rho^2} ( - B^i m^j + B^j m^i ) & \frac{1}{\rho} ( B^i \delta^j_k - B^j \delta^i_k ) & \frac{1}{\rho} ( m^j \delta^i_k - m^i \delta^j_k ) & 0 \\ \frac{1}{\rho^2} ( \tilde\gamma \frac{1}{\rho} m^j m^2 - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} m^j B^2 + \frac{1}{\mu_0} B^k m_k B^j - \gamma m^j E_{total} ) & \frac{1}{\rho} ( - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 \delta^j_k - \tilde\gamma \frac{1}{\rho} m^j m_k + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 \delta^j_k - \frac{1}{\mu_0} B_k B^j + \gamma E_{total} \delta^j_k ) & \frac{1}{\mu_0} \frac{1}{\rho} ( (2 - \gamma) m^j B_k - m_k B^j - B^l m_l \delta^j_k ) & \gamma \frac{1}{\rho} m^j }\right] \left[\matrix{ \rho \\ m^k \\ B^k \\ E_{total} }\right]_{,j} + g_{kl,j}\left[\matrix{ 0 \\ - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^k m^l g^{ij} + \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 g^{ik} g^{lj} + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^k B^l g^{ij} - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 g^{ik} g^{lj} - \tilde\gamma E_{total} g^{ik} g^{lj} \\ 0 \\ - \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^k m^l + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^k B^l - \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l B^j }\right]$

Flux covariant derivative:

${F^{Ij}}_{;j}$
$= \left[\matrix{ 0 & \delta^j_k & 0 & 0 \\ \frac{1}{\rho^2} ( - m^i m^j + \frac{1}{2} \tilde\gamma m^2 g^{ij} ) & \frac{1}{\rho} ( m^j \delta^i_k + m^i \delta^j_k - \tilde\gamma m_k g^{ij} ) & \frac{1}{\mu_0} ( (2 - \gamma) B_k g^{ij} - B^j \delta^i_k - B^i \delta^j_k ) & \tilde\gamma g^{ij} \\ \frac{1}{\rho^2} ( - B^i m^j + B^j m^i ) & \frac{1}{\rho} ( B^i \delta^j_k - B^j \delta^i_k ) & \frac{1}{\rho} ( m^j \delta^i_k - m^i \delta^j_k ) & 0 \\ \frac{1}{\rho^2} ( \tilde\gamma \frac{1}{\rho} m^j m^2 - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} m^j B^2 + \frac{1}{\mu_0} B^k m_k B^j - \gamma m^j E_{total} ) & \frac{1}{\rho} ( - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 \delta^j_k - \tilde\gamma \frac{1}{\rho} m^j m_k + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 \delta^j_k - \frac{1}{\mu_0} B_k B^j + \gamma E_{total} \delta^j_k ) & \frac{1}{\mu_0} \frac{1}{\rho} ( (2 - \gamma) m^j B_k - m_k B^j - B^m m_m \delta^j_k ) & \gamma \frac{1}{\rho} m^j }\right] \left[\matrix{ \rho_{,j} \\ {m^k}_{,j} + {\Gamma^k}_{lj} m^l \\ {B^k}_{,j} + {\Gamma^k}_{lj} B^l \\ E_{total,j} }\right]$

difference:

${F^{Ij}}_{;j}$
$= {F^{Ij}}_{,j} + \left[\matrix{ 0 & \delta^j_k & 0 & 0 \\ \frac{1}{\rho^2} ( - m^i m^j + \frac{1}{2} \tilde\gamma m^2 g^{ij} ) & \frac{1}{\rho} ( m^j \delta^i_k + m^i \delta^j_k - \tilde\gamma m_k g^{ij} ) & \frac{1}{\mu_0} ( (2 - \gamma) B_k g^{ij} - B^j \delta^i_k - B^i \delta^j_k ) & \tilde\gamma g^{ij} \\ \frac{1}{\rho^2} ( - B^i m^j + B^j m^i ) & \frac{1}{\rho} ( B^i \delta^j_k - B^j \delta^i_k ) & \frac{1}{\rho} ( m^j \delta^i_k - m^i \delta^j_k ) & 0 \\ \frac{1}{\rho^2} ( \tilde\gamma \frac{1}{\rho} m^j m^2 - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} m^j B^2 + \frac{1}{\mu_0} B^k m_k B^j - \gamma m^j E_{total} ) & \frac{1}{\rho} ( - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 \delta^j_k - \tilde\gamma \frac{1}{\rho} m^j m_k + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 \delta^j_k - \frac{1}{\mu_0} B_k B^j + \gamma E_{total} \delta^j_k ) & \frac{1}{\mu_0} \frac{1}{\rho} ( (2 - \gamma) m^j B_k - m_k B^j - B^m m_m \delta^j_k ) & \gamma \frac{1}{\rho} m^j }\right] \left[\matrix{ 0 \\ {\Gamma^k}_{lj} m^l \\ {\Gamma^k}_{lj} B^l \\ 0 }\right] - g_{kl,j}\left[\matrix{ 0 \\ - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^k m^l g^{ij} + \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 g^{ik} g^{lj} + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^k B^l g^{ij} - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 g^{ik} g^{lj} - \tilde\gamma E_{total} g^{ik} g^{lj} \\ 0 \\ - \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^k m^l + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^k B^l - \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l B^j }\right] $
$= {F^{Ij}}_{,j} + \left[\matrix{ \delta^j_k {\Gamma^k}_{lj} m^l \\ \frac{1}{\rho} ( m^j \delta^i_k + m^i \delta^j_k - \tilde\gamma m_k g^{ij} ) {\Gamma^k}_{lj} m^l + \frac{1}{\mu_0} ( (2 - \gamma) B_k g^{ij} - B^j \delta^i_k - B^i \delta^j_k ) {\Gamma^k}_{lj} B^l + \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^k m^l g^{ij} (\Gamma_{klj} + \Gamma_{lkj}) - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 g^{ik} g^{lj} (\Gamma_{klj} + \Gamma_{lkj}) - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^k B^l g^{ij} (\Gamma_{klj} + \Gamma_{lkj}) + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 g^{ik} g^{lj} (\Gamma_{klj} + \Gamma_{lkj}) + \tilde\gamma E_{total} g^{ik} g^{lj} (\Gamma_{klj} + \Gamma_{lkj}) \\ \frac{1}{\rho} ( B^i \delta^j_k - B^j \delta^i_k ) {\Gamma^k}_{lj} m^l + \frac{1}{\rho} ( m^j \delta^i_k - m^i \delta^j_k ) {\Gamma^k}_{lj} B^l \\ \frac{1}{\rho} ( - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 \delta^j_k - \tilde\gamma \frac{1}{\rho} m^j m_k + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 \delta^j_k - \frac{1}{\mu_0} B_k B^j + \gamma E_{total} \delta^j_k ) {\Gamma^k}_{lj} m^l + \frac{1}{\mu_0} \frac{1}{\rho} ( (2 - \gamma) m^j B_k - m_k B^j - B^m m_m \delta^j_k ) {\Gamma^k}_{lj} B^l + \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^k m^l (\Gamma_{klj} + \Gamma_{lkj}) - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^k B^l (\Gamma_{klj} + \Gamma_{lkj}) + \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l B^j (\Gamma_{klj} + \Gamma_{lkj}) }\right] $
$= {F^{Ij}}_{,j} + {\Gamma^k}_{jk} F^{Ij} + \left[\matrix{ 0 \\ \frac{1}{\rho} ( {\Gamma^i}_{jk} m^j m^k - \tilde\gamma {\Gamma_{jk}}^i m^j m^k ) + \frac{1}{\mu_0} ( (2 - \gamma) {\Gamma_{jk}}^i B^j B^k - {\Gamma^i}_{jk} B^j B^k ) + \frac{1}{2} \tilde\gamma \frac{1}{\rho} {\Gamma_{jk}}^i m^j m^k - \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^2 g^{jk} {\Gamma^i}_{jk} - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} {\Gamma_{jk}}^i B^j B^k + \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^2 g^{jk} {\Gamma^i}_{jk} + \tilde\gamma E_{total} {\Gamma^i}_{jk} g^{jk} + \frac{1}{2} \tilde\gamma \frac{1}{\rho} m^j m^k {\Gamma_{jk}}^i - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} B^j B^k {\Gamma_{jk}}^i \\ 0 \\ \frac{1}{\rho} ( - \tilde\gamma \frac{1}{\rho} m^j m_k {\Gamma^k}_{lj} m^l - \frac{1}{\mu_0} B_k B^j {\Gamma^k}_{lj} m^l ) + \frac{1}{\mu_0} \frac{1}{\rho} ( (2 - \gamma) m^j B_k {\Gamma^k}_{lj} B^l - m_k B^j {\Gamma^k}_{lj} B^l ) + \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^k m^l \Gamma_{klj} - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^k B^l \Gamma_{klj} + \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l B^j \Gamma_{klj} + \frac{1}{2} \tilde\gamma \frac{1}{\rho^2} m^j m^k m^l \Gamma_{lkj} - \frac{1}{2} (2 - \gamma) \frac{1}{\mu_0} \frac{1}{\rho} m^j B^k B^l \Gamma_{lkj} + \frac{1}{\mu_0} \frac{1}{\rho} B^k m^l B^j \Gamma_{lkj} }\right]$
$= \frac{1}{\sqrt{g}} ( \sqrt{g} F^{Ij} )_{,j} + \left[\matrix{ 0 \\ {\Gamma^i}_{jk} ( \frac{1}{\rho} m^j m^k + P_{total} g^{jk} - \frac{1}{\mu_0} B^j B^k ) \\ 0 \\ 0 }\right]$

[1]: http://www.av8n.com/physics/euler-flow.htm:
[2]: https://en.wikipedia.org/wiki/Maxwell%27s_equations
[3]: https://en.wikipedia.org/wiki/Lorentz_force
[4]: https://en.wikipedia.org/wiki/Magnetic_pressure
[5]: http://www.mpia.de/homes/dullemon/lectures/fluiddynamics/
[6]: Samtaney (1997). Computational Methods for Self-similar Solutions of the Compressible Euler Equations. Journal of Computational Physics, 132, 327-345
[7]: Toro (1999), Riemann Solvers and Numerical Methods for Fluid Dynamics, 2nd Ed. 115-
[8]: Keyes, JFNK