|
HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Function to compute the hydrostatically balanced pressure and density variation functions. More...
#include <stdlib.h>#include <math.h>#include <arrayfunctions.h>#include <mathfunctions.h>#include <physicalmodels/navierstokes3d.h>#include <hypar.h>#include <mpivars.h>Go to the source code of this file.
Functions | |
| int | NavierStokes3DGravityField (void *s, void *m) |
Function to compute the hydrostatically balanced pressure and density variation functions.
Definition in file NavierStokes3DGravityField.c.
| int NavierStokes3DGravityField | ( | void * | s, |
| void * | m | ||
| ) |
This function computes the pressure and density variation functions for the hydrostatic balance of the type specified by the user (NavierStokes3D:HB). The pressure and density in hydrostatic balance are given by
\begin{equation} \rho = \rho_0\varrho\left(x,y\right),\ p = p_0\varphi\left(x,y\right) \end{equation}
where \(\rho_0\) and \(p_0\) are the reference density (NavierStokes3D::rho0) and pressure (NavierStokes3D::p0). This function computes \(\varrho\) (NavierStokes3D::grav_field_f) and \(\varphi\) (NavierStokes3D::grav_field_g). For flows without gravity, \(\varrho = \varphi = 1\).
References:
| s | Solver object of type HyPar |
| m | MPI object of type MPIVariables |
Definition at line 33 of file NavierStokes3DGravityField.c.