OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
agglomerate_ionomer_analytical.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-2013 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: agglomerate_ionomer_analytical.h
11 // - Description: Used to solve a system of equations representing a spherical ionomer-filled agglomerate.
12 // - Developers: Peter Dobson <pdobson@ualberta.ca>
13 // Marc Secanell Gallart, University of Alberta
14 // - $Id: agglomerate_ionomer_analytical.h 2605 2014-08-15 03:36:44Z secanell $
15 //
16 // ----------------------------------------------------------------------------
17 
18 #ifndef FUEL_CELL__IONOMER_AGGLOMERATE_ANALYTICAL__H
19 #define FUEL_CELL__IONOMER_AGGLOMERATE_ANALYTICAL__H
20 
21 
22 //------------------------------
23 // FUEL CELL DECLARATIONS
24 //-----------------------------
25 
31 
32 
33 namespace FuelCellShop
34 {
35  namespace MicroScale
36  {
77  {
78  public:
79 
80 
81  static const std::string concrete_name;
82 
83  /*
84  * Set the composition and structure of the agglomerate
85  */
86 
87 
92  virtual SolutionMap compute_current ( );
93 
97  virtual std::vector<double> compute_derivative_current ();
98 
102  virtual std::string get_name(){
103  return concrete_name;
104  }
105 
109  virtual double aux_volume_fraction(){
110  return 0;
111  }
112 
113 
114 
115  protected:
116  /*
117  * Virtual function for returning film thickness in nano meters.
118  *
119  */
120  virtual double get_film_thickness(){
121  return delta_agg*1e7;
122  }
123 
124  /*
125  * Virtual function for returning agglomerate radius in nano meters.
126  *
127  */
128  virtual double get_radius(){
129  return r_agg*1e7;
130  }
131 
132  /*
133  * Set the composition and structure of the agglomerate
134  */
135  virtual void set_structure ();
136 
137  //name Instance Delivery (Prototype)
139 
143  virtual boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase> create_replica ()
144  {
145  return boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase> (new FuelCellShop::MicroScale::IonomerAgglomerateAnalytical ());
146  }
147 
151 
152  /*
153  * Protected virtual member function for declaring parameters, pure
154  * in MicroScaleBase, implemented here in IonomerAgglomerateAnalytical.
155  * Calls parent AgglomerateBase
156  */
157  virtual void declare_parameters (ParameterHandler &param) const
158  {
160  param.enter_subsection(concrete_name);{
161  //No parameters at the moment
162  }
163  param.leave_subsection();
164  }
165 
166  /*
167  * Protected virtual member function for initializing parameters, pure
168  * in MicroScaleBase, implemented here in IonomerAgglomerateAnalytical.
169  * Calls parent AgglomerateBase
170  */
171  virtual void initialize (ParameterHandler &param)
172  {
174  param.enter_subsection(concrete_name);{
175  //No parameters at the moment
176  }
177  param.leave_subsection();
178  }
179 
180  private:
181 
183  double compute_Er (const double k_c, const double D);
184 
186  double compute_dEr (const double k_c,const double dk_c, const double D);
187 
188  /* Private member function to check kinetics are appropriate for analytical formulation.
189  * Throws exception in event of inappropriate kinetic conditions.
190  */
191  void check_kinetics();
192 
193  /*bool to monitor if we have checked kinetic conditions */
195 
196 
197  };// class IonomerAgglomerate2
198 
199  } // namespace Layer
200 
201 } // namespace FuelCellShop
202 
203 #endif
virtual void declare_parameters(ParameterHandler &param) const
static const std::string concrete_name
Definition: agglomerate_ionomer_analytical.h:81
The base class for agglomerate objects in OpenFCST.
Definition: agglomerate_base.h:240
Convenient storage object for SolutionVariables.
Definition: fcst_variables.h:457
static IonomerAgglomerateAnalytical const * PROTOTYPE
Definition: agglomerate_ionomer_analytical.h:138
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.
bool checked_kinetics
Definition: agglomerate_ionomer_analytical.h:194
virtual void initialize(ParameterHandler &param)
Definition: agglomerate_ionomer_analytical.h:171
double r_agg
Definition: agglomerate_base.h:177
virtual void declare_parameters(ParameterHandler &param) const
Definition: agglomerate_ionomer_analytical.h:157
virtual double aux_volume_fraction()
Returns extra contribution to volume of layer.
Definition: agglomerate_ionomer_analytical.h:109
virtual std::vector< double > compute_derivative_current()
Function to compute the derivative of the current density at the local operating conditions;.
double compute_Er(const double k_c, const double D)
Function to compute the effectiveness of the agglomerate core.
virtual void initialize(ParameterHandler &param)
double delta_agg
Definition: agglomerate_base.h:183
virtual double get_film_thickness()
Definition: agglomerate_ionomer_analytical.h:120
virtual SolutionMap compute_current()
Main function of the class used to compute the current over the whole agglomerate at the local operat...
virtual double get_radius()
Definition: agglomerate_ionomer_analytical.h:128
virtual std::string get_name()
Return name of class instance, i.e.
Definition: agglomerate_ionomer_analytical.h:102
virtual boost::shared_ptr< FuelCellShop::MicroScale::MicroScaleBase > create_replica()
This member function is used to create an object of MicroScaleBase.
Definition: agglomerate_ionomer_analytical.h:143
Class that gives the analytical solution to an ionomer-filled agglomerate problem in 1D...
Definition: agglomerate_ionomer_analytical.h:76