51 std::cerr <<
"Error: Must specify input file." << std::endl;
55 GetPot input( argv[1] );
62 libMesh::Real T0 = input(
"Conditions/T0", 300.0 );
63 libMesh::Real T1 = input(
"Conditions/T1", 300.0 );
64 libMesh::Real T_inc = input(
"Conditions/T_increment", 100.0 );
67 libMesh::Real p0 = input(
"Conditions/pressure", 1.0e5 );
69 const unsigned int n_species = antioch_mixture.n_species();
71 std::vector<libMesh::Real> Y(n_species);
72 if( input.vector_variable_size(
"Conditions/mass_fractions" ) != n_species )
74 std::cerr <<
"Error: mass fractions size not consistent with n_species"
79 for(
unsigned int s = 0; s < n_species; s++ )
81 Y[s] = input(
"Conditions/mass_fractions", 0.0, s );
84 libMesh::Real R_mix = antioch_mixture.R_mix(Y);
87 std::vector<libMesh::Real> omega_dot(n_species,0.0);
92 output.open(
"omega_dot.dat", std::ios::trunc );
94 output <<
"# Species names" << std::endl;
95 for(
unsigned int s = 0; s < n_species; s++ )
97 output << antioch_mixture.species_name( s ) <<
" ";
100 output <<
"# T [K] omega_dot [kg/m^3-s]" << std::endl;
106 Antioch::TempCache<libMesh::Real> T_cache(T);
108 libMesh::Real rho = p0/(R_mix*T);
110 antioch_kinetics.omega_dot( T_cache, rho, Y, omega_dot );
112 output.open(
"omega_dot.dat", std::ios::app );
115 for(
unsigned int i = 0; i < n_species; i++ )
117 output << std::scientific << std::setprecision(16)
118 << omega_dot[i] <<
" ";
Wrapper class for evaluating chemical kinetics using Antioch.
static PhysicsName reacting_low_mach_navier_stokes()
Wrapper class for storing state for Antioch thermo and kinetics.
static std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section.