Template Function miso::mhd::resistive_flux
Defined in File mhd_resistivity.hpp
Function Documentation
-
template<typename Real>
inline Real miso::mhd::resistive_flux(const Array3DView<const Real> &bm, const Array3DView<const Real> &bd, const Array3DView<const Real> &eta, const Real *dsi_n, int ni, int nj, int nk, const Real *dsi_t, int ti, int tj, int tk, int i, int j, int k) Resistive flux G_md = eta (d_d B_m - d_m B_d) on the face between the cell (i, j, k) and (i + ni, j + nj, k + nk).
The face normal is the direction d given by the offsets (ni, nj, nk) and the inverse spacing
dsi_nof that axis. The tangential direction m is given by (ti, tj, tk) anddsi_t, in the same way as the artificial viscosity (e.g., (grid.is, 0, 0) and grid.dxi for x).d_d B_m (normal): compact difference of the two cells adjacent to the face, which avoids odd-even decoupling.
d_m B_d (tangential): average of the centered differences in the two cells. An inactive direction has zero offsets and zero inverse spacing, so that its contribution vanishes.