OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
This class defines an MPL where effective transport properties are computed using macro-homogeneous correlations to estimate the effective properties of the media. More...
#include <design_MPL.h>
Public Member Functions | |
Constructors, destructor, and initalization | |
DesignMPL (std::string name) | |
Constructor. | |
DesignMPL () | |
Replica Constructor. | |
~DesignMPL () | |
Destructor. | |
void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
void | set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m) |
Member function used to set new parameters values in the optimization loop. | |
void | initialize (ParameterHandler ¶m) |
Member function used to read in data and initialize the necessary data to compute the coefficients. | |
Effective property calculators | |
virtual void | effective_gas_diffusivity (const double &property, double &effective_property) const |
Compute the effective property in the pores. | |
virtual void | effective_gas_diffusivity (const double &property, Tensor< 2, dim > &effective_property) const |
Compute the effective property in the pores. | |
virtual void | effective_gas_diffusivity (Table< 2, Tensor< 2, dim > > &D_eff) const |
Compute the effective property in the pores. | |
virtual void | effective_electron_conductivity (double &) const |
Compute the effective conductivity. | |
virtual void | effective_electron_conductivity (Tensor< 2, dim > &) const |
Compute the effective conductivity. | |
virtual void | effective_transport_property_solid (const double &property, double &effective_property) const |
Compute the effective property of a property that is defined by the network of fibres. | |
virtual void | effective_transport_property_solid (const Tensor< 2, dim > &property, Tensor< 2, dim > &effective_property) const |
Compute the effective property of a property that is defined by the network of fibres. | |
![]() | |
void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
void | initialize (ParameterHandler ¶m) |
Member function used to read in data and initialize the necessary data to compute the coefficients. | |
const std::type_info & | get_base_type () const |
This member function returns a type_info object with the name of the base layer type the inherited class belongs to, i.e. | |
virtual bool | set_method_effective_transport_property_solid (std::string) |
Specify the methodology to be used to compute the effective properties for the porous phase. | |
![]() | |
void | set_gases_and_compute (std::vector< FuelCellShop::Material::PureGas * > &gases_in, const double &pressure_in, const double &temperature_in) |
Member function used to store all the gases that are in the pore space in the gas diffusion layer as well as their temperature [Kelvin ] and total pressure [atm ]. | |
void | compute_gas_diffusion (FuelCellShop::Material::PureGas *solute_gas, FuelCellShop::Material::PureGas *solvent_gas) |
Member function used to compute bulk diffusion coefficients and derivatives w.r.t temperature for non-isothermal case and store inside the layer. | |
void | set_gases (std::vector< FuelCellShop::Material::PureGas * > &gases_in, const double &pressure_in) |
Member function used to store all the gases that are in the pore space in the porous layer. | |
void | set_temperature (const SolutionVariable &T_in) |
Member function used to set the temperature ]Kelvin ] at every quadrature point inside the cell. | |
FuelCellShop::Material::PureGas * | get_gas_pointer (int index) const |
Return the FuelCellShop::Material::PureGas pointer that is stored inside the class in the ith position. | |
std::vector < FuelCellShop::Material::PureGas * > | get_gases () const |
Returns the vector of FuelCellShop::Material::PureGas pointers stored in the porous layer. | |
void | get_gas_index (FuelCellShop::Material::PureGas *gas_type, int &index) const |
Return the gas index in the GDL class. | |
void | get_T_and_p (double &T, double &p) const |
Return the constant temperature [Kelvin ] and constant pressure [atm ] inside the layer. | |
void | get_p (double &p) const |
Return the constant pressure [atm ] inside the layer. | |
virtual void | print_layer_properties () const |
This member function is a virtual class that can be used to output to screen information from the layer. | |
virtual bool | test_layer () const |
This virtual class should be used for any derived class to be able to test the functionality of the class. | |
![]() | |
virtual void | set_derivative_flags (const std::vector< VariableNames > &flags) |
Set the variables for which you would like to compute the derivatives. | |
void | set_position (std::vector< Point< dim > > &p) |
Member function used by some applications such as dummyGDL in order to know which value to return. | |
virtual void | set_constant_solution (const double &value, const VariableNames &name) |
Set those solution variables which are constant in the particular application. | |
virtual void | set_solution (const std::vector< SolutionVariable > &) |
If the effective properties in the layer depend on the solution, the solution for a given cell should be passed to the class using this member function. | |
bool | belongs_to_material (const char material_id) |
Check if a given cell belongs to the catalyst layer. | |
const std::string & | name_material () |
Return the name of the layer. | |
virtual bool | test_layer () |
This virtual class should be used for any derived class to be able to test the functionality of the class. | |
unsigned int | get_material_id () |
Return the material id of the layer. | |
Protected Attributes | |
Internal variables | |
bool | anisotropy |
General properties. | |
double | porosity |
Porosity of the GDL. | |
double | solid_phase |
Volume fraction of solid phase, i.e. | |
std::string | method_eff_property_pores |
Method used to compute the effective properties in the pores. | |
std::string | method_eff_property_fibres |
Method used to compute the effective properties in the solid phase. | |
double | electrical_conductivity |
Electrical conductivity from the input file. | |
Tensor< 2, dim > | matrix_electrical_conductivity |
Electrical conductivity from the input file in the anisotripic case. | |
std::vector< double > | porosity_th |
Anisotropic properties. | |
std::vector< double > | porosity_mu |
Network constant. | |
std::vector< double > | porosity_gamma |
Network constant gamma. | |
std::vector< double > | D_O2 |
Oxygen Diffusion coefficient. | |
std::vector< double > | D_wv |
Water vapour diffusion coefficient. | |
std::vector< double > | fibre_th |
Solid (electron conductive) network of the MPL threshold. | |
std::vector< double > | fibre_mu |
Solid (electron conductive) network constant. | |
Declaration | |
static const std::string | concrete_name |
Concrete name used for objects of this class. | |
void | declare_parameters (const std::string &mpl_section_name, ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
void | set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &name, ParameterHandler ¶m) const |
Member function used to set new parameters values in the optimization loop. | |
Instance Delivery | |
static DesignMPL< dim > const * | PROTOTYPE |
Prototype declaration. | |
virtual boost::shared_ptr < FuelCellShop::Layer::MicroPorousLayer < dim > > | create_replica (const std::string &name) |
This member function is used to create an object of type micro porous layer. | |
Additional Inherited Members | |
![]() | |
static void | declare_MicroPorousLayer_parameters (const std::string &mpl_section_name, ParameterHandler ¶m) |
Function used to declare all the data necessary in the parameter files former all MicroPorousLayer children. | |
static void | set_MicroPorousLayer_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &mpl_section_name, ParameterHandler ¶m) |
This routine is only used for optimization and parameteric studies purposes when using the Dakota Interface. | |
static boost::shared_ptr < FuelCellShop::Layer::MicroPorousLayer < dim > > | create_MicroPorousLayer (const std::string &mpl_section_name, ParameterHandler ¶m) |
Function used to select the appropriate MicroPorousLayer. | |
![]() | |
static const std::string | concrete_name |
Concrete name used for objects of this class. | |
![]() | |
typedef std::map< std::string, MicroPorousLayer< dim > * > | _mapFactory |
This object is used to store all objects of type MicroPorousLayer. | |
![]() | |
MicroPorousLayer () | |
Replica Constructor. | |
MicroPorousLayer (const std::string &name) | |
Constructor. | |
~MicroPorousLayer () | |
Destructor. | |
void | declare_parameters (const std::string &name, ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
void | set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &name, ParameterHandler ¶m) const |
Member function used to set new parameters values in the optimization loop. | |
![]() | |
PorousLayer (const std::string &name) | |
Constructor. | |
PorousLayer () | |
Constructor. | |
virtual | ~PorousLayer () |
Destructor. | |
void | set_parameters (const std::string &object_name, 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 | gas_diffusion_coefficients (Table< 2, double > &) const |
Return the molecular diffusivty all the gases assigned to the layer using set_gases_and_compute. | |
virtual void | derivative_gas_diffusion_coefficients (std::vector< Table< 2, double > > &) const |
Return the derivative of the molecular diffusion coefficient with respect to the derivative flags for all the gases assigned to the layer using set_gases_and_compute. | |
![]() | |
static _mapFactory * | get_mapFactory () |
Return the map library that stores all childrens of this class. | |
This class defines an MPL where effective transport properties are computed using macro-homogeneous correlations to estimate the effective properties of the media.
Currently the following macro-homogeneous correlations are implemented for the gas phase:
\[ D_{eff} = D*\epsilon^1.5 \]
where \( \epsilon \) is the porosity and is specified in the input file in the following section:\[ D_{eff} = D*(\epsilon - \epsilon_{th})/(1 - \epsilon_{th})^\mu; \]
where \( \epsilon \) is the porosity, \( \epsilon_{th} \) is the threshold porosity below which the gas transport is zero due to a lack of connectiveness of the pores and \( \mu \) is a parameter between 2 and 3. These parameters might be specified for each direction in the media in the input file. The sections where they are specified are:If you would like to define an anisotripic media, please set Anisotropic transport = true and then all the properties will have an X, Y and Z at the end of their name, e.g. set Porosity threshold X = 0.118
For the solid phase properties the methods above can also be selected. The properties are set using the same rules.
FuelCellShop::Layer::DesignMPL< dim >::DesignMPL | ( | std::string | name | ) |
Constructor.
FuelCellShop::Layer::DesignMPL< dim >::DesignMPL | ( | ) |
Replica Constructor.
|
inline |
Destructor.
|
inlineprotectedvirtual |
This member function is used to create an object of type micro porous layer.
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
inlinevirtual |
Declare parameters for a parameter file.
Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.
|
protectedvirtual |
Declare parameters for a parameter file.
The parameters that need to be declared are
Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.
|
virtual |
Compute the effective conductivity.
To compute the effective properties it will use the method specified in set_method_effective_transport_property_solid . This function is used for the isotropic MPL
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Compute the effective conductivity.
To compute the effective properties it will use the method specified in set_method_effective_transport_property_solid . This function is used for the anisotropic MPL.
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Compute the effective property in the pores.
This is used for example to compute effective diffusivity of gases. This routine is used in the isotropic case
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Compute the effective property in the pores.
This is used for example to compute effective diffusivity of gases This routine can be used either in the isotropic or anisotripic case
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Compute the effective property in the pores.
This is used to compute effective diffusivity of gases. This routine can be used either in the isotropic or anisotropic cases. Bulk diffusion coefficients or their derivatives are obtained from Mixure::BinaryDiffusion classes inside this method.
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Compute the effective property of a property that is defined by the network of fibres.
For example this could be used to compute the effective electron conductivity or heat conduction. NOTE: Isotropic case
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Compute the effective property of a property that is defined by the network of fibres.
For example this could be used to compute the effective electron conductivity or heat conduction. Note: Anisotropic case.
Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.
|
virtual |
Member function used to read in data and initialize the necessary data to compute the coefficients.
Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.
|
virtual |
Member function used to set new parameters values in the optimization loop.
Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.
|
inlineprotected |
Member function used to set new parameters values in the optimization loop.
|
protected |
General properties.
Anisotropy ?
|
static |
Concrete name used for objects of this class.
This name is used when setting up the subsection where the data is stored in the input file.
The data will be store under
|
protected |
Oxygen Diffusion coefficient.
|
protected |
Water vapour diffusion coefficient.
|
protected |
Electrical conductivity from the input file.
|
protected |
Solid (electron conductive) network constant.
|
protected |
Solid (electron conductive) network of the MPL threshold.
|
protected |
Electrical conductivity from the input file in the anisotripic case.
|
protected |
Method used to compute the effective properties in the solid phase.
|
protected |
Method used to compute the effective properties in the pores.
|
protected |
Porosity of the GDL.
|
protected |
Network constant gamma.
|
protected |
Network constant.
|
protected |
Anisotropic properties.
Porosity of the GDL threshold
|
staticprotected |
Prototype declaration.
|
protected |
Volume fraction of solid phase, i.e.
fibres