Compute the right hand side of the conservative HD/MHD equations. More...
#include "pluto.h"
Functions | |
static void | TotalFlux (const State_1D *, double *, int, int, Grid *) |
void | RightHandSide (const State_1D *state, Time_Step *Dts, int beg, int end, double dt, Grid *grid) |
This function constructs the one-dimensional right hand side of the conservative MHD or HD equations in the direction given by g_dir in different geometries. The right hand side in the d
direction is computed as a two-point flux difference term plus a source term:
where while
See also the RHS_page. The right hand side is assembled through the following steps:
Source terms are added later in RightHandSideSource().
For the entropy equation, the dissipative contributions can be recovered from the internal energy equation, for which (Boyd, Eq. [3.27]):
To obtain the corresponding contribution to the (conservative form of) entropy equation, just divide the previous one by :
See the books by
References
Compute the total flux in order to enforce conservation of angular momentum and energy in presence of FARGO source terms, rotation or gravitational potential.
In Cartesian coordinates, for instance, we modify the energy and the y-momentum flux as:
where is the average orbital velocity computed during the FARGO algorithm and is the gravitational potential. This is described in Mignone et al. (A&A 2012), see appendix there.
[in] | state | pointer to State_1D structure; |
[in,out] | phi_p | 1D array defining the gravitational potential at grid interfaces; |
[in] | beg | initial index of computation; |
[in] | end | final index of computation; |
[in] | grid | pointer to Grid structure; |
Reference