OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
agglomerate_ionomer_sun.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // C++ Interface: agglomerate_ionomer_sun.h
3 //
4 // Description: Used to solve a system of equations representing a
5 // spherical ionomer-filled agglomerate.
6 //
7 // Author: Marc Secanell, Phil Wardlaw
8 // University of Alberta
9 //
10 // Copyright: See COPYING file that comes with this distribution
11 //
12 //---------------------------------------------------------------------------
13 
14 #ifndef FUEL_CELL__IONOMER_AGGLOMERATE_SUN__H
15 #define FUEL_CELL__IONOMER_AGGLOMERATE_SUN__H
16 
17 
18 //------------------------------
19 // FUEL CELL DECLARATIONS
20 //-----------------------------
21 
22 #include "agglomerate_base.h"
23 #include <tafel_kinetics.h>
24 #include <fcst_variables.h>
25 #include <dual_path_kinetics.h>
26 #include <catalyst_base.h>
27 
28 namespace FuelCellShop
29 {
30  namespace MicroScale
31  {
100  {
101  public:
102 
103 
104  static const std::string concrete_name;
105 
106 
111  virtual SolutionMap compute_current ();
112 
116  virtual std::vector<double> compute_derivative_current ();
117 
121  virtual std::string get_name(){
122  return concrete_name;
123  }
124 
129  virtual double aux_volume_fraction(){
130  return 0;
131  }
132 
133 
134  protected:
135  /*
136  * Virtual function for returning film thickness in nano meters.
137  *
138  */
139  virtual double get_film_thickness(){
140  return delta_agg*1e7;
141  }
142 
143  /*
144  * Virtual function for returning agglomerate radius in nano meters.
145  *
146  */
147  virtual double get_radius(){
148  return r_agg*1e7;
149  }
150 
151  /*
152  * Set the composition and structure of the agglomerate
153  */
154  virtual void set_structure ();
155 
157 
158  virtual boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase> create_replica ()
159  {
160  return boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase> (new FuelCellShop::MicroScale::IonomerAgglomerateSun ());
161  }
162 
166 
167  /*
168  * Protected virtual member function for declaring parameters, pure
169  * in MicroScaleBase, implemented here in IonomerAgglomerateSun.
170  * Calls parent AgglomerateBase
171  */
172  virtual void declare_parameters (ParameterHandler &param) const
173  {
175  param.enter_subsection(concrete_name);{
176  //No parameters at the moment
177  }
178  param.leave_subsection();
179  }
180 
181  /*
182  * Protected virtual member function for initializing parameters, pure
183  * in MicroScaleBase, implemented here in IonomerAgglomerateSun.
184  * Calls parent AgglomerateBase
185  */
186  virtual void initialize (ParameterHandler &param)
187  {
189  param.enter_subsection(concrete_name);{
190  //No parameters at the moment
191  }
192  param.leave_subsection();
193 
194  }
195 
196 
197  private:
198 
199  /* Private member function to check kinetics are appropriate for analytical formulation.
200  * Throws exception in event of inappropriate kinetic conditions.
201  */
202  void check_kinetics();
203 
204  /*bool to monitor if we have checked kinetic conditions */
206 
207 
209  double compute_Er (const double k_c, const double D);
210 
212  double compute_dEr (const double k_c,const double dk_c, const double D);
213 
215  double epsilon_V;
216 
217 
218  };// class IonomerAgglomerateSun
219 
220  } // namespace Layer
221 
222 } // namespace FuelCellShop
223 
224 #endif
225 
double compute_dEr(const double k_c, const double dk_c, const double D)
Function to compute the derivative of the effectiveness of the agglomerate core.
virtual void declare_parameters(ParameterHandler &param) const
virtual std::vector< double > compute_derivative_current()
Function to compute the derivative of the current density at the local operating conditions;.
static IonomerAgglomerateSun const * PROTOTYPE
Definition: agglomerate_ionomer_sun.h:156
double r_agg
Definition: agglomerate_base.h:361
double delta_agg
Definition: agglomerate_base.h:367
The base class for agglomerate objects in OpenFCST.
Definition: agglomerate_base.h:70
Convenient storage object for SolutionVariables.
Definition: fcst_variables.h:447
virtual SolutionMap compute_current()
Main function of the class used to compute the current over the whole agglomerate at the local operat...
virtual void declare_parameters(ParameterHandler &param) const
Definition: agglomerate_ionomer_sun.h:172
virtual double get_radius()
Definition: agglomerate_ionomer_sun.h:147
virtual double aux_volume_fraction()
Returns extra contribution to volume of layer.
Definition: agglomerate_ionomer_sun.h:129
Analytical solution to an ionomer-filled agglomerate problem in 1D.
Definition: agglomerate_ionomer_sun.h:99
virtual std::string get_name()
Return name of class instance, i.e.
Definition: agglomerate_ionomer_sun.h:121
static const std::string concrete_name
Definition: agglomerate_ionomer_sun.h:104
virtual void initialize(ParameterHandler &param)
Definition: agglomerate_ionomer_sun.h:186
virtual void initialize(ParameterHandler &param)
double compute_Er(const double k_c, const double D)
Function to compute the effectiveness of the agglomerate core.
bool checked_kinetics
Definition: agglomerate_ionomer_sun.h:205
virtual double get_film_thickness()
Definition: agglomerate_ionomer_sun.h:139
virtual boost::shared_ptr< FuelCellShop::MicroScale::MicroScaleBase > create_replica()
This member function is used to create an object of MicroScaleBase.
Definition: agglomerate_ionomer_sun.h:158
double epsilon_V
Catalyst layer porosity.
Definition: agglomerate_ionomer_sun.h:215