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) 2006-2015 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: This class describes steady-state electron transport using Ohm's law
12 // - Developers: Marc Secanell, Madhur Bhaiya, Valentin N. Zingan
13 // - Id: $Id$
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"
23 #include "layers/channel.h"
26 #include "layers/catalyst_layer.h"
27 #include "layers/solid_layer.h"
28 
29 // STD
30 #include <sstream>
31 #include <string>
32 
33 namespace FuelCellShop
34 {
35  namespace Equation
36  {
129  template<int dim>
131  {
132  public:
133 
135 
136 
141 
145  virtual ~ElectronTransportEquation();
146 
150  virtual void declare_parameters(ParameterHandler& param) const;
151 
159  virtual void set_parameters(const std::vector<std::string>& name_dvar,
160  const std::vector<double>& value_dvar,
161  ParameterHandler& param);
162 
166  virtual void initialize(ParameterHandler& param);
167 
169 
172 
182 
189 
196 
203 
205 
207 
208 
213  virtual void print_equation_info() const;
214 
219  void class_test();
221 
222  protected:
224 
225 
230  std::map<unsigned int, double> electron_current_flux_map;
231 
232 
234 
235 
241 
251 
261 
268 
275 
277 
279 
280 
285  virtual void make_internal_cell_couplings();
286 
288 
290 
291 
296 
298 
300 
301 
306  Tensor<2,dim> sigmaSeff_cell;
307 
315  std::vector< std::vector< Tensor<1,dim> > > grad_phi_phiS_cell;
316 
318 
320 
321 
329  std::vector< std::vector<double> > phi_phiS_bdry;
330 
332 
337  unsigned int last_iter_cell;
338 
343  unsigned int last_iter_bdry;
344 
345  };
346 
347  } // Equation
348 
349 } // FuelCellShop
350 
351 #endif
virtual void make_assemblers_bdry_variable_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
This function computes Local CG FEM based assemblers - variable data (boundary) .
Tensor< 2, dim > sigmaSeff_cell
Effective electronic conductivity, [S/cm], of the cell.
Definition: electron_transport_equation.h:306
virtual void set_parameters(const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler &param)
Set parameters using the parameter file, in order to run parametric/optimization studies.
virtual void assemble_cell_matrix(FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell matrix.
FuelCell::SystemManagement * system_management
Pointer to the external YourApplication&lt;dim&gt;::system_management object.
Definition: equation_base.h:817
std::vector< std::vector< double > > phi_phiS_bdry
shape functions.
Definition: electron_transport_equation.h:329
virtual void print_equation_info() const
The function printing out the equations info.
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters.
virtual void assemble_bdry_matrix(FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local boundary matrix.
virtual void make_assemblers_generic_constant_data()
This function computes Local CG FEM based assemblers - constant data (generic).
virtual void make_assemblers_cell_variable_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
This function computes Local CG FEM based assemblers - variable data (cell) .
This class deals with Electron Transport Equation.
Definition: electron_transport_equation.h:130
void class_test()
This member function creates an object of its own type and runs test to diagnose if there are any pro...
ElectronTransportEquation(FuelCell::SystemManagement &system_management)
Constructor.
unsigned int last_iter_cell
Variable used to store the index in cell_info-&gt;global_data of the previous Newton solution The soluti...
Definition: electron_transport_equation.h:337
virtual void initialize(ParameterHandler &param)
Initialize parameters.
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
std::vector< std::vector< Tensor< 1, dim > > > grad_phi_phiS_cell
shape function gradients.
Definition: electron_transport_equation.h:315
virtual void assemble_cell_residual(FuelCell::ApplicationCore::FEVector &cell_rhs, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell residual.
unsigned int last_iter_bdry
Variable used to store the index in bdry_info-&gt;global_data of the previous Newton solution The soluti...
Definition: electron_transport_equation.h:343
std::map< unsigned int, double > electron_current_flux_map
std::map&lt; unsigned int, double &gt; container for details regarding Galvanostatic boundary conditions...
Definition: electron_transport_equation.h:230
virtual void make_internal_cell_couplings()
This function fills out internal_cell_couplings.
This class contains generic data and methods heavily used by all derived equation classes...
Definition: equation_base.h:199
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
virtual void assemble_bdry_residual(FuelCell::ApplicationCore::FEVector &bdry_rhs, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local boundary residual.
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_base.h:121
virtual void make_assemblers_cell_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
This function computes Local CG FEM based assemblers - constant data (cell) and allocates the memor...
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:39
VariableInfo phi_s
VariableInfo structure corresponding to &quot;electronic_electrical_potential&quot;.
Definition: electron_transport_equation.h:295
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
virtual void make_assemblers_bdry_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info)
This function computes Local CG FEM based assemblers - constant data (boundary) and allocates the m...