OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nafion_membrane.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: nafion_membrane.h
11 // - Description: Class representing Nafion membrane layer class - returning effective transport properties
12 // - Developers: Madhur Bhaiya (2012-13)
13 // - Id: $Id: nafion_membrane.h 1460 2013-08-30 22:28:49Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__NAFION_MEMBRANE_H
18 #define _FUELCELLSHOP__NAFION_MEMBRANE_H
19 
20 // Include FCST classes
21 #include "layers/membrane_layer.h"
23 #include "materials/nafion.h"
24 
25 #include "boost/shared_ptr.hpp"
26 
27 namespace FuelCellShop
28 {
29  namespace Layer
30  {
45  template <int dim>
46  class NafionMembrane : public MembraneLayer<dim>
47  {
48  public:
64  static const std::string concrete_name;
65 
67 
68 
79 
83  ~NafionMembrane();
84 
86 
88 
89 
92  virtual void effective_proton_conductivity(double&) const;
97  virtual void effective_proton_conductivity(std::vector<double>&) const;
102  virtual void derivative_effective_proton_conductivity(std::map< VariableNames, std::vector<double> >&) const;
103 
107  virtual void effective_water_diffusivity(double&) const;
112  virtual void effective_water_diffusivity(std::vector<double>&) const;
117  virtual void derivative_effective_water_diffusivity(std::map< VariableNames, std::vector<double> >&) const;
118 
122  virtual void effective_oxygen_diffusivity(double&) const;
128  virtual void effective_oxygen_diffusivity(std::vector<double>&) const;
134  virtual void derivative_effective_oxygen_diffusivity(std::map< VariableNames, std::vector<double> >&) const;
135 
137 
138  protected:
140 
141 
145  NafionMembrane(std::string name);
146 
155  void declare_parameters (const std::string& name,
156  ParameterHandler &param) const;
157 
162  void set_parameters (const std::vector<std::string>& name_dvar,
163  const std::vector<double>& value_dvar,
164  const std::string& name,
165  ParameterHandler &param) const;
166 
171  void initialize (ParameterHandler &param);
172 
174 
175 
176 
181  virtual boost::shared_ptr<FuelCellShop::Layer::MembraneLayer<dim> > create_replica (std::string &name)
182  {
183  return boost::shared_ptr<FuelCellShop::Layer::MembraneLayer<dim> > (new FuelCellShop::Layer::NafionMembrane<dim> (name));
184  }
186 
187 
188 
193  };
194  }
195 }
196 
197 #endif