GRINS-0.8.0
gas_solid_catalytic_wall.h
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 #ifndef GRINS_GAS_SOLID_CATALYTIC_WALL_H
26 #define GRINS_GAS_SOLID_CATALYTIC_WALL_H
27 
28 // GRINS
29 #include "grins/var_typedefs.h"
31 
32 namespace GRINS
33 {
34 
35  template<typename Chemistry>
36  class GasSolidCatalyticWall : public CatalyticWallBase<Chemistry>
37  {
38  public:
39 
40  GasSolidCatalyticWall(SharedPtr<Chemistry>& chem,
41  SharedPtr<CatalycityBase>& gamma,
42  const std::vector<VariableIndex>& species_vars,
43  VariableIndex T_var,
44  libMesh::Real p0,
45  unsigned int reactant_gas_species_idx,
46  unsigned int reactant_solid_species_idx,
47  unsigned int product_species_idx);
48 
50  GasSolidCatalyticWall( const Chemistry& chem_mixture,
51  CatalycityBase& gamma,
52  const unsigned int reactant_gas_species_idx,
53  const unsigned int reactant_solid_species_idx,
54  const unsigned int product_species_idx );
55 
57 
59  virtual void init( const libMesh::FEMSystem& system );
60 
61  virtual bool eval_flux( bool compute_jacobian,
62  AssemblyContext& context,
63  libMesh::Real sign,
64  bool is_axisymmetric );
65 
67  virtual void apply_fluxes( AssemblyContext& context,
68  const CachedValues& cache,
69  const bool request_jacobian );
70 
71  libMesh::Real compute_reactant_gas_mass_flux( const libMesh::Real rho,
72  const libMesh::Real Y_r,
73  const libMesh::Real T );
74 
75  // kg/m^2-s
76  libMesh::Real compute_reactant_solid_mass_consumption( const libMesh::Real rho,
77  const libMesh::Real Y_r,
78  const libMesh::Real T );
79 
80  libMesh::Real compute_product_mass_flux( const libMesh::Real rho,
81  const libMesh::Real Y_r,
82  const libMesh::Real T );
83 
84  libMesh::Real compute_reactant_solid_mass_consumption_dT( const libMesh::Real rho,
85  const libMesh::Real Y_r,
86  const libMesh::Real T );
87 
88  libMesh::Real compute_reactant_solid_mass_consumption_dYs( const libMesh::Real rho,
89  const std::vector<libMesh::Real> Y,
90  const libMesh::Real T );
91 
92  protected:
93 
94  const unsigned int _reactant_gas_species_idx;
96 
97  const unsigned int _reactant_solid_species_idx;
98 
99  const unsigned int _product_species_idx;
101 
102  };
103 
104  template<typename Chemistry>
105  inline
107  const libMesh::Real Y_r,
108  const libMesh::Real T )
109  {
110  const libMesh::Real rho_r = rho*Y_r;
111 
112  const libMesh::Real omega_dot = this->omega_dot( rho_r, T );
113 
114  return -omega_dot;
115  }
116 
117  template<typename Chemistry>
118  inline
120  const libMesh::Real Y_r,
121  const libMesh::Real T )
122  {
123  const libMesh::Real rho_r = rho*Y_r;
124 
125  const libMesh::Real M_r = this->_chemistry.M(_reactant_gas_species_idx);
126 
127  const libMesh::Real M_solid = this->_chemistry.M(_reactant_solid_species_idx);
128 
129  const libMesh::Real omega_dot = this->omega_dot( rho_r, T )*M_solid/M_r;
130 
131  return -omega_dot;
132  }
133 
134  template<typename Chemistry>
135  inline
136  libMesh::Real GasSolidCatalyticWall<Chemistry>::compute_product_mass_flux( const libMesh::Real rho,
137  const libMesh::Real Y_r,
138  const libMesh::Real T )
139  {
140  const libMesh::Real rho_r = rho*Y_r;
141 
142  const libMesh::Real M_r = this->_chemistry.M(_reactant_gas_species_idx);
143 
144  const libMesh::Real M_p = this->_chemistry.M(_product_species_idx);
145 
146  const libMesh::Real omega_dot = this->omega_dot( rho_r, T )*M_p/M_r;
147 
148  return omega_dot;
149  }
150 
151  template<typename Chemistry>
152  inline
154  const libMesh::Real Y_r,
155  const libMesh::Real T )
156  {
157  const libMesh::Real rho_r = rho*Y_r;
158 
159  const libMesh::Real M_r = this->_chemistry.M(_reactant_gas_species_idx);
160 
161  const libMesh::Real M_solid = this->_chemistry.M(_reactant_solid_species_idx);
162 
163  const libMesh::Real domega_dot_dT = this->domega_dot_dT( rho_r, T )*M_solid/M_r;
164 
165  return -domega_dot_dT;
166  }
167 
168  template<typename Chemistry>
169  inline
171  const std::vector<libMesh::Real> Y,
172  const libMesh::Real T )
173  {
174  const libMesh::Real Y_r = Y[_reactant_gas_species_idx];
175 
176  const libMesh::Real rho_r = rho*Y_r;
177 
178  const libMesh::Real M_r = this->_chemistry.M(_reactant_gas_species_idx);
179 
180  const libMesh::Real M_solid = this->_chemistry.M(_reactant_solid_species_idx);
181 
182  const libMesh::Real R = this->_chemistry.R_mix(Y);
183 
184  const libMesh::Real domega_dot_dYs = this->domega_dot_dws( rho_r, Y_r, T, R )*M_solid/M_r;
185 
186  return -domega_dot_dYs;
187  }
188 
189 } // end namespace GRINS
190 
191 #endif // GRINS_GAS_SOLID_CATALYTIC_WALL_H
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
Definition: var_typedefs.h:42
const unsigned int _reactant_gas_species_idx
virtual void init(const libMesh::FEMSystem &system)
Deprecated.
libMesh::Real compute_reactant_gas_mass_flux(const libMesh::Real rho, const libMesh::Real Y_r, const libMesh::Real T)
const unsigned int _reactant_solid_species_idx
libMesh::Real compute_reactant_solid_mass_consumption(const libMesh::Real rho, const libMesh::Real Y_r, const libMesh::Real T)
GRINS namespace.
libMesh::Real compute_reactant_solid_mass_consumption_dT(const libMesh::Real rho, const libMesh::Real Y_r, const libMesh::Real T)
virtual bool eval_flux(bool compute_jacobian, AssemblyContext &context, libMesh::Real sign, bool is_axisymmetric)
GasSolidCatalyticWall(SharedPtr< Chemistry > &chem, SharedPtr< CatalycityBase > &gamma, const std::vector< VariableIndex > &species_vars, VariableIndex T_var, libMesh::Real p0, unsigned int reactant_gas_species_idx, unsigned int reactant_solid_species_idx, unsigned int product_species_idx)
virtual void apply_fluxes(AssemblyContext &context, const CachedValues &cache, const bool request_jacobian)
Deprecated.
libMesh::Real compute_reactant_solid_mass_consumption_dYs(const libMesh::Real rho, const std::vector< libMesh::Real > Y, const libMesh::Real T)
libMesh::Real compute_product_mass_flux(const libMesh::Real rho, const libMesh::Real Y_r, const libMesh::Real T)
libMesh::Real rho(libMesh::Real T, libMesh::Real p0, libMesh::Real R_mix) const

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