26 #ifndef GRINS_ANTIOCH_MIXTURE_BUILDER_BASE_H
27 #define GRINS_ANTIOCH_MIXTURE_BUILDER_BASE_H
29 #include "grins_config.h"
31 #ifdef GRINS_HAVE_ANTIOCH
38 #include "antioch/vector_utils_decl.h"
39 #include "antioch/vector_utils.h"
40 #include "antioch/chemical_mixture.h"
41 #include "antioch/reaction_set.h"
42 #include "antioch/nasa_mixture.h"
43 #include "antioch/cea_curve_fit.h"
44 #include "antioch/nasa_mixture_parsing.h"
47 #include "libmesh/auto_ptr.h"
48 #include "libmesh/getpot.h"
68 libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> >
69 build_chem_mix(
const GetPot & input,
const std::string & material );
71 libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> >
73 const Antioch::ChemicalMixture<libMesh::Real> & chem_mix );
75 template<
typename KineticsThermoCurveFit>
76 libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> >
78 const Antioch::ChemicalMixture<libMesh::Real> & chem_mix );
81 template<
typename KineticsThermoCurveFit>
82 libMesh::UniquePtr<AntiochMixture<KineticsThermoCurveFit> >
85 libMesh::Real
parse_min_T(
const GetPot & input,
const std::string & material )
87 return input(
"Materials/"+material+
"/GasMixture/Antioch/minimum_T",
88 -std::numeric_limits<libMesh::Real>::max() );
93 return input(
"Materials/"+material+
"/GasMixture/Antioch/clip_negative_rho",
false);
99 ( Antioch::NASAThermoMixture<libMesh::Real,Antioch::CEACurveFit<libMesh::Real> > & nasa_mixture,
100 const GetPot & input,
const std::string & material)
102 std::string cea_data_filename = input(
"Materials/"+material+
"/GasMixture/Antioch/cea_data",
"default" );
104 if( cea_data_filename == std::string(
"default") )
105 cea_data_filename = Antioch::DefaultInstallFilename::thermo_data();
107 Antioch::read_nasa_mixture_data( nasa_mixture, cea_data_filename, Antioch::ASCII,
true );
112 template<
typename KineticsThermoCurveFit>
114 libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> >
116 const Antioch::ChemicalMixture<libMesh::Real> & chem_mix )
118 libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> >
119 nasa_mixture(
new Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit>(chem_mix) );
126 template<
typename KineticsThermoCurveFit>
128 libMesh::UniquePtr<AntiochMixture<KineticsThermoCurveFit> >
131 libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > chem_mixture =
134 libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > reaction_set =
137 libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > nasa_mixture =
138 this->build_nasa_thermo_mix<KineticsThermoCurveFit>(input,material,*chem_mixture);
140 libMesh::Real min_T = this->
parse_min_T(input,material);
143 return libMesh::UniquePtr<AntiochMixture<KineticsThermoCurveFit> >
145 (chem_mixture,reaction_set,nasa_mixture,min_T,clip_negative_rho) );
150 #endif // GRINS_HAVE_ANTIOCH
152 #endif // GRINS_ANTIOCH_MIXTURE_BUILDER_BASE_H
bool parse_clip_negative_rho(const GetPot &input, const std::string &material)
void parse_nasa_data(Antioch::NASAThermoMixture< libMesh::Real, Antioch::CEACurveFit< libMesh::Real > > &nasa_mixture, const GetPot &input, const std::string &material)
libMesh::UniquePtr< Antioch::ReactionSet< libMesh::Real > > build_reaction_set(const GetPot &input, const std::string &material, const Antioch::ChemicalMixture< libMesh::Real > &chem_mix)
~AntiochMixtureBuilderBase()
libMesh::UniquePtr< AntiochMixture< KineticsThermoCurveFit > > build_antioch_mixture(const GetPot &input, const std::string &material)
Base class building Antioch mixture wrappers.
libMesh::UniquePtr< Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > > build_nasa_thermo_mix(const GetPot &input, const std::string &material, const Antioch::ChemicalMixture< libMesh::Real > &chem_mix)
Wrapper class for storing state for Antioch thermo and kinetics.
AntiochMixtureBuilderBase()
libMesh::Real parse_min_T(const GetPot &input, const std::string &material)
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > build_chem_mix(const GetPot &input, const std::string &material)