9#include "../include/var_struc.h"
10#include "../include/flux_calc.h"
31 struct b_f_var * bfv_D,
struct b_f_var * bfv_U,
const _Bool Transversal)
33 double const eps =
config[4];
34 double const h_y =
config[11];
35 struct i_f_var ifv_D = {.
n_x = 0.0, .n_y = 1.0}, ifv_U = {.n_x = 0.0, .n_y = 1.0};
39 for(j = 0; j < m; ++j)
40 for(i = 0; i <= n; ++i)
45 ifv_D.
d_u = CV->
t_u[j][i-1];
46 ifv_D.
d_v = CV->
t_v[j][i-1];
47 ifv_D.
d_p = CV->
t_p[j][i-1];
48 ifv_D.
RHO = CV[nt].
RHO[j][i-1] + 0.5*h_y*CV->
t_rho[j][i-1];
49 ifv_D.
U = CV[nt].
U[j][i-1] + 0.5*h_y* CV->
t_u[j][i-1];
50 ifv_D.
V = CV[nt].
V[j][i-1] + 0.5*h_y* CV->
t_v[j][i-1];
51 ifv_D.
P = CV[nt].
P[j][i-1] + 0.5*h_y* CV->
t_p[j][i-1];
56 ifv_D.
d_u = bfv_D[j].
TU;
57 ifv_D.
d_v = bfv_D[j].
TV;
58 ifv_D.
d_p = bfv_D[j].
TP;
59 ifv_D.
RHO = bfv_D[j].
RHO + 0.5*h_y*bfv_D[j].
TRHO;
60 ifv_D.
U = bfv_D[j].
U + 0.5*h_y*bfv_D[j].
TU;
61 ifv_D.
V = bfv_D[j].
V + 0.5*h_y*bfv_D[j].
TV;
62 ifv_D.
P = bfv_D[j].
P + 0.5*h_y*bfv_D[j].
TP;
66 ifv_U.d_rho = CV->
t_rho[j][i];
67 ifv_U.d_u = CV->
t_u[j][i];
68 ifv_U.d_v = CV->
t_v[j][i];
69 ifv_U.d_p = CV->
t_p[j][i];
70 ifv_U.RHO = CV[nt].
RHO[j][i] - 0.5*h_y*CV->
t_rho[j][i];
71 ifv_U.U = CV[nt].
U[j][i] - 0.5*h_y* CV->
t_u[j][i];
72 ifv_U.V = CV[nt].
V[j][i] - 0.5*h_y* CV->
t_v[j][i];
73 ifv_U.P = CV[nt].
P[j][i] - 0.5*h_y* CV->
t_p[j][i];
77 ifv_U.d_rho = bfv_U[j].
TRHO;
78 ifv_U.d_u = bfv_U[j].
TU;
79 ifv_U.d_v = bfv_U[j].
TV;
80 ifv_U.d_p = bfv_U[j].
TP;
81 ifv_U.RHO = bfv_U[j].
RHO - 0.5*h_y*bfv_U[j].
TRHO;
82 ifv_U.U = bfv_U[j].
U - 0.5*h_y*bfv_U[j].
TU;
83 ifv_U.V = bfv_U[j].
V - 0.5*h_y*bfv_U[j].
TV;
84 ifv_U.P = bfv_U[j].
P - 0.5*h_y*bfv_U[j].
TP;
86 if(ifv_D.
P < eps || ifv_U.P < eps || ifv_D.
RHO < eps || ifv_U.RHO < eps)
88 printf(
"<0.0 error on [%d, %d, %d] (nt, x, y) - Reconstruction_y\n", nt, j, i);
91 if(!isfinite(ifv_D.
d_p)|| !isfinite(ifv_U.d_p)|| !isfinite(ifv_D.
d_u)|| !isfinite(ifv_U.d_u)|| !isfinite(ifv_D.
d_v)|| !isfinite(ifv_U.d_v)|| !isfinite(ifv_D.
d_rho)|| !isfinite(ifv_U.d_rho))
93 printf(
"NAN or INFinite error on [%d, %d, %d] (nt, x, y) - d_Slope_y\n", nt, j, i);
103 ifv_D.
t_u = - CV->
s_u[j][i-1];
104 ifv_D.
t_v = - CV->
s_v[j][i-1];
105 ifv_D.
t_p = - CV->
s_p[j][i-1];
110 ifv_D.
t_u = -bfv_D[j].
SU;
111 ifv_D.
t_v = -bfv_D[j].
SV;
112 ifv_D.
t_p = -bfv_D[j].
SP;
116 ifv_U.t_rho = -CV->
s_rho[j][i];
117 ifv_U.t_u = - CV->
s_u[j][i];
118 ifv_U.t_v = - CV->
s_v[j][i];
119 ifv_U.t_p = - CV->
s_p[j][i];
123 ifv_U.t_rho = -bfv_U[j].
SRHO;
124 ifv_U.t_u = -bfv_U[j].
SU;
125 ifv_U.t_v = -bfv_U[j].
SV;
126 ifv_U.t_p = -bfv_U[j].
SP;
128 if(!isfinite(ifv_D.
t_p)|| !isfinite(ifv_U.t_p)|| !isfinite(ifv_D.
t_u)|| !isfinite(ifv_U.t_u)|| !isfinite(ifv_D.
t_v)|| !isfinite(ifv_U.t_v)|| !isfinite(ifv_D.
t_rho)|| !isfinite(ifv_U.t_rho))
130 printf(
"NAN or INFinite error on [%d, %d, %d] (nt, x, y) - t_Slope_y\n", nt, j, i);
151 printf(
"<0.0 error on [%d, %d, %d] (nt, x, y) - STAR_y\n", nt, j, i);
154 printf(
"NAN or INFinite error on [%d, %d, %d] (nt, x, y) - STAR_y\n", nt, j, i);
157 printf(
"NAN or INFinite error on [%d, %d, %d] (nt, x, y) - DIRE_y\n", nt, j, i);
162 CV->
G_u[j][i] = ifv_D.
F_u;
163 CV->
G_v[j][i] = ifv_D.
F_v;
164 CV->
G_e[j][i] = ifv_D.
F_e;
int GRP_2D_flux(struct i_f_var *ifv, struct i_f_var *ifv_R, const double tau)
This function calculate Eulerian fluxes of 2-D Euler equations by 2-D GRP solver.
int flux_generator_y(const int m, const int n, const int nt, const double tau, struct cell_var_stru *CV, struct b_f_var *bfv_D, struct b_f_var *bfv_U, const _Bool Transversal)
This function calculate Eulerian fluxes of 2-D Euler equations in y-direction by 2-D GRP solver.
Fluid VARiables at Boundary.
double SV
spatial derivatives in coordinate x (slopes).
double TV
spatial derivatives in coordinate y (slopes).
pointer structure of VARiables on STRUctural computational grid CELLs.
double ** G_v
numerical fluxes at (y_{j-1/2}, t_{n}).
double ** s_p
spatial derivatives in coordinate x (slopes).
double ** pIy
interfacial variable values in coordinate y at t_{n+1}.
double ** t_p
spatial derivatives in coordinate y (slopes).
Interfacial Fluid VARiables.
double V
variable values at t_{n}.
double V_int
interfacial variables at t_{n+1}.
double t_v
tangential spatial derivatives OR spatial derivatives in Lagrangian coordinate ξ
double F_v
interfacial fluxes at t_{n+1/2}.
double d_v
normal spatial derivatives.
double config[]
Initial configuration data array.