10#include "../include/var_struc.h"
30 const double gamma = ifv_L->
gamma;
31 const double P_L = ifv_L->
P, P_R = ifv_R->
P;
32 const double RHO_L = ifv_L->
RHO, RHO_R = ifv_R->
RHO;
33 const double U_L = ifv_L->
U, U_R = ifv_R->
U;
34 const double V_L = ifv_L->
V, V_R = ifv_R->
V;
39 C_L = sqrt(gamma*P_L/RHO_L);
40 C_R = sqrt(gamma*P_R/RHO_R);
101 H_L = gamma/(gamma-1.0)*P_L/RHO_L + 0.5*(U_L*U_L);
102 H_R = gamma/(gamma-1.0)*P_R/RHO_R + 0.5*(U_R*U_R);
106 E_L = 1.0/(gamma-1.0)*P_L/RHO_L + 0.5*(U_L*U_L);
114 double RHO_S, U_S, H_S, C_S;
115 RHO_S = sqrt(RHO_L*RHO_R);
116 U_S = (U_L*sqrt(RHO_L)+U_R*sqrt(RHO_R)) / (sqrt(RHO_L)+sqrt(RHO_R));
117 H_S = (H_L*sqrt(RHO_L)+H_R*sqrt(RHO_R)) / (sqrt(RHO_L)+sqrt(RHO_R));
118 C_S = sqrt((gamma-1.0)*(H_S-0.5*U_S*U_S));
121 double lambda[3], W[3];
128 R[2][0] = H_S - U_S*C_S;
129 R[2][1] = 0.5*(U_S*U_S);
130 R[2][2] = H_S + U_S*C_S;
134 W[0] = 0.5*((P_R-P_L)-RHO_S*C_S*(U_R-U_L))/(C_S*C_S);
135 W[1] = (RHO_R-RHO_L)-(P_R-P_L)/(C_S*C_S);
136 W[2] = 0.5*((P_R-P_L)+RHO_S*C_S*(U_R-U_L))/(C_S*C_S);
138 lambda[0] = U_S - C_S;
140 lambda[2] = U_S + C_S;
142 *lambda_max = fabs(U_S) + C_S;
164 for(j = 0; j < 3; j++)
168 for(i = 0; i < 3 ; i++)
170 U[i] += W[j]*R[i][j];
178 F[2] = (U[2]/U[0] - 0.5*F[1]*F[1])*(gamma-1.0)*F[0];
181 S_L=fmin(U_S-C_S,U_L-C_L);
182 S_R=fmax(U_S+C_S,U_R+C_R);
186 *V_mk=(RHO_R*(S_R-U_R)*V_R-RHO_L*(S_L-U_L)*V_L)/(RHO_R*(S_R-U_R)-RHO_L*(S_L-U_L));
void Roe_HLL_solver(double *V_mk, double *F, double *lambda_max, const struct i_f_var *ifv_L, const struct i_f_var *ifv_R, const double delta)
An approxiamate Riemann solver hybridizing the Roe flux and the HLL flux for unsteady compressible in...
Interfacial Fluid VARiables.
double V
primitive variable values at t_{n}.
double gamma
specific heat ratio.