GRINS-0.6.0
catalytic_wall_base.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_CATALYTIC_WALL_BASE_H
26 #define GRINS_CATALYTIC_WALL_BASE_H
27 
28 // Boost
29 #include "boost/scoped_ptr.hpp"
30 
31 // GRINS
32 #include "grins/catalycity_base.h"
33 
34 // libMesh
35 #include "libmesh/libmesh_common.h"
36 namespace libMesh
37 {
38  class FEMSystem;
39 }
40 
41 namespace GRINS
42 {
43 
44  // Forward declarations
45  class AssemblyContext;
46  class CachedValues;
47 
48  template<typename Chemistry>
50  {
51  public:
52 
53  CatalyticWallBase( const Chemistry& chem_mixture,
54  CatalycityBase& gamma,
55  const unsigned int reactant_species_idx );
56 
57  virtual ~CatalyticWallBase();
58 
59  virtual void apply_fluxes( AssemblyContext& context,
60  const CachedValues& cache,
61  const bool request_jacobian ) =0;
62 
63  virtual void init( const libMesh::FEMSystem& system );
64 
65  void set_axisymmetric( bool is_axisymmetric );
66 
68  libMesh::Real omega_dot( const libMesh::Real rho_s, const libMesh::Real T ) const;
69 
70  libMesh::Real domega_dot_dws( const libMesh::Real rho_s, const libMesh::Real w_s,
71  const libMesh::Real T, const libMesh::Real R ) const;
72 
73  libMesh::Real domega_dot_dT( const libMesh::Real rho_s, const libMesh::Real T ) const;
74 
75  void set_catalycity_params( const std::vector<libMesh::Real>& params );
76 
77  protected:
78 
79  const Chemistry& _chemistry;
80 
81  boost::scoped_ptr<CatalycityBase> _gamma_s;
82 
84  const libMesh::Real _C;
85 
87 
88  };
89 
90  /* ------------------------- Inline Functions -------------------------*/
91  template<typename Chemistry>
92  inline
93  libMesh::Real CatalyticWallBase<Chemistry>::omega_dot( const libMesh::Real rho_s, const libMesh::Real T ) const
94  {
95  return rho_s*(*_gamma_s)(T)*_C*std::sqrt(T);
96  }
97 
98  template<typename Chemistry>
99  inline
100  libMesh::Real CatalyticWallBase<Chemistry>::domega_dot_dws( const libMesh::Real rho_s, const libMesh::Real w_s,
101  const libMesh::Real T, const libMesh::Real R ) const
102  {
103  return (1.0/w_s - rho_s/R)*(this->omega_dot( rho_s, T ));
104  }
105 
106  template<typename Chemistry>
107  inline
108  libMesh::Real CatalyticWallBase<Chemistry>::domega_dot_dT( const libMesh::Real rho_s, const libMesh::Real T ) const
109  {
110  libMesh::Real sqrtT = std::sqrt(T);
111 
112  return rho_s*_C*( 0.5/sqrtT*(*_gamma_s)(T) + sqrtT*(*_gamma_s).dT(T) );
113  }
114 
115 } // end namespace GRINS
116 
117 #endif // GRINS_CATALYTIC_WALL_BASE_H
const libMesh::Real _C
void set_catalycity_params(const std::vector< libMesh::Real > &params)
GRINS namespace.
virtual void apply_fluxes(AssemblyContext &context, const CachedValues &cache, const bool request_jacobian)=0
CatalyticWallBase(const Chemistry &chem_mixture, CatalycityBase &gamma, const unsigned int reactant_species_idx)
libMesh::Real domega_dot_dT(const libMesh::Real rho_s, const libMesh::Real T) const
libMesh::Real omega_dot(const libMesh::Real rho_s, const libMesh::Real T) const
boost::scoped_ptr< CatalycityBase > _gamma_s
libMesh::Real domega_dot_dws(const libMesh::Real rho_s, const libMesh::Real w_s, const libMesh::Real T, const libMesh::Real R) const
virtual void init(const libMesh::FEMSystem &system)
const Chemistry & _chemistry
void set_axisymmetric(bool is_axisymmetric)

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