GRINS-0.6.0
reacting_low_mach_navier_stokes_bc_handling.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef GRINS_REACTING_LOW_MACH_NAVIER_STOKES_BC_HANDLING_H
26 #define GRINS_REACTING_LOW_MACH_NAVIER_STOKES_BC_HANDLING_H
27 
28 // shared_ptr
29 #include "boost/tr1/memory.hpp"
30 
31 // GRINS
34 
35 namespace GRINS
36 {
37  template<typename Chemistry>
39  {
40  public:
41 
42  ReactingLowMachNavierStokesBCHandling( const std::string& physics_name, const GetPot& input,
43  const Chemistry& chem_mixture );
44 
46 
47  virtual int string_to_int( const std::string& bc_type_in ) const;
48 
49  virtual void init_bc_data( const libMesh::FEMSystem& system );
50 
51  virtual void init_bc_types( const GRINS::BoundaryID bc_id,
52  const std::string& bc_id_string,
53  const int bc_type,
54  const std::string& bc_vars,
55  const std::string& bc_value,
56  const GetPot& input );
57 
58  virtual void user_init_dirichlet_bcs( libMesh::FEMSystem* system,
59  libMesh::DofMap& dof_map,
60  GRINS::BoundaryID bc_id,
61  GRINS::BCType bc_type ) const;
62 
63  virtual void init_dirichlet_bcs( libMesh::FEMSystem* system ) const;
64 
65  virtual void user_apply_neumann_bcs( AssemblyContext& context,
66  const GRINS::CachedValues& cache,
67  const bool request_jacobian,
68  const GRINS::BoundaryID bc_id,
69  const GRINS::BCType bc_type ) const;
70 
71  void set_species_bc_type( GRINS::BoundaryID bc_id, int bc_type );
72 
73  void set_species_bc_values( GRINS::BoundaryID bc_id, const std::vector<libMesh::Real>& species_values );
74 
75  libMesh::Real get_species_bc_value( GRINS::BoundaryID bc_id, unsigned int species ) const;
76 
79 
80  protected:
81 
82  void build_catalycities( const GetPot& input,
83  const std::string& reactant,
84  const std::string& bc_id_string,
85  const BoundaryID bc_id,
86  boost::scoped_ptr<CatalycityBase>& gamma_r );
87 
88  // We need a another container to stash dirichlet values for the speccies
89  std::map< GRINS::BoundaryID, std::vector<libMesh::Real> > _species_bc_values;
90 
91  // We also need another map container
92  std::vector<std::pair<BoundaryID,BCType> > _species_bc_map;
93 
94  unsigned int _n_species;
95  std::vector<std::string> _species_var_names;
96  std::vector<GRINS::VariableIndex> _species_vars;
97 
98  std::multimap<BoundaryID, std::tr1::shared_ptr<CatalyticWallBase<Chemistry> > > _catalytic_walls;
99 
100  const Chemistry& _chemistry;
101 
102  private:
103 
105 
106  // Needs to start larger than the LMNS_BC_TYPES end
113 
114  };
115 }
116 
117 #endif // GRINS_REACTING_LOW_MACH_NAVIER_STOKES_BC_HANDLING_H
virtual void init_dirichlet_bcs(libMesh::FEMSystem *system) const
virtual void user_init_dirichlet_bcs(libMesh::FEMSystem *system, libMesh::DofMap &dof_map, GRINS::BoundaryID bc_id, GRINS::BCType bc_type) const
Base class for reading and handling boundary conditions for physics classes.
virtual void init_bc_data(const libMesh::FEMSystem &system)
Override this method to initialize any system-dependent data.
libMesh::boundary_id_type BoundaryID
More descriptive name of the type used for boundary ids.
Definition: var_typedefs.h:54
GRINS namespace.
virtual void init_bc_types(const GRINS::BoundaryID bc_id, const std::string &bc_id_string, const int bc_type, const std::string &bc_vars, const std::string &bc_value, const GetPot &input)
virtual int string_to_int(const std::string &bc_type_in) const
void build_catalycities(const GetPot &input, const std::string &reactant, const std::string &bc_id_string, const BoundaryID bc_id, boost::scoped_ptr< CatalycityBase > &gamma_r)
std::multimap< BoundaryID, std::tr1::shared_ptr< CatalyticWallBase< Chemistry > > > _catalytic_walls
virtual void user_apply_neumann_bcs(AssemblyContext &context, const GRINS::CachedValues &cache, const bool request_jacobian, const GRINS::BoundaryID bc_id, const GRINS::BCType bc_type) const
int BCType
Definition: bc_types.h:32
void set_species_bc_values(GRINS::BoundaryID bc_id, const std::vector< libMesh::Real > &species_values)
std::map< GRINS::BoundaryID, std::vector< libMesh::Real > > _species_bc_values
libMesh::Real get_species_bc_value(GRINS::BoundaryID bc_id, unsigned int species) const
std::vector< std::pair< BoundaryID, BCType > > _species_bc_map
CatalyticWallBase< Chemistry > * get_catalytic_wall(const BoundaryID bc_id)

Generated on Mon Jun 22 2015 21:32:19 for GRINS-0.6.0 by  doxygen 1.8.9.1