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

#include <gas_recombination_catalytic_wall_neumann_bc_factory_impl.h>

Public Member Functions

 GasRecombinationCatalyticWallNeumannBCFactoryImpl ()
 
 ~GasRecombinationCatalyticWallNeumannBCFactoryImpl ()
 
SharedPtr< NeumannBCAbstractbuild_catalytic_wall (const GetPot &input, const std::string &reaction, SharedPtr< CatalycityBase > &gamma_ptr, const std::vector< VariableIndex > &species_vars, const std::string &material, VariableIndex T_var, libMesh::Real p0, const std::string &thermochem_lib)
 
void parse_reactant_and_product (const std::string &reaction, std::string &reactant, std::string &product) const
 

Protected Member Functions

template<typename ChemistryType >
void build_wall_ptr (SharedPtr< ChemistryType > &chem_ptr, SharedPtr< CatalycityBase > &catalycity, const std::string &reactant, const std::string &product, const std::vector< VariableIndex > &species_vars, VariableIndex T_var, libMesh::Real p0, SharedPtr< NeumannBCAbstract > &catalytic_wall)
 

Detailed Description

Definition at line 37 of file gas_recombination_catalytic_wall_neumann_bc_factory_impl.h.

Constructor & Destructor Documentation

GRINS::GasRecombinationCatalyticWallNeumannBCFactoryImpl::GasRecombinationCatalyticWallNeumannBCFactoryImpl ( )
inline
GRINS::GasRecombinationCatalyticWallNeumannBCFactoryImpl::~GasRecombinationCatalyticWallNeumannBCFactoryImpl ( )
inline

Member Function Documentation

SharedPtr< NeumannBCAbstract > GRINS::GasRecombinationCatalyticWallNeumannBCFactoryImpl::build_catalytic_wall ( const GetPot &  input,
const std::string &  reaction,
SharedPtr< CatalycityBase > &  gamma_ptr,
const std::vector< VariableIndex > &  species_vars,
const std::string &  material,
VariableIndex  T_var,
libMesh::Real  p0,
const std::string &  thermochem_lib 
)
Todo:
Update the API for the catalytic walls to take a unique_ptr to avoid this garbage.
Todo:
Update the API for the catalytic walls to take a unique_ptr to avoid this garbage.

Definition at line 46 of file gas_recombination_catalytic_wall_neumann_bc_factory_impl.C.

References GRINS::ChemistryBuilder::build_chemistry().

56  {
57  std::string reactant;
58  std::string product;
59  this->parse_reactant_and_product(reaction,reactant,product);
60 
61  // Now construct the Neumann BC
62  SharedPtr<NeumannBCAbstract> catalytic_wall;
63 
64  ChemistryBuilder chem_builder;
65 
66  if( thermochem_lib == "cantera" )
67  {
68 #ifdef GRINS_HAVE_CANTERA
69  libMesh::UniquePtr<CanteraMixture> chem_uptr;
70  chem_builder.build_chemistry(input,material,chem_uptr);
71 
73  SharedPtr<CanteraMixture> chem_ptr(chem_uptr.release());
74 
75  this->build_wall_ptr<CanteraMixture>(chem_ptr,gamma_ptr,reactant,product,
76  species_vars,T_var,p0,catalytic_wall);
77 #else
78  libmesh_error_msg("Error: Cantera not enabled in this configuration. Reconfigure using --with-cantera option.");
79 #endif
80  }
81  else if( thermochem_lib == "antioch" )
82  {
83 #ifdef GRINS_HAVE_ANTIOCH
84  libMesh::UniquePtr<AntiochChemistry> chem_uptr;
85  chem_builder.build_chemistry(input,material,chem_uptr);
86 
88  SharedPtr<AntiochChemistry> chem_ptr(chem_uptr.release());
89 
90  this->build_wall_ptr<AntiochChemistry>(chem_ptr,gamma_ptr,reactant,product,
91  species_vars,T_var,p0,catalytic_wall);
92 #else
93  libmesh_error_msg("Error: Antioch not enabled in this configuration. Reconfigure using --with-antioch option.");
94 #endif
95  }
96  else
97  libmesh_error_msg("ERROR: Invalid thermochemistry library "+thermochem_lib+"!");
98 
99  return catalytic_wall;
100  }
void parse_reactant_and_product(const std::string &reaction, std::string &reactant, std::string &product) const
template<typename ChemistryType >
void GRINS::GasRecombinationCatalyticWallNeumannBCFactoryImpl::build_wall_ptr ( SharedPtr< ChemistryType > &  chem_ptr,
SharedPtr< CatalycityBase > &  catalycity,
const std::string &  reactant,
const std::string &  product,
const std::vector< VariableIndex > &  species_vars,
VariableIndex  T_var,
libMesh::Real  p0,
SharedPtr< NeumannBCAbstract > &  catalytic_wall 
)
inlineprotected

Definition at line 62 of file gas_recombination_catalytic_wall_neumann_bc_factory_impl.h.

70  {
71  catalytic_wall.reset( new GasRecombinationCatalyticWall<ChemistryType>
72  ( chem_ptr,
73  catalycity,
74  species_vars,
75  T_var,
76  p0,
77  chem_ptr->species_index(reactant),
78  chem_ptr->species_index(product) ) );
79  }
void GRINS::GasRecombinationCatalyticWallNeumannBCFactoryImpl::parse_reactant_and_product ( const std::string &  reaction,
std::string &  reactant,
std::string &  product 
) const
Todo:
We currently can only handle reactions of the type R -> P e.g. not R1+R2 -> P, etc.

Definition at line 102 of file gas_recombination_catalytic_wall_neumann_bc_factory_impl.C.

References GRINS::StringUtilities::split_string().

Referenced by GRINS::GasRecombinationCatalyticWallNeumannBCOldStyleFactory::reactant_for_catalycity().

105  {
106  // Split each reaction into reactants and products
107  std::vector<std::string> partners;
108  StringUtilities::split_string(reaction, "->", partners);
109 
112  if( partners.size() != 2 )
113  libmesh_error_msg("ERROR: Must have only one reactant and one product for GasRecombinationCatalyticWall!");
114 
115  reactant = partners[0];
116  product = partners[1];
117  }
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
Definition: string_utils.C:31

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