OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
homogeneous_CL.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-13 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 // - Class: homogeneous_CL.h
10 // - Description: Class characterizing the macro-homogeneous catalyst layer.
11 // - Developers: Marc Secanell, Peter Dobson and Madhur Bhaiya
12 // - Id: $Id: homogeneous_CL.h 1373 2013-08-21 00:34:53Z madhur $
13 //
14 //---------------------------------------------------------------------------
15 
16 #ifndef _FUELCELLSHOP__HOMOGENEOUS_CL__H
17 #define _FUELCELLSHOP__HOMOGENEOUS_CL__H
18 
19 // Include deal.II classes
20 #include <base/parameter_handler.h>
21 #include <base/point.h>
22 #include <base/function.h>
23 #include <lac/vector.h>
24 #include <fe/fe_values.h>
25 
26 // Include openFCST routines:
27 #include "fcst_constants.h"
28 #include "conventional_CL.h"
29 #include "base_kinetics.h"
31 #include "catalyst_support_base.h"
32 #include "catalyst_base.h"
33 
34 // Include STL
35 #include "cmath"
36 #include "iostream"
37 
38 namespace FuelCellShop
39 {
40  namespace Layer
41  {
50  template <int dim>
51  class HomogeneousCL :
52  public ConventionalCL<dim>
53  {
54  public:
55 
71  static const std::string concrete_name;
72 
74 
75 
80  HomogeneousCL();
81 
86 
88 
90 
91 
95  virtual void current_density(std::vector<double>&);
96 
101  virtual void current_density(std::vector<double>& current, std::vector<double>& effectiveness)
102  {
103  current_density(current);
104  effectiveness.assign(current.size(), 1.0);
105  }
106 
111  virtual void derivative_current_density(std::map< VariableNames, std::vector<double> >& );
113 
114  protected:
116 
117 
121  HomogeneousCL(const std::string name);
122 
129  virtual void declare_parameters (const std::string& cl_section_name,
130  ParameterHandler &param) const;
131 
138  virtual void set_parameters ( const std::vector<std::string>& name_dvar,
139  const std::vector<double>& value_dvar,
140  const std::string& cl_section_name,
141  ParameterHandler &param ) const;
142 
147  void initialize (ParameterHandler &param);
149 
151 
152 
157  virtual boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > create_replica (const std::string &cl_section_name)
158  {
159  return boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > (new FuelCellShop::Layer::HomogeneousCL<dim> (cl_section_name));
160  }
162 
164 
165 
170 
171  };
172  }
173 }
174 
175 #endif