OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dual_path_kinetics.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 //
10 // - Class: dual_path_kinetics.h
11 // - Description: Dual Path Kinetics model for hydrogen oxidation reaction
12 // - Developers: M. Secanell, M. Moore and Madhur Bhaiya
13 // - $Id: dual_path_kinetics.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__DUAL_PATH_KINETICS_H
18 #define _FUELCELLSHOP__DUAL_PATH_KINETICS_H
19 
20 // Include openFCST routines:
22 
23 // Include deal.II classes
24 #include <deal.II/base/parameter_handler.h>
25 #include <deal.II/base/point.h>
26 #include <deal.II/base/function.h>
27 #include <deal.II/lac/vector.h>
28 #include <deal.II/fe/fe_values.h>
29 
30 //Include STL
31 #include<cmath>
32 #include<iostream>
33 
34 using namespace dealii;
35 
36 namespace FuelCellShop
37 {
38  namespace Kinetics
39  {
57  public BaseKinetics
58  {
59  public:
61 
62 
73  static const std::string concrete_name;
75 
77 
78 
82 
88  DualPathKinetics(const bool);
89 
94 
98  virtual void declare_parameters(ParameterHandler &param) const;
99 
104  virtual void initialize(ParameterHandler &param);
106 
108 
109 
113  virtual void set_reaction_kinetics(const ReactionNames & name)
114  {
115  if (name == HOR)
116  name_reaction_kinetics = name;
117 
118  else
119  {
120  const std::type_info& info = typeid(*this);
121  FcstUtilities::log << "Only HOR reaction is to be implemented in " << __FUNCTION__ << " called in Class " << info.name() << std::endl;
122  exit(1);
123  }
124  }
126 
128 
129 
134  virtual void current_density (std::vector<double>&);
135 
145  virtual void derivative_current (std::map< VariableNames, std::vector<double> >&);
146 
148 
149  protected:
151 
152 
157  virtual boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics > create_replica ()
158  {
159  return boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics > (new FuelCellShop::Kinetics::DualPathKinetics ( ));
160  }
166 
168 
169 
173  virtual void init_kin_param()
174  {
175  Assert( !kin_param_initialized, ExcInternalError() );
176  Assert( catalyst != NULL, ExcMessage("Catalyst object not initialized in the DualPathKinetics object.") );
177  Assert( catalyst->get_reaction_name() == HOR, ExcMessage("Catalyst object in the DualPathKinetics not set to HOR reaction name.") );
178  Assert( phi_m.is_initialized() && phi_s.is_initialized() && T.is_initialized(), ExcMessage("Either phi_m/phi_s/T is not set in the DualPathKinetics object.") );
179  Assert( reactants_map.find(hydrogen_concentration) != reactants_map.end(), ExcMessage("Hydrogen concentration is not set in the DualPathKinetics object.") );
180 
181  std::vector<VariableNames> names(1, hydrogen_concentration);
182  std::map< VariableNames, double > cref_map;
183  catalyst->reference_concentration(names, cref_map);
184  ref_conc_H2 = cref_map[hydrogen_concentration];
185 
186  kin_param_initialized = true;
187  }
188 
190  double ref_conc_H2;
191 
193  double j_0T;
194 
196  double j_0H;
197 
200 
203 
205 
206 
207  };
208 
209  } //Kinetics
210 
211 } //FuelCellShop
212 
213 #endif //_FUELCELLSHOP__DUAL_PATH_KINETICS_H
Definition: system_management.h:181
double j_0H
HV exchange current density [A/cm^2].
Definition: dual_path_kinetics.h:196
Definition: system_management.h:88
double ref_potential
Reference potential.
Definition: dual_path_kinetics.h:202
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
virtual void set_reaction_kinetics(const ReactionNames &name)
Member function used to set the reaction name in the Dual path kinetics object.
Definition: dual_path_kinetics.h:113
This class will contain the implementation of the dual path kinetic kinetic model as developed by Wan...
Definition: dual_path_kinetics.h:56
virtual boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics > create_replica()
This member function is used to create an object of type gas diffusion layer.
Definition: dual_path_kinetics.h:157
double potential_constant
Potential range constant.
Definition: dual_path_kinetics.h:199
static const std::string concrete_name
Concrete name used for objects of this class.
Definition: dual_path_kinetics.h:73
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
ReactionNames
Definition: system_management.h:177
Definition: system_management.h:80
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:102
virtual void init_kin_param()
Method used to initialize reference concentration of hydrogen for the reaction, and number of quadrat...
Definition: dual_path_kinetics.h:173
double j_0T
TV exchange current density [A/cm^2].
Definition: dual_path_kinetics.h:193
static DualPathKinetics const * PROTOTYPE
Create prototype for the layer.
Definition: dual_path_kinetics.h:164
double ref_conc_H2
Reference concentration for hydrogen, .
Definition: dual_path_kinetics.h:190