@@ -129,6 +129,23 @@ Flow1D::Flow1D(ThermoPhase* ph, size_t nsp, size_t points) :
129129 }
130130 }
131131 }
132+
133+ // Polynomial coefficients for CO2 and H2O (backwards compatibility)
134+ // Check if "CO2" is already in the map, if not, add the polynomial fit data
135+ if (!m_PMAC.hasKey (" CO2" )) {
136+ const std::vector<double > c_CO2 = {18.741 , -121.310 , 273.500 , -194.050 , 56.310 ,
137+ -5.8169 };
138+ m_PMAC[" CO2" ][" fit-type" ] = " polynomial" ;
139+ m_PMAC[" CO2" ][" coefficients" ] = c_CO2;
140+ }
141+
142+ // Check if "H2O" is already in the map, if not, add the polynomial fit data
143+ if (!m_PMAC.hasKey (" H2O" )) {
144+ const std::vector<double > c_H2O = {-0.23093 , -1.12390 , 9.41530 , -2.99880 ,
145+ 0.51382 , -1.86840e-5 };
146+ m_PMAC[" H2O" ][" fit-type" ] = " polynomial" ;
147+ m_PMAC[" H2O" ][" coefficients" ] = c_H2O;
148+ }
132149}
133150
134151Flow1D::Flow1D (shared_ptr<ThermoPhase> th, size_t nsp, size_t points)
@@ -514,12 +531,6 @@ void Flow1D::computeRadiation(double* x, size_t jmin, size_t jmax)
514531 // radiation calculation:
515532 double k_P_ref = 1.0 *OneAtm;
516533
517- // Polynomial coefficients:
518- const double c_H2O[6 ] = {-0.23093 , -1.12390 , 9.41530 , -2.99880 ,
519- 0.51382 , -1.86840e-5 };
520- const double c_CO2[6 ] = {18.741 , -121.310 , 273.500 , -194.050 ,
521- 56.310 , -5.8169 };
522-
523534 // Calculation of the two boundary values
524535 double boundary_Rad_left = m_epsilon_left * StefanBoltz * pow (T (x, 0 ), 4 );
525536 double boundary_Rad_right = m_epsilon_right * StefanBoltz * pow (T (x, m_points - 1 ), 4 );
0 commit comments