OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
design_MPL.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: design_MPL.h
11 // - Description: Class used to represent a design MPL where effective properties are computed based on the porosity etc.
12 // - Developers: Madhur Bhaiya
13 // - $Id: design_MPL.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__DESIGN_MPL_H
18 #define _FUELCELLSHOP__DESIGN_MPL_H
19 
20 // FCST classes
22 
23 using namespace dealii;
24 
25 namespace FuelCellShop
26 {
27  namespace Layer
28  {
100  template <int dim>
101  class DesignMPL :
102  public MicroPorousLayer<dim>
103  {
104  public:
106 
107 
122  static const std::string concrete_name;
123 
125 
127 
130  DesignMPL(std::string name);
131 
135  DesignMPL();
136 
141  {}
142 
148  void declare_parameters (ParameterHandler &param) const
149  {
151  }
155  void set_parameters (const std::vector<std::string>& name_dvar,const std::vector<double>& value_dvar,ParameterHandler &param);
156 
157 
162  void initialize (ParameterHandler &param);
164 
166 
167 
168 
170 
172 
173 
179  virtual void effective_gas_diffusivity(const double& property,
180  const double& saturation,
181  double& effective_property) const;
187  virtual void effective_gas_diffusivity(const double& property,
188  const double& saturation,
189  Tensor<2,dim>& effective_property) const;
190 
199  virtual void effective_gas_diffusivity(std::vector< Tensor<2,dim> >& ) const;
209  virtual void derivative_effective_gas_diffusivity(std::map< VariableNames, std::vector< Tensor<2,dim> > >& ) const;
210 
211 
222  virtual void effective_gas_diffusivity(Table< 2, Tensor< 2, dim > > &D_eff) const;
223 
224 
230  virtual void effective_electron_conductivity(double& ) const;
231 
237  virtual void effective_electron_conductivity(Tensor<2,dim>& ) const;
243  virtual void effective_thermal_conductivity(double& ) const;
244 
250  virtual void effective_thermal_conductivity(Tensor<2,dim>& ) const;
251 
257  virtual void effective_thermal_conductivity(std::vector< Tensor<2,dim> >& ) const;
258 
259 
263  virtual void liquid_permeablity(std::vector< Tensor<2,dim> >& ) const;
269  virtual void derivative_liquid_permeablity(std::map< VariableNames, std::vector< Tensor<2,dim> > >& ) const;
274  virtual void saturated_liquid_permeablity_PSD(double&) const;
275  virtual void relative_liquid_permeability_PSD(std::vector< Tensor<2,dim> >&) const;
276  virtual void derivative_relative_liquid_permeablity_PSD(std::vector<double>&) const;
277  virtual void derivative_relative_liquid_permeablity_PSD(std::map< VariableNames, std::vector< Tensor<2,dim> > >&) const;
278 
279 
283  virtual void pcapillary(std::vector<double>&) const;
284  virtual void saturation_from_capillary_equation(std::vector<double>&) const;
285 
286  virtual void derivative_saturation_from_capillary_equation_PSD(std::vector<double>&) const;
290  virtual void dpcapillary_dsat(std::vector<double> &) const;
296  virtual void derivative_dpcapillary_dsat(std::map< VariableNames, std::vector<double> > &) const;
297 
302  virtual void interfacial_surface_area(std::vector<double>&) const;
308  virtual void derivative_interfacial_surface_area(std::map< VariableNames, std::vector<double> >&) const;
309 
314  virtual void interfacial_surface_area_PSD(std::vector<double>&) const;
320  virtual void derivative_interfacial_surface_area_PSD(std::vector<double>&) const;
321  virtual void derivative_interfacial_surface_area_PSD(std::map< VariableNames, std::vector<double> >&) const;
322 
323 
330  virtual void effective_transport_property_solid(const double& property,
331  double& effective_property) const;
332 
339  virtual void effective_transport_property_solid(const Tensor<2,dim>& property,
340  Tensor<2,dim>& effective_property) const;
341 
343 
344  protected:
346 
347 
353  void declare_parameters (const std::string& mpl_section_name,
354  ParameterHandler &param) const;
355 
356 
361  void set_parameters (const std::vector<std::string>& name_dvar,
362  const std::vector<double>& value_dvar,
363  const std::string& name,
364  ParameterHandler &param) const
365  {
366  const std::type_info& info = typeid(*this);
367  FcstUtilities::log << "Pure function " << __FUNCTION__
368  << " called in Class "
369  << info.name() << std::endl;
370  }
372 
374 
375  virtual boost::shared_ptr<FuelCellShop::Layer::MicroPorousLayer<dim> > create_replica (const std::string &name)
376  {
377  return boost::shared_ptr<FuelCellShop::Layer::MicroPorousLayer<dim> > (new FuelCellShop::Layer::DesignMPL<dim> (name));
378  }
379 
383  static DesignMPL<dim> const* PROTOTYPE;
384 
385 
387 
389 
390 
391  //--------------------------
395  double porosity;
397  double solid_phase;
412 
416  double s_irr;
417 
418  //----------------------
421  std::vector<double> porosity_th;
423  std::vector<double> porosity_mu;
425  std::vector<double> porosity_gamma;
427  std::vector<double> D_O2;
429  std::vector<double> D_wv;
431  std::vector<double> fibre_th;
433  std::vector<double> fibre_mu;
434 
436  std::vector<double> abs_permeability;
437 
443  double PTFE_loading;
449 
451  };
452  }
453 } // FuelCellShop
454 
455 #endif // _FUELCELLSHOP__DESIGN_MPL_H
std::string method_eff_property_pores
Method used to compute the effective properties in the pores.
Definition: design_MPL.h:399
std::vector< double > D_O2
Oxygen Diffusion coefficient.
Definition: design_MPL.h:427
double s_irr
Irreducible liquid water saturation value in the MPL.
Definition: design_MPL.h:416
virtual boost::shared_ptr< FuelCellShop::Layer::MicroPorousLayer< dim > > create_replica(const std::string &name)
This member function is used to create an object of type micro porous layer.
Definition: design_MPL.h:375
std::vector< double > fibre_th
Solid (electron conductive) network of the MPL threshold.
Definition: design_MPL.h:431
std::vector< double > abs_permeability
Absolute permeability [cm^2] of the layer.
Definition: design_MPL.h:436
std::vector< double > D_wv
Water vapour diffusion coefficient.
Definition: design_MPL.h:429
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
std::string method_rel_liquid_permeability
Method used to compute the relative liquid permeability.
Definition: design_MPL.h:414
Virtual class used to provide the interface for all MicroPorousLayer children.
Definition: micro_porous_layer.h:102
static const std::string concrete_name
Concrete name used for objects of this class.
Definition: design_MPL.h:122
std::vector< double > porosity_gamma
Network constant gamma.
Definition: design_MPL.h:425
double thermal_conductivity
Thermal conductivity from the input file.
Definition: design_MPL.h:407
bool anisotropy
General properties.
Definition: design_MPL.h:393
void declare_parameters(ParameterHandler &param) const
Declare parameters for a parameter file.
Definition: design_MPL.h:148
double porosity
Porosity of the GDL.
Definition: design_MPL.h:395
std::string method_eff_property_fibres
Method used to compute the effective properties in the solid phase.
Definition: design_MPL.h:401
double compaction_pressure
MPL Compaction pressure, .
Definition: design_MPL.h:441
std::vector< double > porosity_th
Anisotropic properties.
Definition: design_MPL.h:421
This class defines an MPL where effective transport properties are computed using macro-homogeneous c...
Definition: design_MPL.h:101
double electrical_conductivity
Electrical conductivity from the input file.
Definition: design_MPL.h:405
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
Tensor< 2, dim > matrix_thermal_conductivity
Thermal conductivity from the input file in the anisotripic case.
Definition: design_MPL.h:411
std::vector< double > porosity_mu
Network constant.
Definition: design_MPL.h:423
std::string method_eff_thermal_conductivity
Method used to compute effective thermal conductivity.
Definition: design_MPL.h:403
double solid_phase
Volume fraction of solid phase, i.e.
Definition: design_MPL.h:397
static DesignMPL< dim > const * PROTOTYPE
Prototype declaration.
Definition: design_MPL.h:383
double kumbur_factor
Factor calculated based on Kumbur et al (2007), to be used in capillary pressure computation, given as: .
Definition: design_MPL.h:448
Tensor< 2, dim > matrix_electrical_conductivity
Electrical conductivity from the input file in the anisotripic case.
Definition: design_MPL.h:409
double PTFE_loading
PTFE loading (% wt) in the MPL.
Definition: design_MPL.h:443
void set_parameters(const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &name, ParameterHandler &param) const
Member function used to set new parameters values in the optimization loop.
Definition: design_MPL.h:361
~DesignMPL()
Destructor.
Definition: design_MPL.h:140
std::string method_capillary_function
Method used to compute capillary pressure as a function of saturation.
Definition: design_MPL.h:439
std::vector< double > fibre_mu
Solid (electron conductive) network constant.
Definition: design_MPL.h:433