OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dummy_GDL.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2011-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: dummy_GDL.h
11 // - Description: Implementation of a GDL class that setup us all properties from file
12 // - Developers: M. Secanell
13 // - $Id: dummy_GDL.h 1460 2013-08-30 22:28:49Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__DUMMY_GDL_H
18 #define _FUELCELLSHOP__DUMMY_GDL_H
19 
20 // FCST classes
21 #include "fcst_units.h"
22 #include "base_material.h"
23 #include "base_layer.h"
24 #include "gas_diffusion_layer.h"
25 
26 // Include deal.II classes
27 #include <base/parameter_handler.h>
28 #include <base/point.h>
29 #include <base/function.h>
30 #include <lac/vector.h>
31 #include <fe/fe_values.h>
32 
33 //Include STL
34 #include<cmath>
35 #include<iostream>
36 
37 using namespace dealii;
38 
39 namespace FuelCellShop
40 {
41  namespace Layer
42  {
49  template <int dim>
50  class DummyGDL :
51  public GasDiffusionLayer<dim>
52  {
53  public:
54 
70  static const std::string concrete_name;
71 
72 
74 
75 
86  DummyGDL();
87 
90  {}
91 
98  void declare_parameters (ParameterHandler &param) const
99  {
100  this->declare_parameters(this->name, param);
101  }
102 
107  virtual void initialize (ParameterHandler &param);
108 
112  virtual void set_parameters (const std::vector<std::string>& name_dvar,
113  const std::vector<double>& value_dvar,
114  ParameterHandler &param)
115  {
116  this->set_parameters (name_dvar, value_dvar, this->name, param);
117  };
118 
120 
122 
123 
129  virtual void effective_gas_diffusivity(Table< 2, double> &) const;
130 
137  virtual void effective_gas_diffusivity(Table< 2, Tensor< 2, dim > > &) const;
138 
142  virtual void effective_electron_conductivity(double& ) const;
146  virtual void effective_electron_conductivity(Tensor<2,dim>& ) const;
148  private:
150 
151 
156  DummyGDL(std::string name);
157 
162  virtual void declare_parameters (const std::string& name,
163  ParameterHandler &param) const;
164 
168  virtual void set_parameters (const std::vector<std::string>& name_dvar,
169  const std::vector<double>& value_dvar,
170  const std::string& gdl_section_name,
171  ParameterHandler &param);
172 
174 
175 
176 
181  virtual boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > create_replica (const std::string &name)
182  {
183  return boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > (new FuelCellShop::Layer::DummyGDL<dim> (name));
184  }
186 
187 
188 
191  static DummyGDL<dim> const* PROTOTYPE;
193 
194 
195 
198  double porosity;
200  std::vector<double> D_O2;
202  std::vector<double> D_wv;
204  std::vector<double> sigma_e;
206  };
207 
208  }
209 
210 }
211 
212 #endif