GRINS-0.8.0
List of all members | Public Member Functions | Protected Member Functions
GRINS::CatalyticWallNeumannBCFactoryBase< ImplType > Class Template Reference

#include <catalytic_wall_neumann_bc_factory_base.h>

Inheritance diagram for GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >:
Inheritance graph
[legend]
Collaboration diagram for GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >:
Collaboration graph
[legend]

Public Member Functions

 CatalyticWallNeumannBCFactoryBase (const std::string &bc_type_name)
 
 ~CatalyticWallNeumannBCFactoryBase ()
 
- Public Member Functions inherited from GRINS::NeumannBCFactoryAbstract
 NeumannBCFactoryAbstract (const std::string &bc_type_name)
 
 ~NeumannBCFactoryAbstract ()
 
virtual libMesh::UniquePtr< NeumannBCContainercreate ()
 Creates NeumannBCContainer for this Factory object. More...
 
- Public Member Functions inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
 BCFactoryAbstract (const std::string &bc_type_name)
 
 ~BCFactoryAbstract ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPot< NeumannBCContainer >
 FactoryWithGetPot (const std::string &name)
 
 ~FactoryWithGetPot ()
 
- Public Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
virtual ~FactoryAbstract ()
 
- Public Member Functions inherited from GRINS::CatalyticWallNeumannBCFactoryCommon< ImplType >
 CatalyticWallNeumannBCFactoryCommon ()
 
 ~CatalyticWallNeumannBCFactoryCommon ()
 

Protected Member Functions

virtual SharedPtr< NeumannBCAbstractbuild_neumann_func (const GetPot &input, MultiphysicsSystem &system, const FEVariablesBase &fe_var, const std::string &section)
 Builds the NeumannBCAbstract object for Neumann boundary conditions. More...
 
std::string parse_reaction (const GetPot &input, const std::string &section) const
 Parse the reaction. More...
 
std::string parse_thermochem_model (const GetPot &input, const std::string &material) const
 
libMesh::Real parse_thermo_pressure (const GetPot &input, const std::string &material) const
 
SharedPtr< CatalycityBasebuild_catalycity (const GetPot &input, const std::string &section) const
 
- Protected Member Functions inherited from GRINS::NeumannBCFactoryAbstract
void check_for_flux (const GetPot &input, const std::string &section, const std::vector< std::string > &var_names)
 Checks that the flux variable has been set. More...
 
- Protected Member Functions inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
void check_for_multiple_expressions (const GetPot &input, const std::string &section, const std::string &var_name) const
 Ensure that there is only one expression for the [Section/var_name] variable. More...
 
void build_var_indices (const MultiphysicsSystem &system, const std::vector< std::string > &var_names, std::vector< VariableIndex > &var_indices) const
 
virtual void check_state () const
 Helper function to reduce code duplication. More...
 
virtual void reset_state ()
 Helper function to redue code duplication. More...
 
- Protected Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
 FactoryAbstract (const std::string &name)
 Constructor is protected. Use the build() method to construct Base objects. More...
 
- Protected Member Functions inherited from GRINS::CatalyticWallNeumannBCFactoryCommon< ImplType >
SharedPtr< NeumannBCAbstractbuild_catalytic_wall_common (const GetPot &input, const FEVariablesBase &fe_var, const std::string &material, const std::string &reaction, SharedPtr< CatalycityBase > &gamma_ptr, libMesh::Real p0, std::string &thermochem_lib)
 
void extract_species_vars (const FEVariablesBase &fe_var, std::vector< VariableIndex > &species_vars) const
 
void extract_material (const FEVariablesBase &fe_var, std::string &material) const
 
VariableIndex extract_temp_var () const
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
static void set_system (MultiphysicsSystem &system)
 
static void set_bc_ids (const std::set< BoundaryID > &bc_ids)
 Boundary id for the current boundary condition section. More...
 
static void set_fe_var (const FEVariablesBase &fe_var)
 Active variable for the current boundary condition. More...
 
static void set_section (const std::string &section)
 Sets the current section of the input file. More...
 
static bool have_bc_type (const std::string &bc_type)
 
- Static Public Member Functions inherited from GRINS::FactoryWithGetPot< NeumannBCContainer >
static void set_getpot (const GetPot &input)
 
- Static Public Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
static libMesh::UniquePtr< NeumannBCContainerbuild (const std::string &name)
 Use this method to build objects of type Base. More...
 
- Static Protected Member Functions inherited from GRINS::FactoryAbstract< NeumannBCContainer >
static FactoryAbstract< NeumannBCContainer > & get_factory (const std::string &name)
 Helper method that looks up the factory and returns it if present, or error if it's not. More...
 
static DerivedType & get_factory_subclass (const std::string &name)
 Like get_factory, but will downcast to DerivedType. More...
 
static std::map< std::string, FactoryAbstract< NeumannBCContainer > * > & factory_map ()
 
- Protected Attributes inherited from GRINS::NeumannBCFactoryAbstract
bool _is_homogeneous
 Track if this is a homogeneous Neumann boundary condition. More...
 
- Protected Attributes inherited from GRINS::CatalyticWallNeumannBCFactoryCommon< ImplType >
ImplType _wall_impl
 
- Static Protected Attributes inherited from GRINS::BCFactoryAbstract< NeumannBCContainer >
static MultiphysicsSystem_system
 We store only a raw pointer here because we can't make a copy. More...
 
static const std::set< BoundaryID > * _bc_ids
 BoundaryID for constructing a particular boundary condition. More...
 
static const FEVariablesBase_fe_var
 The FEVariablesBase class associated with the boundary condition being built. More...
 
static std::string _section
 
- Static Protected Attributes inherited from GRINS::FactoryWithGetPot< NeumannBCContainer >
static const GetPot * _input
 We store only a raw pointer here because we can't make a copy. More...
 

Detailed Description

template<typename ImplType>
class GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >

Definition at line 36 of file catalytic_wall_neumann_bc_factory_base.h.

Constructor & Destructor Documentation

template<typename ImplType>
GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::CatalyticWallNeumannBCFactoryBase ( const std::string &  bc_type_name)
inline

Definition at line 41 of file catalytic_wall_neumann_bc_factory_base.h.

42  : NeumannBCFactoryAbstract(bc_type_name),
43  CatalyticWallNeumannBCFactoryCommon<ImplType>()
44  {}
NeumannBCFactoryAbstract(const std::string &bc_type_name)
template<typename ImplType>
GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::~CatalyticWallNeumannBCFactoryBase ( )
inline

Definition at line 46 of file catalytic_wall_neumann_bc_factory_base.h.

46 {};

Member Function Documentation

template<typename ImplType >
SharedPtr< CatalycityBase > GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::build_catalycity ( const GetPot &  input,
const std::string &  section 
) const
protected

Definition at line 103 of file catalytic_wall_neumann_bc_factory_base.C.

References GRINS::FactoryAbstract< CatalycityBase >::build(), GRINS::FactoryWithGetPot< CatalycityBase >::set_getpot(), and GRINS::CatalycityFactoryAbstract::set_section().

105  {
108 
109  std::string catalycity_input_str = section+"/catalycity_type";
110  if( !input.have_variable(catalycity_input_str) )
111  libmesh_error_msg("ERROR: Could not find input variable "+catalycity_input_str+" !\n");
112 
113  std::string catalycity_type = input(catalycity_input_str, "none");
114 
115  libMesh::UniquePtr<CatalycityBase> catalycity_ptr = CatalycityFactoryAbstract::build(catalycity_type);
116 
117  // We need to return a SharedPtr
118  return SharedPtr<CatalycityBase>( catalycity_ptr.release() );
119  }
static void set_getpot(const GetPot &input)
static void set_section(const std::string &section)
static libMesh::UniquePtr< CatalycityBase > build(const std::string &name)
Use this method to build objects of type Base.
template<typename ImplType >
SharedPtr< NeumannBCAbstract > GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::build_neumann_func ( const GetPot &  input,
MultiphysicsSystem system,
const FEVariablesBase fe_var,
const std::string &  section 
)
protectedvirtual

Builds the NeumannBCAbstract object for Neumann boundary conditions.

Subclasses should override this function to build the NeumannBCAbstract object that corresponds to the variables passed in var_names. The FEVariableBase object corresponds to the variable associated with this boundary condition, e.g. Velocity. The section arguments corresponds to the section to parse for the flux in the input file, e.g. input(section+"/"+flux). Note that for Variables with more than one component, the flux input should be a vector the size of the var_names object, even if one of the components is zero.

Todo:
We're assuming constant thermodynamic pressure

Implements GRINS::NeumannBCFactoryAbstract.

Definition at line 37 of file catalytic_wall_neumann_bc_factory_base.C.

41  {
42  std::string reaction = this->parse_reaction(input,section);
43 
44  // Parse and construct the corresponding catalycity
45  SharedPtr<CatalycityBase> gamma_ptr = this->build_catalycity( input, section );
46 
47  std::string material;
48  this->extract_material( fe_var, material );
49 
50  // Parse thermodynamic pressure
52  libMesh::Real p0 = this->parse_thermo_pressure(input,material);
53 
54  std::string thermochem_lib = this->parse_thermochem_model( input, material );
55 
56  return this->build_catalytic_wall_common(input,fe_var,material,reaction,gamma_ptr,p0,thermochem_lib);
57  }
std::string parse_reaction(const GetPot &input, const std::string &section) const
Parse the reaction.
libMesh::Real parse_thermo_pressure(const GetPot &input, const std::string &material) const
void extract_material(const FEVariablesBase &fe_var, std::string &material) const
SharedPtr< CatalycityBase > build_catalycity(const GetPot &input, const std::string &section) const
std::string parse_thermochem_model(const GetPot &input, const std::string &material) const
SharedPtr< NeumannBCAbstract > build_catalytic_wall_common(const GetPot &input, const FEVariablesBase &fe_var, const std::string &material, const std::string &reaction, SharedPtr< CatalycityBase > &gamma_ptr, libMesh::Real p0, std::string &thermochem_lib)
template<typename ImplType >
std::string GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::parse_reaction ( const GetPot &  input,
const std::string &  section 
) const
protected

Parse the reaction.

Definition at line 60 of file catalytic_wall_neumann_bc_factory_base.C.

62  {
63  std::string reaction_input_str = section+"/catalytic_reaction";
64 
65  // First make sure the input reaction is there
66  if(!input.have_variable(reaction_input_str))
67  libmesh_error_msg("ERROR: Could not find input for "+reaction_input_str+" !\n");
68 
69  // Make sure there's only one
70  if( input.vector_variable_size(reaction_input_str) != 1 )
71  libmesh_error_msg("ERROR: Can only specify one catalytic_reaction!\n");
72 
73  return input( reaction_input_str, std::string("DIE!") );
74  }
template<typename ImplType >
libMesh::Real GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::parse_thermo_pressure ( const GetPot &  input,
const std::string &  material 
) const
protected

Definition at line 77 of file catalytic_wall_neumann_bc_factory_base.C.

79  {
80  std::string thermo_press_input_str =
81  "Materials/"+material+"/ThermodynamicPressure/value";
82 
83  if( !input.have_variable(thermo_press_input_str) )
84  libmesh_error_msg("ERROR: Could not find variable "+thermo_press_input_str+"!");
85 
86  return input(thermo_press_input_str, std::numeric_limits<libMesh::Real>::max() );
87  }
template<typename ImplType >
std::string GRINS::CatalyticWallNeumannBCFactoryBase< ImplType >::parse_thermochem_model ( const GetPot &  input,
const std::string &  material 
) const
protected

Definition at line 90 of file catalytic_wall_neumann_bc_factory_base.C.

92  {
93  std::string thermochem_input_str = "Materials/"+material+"/GasMixture/thermochemistry_library";
94 
95  if( !input.have_variable(thermochem_input_str) )
96  libmesh_error_msg("ERROR: Could not find input option "+thermochem_input_str+" !");
97 
98  return input(thermochem_input_str, std::string("DIE!") );
99  }

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