27 #include "grins_config.h"
29 #ifdef GRINS_HAVE_ANTIOCH
37 #include "libmesh/getpot.h"
44 template<
typename KineticsThermo,
typename Thermo,
typename Viscosity,
typename Conductivity,
typename Diffusivity>
51 libMesh::Real T0 = input(
"Conditions/T0", 300.0 );
52 libMesh::Real T1 = input(
"Conditions/T1", 300.0 );
53 libMesh::Real T_inc = input(
"Conditions/T_increment", 100.0 );
55 libMesh::Real rho = input(
"Conditions/density", 1.0e-3 );
57 const unsigned int n_species = mixture.
n_species();
59 std::vector<libMesh::Real> Y(n_species);
60 if( input.vector_variable_size(
"Conditions/mass_fractions" ) != n_species )
62 std::cerr <<
"Error: mass fractions size not consistent with n_species"
67 for(
unsigned int s = 0; s < n_species; s++ )
69 Y[s] = input(
"Conditions/mass_fractions", 0.0, s );
74 libMesh::Real p0 = rho*T*evaluator.
R_mix(Y);
77 output.open(
"transport.dat", std::ios::trunc );
79 output <<
"# Species names" << std::endl;
80 for(
unsigned int s = 0; s < n_species; s++ )
85 output <<
"# T [K] mu k D[s]" << std::endl;
91 output.open(
"transport.dat", std::ios::app );
92 output << std::scientific << std::setprecision(16);
97 std::vector<libMesh::Real> D(n_species);
103 for(
unsigned int s = 0; s< n_species; s++ )
105 output << D[s] <<
" ";
116 int main(
int argc,
char* argv[])
122 std::cerr <<
"Error: Must specify input file." << std::endl;
126 GetPot input( argv[1] );
128 std::string mixing_model = input(
"Physics/Antioch/mixing_model",
"wilke");
129 std::string thermo_model = input(
"Physics/Antioch/thermo_model",
"stat_mech");
130 std::string viscosity_model = input(
"Physics/Antioch/viscosity_model",
"sutherland");
131 std::string conductivity_model = input(
"Physics/Antioch/conductivity_model",
"eucken");
132 std::string diffusivity_model = input(
"Physics/Antioch/diffusivity_model",
"constant_lewis");
133 std::string kinetics_thermo_model = input(
"Physics/Antioch/kinetics_thermo_model",
"cea");
137 if( mixing_model == std::string(
"wilke") )
139 if( kinetics_thermo_model == std::string(
"cea") )
141 if( thermo_model == std::string(
"stat_mech") )
143 if( diffusivity_model == std::string(
"constant_lewis") )
145 if( conductivity_model == std::string(
"eucken") )
147 if( viscosity_model == std::string(
"sutherland") )
149 return_flag = do_transport_eval<Antioch::CEACurveFit<libMesh::Real>,
150 Antioch::StatMechThermodynamics<libMesh::Real>,
151 Antioch::SutherlandViscosity<libMesh::Real>,
152 Antioch::EuckenThermalConductivity<Antioch::StatMechThermodynamics<libMesh::Real> >,
153 Antioch::ConstantLewisDiffusivity<libMesh::Real> >(input);
155 else if( viscosity_model == std::string(
"blottner") )
157 return_flag = do_transport_eval<Antioch::CEACurveFit<libMesh::Real>,
158 Antioch::StatMechThermodynamics<libMesh::Real>,
159 Antioch::BlottnerViscosity<libMesh::Real>,
160 Antioch::EuckenThermalConductivity<Antioch::StatMechThermodynamics<libMesh::Real> >,
161 Antioch::ConstantLewisDiffusivity<libMesh::Real> >(input);
165 std::cerr <<
"Error: Unknown viscosity_model "
166 << viscosity_model <<
"!" << std::endl;
172 std::cerr <<
"Error: Unknown conductivity_model "
173 << conductivity_model <<
"!" << std::endl;
179 std::cerr <<
"Error: Unknown diffusivity_model "
180 << diffusivity_model <<
"!" << std::endl;
186 std::cerr <<
"Error: Unknown thermo_model "
187 << thermo_model <<
"!" << std::endl;
193 std::cerr <<
"Error: Unknown kinetics_thermo_model "
194 << thermo_model <<
"!" << std::endl;
200 std::cerr <<
"Error: Unknown mixing_model "
201 << mixing_model <<
"!" << std::endl;
208 #endif //GRINS_HAVE_ANTIOCH
unsigned int n_species() const
static PhysicsName reacting_low_mach_navier_stokes()
Wrapper class for storing state for computing Wilke transport properties using Antioch.
Wrapper class for evaluating Wilke transport properties using Antioch.
std::string species_name(unsigned int species_index) const
libMesh::Real cp(const libMesh::Real &T, const libMesh::Real P, const std::vector< libMesh::Real > &Y)
int do_transport_eval(const GetPot &input)
void mu_and_k_and_D(const libMesh::Real T, const libMesh::Real rho, const libMesh::Real cp, const std::vector< libMesh::Real > &Y, libMesh::Real &mu, libMesh::Real &k, std::vector< libMesh::Real > &D)
libMesh::Real R_mix(const std::vector< libMesh::Real > &mass_fractions) const
static std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section.
int main(int argc, char *argv[])