PLUTO
4.4-patch2
|
File containing functions for feedback from CR to the fluid. More...
#include "pluto.h"
Functions | |
void | Particles_CR_ConservativeFeedback (Data_Arr U, Data_Arr Fcr, double dt, RBox *box) |
void | Particles_CR_Flux (const State *state, int beg, int end) |
void | Particles_CR_States1DCopy (const Data *d, const Sweep *sweep, int beg, int end) |
void | Particles_CR_StatesSource (const Sweep *sweep, double dt, int beg, int end, Grid *grid) |
void Particles_CR_ConservativeFeedback | ( | Data_Arr | U, |
Data_Arr | Fcr, | ||
double | dt, | ||
RBox * | box | ||
) |
Add source term to the right hand side of the conservative MHD equations.
[out] | U | An array of conserved quantities, U[k][j][i][nv] |
[in] | Fcr | An array containing the CR feedback, Fcr[4][k][j][i] |
[in] | dt | The time step increment |
[in] | box | A pointer to a RBox structure. |
void Particles_CR_Flux | ( | const State * | state, |
int | beg, | ||
int | end | ||
) |
Add CR flux contribution to MHD fluxes. On input, it requires state->Fcr
to be already computed. On output, it returns state->fluxCR
.
Load Fcr from 3D data into 1D state structures. This is needed later to compute the flux (Particles_CR_Flux).
Add CR flux-difference and source term contributions to L/R primitive states during the predictor step of CTU algorithm. Note that, although the update should be done in conservative variables, we choose to directly update primitive variables by performing, in place, a conservative-to-primitive recovery so that:
Note that curl and divergence operators are discretized using finite differences of fluxCR
computed in Particles_CR_Flux().
This step is done only for the primitive Hancock / Char. Trac. schemes since these are carried out in primitive variables. This step is not needed for the conservative Hancock scheme since these terms are included during the predictor.
For source terms not involving derivatives, we include ALL of the components here since no other partcles-related source term will be added during the transverse predictors. For source terms involving derivatives, we include only the normal components since the transverse predictor will add the other components through Riemann solver.