40 gamma = boundary->
gamma;
41 double inv_gamma_m1 = 1.0/(gamma-1.0);
44 int bounds[ndims], indexb[ndims];
52 double rho_gpt, uvel_gpt, vvel_gpt, energy_gpt, pressure_gpt;
57 energy_gpt = inv_gamma_m1*pressure_gpt
58 + 0.5 * rho_gpt * (uvel_gpt*uvel_gpt + vvel_gpt*vvel_gpt);
60 phi[nvars*p1+0] = rho_gpt;
61 phi[nvars*p1+1] = rho_gpt * uvel_gpt;
62 phi[nvars*p1+2] = rho_gpt * vvel_gpt;
63 phi[nvars*p1+3] = energy_gpt;
69 }
else if (ndims == 3) {
72 gamma = boundary->
gamma;
73 double inv_gamma_m1 = 1.0/(gamma-1.0);
76 int bounds[ndims], indexb[ndims];
84 double rho_gpt, uvel_gpt, vvel_gpt, wvel_gpt, energy_gpt, pressure_gpt;
90 energy_gpt = inv_gamma_m1*pressure_gpt
92 * (uvel_gpt*uvel_gpt + vvel_gpt*vvel_gpt + wvel_gpt*wvel_gpt);
94 phi[nvars*p1+0] = rho_gpt;
95 phi[nvars*p1+1] = rho_gpt * uvel_gpt;
96 phi[nvars*p1+2] = rho_gpt * vvel_gpt;
97 phi[nvars*p1+3] = rho_gpt * wvel_gpt;
98 phi[nvars*p1+4] = energy_gpt;
Containts the structures and definitions for boundary condition implementation.
int BCSupersonicInflowU(void *b, void *m, int ndims, int nvars, int *size, int ghosts, double *phi, double waqt)
Some basic definitions and macros.
Structure containing the variables and function pointers defining a boundary.
3D Navier Stokes equations (compressible flows)
#define _ArraySubtract1D_(x, a, b, size)
#define _ArrayIndex1DWO_(N, imax, i, offset, ghost, index)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
Contains macros and function definitions for common array operations.