OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
design_fibrous_GDL.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_fibrous_GDL.h
11 // - Description: Class used to represent a fibrous GDL where effective properties are computed based on the porosity etc.
12 // - Developers: M. Secanell and Madhur Bhaiya
13 // - $Id: design_fibrous_GDL.h 1460 2013-08-30 22:28:49Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__DESIGN_FIBROUS_GDL_H
18 #define _FUELCELLSHOP__DESIGN_FIBROUS_GDL_H
19 
20 // FCST classes
21 #include <base_material.h>
22 #include <gas_diffusion_layer.h>
23 
24 // Include deal.II classes
25 #include <base/parameter_handler.h>
26 #include <base/point.h>
27 #include <base/function.h>
28 #include <lac/vector.h>
29 #include <fe/fe_values.h>
30 
31 //Include STL
32 #include<cmath>
33 #include<iostream>
34 
35 using namespace dealii;
36 
37 namespace FuelCellShop
38 {
39  namespace Layer
40  {
49  template <int dim>
51  public GasDiffusionLayer<dim>
52  {
53  public:
54 
70  static const std::string concrete_name;
71 
73 
74 
85 
91  DesignFibrousGDL(const std::string& name);
92 
95  {}
96 
102  void declare_parameters (ParameterHandler &param) const
103  {
104  declare_parameters(this->name, param);
105  };
106 
112  virtual void set_parameters (const std::vector<std::string>& name_dvar,
113  const std::vector<double>& value_dvar,
114  ParameterHandler &param) const {}
115 
118  virtual void initialize (ParameterHandler &param);
120 
122 
123 
127  virtual void effective_gas_diffusivity(const double& prop, double& prop_eff) const;
132  virtual void effective_gas_diffusivity(const double& prop, Tensor<2,dim>& prop_eff) const;
133 
138  virtual void effective_gas_diffusivity(Table< 2, Tensor<2,dim> > &D_eff) const;
139 
143  virtual void effective_electron_conductivity(double&) const;
144 
148  virtual void effective_electron_conductivity(Tensor<2,dim>&) const;
149 
151 
152  private:
154 
155 
200  virtual void declare_parameters (const std::string& name,
201  ParameterHandler &param) const;
202 
208  virtual void set_parameters (const std::vector<std::string>& name_dvar,
209  const std::vector<double>& value_dvar,
210  const std::string& name,
211  ParameterHandler &param) const
212  {
213  const std::type_info& info = typeid(*this);
214  deallog << "Pure function " << __FUNCTION__
215  << " called in Class "
216  << info.name() << std::endl;
217 
218  }
220 
221 
222 
227  virtual boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > create_replica (const std::string &name)
228  {
229  return boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > (new FuelCellShop::Layer::DesignFibrousGDL<dim> (name));
230  }
232 
234 
235  //--------------------------
237  double porosity;
239  double solid_phase;
245  std::vector<double> sigma_e;
246 
247  //----------------------
252  std::vector<double> porosity_th;
254  std::vector<double> porosity_mu;
256  std::vector<double> porosity_gamma;
258  std::vector<double> solid_th;
260  std::vector<double> solid_mu;
262 
264 
265 
270  };
271  }
272 }
273 
274 #endif