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 <deal.II/base/parameter_handler.h>
23 #include <deal.II/base/point.h>
24 #include <deal.II/base/function.h>
25 #include <deal.II/lac/vector.h>
26 #include <deal.II/fe/fe_values.h>
27 
29 #include <materials/PureGas.h>
30 
31 class NafionTest;
32 
33 namespace FuelCellShop
34 {
35  namespace Material
36  {
83  class Nafion :
85  {
86  public:
87 
91  static const std::string concrete_name;
92 
94 
95 
99  friend class ::NafionTest;
101 
103 
104 
108  Nafion(const bool);
109 
117  Nafion(std::string name = "Nafion");
118 
122  ~Nafion();
123 
155  virtual void declare_parameters(ParameterHandler &param) const;
156 
160  virtual void initialize (ParameterHandler &param);
161 
163 
165 
166 
172  virtual void sorption_isotherm(std::vector<double>&) const;
180  virtual void sorption_isotherm_derivative(std::map < VariableNames, std::vector<double> >&) const;
181 
187  virtual void proton_conductivity(double&, const double, const double) const;
195  virtual void proton_conductivity(double&) const;
204  virtual void proton_conductivity(std::vector<double>&) const;
212  virtual void proton_conductivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
213 
219  virtual void water_diffusivity(double&, const double, const double) const;
227  virtual void water_diffusivity(double&) const;
234  virtual void water_diffusivity(std::vector<double>&) const;
242  virtual void water_diffusivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
243 
250  virtual void electroosmotic_drag(std::vector<double>&) const;
257  virtual void electroosmotic_drag_derivative(std::map< VariableNames, std::vector<double> >&) const;
258 
264  virtual void thermoosmotic_coeff(std::vector<double>&) const;
271  virtual void thermoosmotic_coeff_derivative(std::map< VariableNames, std::vector<double> >&) const;
272 
277  virtual void oxygen_diffusivity(double&, const double) const;
282  virtual void oxygen_diffusivity(double&) const;
283 
288  virtual void hydrogen_diffusivity(double&) const;
293  virtual void oxygen_diffusivity(std::vector<double>&) const;
300  virtual void oxygen_diffusivity_derivative(std::map< VariableNames, std::vector<double> >&) const;
301 
306  virtual void proton_diffusivity(double&) const;
307 
313  virtual void sorption_enthalpy(std::vector<double>& ) const;
320  virtual void sorption_enthalpy_derivative(std::map< VariableNames, std::vector<double> >&) const;
321 
323 
325 
326 
331  virtual double get_Hlambda(const double&) const;
332 
337  virtual double get_dHlambda_dT(const double&) const;
338 
343  virtual double get_d2Hlambda_dT2(const double&) const;
344 
346 
347  private:
348 
350 
351 
356  virtual boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > create_replica ()
357  {
358  return boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > (new FuelCellShop::Material::Nafion ());
359  }
363  static Nafion const* PROTOTYPE;
365 
377  inline void modify_parameters(const unsigned int& index, const std::string& method)
378  {
379  Assert(index>=1 && index<=6, ExcMessage("Wrong index input in Nafion::modify_parameters."));
380 
381  if (index == 1)
382  method_conductivity = method;
383  else if (index == 2)
384  method_diffusivity = method;
385  else if (index == 3)
387  else if (index == 4)
388  method_thermoosmosis = method;
389  else if (index == 5)
390  method_sorption = method;
391  else if (index == 6)
392  method_enthalpy_sorption = method;
393  }
394 
402  std::map<std::string, double> springer_coeffs;
403 
404  };
405  }
406 }
407 #endif
408 
409 
410 
411 
412 
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:363
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:740
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
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:63
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:730
static const std::string concrete_name
Name of the class.
Definition: nafion.h:91
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 water_diffusivity(double &, const double, const double) const
Compute the water diffusivity, [cm^2/s], inside the nafion at every quadrature point 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:725
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 proton_conductivity(double &, const double, const double) const
Compute the proton conductivity, [S/cm], inside the nafion, at every quadrature point in the cell...
Class used to store data and provide information regarding the electrolyte.
Definition: nafion.h:83
std::string method_sorption
Method to compute equilibrium water content value from sorption isotherm.
Definition: polymer_electrolyte_material_base.h:720
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:59
std::map< std::string, double > springer_coeffs
Map for proton conductivity&#39;s coefficients; used with &quot;Springer&quot; method.
Definition: nafion.h:402
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:356
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 hydrogen 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:715
std::string method_thermoosmosis
Method/semi-empirical relation to compute thermo-osmotic diffusion coefficient.
Definition: polymer_electrolyte_material_base.h:735
virtual void oxygen_diffusivity(double &, const double) const
Compute the oxygen diffusivity, [cm^2/s], inside the nafion for a given .
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:377
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...