OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
This class implements the interface to compute the properties of a "standard" polymer electrolyte membrane material. More...
#include <polymer_electrolyte_material_base.h>
Public Member Functions | |
Transport properties and derivatives accessor methods | |
virtual void | sorption_isotherm (std::vector< double > &) const |
Compute the equilibrium water content, \( \lambda_{eq} \), inside the polymer electrolyte for vapor-equilibriated case, 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, \( \frac{\partial \lambda_{eq}}{\partial u} \), at every quadrature point in the cell. | |
virtual void | proton_conductivity (double &) const |
Compute the proton conductivity, \( \sigma_{H^+} \) [S/cm ], inside the polymer electrolyte for constant case. | |
virtual void | proton_conductivity (std::vector< double > &) const |
Compute the proton conductivity, \( \sigma_{H^+} \) [S/cm ], inside the polymer electrolyte, at every quadrature point in the cell. | |
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 | water_diffusivity (double &) const |
Compute the water diffusivity, \( D_{\lambda} \) [cm^2/s ], inside the polymer electrolyte for constant case. | |
virtual void | water_diffusivity (std::vector< double > &) const |
Compute the water diffusivity, \( D_{\lambda} \) [cm^2/s ], inside the polymer electrolyte at every quadrature point in the cell. | |
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 | electroosmotic_drag (std::vector< double > &) const |
Compute the electro-osmotic drag coefficient inside the polymer electrolyte 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 void | oxygen_diffusivity (double &) const |
Compute the oxygen diffusivity, [cm^2/s ], inside the polymer electrolyte for constant case. | |
virtual void | oxygen_diffusivity (std::vector< double > &) const |
Compute the oxygen diffusivity, [cm^2/s ], inside the polymer electrolyte at every quadrature point in the cell. | |
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 | proton_diffusivity (double &) const |
Compute the proton diffusivity, [cm^2/s ], inside the polymer electrolyte for constant case. | |
Physical properties accessor methods | |
double | get_density () const |
Get the density [gm/cm^3 ] of the dry polymer electrolyte material. | |
double | get_H_O2 () const |
Get Henry's constant [Pa-cm^3/mol ] for oxygen dissolution in the polymer electrolyte. | |
double | get_H_H2 () const |
Get Henry's constant [Pa-cm^3/mol ] for hydrogen dissolution in the polymer electrolyte. | |
double | get_EW () const |
Get Equivalent Weight (grams of dry polymer electrolyte per moles of \( SO_3^- \)) of the polymer electrolyte material. | |
double | get_permittivity () const |
Get permittivity of the polymer electrolyte material. | |
Solution setting methods | |
void | set_p_t (const double &p_t) |
Specify the total pressure in Pascals. | |
void | set_T (const double &Temp) |
Specify the temperature [Kelvin ] in the polymer electrolyte for isothermal case. | |
void | set_lambda (const double &L) |
Specify the water content in the polymer electrolyte for constant lambda case. | |
void | set_membrane_water_content (const FuelCellShop::SolutionVariable &l_in) |
Set the solution variable, membrane water content \( \lambda \). | |
void | set_temperature (const FuelCellShop::SolutionVariable &T_in) |
Set the solution variable, temperature \( T \) [Kelvin ]. | |
void | set_water_molar_fraction (const FuelCellShop::SolutionVariable &x_in) |
Set the solution variable, water vapor molar fraction \( x_{H_2O} \). | |
Public Member Functions inherited from FuelCellShop::Material::BaseMaterial | |
void | set_derivative_flags (const std::vector< VariableNames > &flags) |
Set the variables for which you would like to compute the derivatives. | |
const std::string & | name_material () |
Return the name of the layer. | |
virtual void | print_material_properties () const |
This function prints out the material properties. | |
Static Public Member Functions | |
Instance Delivery (Public functions) | |
static void | declare_PolymerElectrolyte_parameters (ParameterHandler ¶m) |
Function used to declare all the data necessary in the parameter files for all PolymerElectrolyteBase children. | |
static void | set_PolymerElectrolyte_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m) |
static boost::shared_ptr < FuelCellShop::Material::PolymerElectrolyteBase > | create_PolymerElectrolyte (ParameterHandler ¶m, std::string polymer_electrolyte_name) |
Function called in create_CatalystLayer and used to select the appropriate PolymerElectrolyteBase children that will be used in the layer. | |
Protected Types | |
Instance Delivery (Types) | |
typedef std::map< std::string, FuelCellShop::Material::PolymerElectrolyteBase * > | _mapFactory |
This object is used to store all objects of type PolymerElectrolyteBase. | |
Protected Member Functions | |
Constructors, destructor and parameter initialization | |
PolymerElectrolyteBase (std::string name) | |
Constructor. | |
PolymerElectrolyteBase () | |
Constructor. | |
virtual | ~PolymerElectrolyteBase () |
Destructor. | |
virtual void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
virtual void | set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m) |
Member function used to change the values in the parameter file for a given list of parameters. | |
virtual void | initialize (ParameterHandler ¶m) |
Initialize parameters. | |
Instance Delivery (Private functions) | |
virtual boost::shared_ptr < FuelCellShop::Material::PolymerElectrolyteBase > | create_replica () |
This member function is used to create an object of type PolymerElectrolyteBase. | |
Protected Member Functions inherited from FuelCellShop::Material::BaseMaterial | |
BaseMaterial () | |
Constructor. | |
BaseMaterial (const std::string &name) | |
Constructor. | |
virtual | ~BaseMaterial () |
Destructor. | |
Static Protected Member Functions | |
Instance Delivery (Private and static) | |
static _mapFactory * | get_mapFactory () |
Protected Attributes | |
Numerical constants | |
double | EW |
Equivalent weight. | |
double | rho_M |
Dry polymer electrolyte density [gm/cm^3 ]. | |
double | H_O2 |
Henry's Constant [Pa-cm^3/mol ] for dissolution of oxygen. | |
double | H_H2 |
Henry's Constant [Pa-cm^3/mol ] for dissolution of hydroge. | |
double | permittivity |
Permittivity of the material. | |
double | T |
Temperature [Kelvins ] for isothermal case. | |
double | lambda |
Membrane water content, \( \lambda \) for constant lambda case. | |
double | p_total |
Total pressure (in Pascals). | |
double | sigma_p |
Proton conductivity value [S/cm ], given in the parameter file; used with "Constant" method. | |
double | diffusion_w |
Diffusion of water in polymer electrolyte (if constant option is used), [cm2/s ]. | |
double | given_n_drag |
Given electroosmotic drag value in the parameter file. | |
double | D_O2 |
Diffusion coefficient of oxygen [cm^2/s ], given in the parameter file. | |
double | D_Protons |
Diffusion coefficient of protons [cm^2/s ], given in the parameter file. | |
Empirical method name strings | |
std::string | method_conductivity |
Method/Semi-empirical relation to compute protonic conductivity. | |
std::string | method_sorption |
Method to compute equilibrium water content value from sorption isotherm. | |
std::string | method_diffusivity |
Method/semi-empirical relation to compute water diffusivity. | |
std::string | method_electroosmotic_drag |
Method/semi-empirical relation to compute Electro-osmotic drag. | |
Solution variables | |
FuelCellShop::SolutionVariable | lambda_var |
Solution variable, membrane water content \( \lambda \). | |
FuelCellShop::SolutionVariable | T_var |
Solution variable, temperature \( T \). | |
FuelCellShop::SolutionVariable | xwater_var |
Solution variable, water vapor molar fraction \( x_{H_2O} \). | |
Protected Attributes inherited from FuelCellShop::Material::BaseMaterial | |
const std::string | name |
Name of the layer. | |
std::vector< VariableNames > | derivative_flags |
Flags for derivatives: These flags are used to request derivatives. | |
This class implements the interface to compute the properties of a "standard" polymer electrolyte membrane material.
Note that there are many types of polymer electrolye materials such as Nafion, Gore , Flemion membranes etc.. This class serves a common interface for each one of these types. It implements member functions to declare the parameter file for each catalyst, read the parameter file and select the appropriate polymer electrolyte materials based on the user input. It basically has accessor methods for various physical properties and return bulk transport propeties of the materials. These methods are implemented in the children classes. Since, almost all of the transport properties are dependent on solution variables, e.g. membrane_water_content, \( \lambda \), temperature_of_REV, \( T \) etc. Hence it's important to set these solution variables values inside the class, prior to accessing the bulk transport properties, e.g. proton conductivity, \( \sigma_{H^+} \) [S/cm
], water diffusivity, \( D_{\lambda} \) [cm^2/s
], etc. Besides, the derivatives of these transport properties w.r.t various solution variables can also be returned from this class.
|
protected |
This object is used to store all objects of type PolymerElectrolyteBase.
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
Destructor.
|
inlinestatic |
Function called in create_CatalystLayer and used to select the appropriate PolymerElectrolyteBase children that will be used in the layer.
The name of the PolymerElectrolyteBase children object to be used is provided in polymer_electrolyte_name.
The name of the PolymerElectrolyteBase children object is provided in the ParameterHandler in the CatalystLayer subsection as follows:
current options are [ Nafion ]
References get_mapFactory().
|
inlineprotectedvirtual |
This member function is used to create an object of type PolymerElectrolyteBase.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlineprotectedvirtual |
Declare parameters for a parameter file.
Reimplemented from FuelCellShop::Material::BaseMaterial.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinestatic |
Function used to declare all the data necessary in the parameter files for all PolymerElectrolyteBase children.
References get_mapFactory().
|
inlinevirtual |
Compute the electro-osmotic drag coefficient inside the polymer electrolyte at every quadrature point in the cell.
It takes vector as an input argument and values are passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the derivatives of electro-osmotic drag coefficient, at every quadrature point in the cell.
The derivatives are computed based on the flags set by the set_derivative_flags method. It takes map as an input argument by reference, in which Key
corresponds to the variable about which derivative is being computed, i.e., VariableNames and Value
corresponds to the vector storing the derivative values.
Reimplemented in FuelCellShop::Material::Nafion.
|
inline |
Get the density [gm/cm^3
] of the dry polymer electrolyte material.
References rho_M.
|
inline |
Get Equivalent Weight (grams of dry polymer electrolyte per moles of \( SO_3^- \)) of the polymer electrolyte material.
References EW.
|
inline |
Get Henry's constant [Pa-cm^3/mol
] for hydrogen dissolution in the polymer electrolyte.
References H_H2.
|
inline |
Get Henry's constant [Pa-cm^3/mol
] for oxygen dissolution in the polymer electrolyte.
References H_O2.
|
inlinestaticprotected |
Referenced by create_PolymerElectrolyte(), declare_PolymerElectrolyte_parameters(), and set_PolymerElectrolyte_parameters().
|
inline |
Get permittivity of the polymer electrolyte material.
References permittivity.
|
inlineprotectedvirtual |
Initialize parameters.
Reimplemented from FuelCellShop::Material::BaseMaterial.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the oxygen diffusivity, [cm^2/s
], inside the polymer electrolyte for constant case.
It takes a double as an input argument and value is passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the oxygen diffusivity, [cm^2/s
], inside the polymer electrolyte at every quadrature point in the cell.
It takes vector as an input argument and values are passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the derivatives of oxygen diffusivity, at every quadrature point in the cell.
The derivatives are computed based on the flags set by the set_derivative_flags method. It takes map as an input argument by reference, in which Key
corresponds to the variable about which derivative is being computed, i.e., VariableNames and Value
corresponds to the vector storing the derivative values.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the proton conductivity, \( \sigma_{H^+} \) [S/cm
], inside the polymer electrolyte for constant case.
It takes a double as an input argument and value is passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the proton conductivity, \( \sigma_{H^+} \) [S/cm
], inside the polymer electrolyte, at every quadrature point in the cell.
It takes vector as an input argument and values are passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the derivatives of proton conductivity at every quadrature point in the cell.
The derivatives are computed based on the flags set by the set_derivative_flags method. It takes map as an input argument by reference, in which Key
corresponds to the variable about which derivative is being computed, i.e., VariableNames and Value
corresponds to the vector storing the derivative values.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the proton diffusivity, [cm^2/s
], inside the polymer electrolyte for constant case.
It takes a double as an input argument and value is passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inline |
Specify the water content in the polymer electrolyte for constant lambda case.
References lambda.
|
inline |
Set the solution variable, membrane water content \( \lambda \).
It also initializes the temperature solution variable, if it isn't initialized yet. This will help in the case of isothermal applications. set_T method should be used in the initialization of the application to ensure that temperature value is set for isothermal case, otherwise default value 0.0
will be used leading to wrong results.
References FuelCellShop::SolutionVariable::get_variablename(), FuelCellShop::SolutionVariable::is_initialized(), lambda_var, membrane_water_content, T, T_var, and temperature_of_REV.
|
inline |
Specify the total pressure in Pascals.
References p_total.
|
inlineprotectedvirtual |
Member function used to change the values in the parameter file for a given list of parameters.
Reimplemented from FuelCellShop::Material::BaseMaterial.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinestatic |
|
inline |
Specify the temperature [Kelvin
] in the polymer electrolyte for isothermal case.
References T.
|
inline |
Set the solution variable, temperature \( T \) [Kelvin
].
It also initializes the lambda solution variable, it it isn't initialized yet. This will help in the case of applications where \( \lambda \) is not being solved for. Membrane water content value is defaulted to 12.0
, in case if different value is required, use set_lambda method.
References FuelCellShop::SolutionVariable::get_variablename(), FuelCellShop::SolutionVariable::is_initialized(), lambda, lambda_var, membrane_water_content, T_var, and temperature_of_REV.
|
inline |
Set the solution variable, water vapor molar fraction \( x_{H_2O} \).
It also initializes the temperature solution variable, if it isn't initialized yet. This will help in the case of isothermal applications. set_T method should be used in the initialization of the application to ensure that temperature value is set for isothermal case, otherwise default value 0.0
will be used leading to wrong results. Also, total pressure should be set using set_p_t method.
References FuelCellShop::SolutionVariable::get_variablename(), FuelCellShop::SolutionVariable::is_initialized(), T, T_var, temperature_of_REV, water_molar_fraction, and xwater_var.
|
inlinevirtual |
Compute the equilibrium water content, \( \lambda_{eq} \), inside the polymer electrolyte for vapor-equilibriated case, at every quadrature point in the cell.
It takes a vector as an input argument and values are passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the derivatives for water sorption source terms, \( \frac{\partial \lambda_{eq}}{\partial u} \), at every quadrature point in the cell.
The derivatives are computed based on the flags set by the set_derivative_flags method. It takes map as an input argument by reference, in which Key
corresponds to the variable about which derivative is being computed, i.e., VariableNames and Value
corresponds to the vector storing the derivative values.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the water diffusivity, \( D_{\lambda} \) [cm^2/s
], inside the polymer electrolyte for constant case.
It takes a double as an input argument and value is passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the water diffusivity, \( D_{\lambda} \) [cm^2/s
], inside the polymer electrolyte at every quadrature point in the cell.
It takes vector as an input argument and values are passed by reference.
Reimplemented in FuelCellShop::Material::Nafion.
|
inlinevirtual |
Compute the derivatives of water diffusivity at every quadrature point in the cell.
The derivatives are computed based on the flags set by the set_derivative_flags method. It takes map as an input argument by reference, in which Key
corresponds to the variable about which derivative is being computed, i.e., VariableNames and Value
corresponds to the vector storing the derivative values.
Reimplemented in FuelCellShop::Material::Nafion.
|
protected |
Diffusion coefficient of oxygen [cm^2/s
], given in the parameter file.
|
protected |
Diffusion coefficient of protons [cm^2/s
], given in the parameter file.
|
protected |
Diffusion of water in polymer electrolyte (if constant option is used), [cm2/s
].
|
protected |
Equivalent weight.
Referenced by get_EW().
|
protected |
Given electroosmotic drag value in the parameter file.
This value will be used when method_electroosmotic_drag is set to "Constant".
|
protected |
Henry's Constant [Pa-cm^3/mol
] for dissolution of hydroge.
Referenced by get_H_H2().
|
protected |
Henry's Constant [Pa-cm^3/mol
] for dissolution of oxygen.
Referenced by get_H_O2().
|
protected |
Membrane water content, \( \lambda \) for constant lambda case.
In order to update this value, use set_lambda method.
Referenced by PolymerElectrolyteBase(), set_lambda(), and set_temperature().
|
protected |
Solution variable, membrane water content \( \lambda \).
Referenced by set_membrane_water_content(), and set_temperature().
|
protected |
Method/Semi-empirical relation to compute protonic conductivity.
Referenced by FuelCellShop::Material::Nafion::modify_parameters().
|
protected |
Method/semi-empirical relation to compute water diffusivity.
Referenced by FuelCellShop::Material::Nafion::modify_parameters().
|
protected |
Method/semi-empirical relation to compute Electro-osmotic drag.
Referenced by FuelCellShop::Material::Nafion::modify_parameters().
|
protected |
Method to compute equilibrium water content value from sorption isotherm.
Referenced by FuelCellShop::Material::Nafion::modify_parameters().
|
protected |
Total pressure (in Pascals).
In order to update this value, use set_p_t method.
Referenced by PolymerElectrolyteBase(), and set_p_t().
|
protected |
Permittivity of the material.
Referenced by get_permittivity().
|
protected |
Dry polymer electrolyte density [gm/cm^3
].
Referenced by get_density().
|
protected |
Proton conductivity value [S/cm
], given in the parameter file; used with "Constant" method.
|
protected |
Temperature [Kelvins
] for isothermal case.
In order to update this value, use set_T method.
Referenced by PolymerElectrolyteBase(), set_membrane_water_content(), set_T(), and set_water_molar_fraction().
|
protected |
Solution variable, temperature \( T \).
Referenced by set_membrane_water_content(), set_temperature(), and set_water_molar_fraction().
|
protected |
Solution variable, water vapor molar fraction \( x_{H_2O} \).
Referenced by set_water_molar_fraction().