45 std::cerr <<
"Error: Must specify input file." << std::endl;
49 GetPot input( argv[1] );
58 std::vector<double> Y(5,0.2);
66 std::vector<double> Tqp(1,T);
67 std::vector<double> Pqp(1,P);
68 std::vector<std::vector<double> > Yqp(1,Y);
74 std::vector<double> omega_dot(5,0.0);
76 gas.omega_dot( cache, 0, omega_dot );
78 const double cv = gas.cv( cache, 0 );
79 const double cp = gas.cp( cache, 0 );
81 const double mu = gas.mu( cache, 0 );
82 const double k = gas.k( cache, 0 );
84 std::vector<libMesh::Real> D(5,0.0);
88 std::vector<double> h(5,0.0);
89 gas.h_s( cache, 0, h );
95 const double cv_reg = 8.8382964243437857e+02;
96 if( std::fabs( (cv - cv_reg)/cv_reg ) > tol )
98 std::cerr <<
"Error: Mismatch in internal energy." << std::endl
99 << std::setprecision(16) << std::scientific
100 <<
"cv = " << cv << std::endl
101 <<
"cv_reg = " << cv_reg << std::endl;
105 const double cp_reg = 1.2732313697364564e+03;
106 if( std::fabs( (cp - cp_reg)/cp_reg ) > tol )
108 std::cerr <<
"Error: Mismatch in internal energy." << std::endl
109 << std::setprecision(16) << std::scientific
110 <<
"cp = " << cp << std::endl
111 <<
"cp_reg = " << cp_reg << std::endl;
115 std::vector<double> od_reg(5,0.0);
123 od_reg[0] = 9.3626353539094969e+04;
124 od_reg[1] = -3.3748303628338216e+05;
125 od_reg[2] = 2.5813337444763799e+05;
126 od_reg[3] = -2.1412192748531760e+05;
127 od_reg[4] = 1.9984523578196683e+05;
129 for(
unsigned int i = 0; i < 5; i++ )
131 if( std::fabs( (omega_dot[i] - od_reg[i])/od_reg[i] ) > tol )
133 std::cerr <<
"Error: Mismatch in internal energy." << std::endl
134 << std::setprecision(16) << std::scientific
135 <<
"i = " << i << std::endl
136 <<
"omega_dot = " << omega_dot[i] << std::endl
137 <<
"od_reg = " << od_reg[i] << std::endl;
142 const double mu_reg = 5.4816457619629627e-05;
143 const double k_reg = 9.2830809315384427e-02;
144 std::vector<libMesh::Real> D_reg(5,0.0);
145 D_reg[0] = 3.4493708884909694e-04;
146 D_reg[1] = 3.3630005706895442e-04;
147 D_reg[2] = 3.4039101336823794e-04;
148 D_reg[3] = 5.2738514208048540e-04;
149 D_reg[4] = 5.1755853748986337e-04;
151 if( std::fabs( (mu_reg - mu)/mu ) > tol )
153 std::cerr <<
"Error: Mismatch in viscosity." << std::endl
154 << std::setprecision(16) << std::scientific
155 <<
"mu = " << mu << std::endl
156 <<
"mu_reg = " << mu_reg << std::endl;
160 for(
unsigned int i = 0; i < 5; i++ )
162 if( std::fabs( (D_reg[i] - D[i])/D[i] ) > tol )
164 std::cerr <<
"Error: Mismatch in diffusion coefficient." << std::endl
165 << std::setprecision(16) << std::scientific
166 <<
"i = " << i << std::endl
167 <<
"D = " << D[i] << std::endl
168 <<
"D_reg = " << D_reg[i] << std::endl;
173 std::vector<double> h_reg(5,0.0);
174 h_reg[0] = 1.3709248272267890e+06;
175 h_reg[1] = 1.2692054328083945e+06;
176 h_reg[2] = 4.3659730250572553e+06;
177 h_reg[3] = 3.5529883128718123e+07;
178 h_reg[4] = 1.7154994250083648e+07;
180 for(
unsigned int i = 0; i < 5; i++ )
182 if( std::fabs( (h[i] - h_reg[i])/h_reg[i] ) > tol )
184 std::cerr <<
"Error: Mismatch in internal energy." << std::endl
185 << std::setprecision(16) << std::scientific
186 <<
"i = " << i << std::endl
187 <<
"h = " << h[i] << std::endl
188 <<
"h_reg = " << h_reg[i] << std::endl;
195 if( std::fabs( (k_reg - k)/k ) > tol )
197 std::cerr <<
"Error: Mismatch in thermal conductivity." << std::endl
198 << std::setprecision(16) << std::scientific
199 <<
"k = " << k << std::endl
200 <<
"k_reg = " << k_reg << std::endl;
void set_values(unsigned int quantity, std::vector< libMesh::Number > &values)
Wrapper class for evaluating thermochemistry and transport properties using Cantera.
Wrapper class for storing state for computing thermochemistry and transport properties using Cantera...
void add_quantity(unsigned int quantity)
void set_vector_values(unsigned int quantity, std::vector< std::vector< libMesh::Number > > &values)