GRINS-0.8.0
List of all members | Public Member Functions | Protected Member Functions
GRINS::AntiochMixtureBuilderBase Class Reference

Base class building Antioch mixture wrappers. More...

#include <antioch_mixture_builder_base.h>

Inheritance diagram for GRINS::AntiochMixtureBuilderBase:
Inheritance graph
[legend]

Public Member Functions

 AntiochMixtureBuilderBase ()
 
 ~AntiochMixtureBuilderBase ()
 
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > build_chem_mix (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)
 
template<typename KineticsThermoCurveFit >
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)
 
template<typename KineticsThermoCurveFit >
libMesh::UniquePtr< AntiochMixture< KineticsThermoCurveFit > > build_antioch_mixture (const GetPot &input, const std::string &material)
 
libMesh::Real parse_min_T (const GetPot &input, const std::string &material)
 
bool parse_clip_negative_rho (const GetPot &input, const std::string &material)
 

Protected Member Functions

void parse_nasa_data (Antioch::NASAThermoMixture< libMesh::Real, Antioch::CEACurveFit< libMesh::Real > > &nasa_mixture, const GetPot &input, const std::string &material)
 

Detailed Description

Base class building Antioch mixture wrappers.

This class only worries about building the kinetics and the thermo associated with kinetics. Subclasses will handle thermo and transport.

Definition at line 62 of file antioch_mixture_builder_base.h.

Constructor & Destructor Documentation

GRINS::AntiochMixtureBuilderBase::AntiochMixtureBuilderBase ( )
inline

Definition at line 65 of file antioch_mixture_builder_base.h.

65 {}
GRINS::AntiochMixtureBuilderBase::~AntiochMixtureBuilderBase ( )
inline

Definition at line 66 of file antioch_mixture_builder_base.h.

66 {}

Member Function Documentation

template<typename KineticsThermoCurveFit >
libMesh::UniquePtr< AntiochMixture< KineticsThermoCurveFit > > GRINS::AntiochMixtureBuilderBase::build_antioch_mixture ( const GetPot &  input,
const std::string &  material 
)
inline

Definition at line 129 of file antioch_mixture_builder_base.h.

References build_chem_mix(), build_reaction_set(), parse_clip_negative_rho(), and parse_min_T().

Referenced by GRINSTesting::AntiochTestBase::init_antioch(), and main().

130  {
131  libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > chem_mixture =
132  this->build_chem_mix(input,material);
133 
134  libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > reaction_set =
135  this->build_reaction_set(input,material,*chem_mixture);
136 
137  libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > nasa_mixture =
138  this->build_nasa_thermo_mix<KineticsThermoCurveFit>(input,material,*chem_mixture);
139 
140  libMesh::Real min_T = this->parse_min_T(input,material);
141  bool clip_negative_rho = this->parse_clip_negative_rho(input,material);
142 
143  return libMesh::UniquePtr<AntiochMixture<KineticsThermoCurveFit> >
144  ( new AntiochMixture<KineticsThermoCurveFit>
145  (chem_mixture,reaction_set,nasa_mixture,min_T,clip_negative_rho) );
146  }
bool parse_clip_negative_rho(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)
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)
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > GRINS::AntiochMixtureBuilderBase::build_chem_mix ( const GetPot &  input,
const std::string &  material 
)

Definition at line 42 of file antioch_mixture_builder_base.C.

References GRINS::MaterialsParsing::parse_chemical_species().

Referenced by build_antioch_mixture(), GRINS::ChemistryBuilder::build_chemistry(), GRINS::AntiochConstantTransportMixtureBuilder::build_mixture(), GRINS::AntiochMixtureAveragedTransportMixtureBuilder::build_mixture(), GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_chem_mix(), GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_nasa_thermo_mix_cea(), and GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_reaction_set().

43  {
44  std::vector<std::string> species_list;
45  MaterialsParsing::parse_chemical_species(input,material,species_list);
46 
47  bool verbose_antioch_read = input("Materials/"+material+"/GasMixture/Antioch/verbose_read",false);
48 
49  std::string species_data_filename = input("Materials/"+material+"/GasMixture/Antioch/species_data", "default" );
50  if( species_data_filename == std::string("default") )
51  species_data_filename = Antioch::DefaultInstallFilename::chemical_mixture();
52 
53  std::string vibration_data_filename = input("Materials/"+material+"/GasMixture/Antioch/vibration_data", "default" );
54  if( vibration_data_filename == std::string("default") )
55  vibration_data_filename = Antioch::DefaultInstallFilename::vibrational_data();
56 
57  std::string electronic_data_filename = input("Materials/"+material+"/GasMixture/Antioch/electronic_data", "default" );
58  if( electronic_data_filename == std::string("default") )
59  electronic_data_filename = Antioch::DefaultInstallFilename::electronic_data();
60 
61  // By default, Antioch is using its ASCII parser. We haven't added more options yet.
62  return libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> >
63  ( new Antioch::ChemicalMixture<libMesh::Real>( species_list,
64  verbose_antioch_read,
65  species_data_filename,
66  vibration_data_filename,
67  electronic_data_filename ) );
68  }
static void parse_chemical_species(const GetPot &input, const std::string &material, std::vector< std::string > &species_names)
Helper function for parsing the chemical species.
template<typename KineticsThermoCurveFit >
libMesh::UniquePtr< Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > > GRINS::AntiochMixtureBuilderBase::build_nasa_thermo_mix ( const GetPot &  input,
const std::string &  material,
const Antioch::ChemicalMixture< libMesh::Real > &  chem_mix 
)
inline

Definition at line 115 of file antioch_mixture_builder_base.h.

References parse_nasa_data().

Referenced by GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_nasa_thermo_mix_cea().

117  {
118  libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> >
119  nasa_mixture( new Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit>(chem_mix) );
120 
121  this->parse_nasa_data( *nasa_mixture, input, material);
122 
123  return nasa_mixture;
124  }
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 > > GRINS::AntiochMixtureBuilderBase::build_reaction_set ( const GetPot &  input,
const std::string &  material,
const Antioch::ChemicalMixture< libMesh::Real > &  chem_mix 
)

Definition at line 71 of file antioch_mixture_builder_base.C.

References GRINS::MaterialsParsing::parse_chemical_kinetics_datafile_name().

Referenced by build_antioch_mixture(), GRINS::AntiochConstantTransportMixtureBuilder::build_mixture(), GRINS::AntiochMixtureAveragedTransportMixtureBuilder::build_mixture(), and GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_reaction_set().

73  {
74  libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> >
75  reaction_set( new Antioch::ReactionSet<libMesh::Real>(chem_mix) );
76 
77  std::string kinetics_data_filename = MaterialsParsing::parse_chemical_kinetics_datafile_name( input, material );
78 
79  bool verbose_read = input("screen-options/verbose_kinetics_read", false );
80 
81  Antioch::read_reaction_set_data_xml<libMesh::Real>( kinetics_data_filename, verbose_read, *reaction_set );
82 
83  return reaction_set;
84  }
static std::string parse_chemical_kinetics_datafile_name(const GetPot &input, const std::string &material)
bool GRINS::AntiochMixtureBuilderBase::parse_clip_negative_rho ( const GetPot &  input,
const std::string &  material 
)
inline
libMesh::Real GRINS::AntiochMixtureBuilderBase::parse_min_T ( const GetPot &  input,
const std::string &  material 
)
inline

Definition at line 85 of file antioch_mixture_builder_base.h.

Referenced by build_antioch_mixture(), GRINS::AntiochConstantTransportMixtureBuilder::build_mixture(), GRINS::AntiochMixtureAveragedTransportMixtureBuilder::build_mixture(), and GRINSTesting::AntiochMixtureBuilderBaseTest::test_parse_min_T().

86  {
87  return input( "Materials/"+material+"/GasMixture/Antioch/minimum_T",
88  -std::numeric_limits<libMesh::Real>::max() );
89  }
void GRINS::AntiochMixtureBuilderBase::parse_nasa_data ( Antioch::NASAThermoMixture< libMesh::Real, Antioch::CEACurveFit< libMesh::Real > > &  nasa_mixture,
const GetPot &  input,
const std::string &  material 
)
inlineprotected

Definition at line 99 of file antioch_mixture_builder_base.h.

Referenced by build_nasa_thermo_mix().

101  {
102  std::string cea_data_filename = input( "Materials/"+material+"/GasMixture/Antioch/cea_data", "default" );
103 
104  if( cea_data_filename == std::string("default") )
105  cea_data_filename = Antioch::DefaultInstallFilename::thermo_data();
106 
107  Antioch::read_nasa_mixture_data( nasa_mixture, cea_data_filename, Antioch::ASCII, true );
108  }

The documentation for this class was generated from the following files:

Generated on Tue Dec 19 2017 12:47:30 for GRINS-0.8.0 by  doxygen 1.8.9.1