OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nafion.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.h
11 // - Description: Class to represent and return bulk properties for Nafion (Polymer Electrolyte Membrane)
12 // - Developers: M. Secanell (2009-13) and Madhur Bhaiya (2012-13)
13 // - Id: $Id: nafion.h 1460 2013-08-30 22:28:49Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 
18 #ifndef _FUELCELLSHOP__NAFION_H
19 #define _FUELCELLSHOP__NAFION_H
20 
21 // Include deal.II classes
22 #include <base/parameter_handler.h>
23 #include <base/point.h>
24 #include <base/function.h>
25 #include <lac/vector.h>
26 #include <fe/fe_values.h>
27 
29 #include "PureGas.h"
30 
31 //Include STL
32 #include<cmath>
33 #include<iostream>
34 
35 class NafionTest;
36 
37 namespace FuelCellShop
38 {
39  namespace Material
40  {
84  class Nafion :
86  {
87  public:
88 
92  static const std::string concrete_name;
93 
95 
96 
100  friend class ::NafionTest;
102 
104 
105 
109  Nafion(const bool);
110 
118  Nafion(std::string name = "Nafion");
119 
123  ~Nafion();
124 
152  virtual void declare_parameters(ParameterHandler &param) const;
153 
170  virtual void set_parameters (const std::vector<std::string>& name_dvar,
171  const std::vector<double>& value_dvar,
172  ParameterHandler& param);
173 
177  virtual void initialize (ParameterHandler &param);
178 
180 
182 
183 
189  virtual void sorption_isotherm(std::vector<double>&) const;
197  virtual void sorption_isotherm_derivative(std::map < VariableNames, std::vector<double> >&) const;
198 
206  virtual void proton_conductivity(double&) const;
215  virtual void proton_conductivity(std::vector<double>&) const;
223  virtual void proton_conductivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
224 
232  virtual void water_diffusivity(double&) const;
239  virtual void water_diffusivity(std::vector<double>&) const;
247  virtual void water_diffusivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
248 
255  virtual void electroosmotic_drag(std::vector<double>&) const;
262  virtual void electroosmotic_drag_derivative(std::map< VariableNames, std::vector<double> >&) const;
263 
268  virtual void oxygen_diffusivity(double&) const;
273  virtual void oxygen_diffusivity(std::vector<double>&) const;
280  virtual void oxygen_diffusivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
281 
286  virtual void proton_diffusivity(double&) const;
287 
289 
290  private:
291 
293 
294 
299  virtual boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > create_replica ()
300  {
301  return boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > (new FuelCellShop::Material::Nafion ());
302  }
306  static Nafion const* PROTOTYPE;
308 
318  inline void modify_parameters(const unsigned int& index, const std::string& method)
319  {
320  Assert(index>=1 && index<=6, ExcMessage("Wrong index input in Nafion::modify_parameters."));
321 
322  if (index == 1)
323  method_conductivity = method;
324  else if (index == 2)
325  method_diffusivity = method;
326  else if (index == 3)
328  else if (index == 4)
329  method_sorption = method;
330  }
331 
332  };
333  }
334 }
335 #endif
336 
337 
338 
339 
340