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/navierstokes2d.h>
#include <hypar.h>
#include <mpivars.h>
Go to the source code of this file.
Functions | |
int | NavierStokes2DGravityField (void *s, void *m) |
Function to compute the hydrostatically balanced pressure and density variation functions.
Definition in file NavierStokes2DGravityField.c.
int NavierStokes2DGravityField | ( | void * | s, |
void * | m | ||
) |
This function computes the pressure and density variation functions for the hydrostatic balance of the type specified by the user (NavierStokes2D: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 (NavierStokes2D::rho0) and pressure (NavierStokes2D::p0). This function computes \(\varrho\) (NavierStokes2D::grav_field_f) and \(\varphi\) (NavierStokes2D::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 NavierStokes2DGravityField.c.