GRINS-0.8.0
catalytic_wall_base.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 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 // This class
27 
28 // GRINS
29 #include "grins/math_constants.h"
30 #include "grins/assembly_context.h"
31 #include "grins/cached_values.h"
32 
33 // libMesh
34 #include "libmesh/fem_system.h"
35 
36 namespace GRINS
37 {
38  template<typename Chemistry>
40  SharedPtr<CatalycityBase>& gamma,
41  const std::vector<VariableIndex>& species_vars,
42  VariableIndex T_var,
43  libMesh::Real p0,
44  unsigned int reactant_species_idx)
45  : _chem_ptr(chem),
46  _chemistry(*(chem.get())),// This will be removed after NeumannBC refactoring
47  _gamma_ptr(gamma),
48  _C( std::sqrt( chem->R(reactant_species_idx)/(GRINS::Constants::two_pi) ) ),
49  _species_vars(species_vars),
50  _T_var(T_var),
51  _p0(p0)
52  {}
53 
54  template<typename Chemistry>
56  CatalycityBase& gamma,
57  const unsigned int reactant_species_idx )
58  : _chemistry(chemistry),
59  _gamma_s( gamma.clone() ),
60  _C( std::sqrt( chemistry.R(reactant_species_idx)/(GRINS::Constants::two_pi) ) )
61  {}
62 
63  template<typename Chemistry>
64  void CatalyticWallBase<Chemistry>::set_catalycity_params( const std::vector<libMesh::Real>& params )
65  {
66  if(_gamma_s)
67  {
68  libmesh_deprecated();
69  _gamma_s->set_params( params );
70  }
71  else if( _gamma_ptr)
72  _gamma_ptr->set_params( params );
73  else
74  libmesh_error();
75  }
76 
77  template<typename Chemistry>
78  void CatalyticWallBase<Chemistry>::register_parameter(const std::string & param_name,
80  {
81  _gamma_ptr->register_parameter(param_name,param_pointer);
82  }
83 } // end namespace GRINS
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
Definition: var_typedefs.h:42
void set_catalycity_params(const std::vector< libMesh::Real > &params)
GRINS namespace.
virtual void register_parameter(const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
Each subclass will register its copy of an independent.
CatalyticWallBase(SharedPtr< Chemistry > &chem, SharedPtr< CatalycityBase > &gamma, const std::vector< VariableIndex > &species_vars, VariableIndex T_var, libMesh::Real p0, unsigned int reactant_species_idx)
const libMesh::Real two_pi

Generated on Tue Dec 19 2017 12:47:27 for GRINS-0.8.0 by  doxygen 1.8.9.1