GRINS-0.7.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 (const GetPot &input, const std::string &material, 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 
)

Definition at line 45 of file gas_recombination_catalytic_wall_neumann_bc_factory_impl.C.

55  {
56  std::string reactant;
57  std::string product;
58  this->parse_reactant_and_product(reaction,reactant,product);
59 
60  // Now construct the Neumann BC
61  SharedPtr<NeumannBCAbstract> catalytic_wall;
62 
63  if( thermochem_lib == "cantera" )
64  {
65 #ifdef GRINS_HAVE_CANTERA
66  this->build_wall_ptr<CanteraMixture>(input,material,gamma_ptr,reactant,product,
67  species_vars,T_var,p0,catalytic_wall);
68 #else
69  libmesh_error_msg("Error: Cantera not enabled in this configuration. Reconfigure using --with-cantera option.");
70 #endif
71  }
72  else if( thermochem_lib == "antioch" )
73  {
74 #ifdef GRINS_HAVE_ANTIOCH
75  this->build_wall_ptr<AntiochChemistry>(input,material,gamma_ptr,reactant,product,
76  species_vars,T_var,p0,catalytic_wall);
77 #else
78  libmesh_error_msg("Error: Antioch not enabled in this configuration. Reconfigure using --with-antioch option.");
79 #endif
80  }
81  else
82  libmesh_error_msg("ERROR: Invalid thermochemistry library "+thermochem_lib+"!");
83 
84  return catalytic_wall;
85  }
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 ( const GetPot &  input,
const std::string &  material,
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.

71  {
72  SharedPtr<ChemistryType> chem_ptr( new ChemistryType(input,material) );
73 
74  catalytic_wall.reset( new GasRecombinationCatalyticWall<ChemistryType>
75  ( chem_ptr,
76  catalycity,
77  species_vars,
78  T_var,
79  p0,
80  chem_ptr->species_index(reactant),
81  chem_ptr->species_index(product) ) );
82  }
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 87 of file gas_recombination_catalytic_wall_neumann_bc_factory_impl.C.

References GRINS::StringUtilities::split_string().

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

90  {
91  // Split each reaction into reactants and products
92  std::vector<std::string> partners;
93  StringUtilities::split_string(reaction, "->", partners);
94 
97  if( partners.size() != 2 )
98  libmesh_error_msg("ERROR: Must have only one reactant and one product for GasRecombinationCatalyticWall!");
99 
100  reactant = partners[0];
101  product = partners[1];
102  }
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 Thu Jun 2 2016 21:52:31 for GRINS-0.7.0 by  doxygen 1.8.10