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:
21 #include "base_kinetics.h"
22 
23 // Include deal.II classes
24 #include <base/parameter_handler.h>
25 #include <base/point.h>
26 #include <base/function.h>
27 #include <lac/vector.h>
28 #include <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  {
54  public BaseKinetics
55  {
56  public:
58 
59 
70  static const std::string concrete_name;
72 
74 
75 
79  virtual void set_reaction_kinetics(const ReactionNames & name)
80  {
81  if (name == HOR)
82  name_reaction_kinetics = name;
83 
84  else
85  {
86  const std::type_info& info = typeid(*this);
87  FcstUtilities::log << "Only HOR reaction is to be implemented in " << __FUNCTION__ << " called in Class " << info.name() << std::endl;
88  exit(1);
89  }
90  }
92 
94 
95 
98  virtual void current_density (std::vector<double>&);
99 
106  virtual void derivative_current (std::map< VariableNames, std::vector<double> >&);
107 
109 
111 
112 
116 
122  DualPathKinetics(const bool);
123 
127  ~DualPathKinetics();
128 
132  virtual void declare_parameters(ParameterHandler &param) const;
133 
138  virtual void initialize(ParameterHandler &param);
140 
141  protected:
143 
144 
149  virtual boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics > create_replica ()
150  {
151  return boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics > (new FuelCellShop::Kinetics::DualPathKinetics ( ));
152  }
158 
160 
161 
165  virtual void init_kin_param()
166  {
167  Assert( !kin_param_initialized, ExcInternalError() );
168  Assert( catalyst != NULL, ExcMessage("Catalyst object not initialized in the DualPathKinetics object.") );
169  Assert( catalyst->get_reaction_name() == HOR, ExcMessage("Catalyst object in the DualPathKinetics not set to HOR reaction name.") );
170  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.") );
171  Assert( reactants_map.find(hydrogen_concentration) != reactants_map.end(), ExcMessage("Hydrogen concentration is not set in the DualPathKinetics object.") );
172 
173  std::vector<VariableNames> names(1, hydrogen_concentration);
174  std::map< VariableNames, double > cref_map;
175  catalyst->reference_concentration(names, cref_map);
176  ref_conc_H2 = cref_map[hydrogen_concentration];
177 
178  kin_param_initialized = true;
179  }
180 
182  double ref_conc_H2;
183 
185  double j_0T;
186 
188  double j_0H;
189 
192 
195 
197 
198 
199  };
200 
201  } //Kinetics
202 
203 } //FuelCellShop
204 
205 #endif //_FUELCELLSHOP__DUAL_PATH_KINETICS_H
Definition: system_management.h:152
double j_0H
HV exchange current density [A/cm^2].
Definition: dual_path_kinetics.h:188
Definition: system_management.h:87
double ref_potential
Reference potential.
Definition: dual_path_kinetics.h:194
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:62
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:79
This class will contain the implementation of the dual path kinetic kinetic model as developed by Wan...
Definition: dual_path_kinetics.h:53
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:149
double potential_constant
Potential range constant.
Definition: dual_path_kinetics.h:191
static const std::string concrete_name
Concrete name used for objects of this class.
Definition: dual_path_kinetics.h:70
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
ReactionNames
Definition: system_management.h:148
Definition: system_management.h:79
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:107
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:165
double j_0T
TV exchange current density [A/cm^2].
Definition: dual_path_kinetics.h:185
static DualPathKinetics const * PROTOTYPE
Create prototype for the layer.
Definition: dual_path_kinetics.h:156
double ref_conc_H2
Reference concentration for hydrogen, .
Definition: dual_path_kinetics.h:182