#include <gas_solid_catalytic_wall_neumann_bc_factory_impl.h>
|
| GasSolidCatalyticWallNeumannBCFactoryImpl () |
|
| ~GasSolidCatalyticWallNeumannBCFactoryImpl () |
|
SharedPtr< NeumannBCAbstract > | 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) |
|
void | parse_reactants_and_product (const std::string &reaction, std::string &gas_reactant, std::string &solid_reactant, std::string &product) const |
|
|
template<typename ChemistryType > |
void | build_wall_ptr (const GetPot &input, const std::string &material, SharedPtr< CatalycityBase > &gamma_ptr, const std::string &gas_reactant, const std::string &solid_reactant, const std::string &product, const std::vector< VariableIndex > &species_vars, VariableIndex T_var, libMesh::Real p0, SharedPtr< NeumannBCAbstract > &catalytic_wall) |
|
GRINS::GasSolidCatalyticWallNeumannBCFactoryImpl::GasSolidCatalyticWallNeumannBCFactoryImpl |
( |
| ) |
|
|
inline |
GRINS::GasSolidCatalyticWallNeumannBCFactoryImpl::~GasSolidCatalyticWallNeumannBCFactoryImpl |
( |
| ) |
|
|
inline |
SharedPtr< NeumannBCAbstract > GRINS::GasSolidCatalyticWallNeumannBCFactoryImpl::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_solid_catalytic_wall_neumann_bc_factory_impl.C.
56 std::string gas_reactant;
57 std::string solid_reactant;
62 SharedPtr<NeumannBCAbstract> catalytic_wall;
64 if( thermochem_lib ==
"cantera" )
66 #ifdef GRINS_HAVE_CANTERA
67 this->build_wall_ptr<CanteraMixture>(input,material,gamma_ptr,gas_reactant,solid_reactant,
68 product,species_vars,T_var,p0,catalytic_wall);
70 libmesh_error_msg(
"Error: Cantera not enabled in this configuration. Reconfigure using --with-cantera option.");
73 else if( thermochem_lib ==
"antioch" )
75 #ifdef GRINS_HAVE_ANTIOCH
76 this->build_wall_ptr<AntiochChemistry>(input,material,gamma_ptr,gas_reactant,solid_reactant,
77 product,species_vars,T_var,p0,catalytic_wall);
79 libmesh_error_msg(
"Error: Antioch not enabled in this configuration. Reconfigure using --with-antioch option.");
83 libmesh_error_msg(
"ERROR: Invalid thermochemistry library "+thermochem_lib+
"!");
85 return catalytic_wall;
void parse_reactants_and_product(const std::string &reaction, std::string &gas_reactant, std::string &solid_reactant, std::string &product) const
template<typename ChemistryType >
void GRINS::GasSolidCatalyticWallNeumannBCFactoryImpl::build_wall_ptr |
( |
const GetPot & |
input, |
|
|
const std::string & |
material, |
|
|
SharedPtr< CatalycityBase > & |
gamma_ptr, |
|
|
const std::string & |
gas_reactant, |
|
|
const std::string & |
solid_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 63 of file gas_solid_catalytic_wall_neumann_bc_factory_impl.h.
74 SharedPtr<ChemistryType> chem_ptr(
new ChemistryType(input,material) );
76 catalytic_wall.reset(
new GasSolidCatalyticWall<ChemistryType>
82 chem_ptr->species_index(gas_reactant),
83 chem_ptr->species_index(solid_reactant),
84 chem_ptr->species_index(product) ) );
void GRINS::GasSolidCatalyticWallNeumannBCFactoryImpl::parse_reactants_and_product |
( |
const std::string & |
reaction, |
|
|
std::string & |
gas_reactant, |
|
|
std::string & |
solid_reactant, |
|
|
std::string & |
product |
|
) |
| const |
Definition at line 88 of file gas_solid_catalytic_wall_neumann_bc_factory_impl.C.
References GRINS::StringUtilities::split_string().
Referenced by GRINS::GasSolidCatalyticWallNeumannBCOldStyleFactory::reactant_for_catalycity().
98 std::vector<std::string> partners;
101 const std::string pre_split_reactants = partners[0];
102 product = partners[1];
104 std::vector<std::string> split_reactants;
108 if( split_reactants.size() != 2 )
110 std::string error_msg =
"ERROR: Currently, GasSolidCatalyticWall boundary condition only supports\n";
111 error_msg +=
" reactions of the form X+Y(s)->Z or Y(s)+X->X. Found ";
112 error_msg += StringUtilities::T_to_string<unsigned int>(split_reactants.size())+
" reactants.\n";
113 libmesh_error_msg(error_msg);
118 if( split_reactants[0].find(
"(s)") == split_reactants[0].npos )
121 if( split_reactants[1].find(
"(s)") == split_reactants[1].npos )
123 std::string error_msg =
"ERROR: could not find solid reactant for GasSolidCatalyticWall!\n";
124 error_msg +=
" Found reactants "+split_reactants[0]+
", "+split_reactants[1]+
"\n";
125 libmesh_error_msg(error_msg);
129 gas_reactant = split_reactants[0];
130 solid_reactant = split_reactants[1].substr(0,split_reactants[1].find(
"(s)"));
137 if( split_reactants[1].find(
"(s)") != split_reactants[1].npos )
139 std::string error_msg =
"ERROR: can have only one solid reactant for GasSolidCatalyticWall!\n";
140 error_msg +=
" Found reactants "+split_reactants[0]+
", "+split_reactants[1]+
"\n";
141 libmesh_error_msg(error_msg);
144 gas_reactant = split_reactants[1];
145 solid_reactant = split_reactants[0].substr(0,split_reactants[0].find(
"(s)"));
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
The documentation for this class was generated from the following files: