OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
agglomerate_hybrid_1D.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // C++ Interface: agglomerate_hybrid_1D.h
3 //
4 // Description: Used to solve a system of equations representing a
5 // spherical hybrid agglomerate.
6 //
7 // Author: Philip Wardlaw 2014,
8 // University of Alberta
9 //
10 // Copyright: See COPYING file that comes with this distribution
11 //
12 //---------------------------------------------------------------------------
13 
14 #ifndef FUEL_CELL__HYBRID_AGGLOMERATE_1D__H
15 #define FUEL_CELL__HYBRID_AGGLOMERATE_1D__H
16 
17 
18 //------------------------------
19 // Inherits everything necessary from water filled agglomerate
20 //------------------------------
21 
23 
24 
25 namespace FuelCellShop
26 {
27 namespace MicroScale
28 {
29 
38 {
39 public:
40 
41 
42 
43  static const std::string concrete_name;
44 
48  virtual std::string get_name(){
49  return concrete_name;
50  }
51 
69  virtual double aux_volume_fraction(){
70 
72 
73  }
74 
78  virtual void print_properties();
79 
80 
81 protected:
82 
108  void set_structure ( );
109 
111  HybridAgglomerate ( int verbose = 1 );
112  HybridAgglomerate (std::string concrete_name);
113 
114 
115  /*
116  * Protected virtual member function for declaring parameters
117  */
118  virtual void declare_parameters (ParameterHandler &param) const
119  {
121  water.declare_parameters(param);
122 
123  param.enter_subsection(concrete_name);{
124  param.declare_entry("Hybrid core fraction", "0.01",
125  Patterns::Double(0.0,0.75),
126  "Fraction of the agglomerate core filled with ionomer.");
127 
128  }
129  param.leave_subsection();
130 
131 
132 
133 
134  }
135 
136  /*
137  * Protected virtual member function for initializing parameters
138  */
139  virtual void initialize (ParameterHandler &param)
140  {
142  water.initialize(param);
143  param.enter_subsection(concrete_name);{
144  hybrid_core_volume_fraction = param.get_double("Hybrid core fraction");
145  }
146  param.leave_subsection();
147 
148 
149  }
150 
169  double compute_thickness_agg ();
170 
187  virtual double compute_epsilon_agg ();
188 
189 
191 
193 
197  virtual boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase> create_replica ()
198  {
199  return boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase> (new FuelCellShop::MicroScale::HybridAgglomerate());
200  }
202 
203 
211  void fsub ( double &, double [], double [], double [] );
212 
213  static void fsub_wrapper ( double &, double [], double [], double [] );
214 
222  void dfsub ( double &, double [], double [], double [] );
223 
224  static void dfsub_wrapper ( double &, double [], double [], double [] );
225 
226 
227 
228 
252 private:
253 
256 };
257 
258 }//namespace Layer
259 }//namespace FuelCellShop
260 
261 #endif
virtual void declare_parameters(ParameterHandler &param) const
Definition: agglomerate_hybrid_1D.h:118
HybridAgglomerate(int verbose=1)
Constructors.
virtual double aux_volume_fraction()
Functions directly inherited from parent.
Definition: agglomerate_hybrid_1D.h:69
FuelCellShop::Material::LiquidWater water
Object to store information on water, necessary for water filled agglomerate.
Definition: agglomerate_water_1D.h:295
virtual double compute_epsilon_agg()
Compute the volume fraction of nafion inside the agglomerate given the catalyst layer ionomer volume ...
virtual void initialize(ParameterHandler &param)
Class that solves a water-filled agglomerate problem in 1D.
Definition: agglomerate_water_1D.h:67
virtual void declare_parameters(ParameterHandler &param) const
void dfsub(double &, double[], double[], double[])
The Jacobian of fsub.
double hybrid_interface
Object inheritted from water filled agglomerate.
Definition: agglomerate_hybrid_1D.h:254
static void fsub_wrapper(double &, double[], double[], double[])
virtual void print_properties()
Print out key agglomerate information (name, radius, film thickness, porosity).
void declare_parameters(ParameterHandler &param) const
Declare all necessary parameters in order to compute the coefficients.
void set_structure()
Functions directly inherited from parent.
virtual double aux_volume_fraction()
MicroScale object may have extra contribution to volume of layer, e.g.
Definition: agglomerate_water_1D.h:97
void fsub(double &, double[], double[], double[])
Define the DAE function.
static void dfsub_wrapper(double &, double[], double[], double[])
virtual std::string get_name()
Return name of class instance, i.e.
Definition: agglomerate_hybrid_1D.h:48
static const std::string concrete_name
Definition: agglomerate_hybrid_1D.h:43
virtual void initialize(ParameterHandler &param)
Definition: agglomerate_hybrid_1D.h:139
Class that solves a Hybrid (water/ionomer filled) agglomerate problem in 1D.
Definition: agglomerate_hybrid_1D.h:37
double compute_thickness_agg()
Member function to compute the thickness of the agglomerate thin film based on the radius and structu...
double hybrid_core_volume_fraction
Definition: agglomerate_hybrid_1D.h:255
void initialize(ParameterHandler &param)
Member function used to read in data and initialize the necessary data to compute the coefficients...
virtual boost::shared_ptr< FuelCellShop::MicroScale::MicroScaleBase > create_replica()
This member function is used to create an object of type MicroScaleBase.
Definition: agglomerate_hybrid_1D.h:197
static HybridAgglomerate const * PROTOTYPE
Definition: agglomerate_hybrid_1D.h:192