OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
conventional_CL.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: conventional_cl.h
11 // - Description: Class characterizing the conventional catalyst layer and methods for computing effective properties. It also provides interface to various material classes used in catalyst layer.
12 // - Developers: Peter Dobson (2011) and Madhur Bhaiya (2013)
13 // - Id: $Id: conventional_CL.h 1465 2013-08-30 22:42:25Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__CONVENTIONAL_CL__H
18 #define _FUELCELLSHOP__CONVENTIONAL_CL__H
19 
20 // Include deal.II classes
21 #include<base/parameter_handler.h>
22 #include<base/point.h>
23 #include <base/function.h>
24 #include <lac/vector.h>
25 #include <fe/fe_values.h>
26 
27 // Include FCST classes
28 #include "catalyst_layer.h"
30 #include "catalyst_support_base.h"
31 #include "catalyst_base.h"
32 #include "base_kinetics.h"
33 #include "platinum.h"
34 #include "nafion.h"
35 #include "carbon.h"
36 #include "geometries.h"
37 #include "boost/shared_ptr.hpp"
38 
39 //Include STL
40 #include <cmath>
41 #include <iostream>
42 #include <algorithm>
43 
44 
45 namespace FuelCellShop
46 {
47  namespace Layer
48  {
57  template <int dim>
59  public CatalystLayer<dim>
60  {
61  public:
62 
78  static const std::string concrete_name;
79 
81 
82 
89 
94 
96 
98 
99 
103  virtual void print_layer_properties() const;
104 
106  virtual inline void get_volume_fraction(double &epsilon_S_out,
107  double &epsilon_V_out,
108  double &epsilon_N_out) const
109  {
110  epsilon_S_out = epsilon_S;
111  epsilon_V_out = epsilon_V;
112  epsilon_N_out = epsilon_N;
113  }
114 
116  virtual inline double get_V_Pt() const
117  {
118  return V_Pt;
119  }
120 
122  inline double get_active_area_Pt() const
123  {
124  return Av;
125  }
126 
128 
129 
130 
136  virtual void effective_gas_diffusivity(const double& , double& ) const;
137 
144  virtual void effective_gas_diffusivity(Table< 2, Tensor< 2, dim > >&) const;
145 
149  virtual void effective_electron_conductivity(double& ) const;
150 
155  virtual void effective_electron_conductivity(Tensor<2,dim>& ) const;
156 
162  virtual void derivative_effective_electron_conductivity(std::vector<double>& ) const;
163 
167  virtual void effective_proton_conductivity(double& ) const;
168  virtual void effective_proton_conductivity(std::vector<double>& ) const;
174  virtual void derivative_effective_proton_conductivity(std::map< VariableNames, std::vector<double> >& ) const;
175 
179  virtual void effective_water_diffusivity(double& ) const;
180  virtual void effective_water_diffusivity(std::vector<double>& ) const;
186  virtual void derivative_effective_water_diffusivity(std::map< VariableNames, std::vector<double> >& ) const;
187 
189 
190  protected:
192 
193 
196  ConventionalCL(std::string name);
197 
230  void declare_parameters (const std::string& cl_section_name,
231  ParameterHandler &param) const;
232 
237  void set_parameters ( const std::vector<std::string>& name_dvar,
238  const std::vector<double>& value_dvar,
239  const std::string& cl_section_name,
240  ParameterHandler &param ) const;
241 
246  void initialize (ParameterHandler &param);
248 
252 
256  void compute_Av();
262 
268  void derivative_volume_fractions(double &Depsilon_S,
269  double &Depsilon_V,
270  double &Depsilon_N) const;
271 
275  void get_method_transport_property_pores(std::string& method)
276  {
277  method = method_eff_property_pores;
278  };
279 
284  {
286  };
287 
291  void get_method_transport_property_solid(std::string& method)
292  {
293  method = method_eff_property_solid;
294  };
295 
302  inline double depsilon_S_cat_dprc_Pt(const double V_Pt,
303  const double prc_Pt) const
304  {
305  return -(V_Pt*1e-3)/(rho_c*pow(prc_Pt,2.0));
306  }
307 
314  inline double depsilon_S_cat_dVPt(const double prc_Pt) const
315  {
316  return (1/rho_Pt + (1-prc_Pt)/(prc_Pt*rho_c))*(1e-3);
317  }
318 
325  inline double depsilon_V_cat_depsilon_S_cat() const
326  {
327  return -1;
328  }
329 
336  inline double depsilon_V_cat_depsilon_N_cat() const
337  {
338  return -1;
339  }
340 
341  //-- Composition
343  double epsilon_N;
345  double epsilon_V;
347  double epsilon_S;
349  double epsilon_W;
350 
351  //-- Catalyst properties
353  double rho_Pt;
355  double rho_c;
357  double prc_Pt;
359  double V_Pt;
361  double M_Pt;
363  double Av;
365  std::string method_Av;
367  std::string method_porosity;
369  double L_CL;
370 
371  //-- Electrolyte properties
373  double rho_N;
378  double loading_N;
380  double prc_N;
381 
382  // Network characteristics
386  double porosity_th;
388  double porosity_mu;
391 
397  double solid_th;
399  double solid_mu;
409  double sigma_p;
410 
412  double E0;
413  };
414  }
415 }
416 
417 #endif