PLUTO  4.4-patch2
Functions
res_flux.c File Reference

Compute the resistive MHD flux for cell-centered field. More...

#include "pluto.h"

Functions

void ResistiveFlux (Data_Arr V, Data_Arr curlB, double **res_flux, double **dcoeff, int beg, int end, Grid *grid)
 

Detailed Description

Compute the resistive fluxes for the induction and energy equations to update cell-centered fields. Fluxes at zone faces by averaging the current available at cell edges. Cell-centered fields are updated also when the CT formalism is employed.

In the induction equation, fluxes are computed by explicitly writing the curl operator in components. In Cartesian components, for instance, one has

\[ \pd{\vec{B}}{t} = - \nabla\times{\vec{E}_{\rm res}} = \pd{}{x}\left(\begin{array}{c} 0 \\ \noalign{\medskip} \eta_z J_z \\ \noalign{\medskip} - \eta_y J_y \end{array}\right) + \pd{}{y}\left(\begin{array}{c} - \eta_z J_z \\ \noalign{\medskip} 0 \\ \noalign{\medskip} \eta_x J_x \end{array}\right) + \pd{}{z}\left(\begin{array}{c} \eta_y J_y \\ \noalign{\medskip} -\eta_x J_x \\ \noalign{\medskip} 0 \end{array}\right) \,,\qquad \left(\vec{E}_{\rm res} = \tens{\eta}\cdot\vec{J}\right) \]

where $\tens{\eta}$ is the resistive diagonal tensor and $\vec{J} = \nabla\times\vec{B}$ is the current density. The corresponding contribution to the energy equation is

\[ \pd{E}{t} = -\nabla\cdot\Big[(\tens{\eta}\cdot\vec{J})\times\vec{B}\Big] = - \pd{}{x}\left(\eta_yJ_yB_z - \eta_zJ_zB_y\right) - \pd{}{y}\left(\eta_zJ_zB_x - \eta_xJ_xB_z\right) - \pd{}{z}\left(\eta_xJ_xB_y - \eta_yJ_yB_x\right) \]

The sign of the flux is given by writing each equation as

\[ \pd{B_i}{t} = \nabla\cdot\vec{F}_i \]

(flux is positive on the right hand side).

References

Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
T. Matsakos
Date
July 10, 2019

Function Documentation

◆ ResistiveFlux()

void ResistiveFlux ( Data_Arr  V,
Data_Arr  curlB,
double **  res_flux,
double **  dcoeff,
int  beg,
int  end,
Grid grid 
)
Parameters
[in]V3D data array of primitive variables
[out]curlBthe current
[out]dcoeffthe diffusion coefficients evaluated at cell interfaces
[in]beginitial index of computation
[in]endfinal index of computation
[in]gridpointer to an array of Grid structures.