OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reaction_source_terms_base.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 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: reaction_source_terms_base.h
11 // - Description: This class is used to assemble both cell matrix and cell residual
12 // for reaction source terms in the catalyst layers for various equation classes
13 // - Developers: Marc Secanell, 2015
14 //
15 // ----------------------------------------------------------------------------
16 
17 #ifndef _FCST_FUELCELLSHOP_EQUATION_REACTION_SOURCE_TERMS_BASE_H_
18 #define _FCST_FUELCELLSHOP_EQUATION_REACTION_SOURCE_TERMS_BASE_H_
19 
20 #include <utils/fcst_constants.h>
21 
24 
25 #include <layers/catalyst_layer.h>
26 
30 
31 namespace FuelCellShop
32 {
33  namespace Equation
34  {
35 
37 
38 
43  DeclException2(VariableNotFoundForKinetics,
44  std::string,
45  std::string,
46  << "For " << arg1 << " kinetics source terms, \"" << arg2 << "\" is not found as one of the solution variables.");
48 
56  template<int dim>
58  {
59  public:
60 
62 
63 
67  ReactionSourceTermsBase(FuelCell::SystemManagement& system_management,boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data =
68  boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >());
69 
73  virtual ~ReactionSourceTermsBase();
74 
78  virtual void declare_parameters(ParameterHandler& param) const;
79 
83  virtual void initialize(ParameterHandler& param){};
84 
86 
88 
89 
96 
102  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
103 
105 
107 
108 
113  virtual void print_equation_info() const {};
114 
116 
117  protected:
118 
119 
120  };
121 
122  } // Equation
123 
124 } // FuelCellShop
125 
126 #endif
boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data
Data object for the application data to be passed to the equation classes.
Definition: equation_base.h:890
virtual void print_equation_info() const
This function prints out the info for this class.
Definition: reaction_source_terms_base.h:113
FuelCell::SystemManagement * system_management
Pointer to the external YourApplication&lt;dim&gt;::system_management object.
Definition: equation_base.h:798
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
DeclException2(VariableShouldExistForEquation, std::string, std::string,<< "The user-defined variable with name \""<< arg1<< "\" should be one of the solution variables for equation with name \""<< arg2<< "\"")
Exception thrown when a particular variable required by the equation class, does not exist in the use...
ReactionSourceTermsBase(FuelCell::SystemManagement &system_management, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
Constructor.
virtual void initialize(ParameterHandler &param)
Initialize parameters.
Definition: reaction_source_terms_base.h:83
This class assembles the reaction source terms for all other transport equations, if there&#39;s any...
Definition: reaction_source_terms_base.h:57
This is the base class used for all Equation classes.
Definition: equation_base.h:160
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters.
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:300
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
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.
Definition: reaction_source_terms_base.h:93
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
virtual void assemble_cell_residual(FuelCell::ApplicationCore::FEVector &cell_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell residual.
Definition: reaction_source_terms_base.h:100