#include <math.h>
#include <mathfunctions.h>
#include <physicalmodels/numa3d.h>
Go to the source code of this file.
|
| int | Numa3DCalculateStandardAtmosphere_1 (void *p, double z, double *ExnerP, double *P, double *rho, double *T) |
| |
| int | Numa3DCalculateStandardAtmosphere_2 (void *p, double z, double *ExnerP, double *P, double *rho, double *T) |
| |
◆ Numa3DCalculateStandardAtmosphere_1()
| int Numa3DCalculateStandardAtmosphere_1 |
( |
void * |
p, |
|
|
double |
z, |
|
|
double * |
ExnerP, |
|
|
double * |
P, |
|
|
double * |
rho, |
|
|
double * |
T |
|
) |
| |
Definition at line 5 of file Numa3DFunctions.c.
10 double gamma = physics->
gamma;
11 double g = physics->
g;
18 double inv_gamma_m1 = 1.0/(gamma-1.0);
19 double Cp = gamma * inv_gamma_m1 * R;
22 *ExnerP = 1.0 - (g/(Cp*theta))*z;
23 *P = P0 *
raiseto((*ExnerP),gamma*inv_gamma_m1);
24 *rho = (P0/(R*theta)) *
raiseto((*ExnerP),inv_gamma_m1);
◆ Numa3DCalculateStandardAtmosphere_2()
| int Numa3DCalculateStandardAtmosphere_2 |
( |
void * |
p, |
|
|
double |
z, |
|
|
double * |
ExnerP, |
|
|
double * |
P, |
|
|
double * |
rho, |
|
|
double * |
T |
|
) |
| |
Definition at line 30 of file Numa3DFunctions.c.
34 double R = physics->
R;
35 double gamma = physics->
gamma;
36 double g = physics->
g;
44 double inv_gamma_m1 = 1.0/(gamma-1.0);
45 double Cp = gamma * inv_gamma_m1 * R;
47 double term = BV*BV*z/g;
48 double theta = T0 * exp(term);
49 *ExnerP = 1.0 + (g*g/(Cp*T0*BV*BV)) * (exp(-term) - 1.0);
50 *P = P0 *
raiseto((*ExnerP),gamma*inv_gamma_m1);
51 *rho = (P0/(R*theta)) *
raiseto((*ExnerP),inv_gamma_m1);