OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
Pore Size Distribution. More...
#include <PSD_base.h>
Public Member Functions | |
Destructor | |
virtual | ~BasePSD () |
Destructor. More... | |
Initalization | |
virtual const std::type_info & | get_base_type () const |
This member function return the name of the type of layer, i.e. More... | |
void | set_porosity (double porosity) |
double | get_porosity () const |
void | set_derivative_flags (const std::vector< VariableNames > &flags) |
Set the names of FCST solution variables with respect to which you would like to compute the derivatives of material properties. More... | |
virtual void | set_constant_solution (const double &value, const VariableNames &name) |
Set those solution variables which are constant in the particular application. More... | |
virtual void | set_solution (const std::vector< SolutionVariable > &) |
If the effective properties in the psd depend on the solution, the solution for a given cell should be passed to the class using this member function. More... | |
virtual void | set_temperature (const SolutionVariable &T_in) |
Member function used to set the temperature [Kelvin ] at every quadrature point inside the cell. More... | |
virtual void | set_capillary_pressure (const SolutionVariable &C_in) |
Member function used to set the capillary pressure [psi ] at every quadrature point inside the cell. More... | |
virtual void | set_critical_radius () |
Member function used to set the critical radius [nm ] at every quadrature point inside the cell. More... | |
virtual void | get_PSD_plot () |
This function is used to create PSD configuration plot by outputing all the numbers. More... | |
virtual void | set_saturation () |
Member function used to set the saturation at every quadrature point inside the cell. More... | |
virtual void | initialize (ParameterHandler ¶m) |
Member function used to set the saturation at every quadrature point inside the cell. More... | |
Accessors and info | |
const std::string & | name_psd () const |
Return the name of the PSD. More... | |
virtual void | print_psd_properties () const |
This function prints out the psd properties. More... | |
virtual void | get_saturation (std::vector< double > &) const =0 |
This function is used to compute the saturation by using PSD, the saturation is represented by . More... | |
virtual void | get_derivative_saturation (std::vector< double > &) const =0 |
virtual void | get_global_saturated_permeability (double &) const =0 |
This function is used to compute the saturated_permeability by using PSD. More... | |
virtual void | get_relative_liquid_permeability (std::vector< double > &) const =0 |
This function is used to compute the liquid_permeability by using PSD. More... | |
virtual void | get_derivative_relative_liquid_permeability (std::vector< double > &) const =0 |
This function is used to compute the liquid_permeability by using PSD. More... | |
virtual void | get_relative_gas_permeability (std::vector< double > &) const =0 |
This function is used to compute the gas_permeability by using PSD. More... | |
virtual void | get_liquid_gas_interfacial_surface (std::vector< double > &) const =0 |
This function is used to compute the liquid_gas_interfacial_surface by using PSD. More... | |
virtual void | get_derivative_liquid_gas_interfacial_surface (std::vector< double > &) const =0 |
This function is used to compute the liquid_gas_interfacial_surface by using PSD. More... | |
virtual void | get_wetted_wall_surface_area (std::vector< double > &) const =0 |
This function is used to compute the pore_wetted_wall by using PSD. More... | |
virtual void | get_knudsen_radius (std::vector< double > &) const =0 |
This function is used to compute the knudsen_radius by using PSD. More... | |
Static Public Member Functions | |
Instance Delivery (Functions) | |
static void | declare_PSD_parameters (ParameterHandler ¶m) |
Function used to declare all the data necessary in the parameter files for all BasePSD children. More... | |
static boost::shared_ptr < FuelCellShop::MicroScale::BasePSD < dim > > | create_PSD (const std::string &psd_section_name, ParameterHandler ¶m) |
Function used to select the appropriate CatalystLayer type as specified in the ParameterHandler under line. More... | |
Protected Types | |
Instance Delivery (Types) | |
typedef std::map< std::string, BasePSD< dim > * > | _mapFactory |
This object is used to store all objects of type psd. More... | |
Protected Member Functions | |
Constructors, destructor, and parameter initalization | |
BasePSD () | |
Constructor. More... | |
BasePSD (const std::string &name) | |
Constructor. More... | |
virtual void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters for a parameter file. More... | |
void | _initialize (ParameterHandler ¶m) |
Member function used to read in data and initialize the necessary data to compute the coefficients. More... | |
Instance Delivery (Private functions) | |
virtual boost::shared_ptr < FuelCellShop::MicroScale::BasePSD < dim > > | create_replica (const std::string &name) |
This member function is used to create an object of type gas diffusion layer. More... | |
Static Protected Member Functions | |
Instance Delivery (Function) | |
static _mapFactory * | get_mapFactory () |
Return the map library that stores all childrens of this class. More... | |
Protected Attributes | |
Internal variables | |
const std::string | name |
Name of the psd. More... | |
std::vector< VariableNames > | derivative_flags |
Flags for derivatives: These flags are used to request derivatives of material properties. More... | |
std::map< VariableNames, double > | constant_solutions |
Map storing values of solution variables constant in a particular application. More... | |
double | gamma |
The gamma is the Water-air interface surface tension. More... | |
double | contact_angle |
The contact_angle is the contact angle between air and water. More... | |
double | lamda |
The lamda is measured from the mercury intrusion experiment. More... | |
double | F_HI |
The F_HI is the fraction of the total volume corresponding to the hydrophilic pores. More... | |
double | F_HO |
The F_HO is the fraction of the total volume corresponding to the hydrophobic pores. More... | |
std::vector< double > | f_k |
The f_k is the contribution of the log-normal distribution k to the total PSD. More... | |
std::vector< double > | r_k |
The r_k is the characteristic pore size of the distribution k. More... | |
std::vector< double > | s_k |
The s_k is the spread of the distribution k. More... | |
double | por |
The por is the porosity inherited from the layer class. More... | |
Pore Size Distribution.
Based on the results of the mecury intrusion experiment, this class calculates effective transport properties such as relative liquid permeability, permeability and knudsen radius, using a bundle of capilaries analogy as described in reference [1].
The input parameter section declared in the PSD base class is shown below.
An exampe of a PSD section is provided below:
To create a PSD object in the layer class, you need to call the static function declare_PSD_parameters first to declare all the parameters in its children classes. Then using create_PSD with the concrete_name to generate the shared pointer which you can use. The PSD_type is the concrete_name for the particular PSD you want to create.
[1] Pedro Abdiel Mateo Villanueva, A MIXED WETTABILITY PORE SIZE DISTRIBUTION MODEL FOR THE ANALYSIS OF WATER TRANSPORT IN PEMFC MATERIALS, M. Sc. thesis, University of Alberta, 2013
Marc Secanell
|
protected |
This object is used to store all objects of type psd.
|
inlinevirtual |
Destructor.
|
inlineprotected |
Constructor.
Constructor used only to create a prototype. Do not use in general since this will not include the name of the section in the parameter file you need.
|
protected |
Constructor.
|
protected |
Member function used to read in data and initialize the necessary data to compute the coefficients.
|
inlinestatic |
Function used to select the appropriate CatalystLayer type as specified in the ParameterHandler under line.
current options are [ PSD_HI | PSD_HO | PSD_dual | NonePSD ]
The class will read the appropriate section in the parameter file, i.e. the one with name
psd_section_name,create | an object of the desired type and return it. |
References FuelCellShop::MicroScale::BasePSD< dim >::create_replica(), FuelCellShop::MicroScale::BasePSD< dim >::get_mapFactory(), and FcstUtilities::log.
|
inlineprotectedvirtual |
This member function is used to create an object of type gas diffusion layer.
Reimplemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
Referenced by FuelCellShop::MicroScale::BasePSD< dim >::create_PSD().
|
protectedvirtual |
Declare parameters for a parameter file.
Reimplemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::HIPSD< dim >.
|
inlinestatic |
Function used to declare all the data necessary in the parameter files for all BasePSD children.
This member function should be used instead of declare_parameters() when we want to use a BasePSD pointer that selects the type of Psd to run at runtime.
psd_section_name | Name of the section that will encapuslate all the information about the PSD |
param | ParameterHandler object used to store all information about the simulation. Used to read the parameter file. |
The parameter file would look as follows:
subsection psd_section_name set psd type = PSD_dual # Options: PSD_HI | PSD_HO | PSD_dual | NonePSD
References FuelCellShop::MicroScale::BasePSD< dim >::get_mapFactory().
|
inlinevirtual |
This member function return the name of the type of layer, i.e.
Note that this is necessary if we want to find out not the name of the actual class which can be obtain using
but the name of the parent class.
Reimplemented in FuelCellShop::MicroScale::DualPSD< dim >, FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
References FcstUtilities::log.
|
pure virtual |
This function is used to compute the liquid_gas_interfacial_surface by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
This function is used to compute the liquid_permeability by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
|
pure virtual |
This function is used to compute the saturated_permeability by using PSD.
Implemented in FuelCellShop::MicroScale::DualPSD< dim >, FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
This function is used to compute the knudsen_radius by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
This function is used to compute the liquid_gas_interfacial_surface by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
inlinestaticprotected |
Return the map library that stores all childrens of this class.
The declare_parameters of each one of the children that are in the map are called in declare_all_psd.
Referenced by FuelCellShop::MicroScale::BasePSD< dim >::create_PSD(), and FuelCellShop::MicroScale::BasePSD< dim >::declare_PSD_parameters().
|
inline |
por
is the porosity for the given layer that contains this PSD
|
inlinevirtual |
This function is used to create PSD configuration plot by outputing all the numbers.
|
pure virtual |
This function is used to compute the gas_permeability by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
This function is used to compute the liquid_permeability by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
This function is used to compute the saturation by using PSD, the saturation is represented by .
The saturation of a porous medium can be obtained by integrating the change of cumulative pore volume fraction as a function of effective pore radius over the whole pore size domain The saturation is represented by
Implemented in FuelCellShop::MicroScale::DualPSD< dim >, FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
pure virtual |
This function is used to compute the pore_wetted_wall by using PSD.
Implemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::NonePSD< dim >.
|
inlinevirtual |
Member function used to set the saturation at every quadrature point inside the cell.
This function should particulary be used in the case of non-isothermal application. It needs to be implemented at each iteration to reduce the computational time.
Reimplemented in FuelCellShop::MicroScale::DualPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, and FuelCellShop::MicroScale::HOPSD< dim >.
|
inline |
Return the name of the PSD.
|
inlinevirtual |
This function prints out the psd properties.
|
inlinevirtual |
Member function used to set the capillary pressure [psi
] at every quadrature point inside the cell.
This function should particulary be used in the case of non-isothermal application.
Reimplemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::HIPSD< dim >.
|
inlinevirtual |
Set those solution variables which are constant in the particular application.
If the effective properties in the psd depend on other variables that are usually part of the solution vector but are assumed to be constant in this simulation, the const solution value should be passed to the class using this member function. This method should be called in the initialization section of the application. This function takes value to be set as the first argument and the VariableNames as second argument. For instance, it's required to store constant temperature value for an isothermal application, in that case this method can be used. e.g., in order to set temperature as 353.0
[Kelvin
] in the psd, you can use the following code:
|
inlinevirtual |
Member function used to set the critical radius [nm
] at every quadrature point inside the cell.
This function should particulary be used in the case of non-isothermal application. It needs to be implemented at each iteration to reduce the computational time.
Reimplemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, and FuelCellShop::MicroScale::DualPSD< dim >.
|
inline |
Set the names of FCST solution variables with respect to which you would like to compute the derivatives of material properties.
|
inline |
por
is the porosity for the given layer that contains this PSD
|
inlinevirtual |
Member function used to set the saturation at every quadrature point inside the cell.
This function should particulary be used in the case of non-isothermal application. It needs to be implemented at each iteration to reduce the computational time.
Reimplemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::HIPSD< dim >, and FuelCellShop::MicroScale::DualPSD< dim >.
|
inlinevirtual |
If the effective properties in the psd depend on the solution, the solution for a given cell should be passed to the class using this member function.
It is used to set SolutionVariable structure inside the psd. This structure stores the solution variable values at all quadrature points in the cell. For sample usage details, please see documentation of FuelCellShop::SolutionVariable structure.
Note, this function in the base psd sets the interface. It has to be reimplemented in respective child psd classes for respective uses.
|
inlinevirtual |
Member function used to set the temperature [Kelvin
] at every quadrature point inside the cell.
This function should particulary be used in the case of non-isothermal application.
Reimplemented in FuelCellShop::MicroScale::HOPSD< dim >, FuelCellShop::MicroScale::DualPSD< dim >, and FuelCellShop::MicroScale::HIPSD< dim >.
|
protected |
Map storing values of solution variables constant in a particular application.
|
protected |
The contact_angle is the contact angle between air and water.
|
protected |
Flags for derivatives: These flags are used to request derivatives of material properties.
|
protected |
The F_HI is the fraction of the total volume corresponding to the hydrophilic pores.
|
protected |
The F_HO is the fraction of the total volume corresponding to the hydrophobic pores.
|
protected |
The f_k is the contribution of the log-normal distribution k to the total PSD.
|
protected |
The gamma is the Water-air interface surface tension.
|
protected |
The lamda is measured from the mercury intrusion experiment.
|
protected |
Name of the psd.
This value is used as a header in a subsection for the parameter file where all the information concerning this psd is held.
|
protected |
The por is the porosity inherited from the layer class.
|
protected |
The r_k is the characteristic pore size of the distribution k.
|
protected |
The s_k is the spread of the distribution k.