OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
electron_transport_equation.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2013 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT License.
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: electron_transport_equation.h
11 // - Description: Equation class for Electron Transport (using Ohm's law)
12 // - Developers: M. Secanell and Madhur Bhaiya
13 // - Id: $Id: electron_transport_equation.h 1354 2013-08-17 00:01:22Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FCST_FUELCELLSHOP_EQUATION_ELECTRON_TRANSPORT_EQUATION_H_
18 #define _FCST_FUELCELLSHOP_EQUATION_ELECTRON_TRANSPORT_EQUATION_H_
19 
20 // FCST includes
22 #include "utils/fcst_constants.h"
25 #include "layers/catalyst_layer.h"
26 #include "layers/solid_layer.h"
27 
28 // STD
29 #include <sstream>
30 #include <string>
31 
32 namespace FuelCellShop
33 {
34  namespace Equation
35  {
129  template<int dim>
131  {
132  public:
133 
135 
136 
141 
145  virtual ~ElectronTransportEquation();
146 
150  virtual void declare_parameters(ParameterHandler& param) const;
151 
155  virtual void initialize(ParameterHandler& param);
156 
158 
159 
161 
168  virtual void assemble_cell_matrix(AppFrame::MatrixVector& cell_matrices,
169  const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info,
171 
175  virtual void assemble_cell_residual(AppFrame::FEVector& cell_rhs,
176  const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info,
178 
182  virtual void assemble_bdry_matrix(AppFrame::MatrixVector& bdry_matrices,
183  const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info,
185 
189  virtual void assemble_bdry_residual(AppFrame::FEVector& bdry_rhs,
190  const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info,
192 
194 
196 
197 
202  virtual void print_equation_info() const;
203 
208  inline std::map<unsigned int, double> get_dirichlet_bdry_map() const
209  {
210  return dirichlet_bdry_map;
211  }
212 
217  void class_test();
219 
220  protected:
222 
223 
228  std::map<unsigned int, double> dirichlet_bdry_map;
229 
234  std::map<unsigned int, double> electron_current_flux_map;
235 
236 
238 
239 
245 
254  virtual void make_assemblers_cell_constant_data(const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info);
255 
264  virtual void make_assemblers_bdry_constant_data(const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info);
265 
272 
279 
281 
283 
284 
289  virtual void make_internal_cell_couplings();
290 
295  virtual void make_boundary_types();
296 
301  virtual void make_output_types()
302  {};
303 
305 
307 
308 
314  const std::string name_base_variable;
315 
320 
322 
324 
325 
331 
339  std::vector< std::vector< Tensor<1,dim> > > grad_phi_phiS_cell;
340 
342 
344 
345 
353  std::vector< std::vector<double> > phi_phiS_bdry;
354 
356 
361  unsigned int last_iter_cell;
362 
367  unsigned int last_iter_bdry;
368 
369  };
370 
371  } // Equation
372 
373 } // FuelCellShop
374 
375 #endif