30 #include "grins_config.h"
36 #include "libmesh/getpot.h"
38 #ifdef GRINS_HAVE_CANTERA
39 int main(
int argc,
char* argv[])
45 std::cerr <<
"Error: Must specify input file." << std::endl;
49 GetPot input( argv[1] );
51 std::vector<std::string> species(5);
52 species[0] = input(
"Physics/Chemistry/species",
"DIE!", 0 );
53 species[1] = input(
"Physics/Chemistry/species",
"DIE!", 1 );
54 species[2] = input(
"Physics/Chemistry/species",
"DIE!", 2 );
55 species[3] = input(
"Physics/Chemistry/species",
"DIE!", 3 );
56 species[4] = input(
"Physics/Chemistry/species",
"DIE!", 4 );
66 std::vector<double> Y(5,0.2);
74 std::vector<double> Tqp(1,T);
75 std::vector<double> Pqp(1,P);
76 std::vector<std::vector<double> > Yqp(1,Y);
82 const double mu = cantera_trans.
mu(cache,0);
83 const double k = cantera_trans.
k(cache,0);
85 std::vector<libMesh::Real> D(5,0.0);
87 cantera_trans.
D(cache, 0, D);
91 const double tol = 6.0e-15;
93 const double mu_reg = 4.2134235819759682e-05;
94 const double k_reg = 5.7138665373733508e-02;
95 std::vector<libMesh::Real> D_reg(5,0.0);
96 D_reg[0] = 1.7611544183904180e-04;
97 D_reg[1] = 1.7169898621123060e-04;
98 D_reg[2] = 1.7379080956310527e-04;
99 D_reg[3] = 2.6991049091576078e-04;
100 D_reg[4] = 2.6488528311729070e-04;
102 if( std::fabs( (mu_reg - mu)/mu ) > tol )
104 std::cerr <<
"Error: Mismatch in viscosity." << std::endl
105 << std::setprecision(16) << std::scientific
106 <<
"mu = " << mu << std::endl
107 <<
"mu_reg = " << mu_reg << std::endl;
111 if( std::fabs( (k_reg - k)/k ) > tol )
113 std::cerr <<
"Error: Mismatch in thermal conductivity." << std::endl
114 << std::setprecision(16) << std::scientific
115 <<
"k = " << k << std::endl
116 <<
"k_reg = " << k_reg << std::endl;
120 for(
unsigned int i = 0; i < 5; i++ )
122 if( std::fabs( (D_reg[i] - D[i])/D[i] ) > tol )
124 std::cerr <<
"Error: Mismatch in diffusion coefficient." << std::endl
125 << std::setprecision(16) << std::scientific
126 <<
"i = " << i << std::endl
127 <<
"D = " << D[i] << std::endl
128 <<
"D_reg = " << D_reg[i] << std::endl;
146 #else //GRINS_HAVE_CANTERA
void D(const CachedValues &cache, unsigned int qp, std::vector< libMesh::Real > &D) const
void set_values(unsigned int quantity, std::vector< libMesh::Number > &values)
int main(int argc, char *argv[])
libMesh::Real mu(const CachedValues &cache, unsigned int qp) const
libMesh::Real k(const CachedValues &cache, unsigned int qp) const
Wrapper class for storing state for computing thermochemistry and transport properties using Cantera...
void add_quantity(unsigned int quantity)
Wrapper class for evaluating transport properties using Cantera.
void set_vector_values(unsigned int quantity, std::vector< std::vector< libMesh::Number > > &values)