Compute right hand side for diffusion terms. More...
#include "pluto.h"
Functions | |
double | ParabolicRHS (const Data *d, Data_Arr dU, double dt, Grid *grid) |
The ParabolicRHS function computes the right hand side, in conservative or divergence form, of the parabolic (diffusion) operators only:
Here q
is a generic quantity (like momentum, magnetic field or total energy) and is the corresponding flux computed elsewhere. Contributions may simultaneously come from viscosity, magnetic resistivity and thermal conduction for which the flux functions are computed in the function ViscousFlux(), ResistiveFlux() or TC_Flux()).
This function is intended for operator split algorithms (STS, RKC) solving for the parabolic part of the equations.
This function also computes the inverse diffusion time step by adding, for each diffusion equation, contributions coming from different directions:
where are the diffusion coefficients available at cell interfaces in the three directions, respectively, and the maximum is taken over the local processor grid.
[in] | V | 3D array containing primitive variables |
[out] | dU | 3D array containing the conservative right hand sides |
[in] | dt | the time step |
[in] | grid | a pointer to an array of Grid structure |