@@ -56,13 +56,6 @@ CSU2TCLib::CSU2TCLib(const CConfig* config, unsigned short val_nDim, bool viscou
5656 MolarFracWBE.resize (nSpecies,0.0 );
5757 phis.resize (nSpecies,0.0 );
5858 mus.resize (nSpecies,0.0 );
59-
60- /* --- Reference values for Sutherland's law viscosity ---*/
61- // Note: Can be extended with better coefficients of individual species,.
62- k_ref.resize (1 ,0.0 );
63- mu_ref.resize (1 ,0.0 );
64- Sm_ref.resize (1 ,0.0 );
65- Sk_ref.resize (1 ,0.0 );
6659 }
6760
6861 if (gas_model ==" ARGON" ){
@@ -1843,8 +1836,7 @@ void CSU2TCLib::DiffusionCoeffGY(){
18431836 // }
18441837
18451838 /* --- Assign species diffusion coefficient ---*/
1846- if (denom == 0 ) { DiffusionCoeff[iSpecies] = 0.0 ; }
1847- else { DiffusionCoeff[iSpecies] = gam_t *gam_t *Mi*(1 -Mi*gam_i) / denom; }
1839+ DiffusionCoeff[iSpecies] = (denom > EPS) ? (gam_t *gam_t *Mi*(1 -Mi*gam_i) / denom) : su2double (0.0 );
18481840 }
18491841 // if (ionization) {
18501842 // TODO: Update correct iElectron....
@@ -2013,13 +2005,13 @@ void CSU2TCLib::ThermalConductivitiesGY(){
20132005 }
20142006
20152007 /* --- Translational contribution to thermal conductivity ---*/
2016- if (denom_t != 0 ) ThermalCond_tr += ( 15.0 /4.0 )*kb*gam_i/denom_t ;
2008+ ThermalCond_tr += (denom_t > EPS) ? (( 15.0 /4.0 )*kb*gam_i/denom_t ) : su2double ( 0.0 ) ;
20172009
20182010 /* --- Translational contribution to thermal conductivity ---*/
2019- if (RotationModes[iSpecies] != 0.0 && denom_r != 0 ) ThermalCond_tr += kb*gam_i/denom_r;
2011+ if (RotationModes[iSpecies] != 0.0 ) ThermalCond_tr += ( denom_r > EPS) ? ( kb*gam_i/denom_r) : su2double ( 0.0 ) ;
20202012
20212013 /* --- Vibrational-electronic contribution to thermal conductivity ---*/
2022- if (denom_r != 0 ) ThermalCond_ve += kb*Cvve/R*gam_i / denom_r;
2014+ ThermalCond_ve += (denom_r > EPS) ? ( kb*Cvve/R*gam_i / denom_r) : su2double ( 0.0 ) ;
20232015 }
20242016
20252017 ThermalConductivities[0 ] = ThermalCond_tr;
@@ -2028,11 +2020,10 @@ void CSU2TCLib::ThermalConductivitiesGY(){
20282020
20292021void CSU2TCLib::ViscositySuth (){
20302022
2031- su2double T_ref = 273.15 ;
2032- su2double T_nd = T / T_ref;
2023+ su2double T_nd = T / T_ref_suth;
20332024
20342025 /* --- Calculate mixture laminar viscosity ---*/
2035- Mu = mu_ref[0 ] * T_nd * sqrt (T_nd) * ((T_ref + Sm_ref[0 ]) / (T + Sm_ref[0 ]));
2026+ Mu = mu_ref[0 ] * T_nd * sqrt (T_nd) * ((T_ref_suth + Sm_ref[0 ]) / (T + Sm_ref[0 ]));
20362027
20372028}
20382029
@@ -2050,9 +2041,8 @@ void CSU2TCLib::ThermalConductivitiesSuth(){
20502041 su2double scl = Cvve/Cvtr;
20512042
20522043 /* --- Compute k's using Sutherland's law ---*/
2053- su2double T_ref = 273.15 ;
2054- su2double T_nd = T / T_ref;
2055- su2double k = k_ref[0 ] * T_nd * sqrt (T_nd) * ((T_ref + Sk_ref[0 ]) / (T + Sk_ref[0 ]));
2044+ su2double T_nd = T / T_ref_suth;
2045+ su2double k = k_ref[0 ] * T_nd * sqrt (T_nd) * ((T_ref_suth + Sk_ref[0 ]) / (T + Sk_ref[0 ]));
20562046 su2double kve = scl*k;
20572047
20582048 ThermalConductivities[0 ] = k;
0 commit comments