26 #include "grins_config.h"
28 #ifdef GRINS_HAVE_ANTIOCH
38 #include "libmesh/getpot.h"
39 #include "libmesh/parameter_multiaccessor.h"
42 #include "antioch/read_reaction_set_data.h"
43 #include "antioch/nasa_mixture_parsing.h"
44 #include "antioch/stat_mech_thermo.h"
48 template <
typename KineticsThermoCurveFit>
50 const std::string& material )
52 _reaction_set( new Antioch::ReactionSet<
libMesh::Real>( (*_antioch_gas.get()) ) ),
53 _nasa_mixture( new Antioch::NASAThermoMixture<
libMesh::Real,KineticsThermoCurveFit>( (*_antioch_gas.get()) ) ),
54 _minimum_T( input(
"Materials/"+material+
"/GasMixture/Antioch/minimum_T", -std::numeric_limits<
libMesh::Real>::max() ) ),
55 _clip_negative_rho( input(
"Materials/"+material+
"/GasMixture/Antioch/clip_negative_rho", false) )
58 std::string warning =
"==============================================\n";
59 warning +=
"WARNING: This AntiochMixture constructor is DEPREACTED!\n";
60 warning +=
" Prefer alternate constructor where parsing\n";
61 warning +=
" is done outside this class.\n";
62 warning +=
"==============================================\n";
64 libmesh_warning(warning);
69 bool verbose_read = input(
"screen-options/verbose_kinetics_read",
false );
71 Antioch::read_reaction_set_data_xml<libMesh::Real>( kinetics_data_filename, verbose_read, *
_reaction_set.get() );
73 std::string cea_data_filename = input(
"Materials/"+material+
"/GasMixture/Antioch/cea_data",
"default" );
74 if( cea_data_filename == std::string(
"default") )
75 cea_data_filename = Antioch::DefaultInstallFilename::thermo_data();
77 Antioch::read_nasa_mixture_data( *
_nasa_mixture.get(), cea_data_filename, Antioch::ASCII, true );
82 template <
typename KineticsThermoCurveFit>
84 ( libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > & chem_mixture,
85 libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > & reaction_set,
86 libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > & nasa_mixture,
88 bool clip_negative_rho )
91 _clip_negative_rho(clip_negative_rho)
94 _reaction_set.reset( reaction_set.release() );
95 _nasa_mixture.reset( nasa_mixture.release() );
97 this->build_stat_mech_ref_correction();
100 template <
typename KineticsThermoCurveFit>
102 (
const std::string & param_name,
109 if (param_name.find(
"Antioch") == 0)
110 param_pointer.push_back
112 (*this->_reaction_set.get(), param_name));
115 template <
typename KineticsThermoCurveFit>
118 Antioch::StatMechThermodynamics<libMesh::Real> thermo( *(this->_antioch_gas.get()) );
120 _h_stat_mech_ref_correction.resize(this->n_species());
122 for(
unsigned int s = 0; s < this->n_species(); s++ )
124 _h_stat_mech_ref_correction[s] = -thermo.h_tot( s, 298.15 ) + thermo.e_0(s);
130 #endif // GRINS_HAVE_ANTIOCH
libMesh::UniquePtr< Antioch::ReactionSet< libMesh::Real > > _reaction_set
Wrapper class for Antioch::ChemicalMixture.
libMesh::UniquePtr< Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > > _nasa_mixture
static std::string parse_chemical_kinetics_datafile_name(const GetPot &input, const std::string &material)
virtual void register_parameter(const std::string ¶m_name, libMesh::ParameterMultiAccessor< libMesh::Number > ¶m_pointer) const
Each subclass will register its copy of an independent.
void build_stat_mech_ref_correction()
virtual void register_parameter(const std::string ¶m_name, libMesh::ParameterMultiAccessor< libMesh::Number > ¶m_pointer) const
Each subclass will register its copy of an independent.