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 2605 2014-08-15 03:36:44Z secanell $
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  {
88  class Nafion :
90  {
91  public:
92 
96  static const std::string concrete_name;
97 
99 
100 
104  friend class ::NafionTest;
106 
108 
109 
113  Nafion(const bool);
114 
122  Nafion(std::string name = "Nafion");
123 
127  ~Nafion();
128 
160  virtual void declare_parameters(ParameterHandler &param) const;
161 
165  virtual void initialize (ParameterHandler &param);
166 
168 
170 
171 
177  virtual void sorption_isotherm(std::vector<double>&) const;
185  virtual void sorption_isotherm_derivative(std::map < VariableNames, std::vector<double> >&) const;
186 
194  virtual void proton_conductivity(double&) const;
203  virtual void proton_conductivity(std::vector<double>&) const;
211  virtual void proton_conductivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
212 
220  virtual void water_diffusivity(double&) const;
227  virtual void water_diffusivity(std::vector<double>&) const;
235  virtual void water_diffusivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
236 
243  virtual void electroosmotic_drag(std::vector<double>&) const;
250  virtual void electroosmotic_drag_derivative(std::map< VariableNames, std::vector<double> >&) const;
251 
257  virtual void thermoosmotic_coeff(std::vector<double>&) const;
264  virtual void thermoosmotic_coeff_derivative(std::map< VariableNames, std::vector<double> >&) const;
265 
270  virtual void oxygen_diffusivity(double&) const;
271 
276  virtual void hydrogen_diffusivity(double&) const;
281  virtual void oxygen_diffusivity(std::vector<double>&) const;
288  virtual void oxygen_diffusivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
289 
294  virtual void proton_diffusivity(double&) const;
295 
301  virtual void sorption_enthalpy(std::vector<double>& ) const;
308  virtual void sorption_enthalpy_derivative(std::map< VariableNames, std::vector<double> >&) const;
309 
311 
313 
314 
319  virtual double get_Hlambda(const double&) const;
320 
325  virtual double get_dHlambda_dT(const double&) const;
326 
331  virtual double get_d2Hlambda_dT2(const double&) const;
332 
334 
335  private:
336 
338 
339 
344  virtual boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > create_replica ()
345  {
346  return boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > (new FuelCellShop::Material::Nafion ());
347  }
351  static Nafion const* PROTOTYPE;
353 
365  inline void modify_parameters(const unsigned int& index, const std::string& method)
366  {
367  Assert(index>=1 && index<=6, ExcMessage("Wrong index input in Nafion::modify_parameters."));
368 
369  if (index == 1)
370  method_conductivity = method;
371  else if (index == 2)
372  method_diffusivity = method;
373  else if (index == 3)
375  else if (index == 4)
376  method_thermoosmosis = method;
377  else if (index == 5)
378  method_sorption = method;
379  else if (index == 6)
380  method_enthalpy_sorption = method;
381  }
382  };
383  }
384 }
385 #endif
386 
387 
388 
389 
390 
virtual double get_d2Hlambda_dT2(const double &) const
Compute of sorbed water in the Nafion as a function of .
static Nafion const * PROTOTYPE
Create prototype for the layer.
Definition: nafion.h:351
virtual void thermoosmotic_coeff_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of thermo-osmotic diffusion coefficient, at every quadrature point in the cel...
virtual double get_dHlambda_dT(const double &) const
Compute of sorbed water in the Nafion as a function of .
std::string method_enthalpy_sorption
Method/semi-empirical relation to compute enthalpy of sorption of water.
Definition: polymer_electrolyte_material_base.h:743
virtual void thermoosmotic_coeff(std::vector< double > &) const
Compute the thermo-osmotic diffusion coefficient, [gm/ (cm-s-K )], inside the nafion at every quadrat...
const std::string name
Name of the layer.
Definition: base_material.h:155
virtual void water_diffusivity(double &) const
Compute the water diffusivity, [cm^2/s], inside the nafion for a case of constant and ...
Nafion(const bool)
PROTOTYE Constructor.
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:62
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters.
virtual void initialize(ParameterHandler &param)
Member function used to read in data and initialize the necessary data from the parameter file to com...
std::string method_electroosmotic_drag
Method/semi-empirical relation to compute Electro-osmotic drag.
Definition: polymer_electrolyte_material_base.h:733
static const std::string concrete_name
Name of the class.
Definition: nafion.h:96
virtual void electroosmotic_drag(std::vector< double > &) const
Compute the electro-osmotic drag coefficient inside the nafion at every quadrature point in the cell...
virtual void sorption_enthalpy(std::vector< double > &) const
Compute the enthalpy of sorption [J/mol] of water in Nafion, at all quadrature points in the cell...
virtual void sorption_isotherm(std::vector< double > &) const
Compute the equilibrium water content, , inside the Nafion for vapor-equilibriated case...
std::string method_diffusivity
Method/semi-empirical relation to compute water diffusivity.
Definition: polymer_electrolyte_material_base.h:728
virtual void sorption_enthalpy_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of enthalpy of sorption of water, at every quadrature point in the cell...
virtual void electroosmotic_drag_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of electro-osmotic drag coefficient, at every quadrature point in the cell...
virtual double get_Hlambda(const double &) const
Compute the molar enthalpy, [J/mol] of sorbed water in the Nafion as a function of ...
virtual void oxygen_diffusivity(double &) const
Compute the oxygen diffusivity, [cm^2/s], inside the nafion for a constant .
Class used to store data and provide information regarding the electrolyte.
Definition: nafion.h:88
std::string method_sorption
Method to compute equilibrium water content value from sorption isotherm.
Definition: polymer_electrolyte_material_base.h:723
virtual void water_diffusivity_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of water diffusivity at every quadrature point in the cell.
virtual void proton_diffusivity(double &) const
Compute the proton diffusivity, [cm^2/s], inside the nafion for constant case.
This class implements the interface to compute the properties of a &quot;standard&quot; polymer electrolyte mem...
Definition: polymer_electrolyte_material_base.h:62
virtual boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase > create_replica()
This member function is used to create an object of type Nafion material.
Definition: nafion.h:344
virtual void proton_conductivity_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of proton conductivity at every quadrature point in the cell.
virtual void hydrogen_diffusivity(double &) const
Compute the oxygen diffusivity, [cm^2/s], inside the nafion for a constant .
std::string method_conductivity
Method/Semi-empirical relation to compute protonic conductivity.
Definition: polymer_electrolyte_material_base.h:718
std::string method_thermoosmosis
Method/semi-empirical relation to compute thermo-osmotic diffusion coefficient.
Definition: polymer_electrolyte_material_base.h:738
void modify_parameters(const unsigned int &index, const std::string &method)
Method to modify parameters, without declaring and initializing the parameter file.
Definition: nafion.h:365
virtual void proton_conductivity(double &) const
Compute the proton conductivity, [S/cm], inside the nafion for a case of constant and ...
virtual void oxygen_diffusivity_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of oxygen diffusivity, at every quadrature point in the cell.
virtual void sorption_isotherm_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives for water sorption source terms, , at every quadrature point in the cell...