OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ICCP.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // C++ Interface: agglomerate_ionomer_1D.h
3 //
4 // Description: Class that solves solid carbon particle, with Pt surface loading,
5 // surrounded by ionomer thin film
6 //
7 // Authors: Philip Wardlaw,
8 // University of Alberta.
9 //
10 // Copyright: See COPYING file that comes with this distribution
11 //
12 //---------------------------------------------------------------------------
13 
15 
16 //FCST materials and kinetics classes
23 #include <microscale/agglomerate_base.h> //For SphericalAgglomerateGeometry
24 
25 
26 #ifndef ICCO_H_
27 #define ICCO_H_
28 
29 
30 namespace FuelCellShop
31 {
32  namespace MicroScale
33  {
34 
62 
63  public:
64 
65  static const std::string concrete_name;
66 
67 
78  virtual void set_solution(const std::map<VariableNames,SolutionVariable>& sols,const VariableNames& react, const int& index);
79 
86  virtual SolutionMap compute_current ( );
87 
93  virtual bool has_derivatives(){
94  //numerical for the moment
95  return false;
96  }
97 
101  virtual std::string get_name(){
102  return concrete_name;
103  }
104 
109  virtual double aux_volume_fraction(){
110  return 0;
111  }
112 
113 
117  virtual void print_properties();
118 
119  virtual void make_thread_safe(ParameterHandler &param, unsigned int thread_index);
120 
121 
122  protected:
123 
124  /*
125  * Method for setting up film thickness or porosity depending on parameters
126  * called in initialize() or adjust_poly adjust_polydisperse_structure().
127  */
129 
130 
133 
135  ICCP():
136  F(Constants::F()),
137  pi(Constants::Pi()){
138  non_eq_BC = false;
139  }
140 
142  ICCP(std::string name);
143 
144 
145  virtual void set_structure ();
146  /*
147  * Protected pure virtual member function for declaring parameters, must be implemented
148  * by all children. Parameter structure is hierarchical, therefore children
149  * should call their parent's declare parameter function from their own declare
150  * parameter function.
151  */
152  virtual void declare_parameters (ParameterHandler &param) const;
153 
154  /*
155  * Protected pure virtual member function for initializing parameters, must be implemented
156  * by all children. Parameter structure is hierarchical, therefore children
157  * should call their parent's initialize function from their own initialize function.
158  */
159  virtual void initialize (ParameterHandler &param);
160 
164  virtual boost::shared_ptr<MicroScaleBase> create_replica (){
165  return boost::shared_ptr<MicroScaleBase>( new ICCP());
166  }
167  static ICCP const* PROTOTYPE;
168 
169  private:
170 
179  double residual(const double & c_inner, const double & c_outer);
180 
181 
182  //Stored solutions
183  std::vector<SolutionVariable> reactants;
185 
186  //Transport factors
187  double ActiveArea; //Scaled to agglomerate surface
188  bool non_eq_BC; //If true then use. See residual()
190  double P; //Pressure
191  double H_R_N; //Henry's number for reactant in Nafion
192  double D_R_N; // diffusion of reactant in bulk nafion
193 
194  //Reaction factors
197 
198 
199  //Pointers to assests obtained from the CL
200  boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics> kinetics;
201  boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase> electrolyte;
202  boost::shared_ptr<FuelCellShop::Material::CatalystBase> catalyst;
203 
204 
205 
206  //Some constants
207  const double F, pi;
208  };
209  }
210 
211 }
212 
213 
214 
215 #endif /* ICCO_H_ */
virtual void make_thread_safe(ParameterHandler &param, unsigned int thread_index)
double residual(const double &c_inner, const double &c_outer)
Compute the residual functions describing oxygen concentration at the particle surface.
boost::shared_ptr< FuelCellShop::Material::CatalystBase > catalyst
Definition: ICCP.h:202
This class implements methods for calculating geometric parameters of a spherical agglomerate surroun...
Definition: agglomerate_base.h:55
virtual void declare_parameters(ParameterHandler &param) const
Class that solves solid carbon particle, with Pt surface loading, surrounded by ionomer thin film...
Definition: ICCP.h:61
virtual bool has_derivatives()
Returns true if the class instance can calculate current density derivatives.
Definition: ICCP.h:93
VariableNames reactant
Definition: ICCP.h:196
SolutionVariable proton_pot
Definition: ICCP.h:184
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
Convenient storage object for SolutionVariables.
Definition: fcst_variables.h:457
const double F
Definition: ICCP.h:207
This structure is used to encapsulate data from constant values and variable solution data that is us...
Definition: fcst_variables.h:86
double D_R_N
Definition: ICCP.h:192
boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase > electrolyte
Definition: ICCP.h:201
virtual void print_properties()
Print out key micro-structural dimensions, defined by child.
const double pi
Definition: ICCP.h:207
double molarNumerator
Definition: ICCP.h:195
FuelCellShop::Layer::MultiScaleCL< deal_II_dimension > CLPropNames
Convenient typdef for getting properties.
Definition: ICCP.h:132
SolutionVariable electron_pot
Definition: ICCP.h:184
ICCP()
Default Constructor.
Definition: ICCP.h:135
virtual std::string get_name()
Return name of class instance, i.e.
Definition: ICCP.h:101
double non_eq_BC_coeff
Definition: ICCP.h:189
double P
Definition: ICCP.h:190
boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics > kinetics
Definition: ICCP.h:200
bool non_eq_BC
Definition: ICCP.h:188
std::vector< SolutionVariable > reactants
Definition: ICCP.h:183
The base class for micro scale objects in OpenFCST.
Definition: micro_scale_base.h:134
static ICCP const * PROTOTYPE
Definition: ICCP.h:167
virtual void initialize(ParameterHandler &param)
double H_R_N
Definition: ICCP.h:191
virtual SolutionMap compute_current()
Function used to compute the current density produced by the micro structure.
virtual double aux_volume_fraction()
MicroScale object may have extra contribution to volume of layer, e.g.
Definition: ICCP.h:109
virtual boost::shared_ptr< MicroScaleBase > create_replica()
This member function is used to create an object of type MicroScaleBase.
Definition: ICCP.h:164
static const std::string concrete_name
Definition: ICCP.h:65
double ActiveArea
Definition: ICCP.h:187
double Pi()
.
Definition: fcst_constants.h:42
virtual void set_solution(const std::map< VariableNames, SolutionVariable > &sols, const VariableNames &react, const int &index)
Function for setting the solution map(reactant concentration, phi_s, phi_m, etc.).