HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Compute the modified solution for the well-balanced treatment of gravitational source terms. More...
#include <basic.h>
#include <arrayfunctions.h>
#include <physicalmodels/navierstokes3d.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
int | NavierStokes3DModifiedSolution (double *uC, double *u, int d, void *s, void *m, double waqt) |
Compute the modified solution for the well-balanced treatment of gravitational source terms.
Definition in file NavierStokes3DModifiedSolution.c.
int NavierStokes3DModifiedSolution | ( | double * | uC, |
double * | u, | ||
int | d, | ||
void * | s, | ||
void * | m, | ||
double | waqt | ||
) |
This function computes the modified solution for the well-balanced treatment of the gravitational source terms. The modified solution vector is given by
\begin{equation} {\bf u}^* = \left[\begin{array}{c} \rho \varrho^{-1}\left(x,y\right) \\ \rho u \varrho^{-1}\left(x,y\right) \\ \rho v \varrho^{-1}\left(x,y\right) \\ \rho w \varrho^{-1}\left(x,y\right) \\ e^* \end{array}\right] \end{equation}
where
\begin{equation} e^* = \frac{p \varphi^{-1}\left(x,y\right)}{\gamma-1} + \frac{1}{2}\rho \varrho^{-1}\left(x,y\right) \left(u^2+v^2+w^2\right) \end{equation}
\(\varrho\) and \(\varphi\) are computed in NavierStokes3DGravityField(). For flows without gravity, \({\bf u}^* = {\bf u}\).
References:
uC | Array to hold the computed modified solution |
u | Solution vector array |
d | spatial dimension (not used) |
s | Solver object of type HyPar |
m | MPI object of time MPIVariables |
waqt | Current simulation time |
Definition at line 31 of file NavierStokes3DModifiedSolution.c.