29 template <
typename ValType>
37 template <
typename ValType>
40 perturb_primitive_sol.setZero();
56 primitive_sol =
nullptr;
60 template <
typename ValType>
75 gamma = sol.
cp/sol.
cv;
77 perturb_primitive_sol.resize(n1);
80 perturb_primitive_sol(0) = drho;
82 du1 = (delta_sol(1) - drho * sol.
u1)/sol.
rho;
84 perturb_primitive_sol(1) = du1;
90 du2 = (delta_sol(2) - drho * sol.
u2)/sol.
rho;
91 perturb_primitive_sol(2) = du2;
97 du3 = (delta_sol(3) - drho * sol.
u3)/sol.
rho;
98 perturb_primitive_sol(3) = du3;
102 de_tot = (delta_sol(n1-1) - drho * sol.
e_tot)/sol.
rho;
104 dT = (de_tot - dk)/sol.
cv;
105 perturb_primitive_sol(n1-1) = dT;
107 dp = R*(dT*sol.
rho + sol.
T*drho);
108 da = 0.5*sqrt(gamma*R/sol.
T)*dT;
109 dmach = dk/sqrt(2.0*sol.
k)/sol.
a - sqrt(2.*sol.
k)/pow(sol.
a,2) * da;
110 dentropy = (dp/pow(sol.
rho,gamma) - gamma*sol.
p/pow(sol.
rho,gamma+1.)*drho)
111 / (sol.
p/pow(sol.
rho,gamma)) ;
117 T = primitive_sol->T;
119 dmu = 1.458e-6 * dT * (1.5*pow(T, 0.5)/(T+110.4) - pow(T, 1.5)/pow(T+110.4, 2));
120 dlambda = -2./3.*dmu;
121 dk_thermal = dmu*primitive_sol->cp/primitive_sol->Pr;
126 template <
typename ValType>
132 <<
"Small Perturbation Primitive Solution:" << std::endl
133 << perturb_primitive_sol << std::endl
134 << std::setw(15) <<
" drho: " << drho << std::endl
135 << std::setw(15) <<
" du1: " << du1 << std::endl
136 << std::setw(15) <<
" du2: " << du2 << std::endl
137 << std::setw(15) <<
" du3: " << du3 << std::endl
138 << std::setw(15) <<
" dmach: " << dmach << std::endl
139 << std::setw(15) <<
" da: " << da << std::endl
140 << std::setw(15) <<
" dT: " << dT << std::endl
141 << std::setw(15) <<
" dp: " << dp << std::endl
142 << std::setw(15) <<
" de_tot: " << de_tot << std::endl
143 << std::setw(15) <<
" dk: " << dk << std::endl
144 << std::setw(15) <<
" dentropy: " << dentropy << std::endl << std::endl;
148 template <
typename ValType>
157 template <
typename ValType>
164 switch (primitive_sol->dimension) {
Class defines basic operations and calculation of the small disturbance primitive variables...
void print(std::ostream &out) const
Class defines the conversion and some basic operations on primitive fluid variables used in calculati...
void init(const MAST::PrimitiveSolution &sol, const typename VectorType< ValType >::return_type &delta_sol, bool if_viscous)
void get_duvec(typename VectorType< ValType >::return_type &du) const
ValType c_pressure(const Real q0) const
SmallPerturbationPrimitiveSolution()