27 #include "grins_config.h"
29 #ifdef GRINS_HAVE_CANTERA
42 #include "libmesh/getpot.h"
43 #include "libmesh/libmesh_common.h"
45 int main(
int argc,
char* argv[])
51 std::cerr <<
"Error: Must specify input file." << std::endl;
55 GetPot input( argv[1] );
61 libMesh::Real T0 = input(
"Conditions/T0", 300.0 );
62 libMesh::Real T1 = input(
"Conditions/T1", 300.0 );
63 libMesh::Real T_inc = input(
"Conditions/T_increment", 100.0 );
65 libMesh::Real rho = input(
"Conditions/density", 1.0e-3 );
67 const unsigned int n_species = mixture.
n_species();
69 std::vector<double> Y(n_species,0.0);
70 for(
unsigned int s = 0; s < n_species; s++ )
72 Y[s] = input(
"Conditions/mass_fractions", 0.0, s );
75 std::vector<double> omega_dot(n_species,0.0);
80 output.open(
"omega_dot.dat", std::ios::trunc );
82 output <<
"# Species names" << std::endl;
83 for(
unsigned int s = 0; s < n_species; s++ )
88 output <<
"# T [K] omega_dot [kg/m^3-s]" << std::endl;
94 kinetics.
omega_dot( T, rho, Y, omega_dot );
96 output.open(
"omega_dot.dat", std::ios::app );
99 for(
unsigned int i = 0; i < n_species; i++ )
101 output << std::scientific << std::setprecision(16)
102 << omega_dot[i] <<
" ";
116 #endif //GRINS_HAVE_CANTERA
static PhysicsName reacting_low_mach_navier_stokes()
void omega_dot(const libMesh::Real &T, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot) const
std::string species_name(unsigned int species_index) const
int main(int argc, char *argv[])
unsigned int n_species() const
Wrapper class for storing state for computing thermochemistry and transport properties using Cantera...
static std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section.