OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
FuelCellShop::Layer::DesignMPL< dim > Class Template Reference

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>

Inheritance diagram for FuelCellShop::Layer::DesignMPL< dim >:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::Layer::DesignMPL< dim >:
Collaboration graph
[legend]

Public Member Functions

Constructors, destructor, and initalization
 DesignMPL (std::string name)
 Constructor. More...
 
 DesignMPL ()
 Replica Constructor. More...
 
 ~DesignMPL ()
 Destructor. More...
 
void declare_parameters (ParameterHandler &param) const
 Declare parameters for a parameter file. More...
 
void set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler &param)
 Member function used to set new parameters values in the optimization loop. More...
 
void initialize (ParameterHandler &param)
 Member function used to read in data and initialize the necessary data to compute the coefficients. More...
 
Effective property calculators
virtual void effective_gas_diffusivity (const double &property, const double &saturation, double &effective_property) const
 Compute the effective property in the pores of the MPL. More...
 
virtual void effective_gas_diffusivity (const double &property, const double &saturation, Tensor< 2, dim > &effective_property) const
 Compute the effective property in the pores of the MPL. More...
 
virtual void effective_gas_diffusivity (std::vector< Tensor< 2, dim > > &) const
 Return the effective diffusivity [m^2/s] for nonisothermal with/without two-phase case in the MPL. More...
 
virtual void derivative_effective_gas_diffusivity (std::map< VariableNames, std::vector< Tensor< 2, dim > > > &) const
 Return the derivative of effective diffusivity w.r.t solution variables/design parameters for nonisothermal with/without two-phase case in the MPL. More...
 
virtual void effective_gas_diffusivity (Table< 2, Tensor< 2, dim > > &D_eff) const
 Compute the effective property in the pores. More...
 
virtual void effective_electron_conductivity (double &) const
 Compute the effective conductivity. More...
 
virtual void effective_electron_conductivity (Tensor< 2, dim > &) const
 Compute the effective conductivity. More...
 
virtual void effective_thermal_conductivity (double &) const
 Compute the effective thermal conductivity. More...
 
virtual void effective_thermal_conductivity (Tensor< 2, dim > &) const
 Compute the effective thermal conductivity. More...
 
virtual void effective_thermal_conductivity (std::vector< Tensor< 2, dim > > &) const
 Compute the effective thermal conductivity at all quadrature points in the cell. More...
 
virtual void liquid_permeablity (std::vector< Tensor< 2, dim > > &) const
 Compute the anisotropic MPL liquid permeability $ \left[ cm^2 \right] $, at all quadrature points in the cell. More...
 
virtual void derivative_liquid_permeablity (std::map< VariableNames, std::vector< Tensor< 2, dim > > > &) const
 Compute the derivative of the anisotropic liquid permeability in the MPL with respect to either the solution or design parameters, at all quadrature points in the cell. More...
 
virtual void saturated_liquid_permeablity_PSD (double &) const
 Compute the anisotropic CL liquid permeability $ \left[ cm^2 \right] $, at all quadrature points in the cell. More...
 
virtual void relative_liquid_permeability_PSD (std::vector< Tensor< 2, dim > > &) const
 Compute the derivative of the anisotropic liquid permeability in the GDL with respect to either the solution or design parameters, at all quadrature points in the cell. More...
 
virtual void derivative_relative_liquid_permeablity_PSD (std::vector< double > &) const
 
virtual void derivative_relative_liquid_permeablity_PSD (std::map< VariableNames, std::vector< Tensor< 2, dim > > > &) const
 
virtual void pcapillary (std::vector< double > &) const
 Compute $ p_c \quad \left[ dyne \cdot cm^{-2}\right] $, at all quadrature points in the cell. More...
 
virtual void saturation_from_capillary_equation (std::vector< double > &) const
 
virtual void derivative_saturation_from_capillary_equation_PSD (std::vector< double > &) const
 
virtual void dpcapillary_dsat (std::vector< double > &) const
 Compute $ \frac{\partial p_c}{\partial s} \quad \left[ dyne \cdot cm^{-2}\right] $, at all quadrature points in the MPL. More...
 
virtual void derivative_dpcapillary_dsat (std::map< VariableNames, std::vector< double > > &) const
 Compute the derivative of $ \frac{\partial p_c}{\partial s} \quad \left[ dyne \cdot cm^{-2}\right] $ in the MPL, with respect to either the solution or design parameters, at all quadrature points in the cell. More...
 
virtual void interfacial_surface_area (std::vector< double > &) const
 Compute the liquid-gas interfacial surface area per unit volume, $ a_{lv} ~\left[ \frac{cm^2}{cm^3} \right] $, at all quadrature points in the MPL. More...
 
virtual void derivative_interfacial_surface_area (std::map< VariableNames, std::vector< double > > &) const
 Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the MPL. More...
 
virtual void interfacial_surface_area_PSD (std::vector< double > &) const
 Compute the liquid-gas interfacial surface area per unit volume, $ a_{lv} ~\left[ \frac{cm^2}{cm^3} \right] $, at all quadrature points in the CL. More...
 
virtual void derivative_interfacial_surface_area_PSD (std::vector< double > &) const
 Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the CL. More...
 
virtual void derivative_interfacial_surface_area_PSD (std::map< VariableNames, std::vector< double > > &) const
 Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the CL. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
void initialize (ParameterHandler &param)
 Declare parameters for a parameter file. More...
 
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. More...
 
virtual void derivative_effective_thermal_conductivity (std::vector< Tensor< 2, dim > > &) const
 Compute the derivative of effective thermal conductivity with respect to temperature. More...
 
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. More...
 
- Public Member Functions inherited from FuelCellShop::Layer::PorousLayer< dim >
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]. More...
 
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). More...
 
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. More...
 
void set_gas_mixture (FuelCellShop::Material::GasMixture &rgas_mixture)
 Set gas_mixture. More...
 
void set_porosity_permeability_tortuosity_booleans (const bool &rporosity_is_constant, const bool &rpermeability_is_constant, const bool &rtortuosity_is_constant)
 Set. More...
 
void set_pressure (const SolutionVariable &p_in)
 Member function used to set the temperature [Kelvin] at every quadrature point inside the cell. More...
 
void set_temperature (const SolutionVariable &T_in)
 Member function used to set the temperature [Kelvin] at every quadrature point inside the cell. More...
 
void set_saturation (const SolutionVariable &s_in)
 Member function used to set the liquid water saturation at every quadrature point inside the cell. More...
 
void set_capillary_pressure (const SolutionVariable &p_in)
 Member function used to set the liquid water saturation at every quadrature point inside the cell. More...
 
FuelCellShop::Material::PureGasget_gas_pointer (int index) const
 Return the FuelCellShop::Material::PureGas pointer that is stored inside the class in the ith position. More...
 
std::vector
< FuelCellShop::Material::PureGas * > 
get_gases () const
 Returns the vector of FuelCellShop::Material::PureGas pointers stored in the porous layer. More...
 
const
FuelCellShop::Material::GasMixture
*const 
get_gas_mixture () const
 This function returns gas_mixture. More...
 
void get_gas_index (FuelCellShop::Material::PureGas *gas_type, int &index) const
 Return the gas index in the GDL class. More...
 
void get_T_and_p (double &T, double &p) const
 Return the constant temperature [Kelvin] and constant pressure [atm] inside the layer. More...
 
void get_p (double &p) const
 Return the constant pressure [atm] inside the layer. More...
 
const bool & get_porosity_is_constant () const
 This function returns porosity_is_constant. More...
 
const bool & get_permeability_is_constant () const
 This function returns permeability_is_constant. More...
 
const bool & get_tortuosity_is_constant () const
 This function returns tortuosity_is_constant. More...
 
double get_porosity () const
 This function computes constant porosity in quadrature points of a mesh entity. More...
 
void get_porosity (std::vector< double > &dst) const
 This function computes constant porosity in quadrature points of a mesh entity. More...
 
void get_porosity (std::vector< double > &dst, const std::vector< Point< dim > > &points) const
 This function computes variable porosity in quadrature points of a mesh entity. More...
 
void get_permeability (std::vector< SymmetricTensor< 2, dim > > &dst) const
 This function computes constant permeability in quadrature points of a mesh entity. More...
 
void get_permeability (std::vector< SymmetricTensor< 2, dim > > &dst, const std::vector< Point< dim > > &points) const
 This function computes variable permeability in quadrature points of a mesh entity. More...
 
void get_SQRT_permeability (std::vector< SymmetricTensor< 2, dim > > &dst) const
 This function computes square root of constant permeability in quadrature points of a mesh entity. More...
 
void get_SQRT_permeability (std::vector< SymmetricTensor< 2, dim > > &dst, const std::vector< Point< dim > > &points) const
 This function computes square root of variable permeability in quadrature points of a mesh entity. More...
 
void get_permeability_INV (std::vector< SymmetricTensor< 2, dim > > &dst) const
 This function computes inverse of constant permeability in quadrature points of a mesh entity. More...
 
void get_permeability_INV (std::vector< SymmetricTensor< 2, dim > > &dst, const std::vector< Point< dim > > &points) const
 This function computes inverse of variable permeability in quadrature points of a mesh entity. More...
 
void get_SQRT_permeability_INV (std::vector< SymmetricTensor< 2, dim > > &dst) const
 This function computes inverse of square root of constant permeability in quadrature points of a mesh entity. More...
 
void get_SQRT_permeability_INV (std::vector< SymmetricTensor< 2, dim > > &dst, const std::vector< Point< dim > > &points) const
 This function computes inverse of square root of variable permeability in quadrature points of a mesh entity. More...
 
void get_Forchheimer_permeability (std::vector< SymmetricTensor< 2, dim > > &dst) const
 This function computes constant Forchheimer permeability in quadrature points of a mesh entity. More...
 
void get_Forchheimer_permeability (std::vector< SymmetricTensor< 2, dim > > &dst, const std::vector< Point< dim > > &points) const
 This function computes variable Forchheimer permeability in quadrature points of a mesh entity. More...
 
void get_tortuosity (std::vector< SymmetricTensor< 2, dim > > &dst) const
 This function computes constant tortuosity in quadrature points of a mesh entity. More...
 
void get_tortuosity (std::vector< SymmetricTensor< 2, dim > > &dst, const std::vector< Point< dim > > &points) const
 This function computes variable tortuosity in quadrature points of a mesh entity. More...
 
virtual void effective_gas_diffusivity (Table< 2, double > &D_eff) const
 Return the effective diffusivty in the GDL for all the gases assigned to the layer using set_gases_and_compute. More...
 
virtual void gas_diffusion_coefficient (std::vector< double > &D_b) const
 Member function used to compute diffusion for a solute_gas, solvent_gas combination at a given temperature and pressure. More...
 
virtual void gas_diffusion_coefficient (std::vector< double > &D_b, std::vector< double > &dD_b_dT) const
 Member function used to compute diffusion for a solute_gas, solvent_gas combination at a given temperature and pressure. More...
 
void molecular_gas_diffusion_coefficient (std::vector< double > &D_m) const
 Member function used to compute molecular diffusion for a solute_gas, solvent_gas combination at a given temperature and pressure. More...
 
void molecular_gas_diffusion_coefficient (std::vector< double > &D_m, std::vector< double > &dD_m_dT) const
 Member function used to compute molecular diffusion for a solute_gas, solvent_gas combination at a given temperature and pressure. More...
 
void Knudsen_diffusion (std::vector< double > &D) const
 Member function used to get the Knudsen diffusivity in the layer after calling compute_gas_diffusion. More...
 
void Knudsen_diffusion (std::vector< double > &D, std::vector< double > &dD_dT) const
 Member function used to compute the Knudsen diffusivity in the layer.after calling compute_gas_diffusion. More...
 
void compute_Knudsen_diffusion (const FuelCellShop::Material::PureGas *solute_gas, const SolutionVariable &T_in, std::vector< double > &D_k) const
 Member function used to compute the Knudsen diffusivity in the layer. More...
 
void compute_Knudsen_diffusion (const FuelCellShop::Material::PureGas *solute_gas, const SolutionVariable &T_in, std::vector< double > &D_k, std::vector< double > &dD_k_dT) const
 Member function used to compute the Knudsen diffusivity in the layer. More...
 
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. More...
 
- Public Member Functions inherited from FuelCellShop::Layer::BaseLayer< dim >
virtual void set_derivative_flags (const std::vector< VariableNames > &flags)
 Set the variables for which you would like to compute the derivatives. More...
 
void set_position (const std::vector< Point< dim > > &p)
 Member function used by some applications such as dummyGDL in order to know which value to return. More...
 
virtual void set_local_material_id (const unsigned int &id)
 Function for setting local material id, for unit testing purposes. More...
 
void unset_local_material_id ()
 Function for unsetting local material id, so that it isn't incorrectly used later Once the key is "unset" to some invalid value, an error will be thrown if the key is requested again without being set. 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 layer depend on the solution, the solution for a given cell should be passed to the class using this member function. More...
 
bool belongs_to_material (const unsigned int material_id)
 Check if a given cell belongs to the catalyst layer and assign. More...
 
const std::string & name_layer () const
 Return the name of the layer. More...
 
virtual bool test_layer ()
 This virtual class should be used for any derived class to be able to test the functionality of the class. More...
 
std::vector< unsigned int > get_material_ids ()
 Return the local material id of the layer. More...
 
unsigned int local_material_id () const
 Return the local material id of the layer, performs a check. More...
 

Protected Attributes

Internal variables
bool anisotropy
 General properties. More...
 
double porosity
 Porosity of the GDL. More...
 
double solid_phase
 Volume fraction of solid phase, i.e. More...
 
std::string method_eff_property_pores
 Method used to compute the effective properties in the pores. More...
 
std::string method_eff_property_fibres
 Method used to compute the effective properties in the solid phase. More...
 
std::string method_eff_thermal_conductivity
 Method used to compute effective thermal conductivity. More...
 
double electrical_conductivity
 Electrical conductivity from the input file. More...
 
double thermal_conductivity
 Thermal conductivity from the input file. More...
 
Tensor< 2, dimmatrix_electrical_conductivity
 Electrical conductivity from the input file in the anisotripic case. More...
 
Tensor< 2, dimmatrix_thermal_conductivity
 Thermal conductivity from the input file in the anisotripic case. More...
 
std::string method_rel_liquid_permeability
 Method used to compute the relative liquid permeability. More...
 
double s_irr
 Irreducible liquid water saturation value in the MPL. More...
 
std::vector< double > porosity_th
 Anisotropic properties. More...
 
std::vector< double > porosity_mu
 Network constant. More...
 
std::vector< double > porosity_gamma
 Network constant gamma. More...
 
std::vector< double > D_O2
 Oxygen Diffusion coefficient. More...
 
std::vector< double > D_wv
 Water vapour diffusion coefficient. More...
 
std::vector< double > fibre_th
 Solid (electron conductive) network of the MPL threshold. More...
 
std::vector< double > fibre_mu
 Solid (electron conductive) network constant. More...
 
std::vector< double > abs_permeability
 Absolute permeability [cm^2] of the layer. More...
 
std::string method_capillary_function
 Method used to compute capillary pressure as a function of saturation. More...
 
double compaction_pressure
 MPL Compaction pressure, $ C ~\left[ MPa \right] $. More...
 
double PTFE_loading
 PTFE loading (% wt) in the MPL. More...
 
double kumbur_factor
 Factor calculated based on Kumbur et al (2007), to be used in capillary pressure computation, given as: $ 2^{0.4 C} ~ \sqrt{ \frac{\epsilon_c}{\kappa} } $. More...
 
- Protected Attributes inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
bool anisotropy
 Anisotropy variable. More...
 
Tensor< 2, dimoxygen_diffusivity
 Oxygen diffusion coefficient. More...
 
Tensor< 2, dimwater_diffusivity
 Water diffusion coefficient. More...
 
Tensor< 2, dimelectrical_conductivity
 Electrical conductivity from the input file in the anisotripic case. More...
 
Tensor< 2, dimthermal_conductivity
 Thermal conductivity from the input file in the anisotripic case. More...
 
- Protected Attributes inherited from FuelCellShop::Layer::PorousLayer< dim >
FuelCellShop::Material::GasMixturegas_mixture
 Gas mixture. More...
 
std::vector
< FuelCellShop::Material::PureGas * > 
gases
 Gases inside a porous layer. More...
 
bool porosity_is_constant
 Variable defining if the porosity is constant. More...
 
bool permeability_is_constant
 Variable defining if the permeability is constant. More...
 
bool tortuosity_is_constant
 Variable defining if the tortuosity is constant. More...
 
double porosity
 User defined constant porosity. More...
 
bool use_Bosanquet
 Boolean flag that specifies if Knudsen effects should be accounted for. More...
 
double Knudsen_radius
 Parameter used to define Knudsen pore radius. More...
 
SymmetricTensor< 2, dimpermeability
 User defined constant permeability, m^2. More...
 
SymmetricTensor< 2, dimSQRT_permeability
 Square root of user defined constant permeability, m. More...
 
SymmetricTensor< 2, dimpermeability_INV
 Inverse of user defined constant permeability, 1/m^2. More...
 
SymmetricTensor< 2, dimSQRT_permeability_INV
 Inverse of square root of user defined constant permeability, 1/m. More...
 
SymmetricTensor< 2, dimForchheimer_permeability
 User defined constant Forchheimer permeability, 1/m. More...
 
SymmetricTensor< 2, dimtortuosity
 User defined constant tortuosity. More...
 
std::string diffusion_species_name
 If GDL properties are stored inside the class (e.g DummyGDL) then, return the property stored under coefficient_name name. More...
 
double temperature
 Temperature [K] used to compute gas diffusivity. More...
 
double pressure
 Total pressure [atm] used to compute gas diffusivity. More...
 
SolutionVariable p_vector
 Pressure at every quadrature point inside the cell in [Pa]. More...
 
SolutionVariable T_vector
 Temperature at every quadrature point inside the cell in [K]. More...
 
SolutionVariable s_vector
 Liquid water saturation at every quadrature point inside the cell [-]. More...
 
SolutionVariable capillary_pressure_vector
 Liquid water capillary pressure at every quadrature point inside the cell in [Pa]. More...
 
Table< 2, double > D_ECtheory
 Tensor of diffusion coefficients This are computed with setting up the gas so that they do not need to be recomputed all the time. More...
 
std::vector< Table< 2, double > > dD_ECtheory_dx
 Vector of tensors for the derivative of the diffusion coefficients – This are computed with setting up the gas so that they do not need to be recomputed all the time. More...
 
std::vector< double > D_molecular
 Vector of molecular diffusion coefficients at every quadrature point inside the cell in m^2/s. More...
 
std::vector< double > dD_molecular_dT
 Vector of derivatives for molecular diffusion coefficients w.r.t temperature, at every quadrature in m^2/s. More...
 
std::vector< double > D_k
 Vector of Knudsen diffusion coefficients at every quadrature point inside the cell in m^2/s. More...
 
std::vector< double > dD_k_dT
 Vector of derivatives for Knudsen diffusion coefficients w.r.t temperature, at every quadrature in m^2/s. More...
 
std::vector< double > D_bulk
 Vector of bulk diffusion coefficients at every quadrature point inside the cell. More...
 
std::vector< double > dD_bulk_dT
 Vector of derivative of bulk diffusion coefficients w.r.t temperature, at every quadrature point inside the cell. More...
 
bool PSD_is_used
 Boolean flag to specify if a PSD is to be used to estimate saturation, permeability, etc. More...
 
std::string PSD_type
 PSD class type from input file. More...
 
boost::shared_ptr
< FuelCellShop::MicroScale::BasePSD
< dim > > 
PSD
 Pointer to the PSD object. More...
 
FuelCellShop::MicroScale::BasePSD
< dim > * 
psd_pointer
 Pointer to the PSD object. More...
 
FuelCellShop::Material::PureGassolute_gas
 Pointer used to store the solute gas for computing binary diffusion coefficients. More...
 
FuelCellShop::Material::PureGassolvent_gas
 Pointer used to store the solute gas for computing binary diffusion coefficients. More...
 
- Protected Attributes inherited from FuelCellShop::Layer::BaseLayer< dim >
const std::string name
 Name of the layer. More...
 
std::vector< unsigned int > material_ids
 List of material IDs that belong to the layer. More...
 
std::vector< Point< dim > > point
 Coordinates of the point where we would like to compute the effective properties. More...
 
std::vector< VariableNamesderivative_flags
 Flags for derivatives: These flags are used to request derivatives. More...
 
std::map< VariableNames, double > constant_solutions
 Map storing values of solution variables constant in a particular application. More...
 

Declaration

static const std::string concrete_name
 Concrete name used for objects of this class. More...
 
void declare_parameters (const std::string &mpl_section_name, ParameterHandler &param) const
 Declare parameters for a parameter file. More...
 
void set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &name, ParameterHandler &param) const
 Member function used to set new parameters values in the optimization loop. More...
 

Instance Delivery

static DesignMPL< dim > const * PROTOTYPE
 Prototype declaration. More...
 
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. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
static void declare_MicroPorousLayer_parameters (const std::string &mpl_section_name, ParameterHandler &param)
 Function used to declare all the data necessary in the parameter files former all MicroPorousLayer children. More...
 
static boost::shared_ptr
< FuelCellShop::Layer::MicroPorousLayer
< dim > > 
create_MicroPorousLayer (const std::string &mpl_section_name, ParameterHandler &param)
 Function used to select the appropriate MicroPorousLayer. More...
 
- Static Public Attributes inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
static const std::string concrete_name
 Concrete name used for objects of this class. More...
 
- Protected Types inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
typedef std::map< std::string,
MicroPorousLayer< dim > * > 
_mapFactory
 This object is used to store all objects of type MicroPorousLayer. More...
 
- Protected Member Functions inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
 MicroPorousLayer ()
 Replica Constructor. More...
 
 MicroPorousLayer (const std::string &name)
 Constructor. More...
 
 ~MicroPorousLayer ()
 Destructor. More...
 
void declare_parameters (const std::string &name, ParameterHandler &param) const
 Declare parameters for a parameter file. More...
 
- Protected Member Functions inherited from FuelCellShop::Layer::PorousLayer< dim >
 PorousLayer (const std::string &name)
 Constructor. More...
 
 PorousLayer ()
 Constructor. More...
 
 PorousLayer (const std::string &name, FuelCellShop::Material::GasMixture &gas_mixture)
 Constructor. More...
 
virtual ~PorousLayer ()
 Destructor. More...
 
void print_caller_name (const std::string &caller_name) const
 This function is used to print out the name of another function that has been declared in the scope of this class, but not yet been implemented. More...
 
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. More...
 
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. More...
 
- Protected Member Functions inherited from FuelCellShop::Layer::BaseLayer< dim >
 BaseLayer ()
 Constructor. More...
 
 BaseLayer (const std::string &name)
 Constructor. More...
 
virtual ~BaseLayer ()
 Destructor. More...
 
virtual void set_parameters (const std::string &object_name, const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler &param)
 Member function used to change the values in the parameter file for a given list of parameters. More...
 
- Static Protected Member Functions inherited from FuelCellShop::Layer::MicroPorousLayer< dim >
static _mapFactoryget_mapFactory ()
 Return the map library that stores all childrens of this class. More...
 

Detailed Description

template<int dim>
class FuelCellShop::Layer::DesignMPL< dim >

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:

* subsection Fuel cell data
* (...)
* subsection Cathode microporous layer
* set Material id = 3
* set Micro porous layer type = DesignMPL
* subsection DesignMPL
* set Porosity = 0.4 # From experimental data (manufacturer's data) on Sigracel 24BC
* set Anisotropic transport = false
* ######### Pore network #########
* set Method effective transport properties in pores = Percolation <- Specify if you would like to use Percolation or Bruggemann
* set Porosity threshold = 0.118 <- Specify threshold porosity value
* set Porosity network constant = 2.0 <- Specify mu value/
* ######### Solid network #########
* set Method effective transport properties in solid phase = Percolation
* set Electric conductivity = 88.84 # From experimental data (manufacturer's data) on Sigracel 24BC
* set Solid network threshold = 0.118
* set Solid network constant = 2.0
* end
* end
* (...)
*

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.

Todo:
This class should be divided into two classes DummyMPL and DesignMPL. DummyMPL is a class where all effective properties are directly specified in the input file. DesignMPL is the class used to compute the effective properties based on effective porous media approximations.
Author
M. Secanell, 2013

Constructor & Destructor Documentation

template<int dim>
FuelCellShop::Layer::DesignMPL< dim >::DesignMPL ( std::string  name)

Constructor.

template<int dim>
FuelCellShop::Layer::DesignMPL< dim >::DesignMPL ( )

Replica Constructor.

template<int dim>
FuelCellShop::Layer::DesignMPL< dim >::~DesignMPL ( )
inline

Destructor.

Member Function Documentation

template<int dim>
virtual boost::shared_ptr<FuelCellShop::Layer::MicroPorousLayer<dim> > FuelCellShop::Layer::DesignMPL< dim >::create_replica ( const std::string &  name)
inlineprotectedvirtual

This member function is used to create an object of type micro porous layer.

Warning
This class MUST be redeclared in every child.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
void FuelCellShop::Layer::DesignMPL< dim >::declare_parameters ( ParameterHandler &  param) const
inlinevirtual

Declare parameters for a parameter file.

Deprecated:
Use FuelCellShop::Layer::MicroPorousLayer<dim>::declare_all_MicroPorousLayer_parameters

Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.

template<int dim>
void FuelCellShop::Layer::DesignMPL< dim >::declare_parameters ( const std::string &  mpl_section_name,
ParameterHandler &  param 
) const
protectedvirtual

Declare parameters for a parameter file.

The parameters that need to be declared are

  • Porosity (default : 0.3) Represents the porosity in t*he GDL
  • Method effective transport properties in pores (default: Bruggemann) Other options "Given|Bruggemann|Percolation|Mezedur"
  • Method effective transport properties in fibres (default: Bruggemann) Other options "Given|Bruggemann|Percolation|Mezedur"

Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_dpcapillary_dsat ( std::map< VariableNames, std::vector< double > > &  ) const
virtual

Compute the derivative of $ \frac{\partial p_c}{\partial s} \quad \left[ dyne \cdot cm^{-2}\right] $ in the MPL, with respect to either the solution or design parameters, at all quadrature points in the cell.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags()

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_effective_gas_diffusivity ( std::map< VariableNames, std::vector< Tensor< 2, dim > > > &  ) const
virtual

Return the derivative of effective diffusivity w.r.t solution variables/design parameters for nonisothermal with/without two-phase case in the MPL.

It transforms bulk diffusion properties computed using compute_gas_diffusion method and transforms it into an effective property, taking into account the porosity, saturation and MPL structure (Anisotropic case), at all quadrature points of the cell.

Note
: For two-phase case, set_saturation should be called before using this method, otherwise this method assumes saturation value to be zero.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_interfacial_surface_area ( std::map< VariableNames, std::vector< double > > &  ) const
virtual

Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the MPL.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags().

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_interfacial_surface_area_PSD ( std::vector< double > &  ) const
virtual

Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the CL.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags().

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_interfacial_surface_area_PSD ( std::map< VariableNames, std::vector< double > > &  ) const
virtual

Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the CL.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags().

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_liquid_permeablity ( std::map< VariableNames, std::vector< Tensor< 2, dim > > > &  ) const
virtual

Compute the derivative of the anisotropic liquid permeability in the MPL with respect to either the solution or design parameters, at all quadrature points in the cell.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags()

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_relative_liquid_permeablity_PSD ( std::vector< double > &  ) const
virtual
template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_relative_liquid_permeablity_PSD ( std::map< VariableNames, std::vector< Tensor< 2, dim > > > &  ) const
virtual
template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::derivative_saturation_from_capillary_equation_PSD ( std::vector< double > &  ) const
virtual
template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::dpcapillary_dsat ( std::vector< double > &  ) const
virtual

Compute $ \frac{\partial p_c}{\partial s} \quad \left[ dyne \cdot cm^{-2}\right] $, at all quadrature points in the MPL.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_electron_conductivity ( double &  ) const
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 >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_electron_conductivity ( Tensor< 2, dim > &  ) const
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 >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_gas_diffusivity ( const double &  property,
const double &  saturation,
double &  effective_property 
) const
virtual

Compute the effective property in the pores of the MPL.

This is used for example to compute effective diffusivity of gases. The method takes in bulk diffusion coefficient [m^2/s] and non-negative liquid water saturation as the first and second argument respectively. This routine is used in the isotropic case.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_gas_diffusivity ( const double &  property,
const double &  saturation,
Tensor< 2, dim > &  effective_property 
) const
virtual

Compute the effective property in the pores of the MPL.

This is used for example to compute effective diffusivity of gases. The method takes in bulk diffusion coefficient [m^2/s] and non-negative liquid water saturation as the first and second argument respectively. This routine can be used either in the isotropic or anisotripic case

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_gas_diffusivity ( std::vector< Tensor< 2, dim > > &  ) const
virtual

Return the effective diffusivity [m^2/s] for nonisothermal with/without two-phase case in the MPL.

It takes bulk diffusivity, computed using compute_gas_diffusion method and transforms it into an effective property, taking into account the porosity, saturation and MPL structure (Anisotropic case), at all quadrature points of the cell.

Note
: For two-phase case, set_saturation should be called before using this method, otherwise this method assumes saturation value to be zero.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_gas_diffusivity ( Table< 2, Tensor< 2, dim > > &  D_eff) const
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.

Note
The routine FuelCellShop::Layer::PorousLayer< dim >::set_gases_and_compute (std::vector< FuelCellShop::Material::PureGas * > &gases, double pressure, double temperature) (in the parent class) should have been called prior to using this class. This method is to be used only for a single-phase, isothermal application.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_thermal_conductivity ( double &  ) const
virtual

Compute the effective thermal conductivity.

It's computed based on the "Method effective thermal conductivity" specified in the parameter file. This function is used for the isotropic MPL

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_thermal_conductivity ( Tensor< 2, dim > &  ) const
virtual

Compute the effective thermal conductivity.

It's computed based on the "Method effective thermal conductivity" specified in the parameter file. This function is used for the anisotropic MPL.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_thermal_conductivity ( std::vector< Tensor< 2, dim > > &  ) const
virtual

Compute the effective thermal conductivity at all quadrature points in the cell.

It's computed based on the "Method effective thermal conductivity" specified in the parameter file. This function is used for the anisotropic MPL.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_transport_property_solid ( const double &  property,
double &  effective_property 
) const
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 >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::effective_transport_property_solid ( const Tensor< 2, dim > &  property,
Tensor< 2, dim > &  effective_property 
) const
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 >.

template<int dim>
void FuelCellShop::Layer::DesignMPL< dim >::initialize ( ParameterHandler &  param)
virtual

Member function used to read in data and initialize the necessary data to compute the coefficients.

Reimplemented from FuelCellShop::Layer::PorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::interfacial_surface_area ( std::vector< double > &  ) const
virtual

Compute the liquid-gas interfacial surface area per unit volume, $ a_{lv} ~\left[ \frac{cm^2}{cm^3} \right] $, at all quadrature points in the MPL.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::interfacial_surface_area_PSD ( std::vector< double > &  ) const
virtual

Compute the liquid-gas interfacial surface area per unit volume, $ a_{lv} ~\left[ \frac{cm^2}{cm^3} \right] $, at all quadrature points in the CL.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::liquid_permeablity ( std::vector< Tensor< 2, dim > > &  ) const
virtual

Compute the anisotropic MPL liquid permeability $ \left[ cm^2 \right] $, at all quadrature points in the cell.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::pcapillary ( std::vector< double > &  ) const
virtual

Compute $ p_c \quad \left[ dyne \cdot cm^{-2}\right] $, at all quadrature points in the cell.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::relative_liquid_permeability_PSD ( std::vector< Tensor< 2, dim > > &  ) const
virtual

Compute the derivative of the anisotropic liquid permeability in the GDL with respect to either the solution or design parameters, at all quadrature points in the cell.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags()

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::saturated_liquid_permeablity_PSD ( double &  ) const
virtual

Compute the anisotropic CL liquid permeability $ \left[ cm^2 \right] $, at all quadrature points in the cell.

Reimplemented from FuelCellShop::Layer::MicroPorousLayer< dim >.

template<int dim>
virtual void FuelCellShop::Layer::DesignMPL< dim >::saturation_from_capillary_equation ( std::vector< double > &  ) const
virtual
template<int dim>
void FuelCellShop::Layer::DesignMPL< dim >::set_parameters ( const std::vector< std::string > &  name_dvar,
const std::vector< double > &  value_dvar,
ParameterHandler &  param 
)
virtual

Member function used to set new parameters values in the optimization loop.

Reimplemented from FuelCellShop::Layer::BaseLayer< dim >.

template<int dim>
void FuelCellShop::Layer::DesignMPL< dim >::set_parameters ( const std::vector< std::string > &  name_dvar,
const std::vector< double > &  value_dvar,
const std::string &  name,
ParameterHandler &  param 
) const
inlineprotected

Member function used to set new parameters values in the optimization loop.

References FcstUtilities::log.

Member Data Documentation

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::abs_permeability
protected

Absolute permeability [cm^2] of the layer.

template<int dim>
bool FuelCellShop::Layer::DesignMPL< dim >::anisotropy
protected

General properties.

Anisotropy ?

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::compaction_pressure
protected

MPL Compaction pressure, $ C ~\left[ MPa \right] $.

template<int dim>
const std::string FuelCellShop::Layer::DesignMPL< dim >::concrete_name
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

* subsection name_specified_in_constructor
* set Material id = 2
* set Microporous layer type = DummyMPL # <-here I select the type of object of type GasDiffusionLayer
* subsection DummyMPL # <- this is the concrete_name for this class
* set all info relevant to this object
* end
* end
*
template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::D_O2
protected

Oxygen Diffusion coefficient.

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::D_wv
protected

Water vapour diffusion coefficient.

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::electrical_conductivity
protected

Electrical conductivity from the input file.

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::fibre_mu
protected

Solid (electron conductive) network constant.

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::fibre_th
protected

Solid (electron conductive) network of the MPL threshold.

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::kumbur_factor
protected

Factor calculated based on Kumbur et al (2007), to be used in capillary pressure computation, given as: $ 2^{0.4 C} ~ \sqrt{ \frac{\epsilon_c}{\kappa} } $.

template<int dim>
Tensor<2,dim> FuelCellShop::Layer::DesignMPL< dim >::matrix_electrical_conductivity
protected

Electrical conductivity from the input file in the anisotripic case.

template<int dim>
Tensor<2,dim> FuelCellShop::Layer::DesignMPL< dim >::matrix_thermal_conductivity
protected

Thermal conductivity from the input file in the anisotripic case.

template<int dim>
std::string FuelCellShop::Layer::DesignMPL< dim >::method_capillary_function
protected

Method used to compute capillary pressure as a function of saturation.

template<int dim>
std::string FuelCellShop::Layer::DesignMPL< dim >::method_eff_property_fibres
protected

Method used to compute the effective properties in the solid phase.

template<int dim>
std::string FuelCellShop::Layer::DesignMPL< dim >::method_eff_property_pores
protected

Method used to compute the effective properties in the pores.

template<int dim>
std::string FuelCellShop::Layer::DesignMPL< dim >::method_eff_thermal_conductivity
protected

Method used to compute effective thermal conductivity.

template<int dim>
std::string FuelCellShop::Layer::DesignMPL< dim >::method_rel_liquid_permeability
protected

Method used to compute the relative liquid permeability.

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::porosity
protected

Porosity of the GDL.

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::porosity_gamma
protected

Network constant gamma.

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::porosity_mu
protected

Network constant.

template<int dim>
std::vector<double> FuelCellShop::Layer::DesignMPL< dim >::porosity_th
protected

Anisotropic properties.

Porosity of the GDL threshold

template<int dim>
DesignMPL<dim> const* FuelCellShop::Layer::DesignMPL< dim >::PROTOTYPE
staticprotected

Prototype declaration.

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::PTFE_loading
protected

PTFE loading (% wt) in the MPL.

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::s_irr
protected

Irreducible liquid water saturation value in the MPL.

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::solid_phase
protected

Volume fraction of solid phase, i.e.

fibres

template<int dim>
double FuelCellShop::Layer::DesignMPL< dim >::thermal_conductivity
protected

Thermal conductivity from the input file.


The documentation for this class was generated from the following file: