26 #ifndef GRINS_WILKE_ANTIOCH_TRANSPORT_MIXTURE_H
27 #define GRINS_WILKE_ANTIOCH_TRANSPORT_MIXTURE_H
29 #include "grins_config.h"
31 #ifdef GRINS_HAVE_ANTIOCH
39 #include "libmesh/libmesh_common.h"
40 #include "libmesh/getpot.h"
43 #include "antioch/vector_utils_decl.h"
44 #include "antioch/vector_utils.h"
45 #include "antioch/cea_curve_fit.h"
46 #include "antioch/nasa_evaluator.h"
47 #include "antioch/ideal_gas_micro_thermo.h"
48 #include "antioch/stat_mech_thermo.h"
49 #include "antioch/mixture_averaged_transport_mixture.h"
50 #include "antioch/mixture_viscosity.h"
51 #include "antioch/mixture_conductivity.h"
52 #include "antioch/mixture_diffusion.h"
53 #include "antioch/sutherland_viscosity.h"
54 #include "antioch/blottner_viscosity.h"
55 #include "antioch/eucken_thermal_conductivity.h"
56 #include "antioch/constant_lewis_diffusivity.h"
58 #include "antioch/sutherland_parsing.h"
59 #include "antioch/blottner_parsing.h"
60 #include "antioch/eucken_thermal_conductivity_building.h"
61 #include "antioch/constant_lewis_diffusivity_building.h"
63 #ifdef ANTIOCH_HAVE_GSL
65 #include "antioch/kinetics_theory_viscosity.h"
66 #include "antioch/kinetics_theory_thermal_conductivity.h"
67 #include "antioch/molecular_binary_diffusion.h"
68 #include "antioch/gsl_spliner.h"
69 #include "antioch/kinetics_theory_viscosity_building.h"
70 #include "antioch/kinetics_theory_thermal_conductivity_building.h"
72 #endif // ANTIOCH_HAVE_GSL
84 template<
typename KineticsThermoCurveFit,
typename Thermo,
typename Viscosity,
typename Conductivity,
typename Diffusivity>
94 libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > &
reaction_set,
95 libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > & kinetics_thermo_mix,
96 libMesh::UniquePtr<Antioch::TransportMixture<libMesh::Real> > & trans_mix,
97 libMesh::UniquePtr<Antioch::MixtureAveragedTransportMixture<libMesh::Real> > & wilke_mix,
98 libMesh::UniquePtr<Antioch::MixtureViscosity<Viscosity,libMesh::Real> > & visc,
99 libMesh::UniquePtr<Antioch::MixtureDiffusion<Diffusivity,libMesh::Real> > & diff,
100 libMesh::Real min_T = -std::numeric_limits<libMesh::Real>::max(),
105 const Antioch::MixtureAveragedTransportMixture<libMesh::Real>&
wilke_mixture()
const;
107 const Antioch::MixtureViscosity<Viscosity,libMesh::Real>&
viscosity()
const;
109 const Antioch::MixtureConductivity<Conductivity,libMesh::Real>&
conductivity()
const;
111 const Antioch::MixtureDiffusion<Diffusivity,libMesh::Real>&
diffusivity()
const;
119 libMesh::UniquePtr<Antioch::MixtureAveragedTransportMixture<libMesh::Real> >
_wilke_mixture;
124 libMesh::UniquePtr<Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit> >
_nasa_evaluator;
126 libMesh::UniquePtr<Antioch::MixtureViscosity<Viscosity,libMesh::Real> >
_viscosity;
128 libMesh::UniquePtr<Antioch::MixtureConductivity<Conductivity,libMesh::Real> >
_conductivity;
130 libMesh::UniquePtr<Antioch::MixtureDiffusion<Diffusivity,libMesh::Real> >
_diffusivity;
153 thermo_type<Antioch::StatMechThermodynamics<libMesh::Real> > )
155 thermo.reset(
new Antioch::StatMechThermodynamics<libMesh::Real>( *(this->
_antioch_gas.get()) ) );
158 void specialized_build_thermo( libMesh::UniquePtr<Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit>,libMesh::Real> > & thermo,
159 thermo_type<Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit>,libMesh::Real> > )
161 _nasa_evaluator.reset(
new Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit>(this->
nasa_mixture()) );
162 thermo.reset(
new Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit>, libMesh::Real>( *_nasa_evaluator, *(this->
_antioch_gas.get()) ) );
166 const std::string& material,
167 libMesh::UniquePtr<Antioch::MixtureViscosity<Antioch::SutherlandViscosity<libMesh::Real>,libMesh::Real> > &
viscosity,
170 viscosity.reset(
new Antioch::MixtureViscosity<Antioch::SutherlandViscosity<libMesh::Real>,libMesh::Real>(*(_trans_mixture.get())) );
172 std::string sutherland_data = input(
"Materials/"+material+
"/GasMixture/Antioch/sutherland_data",
"default");
173 if( sutherland_data ==
"default" )
174 sutherland_data = Antioch::DefaultInstallFilename::sutherland_data();
176 Antioch::read_sutherland_data_ascii( *(
viscosity.get()), sutherland_data );
180 const std::string& material,
181 libMesh::UniquePtr<Antioch::MixtureViscosity<Antioch::BlottnerViscosity<libMesh::Real>,libMesh::Real> > &
viscosity,
184 viscosity.reset(
new Antioch::MixtureViscosity<Antioch::BlottnerViscosity<libMesh::Real>,libMesh::Real>(*(_trans_mixture.get())) );
186 std::string blottner_data = input(
"Materials/"+material+
"/GasMixture/Antioch/blottner_data",
"default");
187 if( blottner_data ==
"default" )
188 blottner_data = Antioch::DefaultInstallFilename::blottner_data();
190 Antioch::read_blottner_data_ascii( *(
viscosity.get()), blottner_data );
193 #ifdef ANTIOCH_HAVE_GSL
196 libMesh::UniquePtr<Antioch::MixtureViscosity<Antioch::KineticsTheoryViscosity<libMesh::Real,Antioch::GSLSpliner>,libMesh::Real> > &
viscosity,
197 viscosity_type<Antioch::KineticsTheoryViscosity<libMesh::Real,Antioch::GSLSpliner> > )
199 viscosity.reset(
new Antioch::MixtureViscosity<Antioch::KineticsTheoryViscosity<libMesh::Real,Antioch::GSLSpliner>,libMesh::Real>(*(_trans_mixture.get())) );
201 Antioch::build_kinetics_theory_viscosity<libMesh::Real,Antioch::GSLSpliner>( *(
viscosity.get()) );
203 #endif // ANTIOCH_HAVE_GSL
208 conductivity.reset(
new Antioch::MixtureConductivity<Antioch::EuckenThermalConductivity<Thermo>,libMesh::Real>(*(_trans_mixture.get())) );
209 Antioch::build_eucken_thermal_conductivity<Thermo,libMesh::Real>(*(
conductivity.get()),*(_thermo.get()));
213 #ifdef ANTIOCH_HAVE_GSL
215 conductivity_type<Antioch::KineticsTheoryThermalConductivity<Thermo,libMesh::Real> > )
217 conductivity.reset(
new Antioch::MixtureConductivity<Antioch::KineticsTheoryThermalConductivity<Thermo,libMesh::Real>,libMesh::Real>(*(_trans_mixture.get())) );
219 Antioch::build_kinetics_theory_thermal_conductivity<Thermo,libMesh::Real>( *(
conductivity.get()), *(_thermo.get()) );
221 #endif // ANTIOCH_HAVE_GSL
224 const std::string& material,
225 libMesh::UniquePtr<Antioch::MixtureDiffusion<Antioch::ConstantLewisDiffusivity<libMesh::Real>,libMesh::Real> > &
diffusivity,
230 diffusivity.reset(
new Antioch::MixtureDiffusion<Antioch::ConstantLewisDiffusivity<libMesh::Real>,libMesh::Real>(*(_trans_mixture.get())) );
232 Antioch::build_constant_lewis_diffusivity<libMesh::Real>( *(
diffusivity.get()), Le);
236 #ifdef ANTIOCH_HAVE_GSL
239 libMesh::UniquePtr<Antioch::MixtureDiffusion<Antioch::MolecularBinaryDiffusion<libMesh::Real,Antioch::GSLSpliner>,libMesh::Real> > &
diffusivity,
240 diffusivity_type<Antioch::MolecularBinaryDiffusion<libMesh::Real,Antioch::GSLSpliner> > )
242 diffusivity.reset(
new Antioch::MixtureDiffusion<Antioch::MolecularBinaryDiffusion<libMesh::Real,Antioch::GSLSpliner>,libMesh::Real>(*(_trans_mixture.get())) );
244 #endif // ANTIOCH_HAVE_GSL
249 template<
typename KT,
typename T,
typename V,
typename C,
typename D>
251 const Antioch::MixtureAveragedTransportMixture<libMesh::Real>&
254 return *(_wilke_mixture.get());
257 template<
typename KT,
typename T,
typename V,
typename C,
typename D>
259 const Antioch::MixtureViscosity<V,libMesh::Real>&
262 return *_viscosity.get();
265 template<
typename KT,
typename T,
typename V,
typename C,
typename D>
267 const Antioch::MixtureConductivity<C,libMesh::Real>&
270 return *_conductivity.get();
273 template<
typename KT,
typename T,
typename V,
typename C,
typename D>
275 const Antioch::MixtureDiffusion<D,libMesh::Real>&
278 return *_diffusivity.get();
283 #endif // GRINS_HAVE_ANTIOCH
285 #endif // GRINS_WILKE_ANTIOCH_TRANSPORT_MIXTURE_H
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > _antioch_gas
void specialized_build_thermo(libMesh::UniquePtr< Antioch::StatMechThermodynamics< libMesh::Real > > &thermo, thermo_type< Antioch::StatMechThermodynamics< libMesh::Real > >)
bool clip_negative_rho() const
const Antioch::MixtureAveragedTransportMixture< libMesh::Real > & wilke_mixture() const
libMesh::UniquePtr< Thermo > _thermo
Wrapper class for Antioch::ChemicalMixture.
const Antioch::MixtureViscosity< Viscosity, libMesh::Real > & viscosity() const
Wrapper class for storing state for computing Wilke transport properties using Antioch.
void specialized_build_diffusivity(const GetPot &input, const std::string &material, libMesh::UniquePtr< Antioch::MixtureDiffusion< Antioch::ConstantLewisDiffusivity< libMesh::Real >, libMesh::Real > > &diffusivity, diffusivity_type< Antioch::ConstantLewisDiffusivity< libMesh::Real > >)
void build_diffusivity(const GetPot &input, const std::string &material)
libMesh::UniquePtr< Antioch::TransportMixture< libMesh::Real > > _trans_mixture
const Antioch::MixtureDiffusion< Diffusivity, libMesh::Real > & diffusivity() const
void specialized_build_conductivity(libMesh::UniquePtr< Antioch::MixtureConductivity< Antioch::EuckenThermalConductivity< Thermo >, libMesh::Real > > &conductivity, conductivity_type< Antioch::EuckenThermalConductivity< Thermo > >)
void specialized_build_viscosity(const GetPot &input, const std::string &material, libMesh::UniquePtr< Antioch::MixtureViscosity< Antioch::SutherlandViscosity< libMesh::Real >, libMesh::Real > > &viscosity, viscosity_type< Antioch::SutherlandViscosity< libMesh::Real > >)
libMesh::UniquePtr< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > > _nasa_evaluator
For some Thermo types, we also need to cache a NASAEvaluator.
static libMesh::Real parse_lewis_number(const GetPot &input, const std::string &material)
libMesh::UniquePtr< Antioch::MixtureConductivity< Conductivity, libMesh::Real > > _conductivity
const Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > & nasa_mixture() const
const Antioch::ReactionSet< libMesh::Real > & reaction_set() const
libMesh::UniquePtr< Antioch::MixtureAveragedTransportMixture< libMesh::Real > > _wilke_mixture
void build_conductivity()
libMesh::UniquePtr< Antioch::MixtureViscosity< Viscosity, libMesh::Real > > _viscosity
void specialized_build_viscosity(const GetPot &input, const std::string &material, libMesh::UniquePtr< Antioch::MixtureViscosity< Antioch::BlottnerViscosity< libMesh::Real >, libMesh::Real > > &viscosity, viscosity_type< Antioch::BlottnerViscosity< libMesh::Real > >)
Wrapper class for storing state for Antioch thermo and kinetics.
AntiochChemistry ChemistryParent
libMesh::UniquePtr< Antioch::MixtureDiffusion< Diffusivity, libMesh::Real > > _diffusivity
const Antioch::MixtureConductivity< Conductivity, libMesh::Real > & conductivity() const
void build_viscosity(const GetPot &input, const std::string &material)
virtual ~AntiochMixtureAveragedTransportMixture()
void specialized_build_thermo(libMesh::UniquePtr< Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit >, libMesh::Real > > &thermo, thermo_type< Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit >, libMesh::Real > >)
AntiochMixtureAveragedTransportMixture()