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::CatalystLayer< dim > Class Template Reference

Virtual class used to provide the interface for all CatalystLayer children. More...

#include <catalyst_layer.h>

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

Public Member Functions

Initalization
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 > &)
 This method is used to set the solution variable values in the kinetics object, at all quadrature points in the cell.
 
virtual void set_derivative_flags (const std::vector< VariableNames > &flags)
 Method used to set the variables for which you would like to compute the derivatives in the catalyst layer.
 
void set_reaction_kinetics (const std::string &rxn_name)
 Member function used to specify the reaction for which the kinetic parameters are needed, for example for a Platinum catalyst, we can specify that we need the kinetic parameters for either the oxygen reduction reaction (ORR) or the hydrogen oxidation reaction (HOR)
 
Accessors and info
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.
 
Effective property calculators
virtual void effective_gas_diffusivity (const double &, double &) const
 Compute the effective diffusivty in the CL.
 
virtual void effective_gas_diffusivity (Table< 2, double > &) const
 Return the effective diffusivty in the GDL for all the gases assigned to the layer using set_gases_and_compute.
 
virtual void effective_gas_diffusivity (Table< 2, Tensor< 2, dim > > &) const
 Return a tensor with the effective diffusivty in the GDL for all the gases assigned to the layer using set_gases_and_compute.
 
virtual void effective_electron_conductivity (double &) const
 Compute the effective electron conductivity in the CL.
 
virtual void effective_electron_conductivity (Tensor< 2, dim > &) const
 Compute the effective electron conductivity in the CL.
 
virtual void derivative_effective_electron_conductivity (std::vector< double > &) const
 Compute the derivative of the effective electron conductivity in the GDL with respect to either the solution or design parameters.
 
virtual void derivative_effective_electron_conductivity (std::vector< Tensor< 2, dim > > &) const
 Compute the derivative of the effective electron conductivity in the GDL with respect to either the solution or design parameters.
 
virtual void effective_proton_conductivity (double &) const
 Compute the effective proton conductivity in the CL.
 
virtual void effective_proton_conductivity (std::vector< double > &) const
 Compute the effective proton conductivity, at all quadrature points in the cell, mainly as a function of Temperature.
 
virtual void derivative_effective_proton_conductivity (std::map< VariableNames, std::vector< double > > &) const
 Compute the derivative of the effective proton conductivity in the CL with respect to either the solution or design parameters.
 
virtual void effective_water_diffusivity (double &) const
 Compute the effective water diffusivity (lambda diffusivity) in the CL.
 
virtual void effective_water_diffusivity (std::vector< double > &) const
 Compute the effective water diffusivity (lambda diffusivity) at all quadrature points in the CL.
 
virtual void derivative_effective_water_diffusivity (std::map< VariableNames, std::vector< double > > &) const
 Compute the derivative of the effective water diffusivity (lambda diffusivity) in the CL with respect to either the solution or design parameters.
 
virtual void gas_permeablity (double &) const
 Compute the CL gas permeability.
 
virtual void gas_permeablity (Tensor< 2, dim > &) const
 Compute the CL gas permeability.
 
virtual void derivative_gas_permeablity (std::vector< double > &) const
 Compute the derivative of the effective gas permeability in the GDL with respect to either the solution or design parameters.
 
virtual void derivative_gas_permeablity (std::vector< Tensor< 2, dim > > &) const
 Compute the derivative of the effective gas permeability in the GDL with respect to either the solution or design parameters.
 
virtual void liquid_permeablity (double &) const
 Compute the GDL liquid permeability.
 
virtual void liquid_permeablity (Tensor< 2, dim > &) const
 Compute the GDL liquid permeability.
 
virtual void derivative_liquid_permeablity (std::vector< double > &) const
 Compute the derivative of the effective gas diffusion in the GDL with respect to either the solution or design parameters.
 
virtual void derivative_liquid_permeablity (std::vector< Tensor< 2, dim > > &) const
 Compute the derivative of the effective gas diffusion in the GDL with respect to either the solution or design parameters.
 
Reaction terms
virtual void current_density (std::vector< double > &)
 This member function will use a FuelCellShop::BaseKinetics class in order to compute the current density production in the CL.
 
virtual void current_density (std::vector< double > &, std::vector< double > &)
 This member function will use a FuelCellShop::BaseKinetics class in order to compute the current density production in the CL.
 
virtual void derivative_current_density (std::map< VariableNames, std::vector< double > > &)
 This member function will use a FuelCellShop::BaseKinetics class in order to compute the derivative of the current density with respect to the variables setup using set_derivative_flags.
 
virtual double get_active_area_Pt () const
 Get the active area of platinum per unit volume of CL.
 
virtual
FuelCellShop::Material::PolymerElectrolyteBase
get_electrolyte () const
 Method to provide access to pointer of the electrolyte object of the catalyst layer.
 
virtual
FuelCellShop::Kinetics::BaseKinetics
get_kinetics () const
 Method to provide access to pointer of the kinetic object of the catalyst layer.
 
- 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].
 
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::PureGasget_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.
 
- Public Member Functions inherited from FuelCellShop::Layer::BaseLayer< dim >
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.
 
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.
 

Static Public Member Functions

Instance Delivery (Functions)
static void declare_CatalystLayer_parameters (const std::string &cl_section_name, ParameterHandler &param)
 Function used to declare all the data necessary in the parameter files former all CatalystLayer children.
 
static void set_CatalystLayer_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &cl_section_name, ParameterHandler &param)
 
static boost::shared_ptr
< FuelCellShop::Layer::CatalystLayer
< dim > > 
create_CatalystLayer (const std::string &cl_section_name, ParameterHandler &param)
 Function used to select the appropriate CatalystLayer type as specified in the ParameterHandler under line.
 

Protected Types

Instance Delivery (Types)
typedef std::map< std::string,
CatalystLayer< dim > * > 
_mapFactory
 This object is used to store all objects of type CatalystLayer.
 

Protected Member Functions

Constructors, destructor, and initalization
 CatalystLayer ()
 
 ~CatalystLayer ()
 Destructor.
 
 CatalystLayer (const std::string &name)
 Constructor.
 
virtual void declare_parameters (const std::string &name, ParameterHandler &param) const
 Default virtual declare parameters for a parameter file.
 
virtual 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.
 
void initialize (ParameterHandler &param)
 Member function used to read in data and initialize the necessary data to compute the coefficients.
 
Instance Delivery (Private functions)
virtual boost::shared_ptr
< FuelCellShop::Layer::CatalystLayer
< dim > > 
create_replica (const std::string &name)
 This member function is used to create an object of type gas diffusion layer.
 
- Protected Member Functions inherited from FuelCellShop::Layer::PorousLayer< dim >
 PorousLayer (const std::string &name)
 Constructor.
 
 PorousLayer ()
 Constructor.
 
virtual ~PorousLayer ()
 Destructor.
 
virtual void declare_parameters (ParameterHandler &param) const
 Declare parameters for a parameter file.
 
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.
 
virtual void set_parameters (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.
 
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.
 
- Protected Member Functions inherited from FuelCellShop::Layer::BaseLayer< dim >
 BaseLayer ()
 Constructor.
 
 BaseLayer (const std::string &name)
 Constructor.
 
virtual ~BaseLayer ()
 Destructor.
 

Static Protected Member Functions

Instance Delivery (Function)
static _mapFactoryget_mapFactory ()
 Return the map library that stores all childrens of this class.
 

Protected Attributes

Internal variables
std::string diffusion_species_name
 If CL properties are stored inside the class (e.g.
 
bool default_materials
 If the default materials are used in the layer, this will be set to true.
 
std::string catalyst_type
 Catalyst type from input file.
 
std::string catalyst_support_type
 Catalyst Support type from input file.
 
std::string electrolyte_type
 Electrolyte type from input file.
 
std::string kinetics_type
 Kinetic class type from input file.
 
boost::shared_ptr
< FuelCellShop::Material::PolymerElectrolyteBase
electrolyte
 Pointer to the electrolyte object created in the application that is used to calculate the properties of the electrolyte in the catalyst layer.
 
boost::shared_ptr
< FuelCellShop::Material::CatalystSupportBase
catalyst_support
 Pointer to the catalyst support object created in the application that is used to calculate the carbon black conductivity in the catalyst layer.
 
boost::shared_ptr
< FuelCellShop::Material::CatalystBase
catalyst
 Pointer to the catalyst object created in the application that is used to store the properties of the catalyst used in the layer.
 
boost::shared_ptr
< FuelCellShop::Kinetics::BaseKinetics
kinetics
 Pointer to a kinetics object.
 
unsigned int n_quad
 Stores the number of quadrature points in the cell.
 
std::map< VariableNames,SolutionVariablesolutions
 Map storing solution variables.
 
VariableNames reactant
 Name of the reactant which is being solved for in the catalyst layer.
 
- Protected Attributes inherited from FuelCellShop::Layer::PorousLayer< dim >
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.
 
std::vector
< FuelCellShop::Material::PureGas * > 
gases
 Gases inside the layer.
 
double temperature
 Temperature [Kelvin] used to compute gas diffusivity.
 
double pressure
 Total pressure [atm] used to compute gas diffusivity.
 
SolutionVariable T_vector
 Temperature at every quadrature point inside the cell.
 
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.
 
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.
 
std::vector< double > D_bulk
 Vector of bulk diffusion coefficients at every quadrature point inside the cell.
 
std::vector< double > dD_bulk_dT
 Vector of derivative of bulk diffusion coefficients w.r.t temperature, at every quadrature point inside the cell.
 
- Protected Attributes inherited from FuelCellShop::Layer::BaseLayer< dim >
const std::string name
 Name of the layer.
 
unsigned int material_id
 Identification number.
 
std::vector< Point< dim > > point
 Coordinates of the point where we would like to compute the effective properties.
 
std::vector< VariableNamesderivative_flags
 Flags for derivatives: These flags are used to request derivatives.
 
std::map< VariableNames, double > constant_solutions
 Map storing values of solution variables constant in a particular application.
 

Friends

Friend class for Unit Testing
class ::AgglomerateCLTest
 Friend class for testing purposes.
 

Detailed Description

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

Virtual class used to provide the interface for all CatalystLayer children.

No object of type CatalystLayer should ever be created, instead this layer is used to initialize pointers of type CatalystLayer. The class has a database of children such that it will declare all necessary parameters for all children in the input file, read the input file, create the appripriate children and return a pointer to CatalystLayer with the children selected.

All public functions are virtual but the static functions used to declare parameters and to initialize a pointer of CatalystLayer, i.e. declare_all_CatalystLayer_parameters, set_all_CatalystLayer_parameters and create_CatalystLayer.

Usage Details:

In order to create a catalyst layer within an application, the following steps need to be taken.

First, in the application .h file, create a pointer to a CatalystLayer object, i.e.

boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > CCL;

This pointer object will be available anywhere inside the application. Because we do not want to worry about deleting the pointer afterwards, we use a Boost pointer which has its own memory management algorithms. See the Boost website for more information

Once the pointer is available, we need to do three things in the application

The object is ready for use now.

Here is a code example from app_cathode.cc:

//--------- IN DECLARE_PARAMETERS ------------------------------------------------------
template <int dim>
void
NAME::AppCathode<dim>::declare_parameters(ParameterHandler& param)
{
(...)
// Declare section on the input file where all info will be stored. In this case Fuel Cell Data > Cathode catalyst layer
(...)
}
//--------- IN SET_PARAMETERS ------------------------------------------------------
template <int dim>
void
NAME::AppCathode<dim>::set_parameters(const std::vector<std::string>& name_dvar,
const std::vector<double>& value_dvar,
ParameterHandler& param)
{
(...)
// Set any parameters in the parameter file related to the layers.
FuelCellShop::Layer::CatalystLayer<dim>::set_CatalystLayer_parameters(name_dvar, value_dvar, "Cathode catalyst layer", param);
(...)
}
//--------- IN INITIALIZE ------------------------------------------------------
template <int dim>
void
NAME::AppCathode<dim>::_initialize(ParameterHandler& param)
{
(...)
// Initialize layer classes:
std::vector< FuelCellShop::Material::PureGas * > gases;
gases.push_back(&oxygen);
gases.push_back(&nitrogen);
catalyst.initialize(param);
electrolyte.initialize(param);
catalyst_support.initialize(param);
// Create a catalyst layer. When you create the layer, you also specify the type of electrolyte, catalyst support and catalyst in the layer. For example,
// a conventional catalyst layer will take a FuelCellShop::Material::Nafion type electrolyte, a FuelCellShop::Material::Carbon support
// and a FuelCellShop::Material::Platinum catalyst.
CCL = FuelCellShop::Layer::CatalystLayer<dim>::create_CatalystLayer("Cathode catalyst layer", param);
// Here, I specify the gases that exist in the CCL and their temperature and pressure (based on operating conditions):
CCL->set_gases_and_compute(gases, OC.get_pc_atm (), OC.get_T());
// Initialise the necessary kinetics parameters in CCL.
(...)
}

Member Typedef Documentation

template<int dim>
typedef std::map< std::string, CatalystLayer<dim>* > FuelCellShop::Layer::CatalystLayer< dim >::_mapFactory
protected

This object is used to store all objects of type CatalystLayer.

This information in then used in layer_generator.h in order to create the correct object depending on the specified concrete type of layer selected such as DummyCL.

Constructor & Destructor Documentation

template<int dim>
FuelCellShop::Layer::CatalystLayer< dim >::CatalystLayer ( )
protected
Warning
For internal use only.

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.

template<int dim>
FuelCellShop::Layer::CatalystLayer< dim >::~CatalystLayer ( )
protected

Destructor.

template<int dim>
FuelCellShop::Layer::CatalystLayer< dim >::CatalystLayer ( const std::string &  name)
protected

Constructor.

Member Function Documentation

template<int dim>
static boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > FuelCellShop::Layer::CatalystLayer< dim >::create_CatalystLayer ( const std::string &  cl_section_name,
ParameterHandler &  param 
)
inlinestatic

Function used to select the appropriate CatalystLayer type as specified in the ParameterHandler under line.

set Catalyst layer type = DummyCL

current options are [ DummyCL | AgglomerateCL | HomogeneousCL ]

The class will read the appropriate section in the parameter file, i.e. the one with name

Parameters
cl_section_name,createan object of the desired type and return it.

References FuelCellShop::Layer::CatalystLayer< dim >::create_replica(), and FuelCellShop::Layer::CatalystLayer< dim >::get_mapFactory().

Here is the call graph for this function:

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

This member function is used to create an object of type gas diffusion layer.

Warning
This class MUST be redeclared in every child.

Reimplemented in FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.

Referenced by FuelCellShop::Layer::CatalystLayer< dim >::create_CatalystLayer().

Here is the caller graph for this function:

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::current_density ( std::vector< double > &  )
inlinevirtual

This member function will use a FuelCellShop::BaseKinetics class in order to compute the current density production in the CL.

Reimplemented in FuelCellShop::Layer::DummyCL< dim >, FuelCellShop::Layer::AgglomerateCL< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::current_density ( std::vector< double > &  ,
std::vector< double > &   
)
inlinevirtual

This member function will use a FuelCellShop::BaseKinetics class in order to compute the current density production in the CL.

First argument is current density, and second is effectiveness at all quadrature points in the cell.

Reimplemented in FuelCellShop::Layer::DummyCL< dim >, FuelCellShop::Layer::AgglomerateCL< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.

template<int dim>
static void FuelCellShop::Layer::CatalystLayer< dim >::declare_CatalystLayer_parameters ( const std::string &  cl_section_name,
ParameterHandler &  param 
)
inlinestatic

Function used to declare all the data necessary in the parameter files former all CatalystLayer children.

This member function should be used instead of declare_parameters() when we want to use a CatalystLayer pointer that selects the type of CL to run at runtime.

Parameters
cl_section_nameName of the section that will encapuslate all the information about the CL
paramParameterHandler object used to store all information about the simulation. Used to read the parameter file.

The parameter file would look as follows:

subsection cl_section_name set Catalyst layer type = DummyCL # Options: DummyCL | HomogeneousCL | AgglomerateCL set Catalyst type = Platinum # Options: Platinum set Catalyst support type = CarbonBlack # Options: CarbonBlack set Electrolyte type = Nafion # Options: Nafion

References FuelCellShop::Layer::CatalystLayer< dim >::get_mapFactory().

Here is the call graph for this function:

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

Default virtual declare parameters for a parameter file.

Note
This member function must be virtual since it will be accessed via pointers for all children.

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

Reimplemented in FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.

Referenced by FuelCellShop::Layer::DummyCL< dim >::declare_parameters().

Here is the caller graph for this function:

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::derivative_current_density ( std::map< VariableNames, std::vector< double > > &  )
inlinevirtual

This member function will use a FuelCellShop::BaseKinetics class in order to compute the derivative of the current density with respect to the variables setup using set_derivative_flags.

Reimplemented in FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::derivative_effective_electron_conductivity ( std::vector< double > &  ) const
inlinevirtual

Compute the derivative of the effective electron conductivity in the GDL with respect to either the solution or design parameters.

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

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::derivative_effective_electron_conductivity ( std::vector< Tensor< 2, dim > > &  ) const
inlinevirtual

Compute the derivative of the effective electron conductivity in the GDL with respect to either the solution or design parameters.

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

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

Compute the derivative of the effective proton conductivity in the CL with respect to either the solution or design parameters.

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

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

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

Compute the derivative of the effective water diffusivity (lambda diffusivity) in the CL with respect to either the solution or design parameters.

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

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::derivative_gas_permeablity ( std::vector< double > &  ) const
inlinevirtual

Compute the derivative of the effective gas permeability in the GDL with respect to either the solution or design parameters.

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

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::derivative_gas_permeablity ( std::vector< Tensor< 2, dim > > &  ) const
inlinevirtual

Compute the derivative of the effective gas permeability in the GDL with respect to either the solution or design parameters.

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

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::derivative_liquid_permeablity ( std::vector< double > &  ) const
inlinevirtual

Compute the derivative of the effective gas diffusion in the GDL with respect to either the solution or design parameters.

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

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

Compute the derivative of the effective gas diffusion in the GDL with respect to either the solution or design parameters.

The parameters with respect to which the derivatives are computed are setup in FuelCellShop::Layer::set_derivative_flags(std::vector< std::string > &flags)

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_electron_conductivity ( double &  ) const
inlinevirtual

Compute the effective electron conductivity in the CL.

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_electron_conductivity ( Tensor< 2, dim > &  ) const
inlinevirtual

Compute the effective electron conductivity in the CL.

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_gas_diffusivity ( const double &  ,
double &   
) const
inlinevirtual

Compute the effective diffusivty in the CL.

This routine takes the gas diffusivity from FuelCellShop::BinaryDiffusion and transforms it into an effective property taking into account the porosity and structure of the CL

Deprecated:

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_gas_diffusivity ( Table< 2, double > &  ) const
inlinevirtual

Return the effective diffusivty in the GDL for all the gases assigned to the layer using set_gases_and_compute.

This routine uses FuelCellShop::Mixture::ChapmanEnskog to compute the binary diffusivity for each gas with respect to each other. If the layer contains three gases the vector returns D12, D13, D23. For 4 gases, it returns D12, D13, D14, D23, D24, D34.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_gas_diffusivity ( Table< 2, Tensor< 2, dim > > &  ) const
inlinevirtual

Return a tensor with the effective diffusivty in the GDL for all the gases assigned to the layer using set_gases_and_compute.

This routine uses FuelCellShop::Mixture::ChapmanEnskog to compute the binary diffusivity for each gas with respect to each other. If the layer contains three gases the vector returns D12, D13, D23. For 4 gases, it returns D12, D13, D14, D23, D24, D34 (Anisotropic case).

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_proton_conductivity ( double &  ) const
inlinevirtual

Compute the effective proton conductivity in the CL.

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_proton_conductivity ( std::vector< double > &  ) const
inlinevirtual

Compute the effective proton conductivity, at all quadrature points in the cell, mainly as a function of Temperature.

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_water_diffusivity ( double &  ) const
inlinevirtual

Compute the effective water diffusivity (lambda diffusivity) in the CL.

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::effective_water_diffusivity ( std::vector< double > &  ) const
inlinevirtual

Compute the effective water diffusivity (lambda diffusivity) at all quadrature points in the CL.

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::gas_permeablity ( double &  ) const
inlinevirtual

Compute the CL gas permeability.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::gas_permeablity ( Tensor< 2, dim > &  ) const
inlinevirtual

Compute the CL gas permeability.

template<int dim>
virtual double FuelCellShop::Layer::CatalystLayer< dim >::get_active_area_Pt ( ) const
inlinevirtual

Get the active area of platinum per unit volume of CL.

Reimplemented in FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::ConventionalCL< dim >.

template<int dim>
const std::type_info& FuelCellShop::Layer::CatalystLayer< dim >::get_base_type ( ) const
inlinevirtual

This member function returns a type_info object with the name of the base layer type the inherited class belongs to, 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

const std::type_info& name = typeid(*this)

but the name of the parent class.

Note
Do not re-implement this class in children classes

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

template<int dim>
virtual FuelCellShop::Material::PolymerElectrolyteBase* FuelCellShop::Layer::CatalystLayer< dim >::get_electrolyte ( ) const
inlinevirtual

Method to provide access to pointer of the electrolyte object of the catalyst layer.

References FuelCellShop::Layer::CatalystLayer< dim >::electrolyte.

template<int dim>
virtual FuelCellShop::Kinetics::BaseKinetics* FuelCellShop::Layer::CatalystLayer< dim >::get_kinetics ( ) const
inlinevirtual

Method to provide access to pointer of the kinetic object of the catalyst layer.

References FuelCellShop::Layer::CatalystLayer< dim >::kinetics.

template<int dim>
static _mapFactory* FuelCellShop::Layer::CatalystLayer< dim >::get_mapFactory ( )
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_CatalystLayers.

Warning
In order for children of this class to appear in the map the following four things are necessary
  • a static PROTOTYPE object has to be created. For example, in the .h file:
    static DummyCL<dim> const* PROTOTYPE;
    in the .cc file:
    template <int dim>
    NAME::DummyCL<dim> const* NAME::DummyCL<dim>::PROTOTYPE = new NAME::DummyCL<dim>();
  • a default constructor which creates the PROTOTYPE is needed, e.g.
    template <int dim>
    NAME::DummyCL<dim>::DummyCL()
    : FuelCellShop::Layer::CatalystLayer<dim> ()
    {
    deallog<<" Register DummyGDL GDL to FactoryMap"<<std::endl;
    this->get_mapFactory()->insert(std::pair<std::string, FuelCellShop::Layer::GasDiffusionLayer<dim>* >(concrete_name, this));
    }
  • a static std::string concrete_name must be declared and initialized to the desired name of the children class. This name is used as the name in the map and as the name of the subsection where its parameters are declared. For example, in the .h file:
    static const std::string concrete_name;
    in the .cc file:
    template <int dim>
    const std::string NAME::DummyCL<dim>::concrete_name ("DummyCL");
  • virtual boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > create_replica () needs to be re-implemented in the child. For example, in the .h file
    virtual boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > create_replica (std::string &name,
    {
    return boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > (new FuelCellShop::Layer::DummyCL<dim> (name, electrolyte1, catalyst_support1, catalyst1));
    }

Referenced by FuelCellShop::Layer::CatalystLayer< dim >::create_CatalystLayer(), and FuelCellShop::Layer::CatalystLayer< dim >::declare_CatalystLayer_parameters().

Here is the caller graph for this function:

template<int dim>
void FuelCellShop::Layer::CatalystLayer< dim >::initialize ( ParameterHandler &  param)
protectedvirtual

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

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

Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::HomogeneousCL< dim >, and FuelCellShop::Layer::DummyCL< dim >.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::liquid_permeablity ( double &  ) const
inlinevirtual

Compute the GDL liquid permeability.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::liquid_permeablity ( Tensor< 2, dim > &  ) const
inlinevirtual

Compute the GDL liquid permeability.

template<int dim>
static void FuelCellShop::Layer::CatalystLayer< dim >::set_CatalystLayer_parameters ( const std::vector< std::string > &  name_dvar,
const std::vector< double > &  value_dvar,
const std::string &  cl_section_name,
ParameterHandler &  param 
)
inlinestatic
template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::set_constant_solution ( const double &  value,
const VariableNames name 
)
inlinevirtual

Set those solution variables which are constant in the particular application.

If the effective properties in the layer 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 layer, you can use the following code:

// In the initialization section of the application.
layer.set_constant_solution(353.0, VariableNames::temperature_of_REV);

If temperature_of_REV is passed using this method, it also sets the temperature [Kelvin] values in the electrolyte object. If total_pressure is passed using this method, it also sets the total pressure [Pascals] values in the kinetics and electrolyte object.

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

References FuelCellShop::Layer::CatalystLayer< dim >::electrolyte, FuelCellShop::Layer::CatalystLayer< dim >::kinetics, FuelCellShop::Layer::BaseLayer< dim >::set_constant_solution(), temperature_of_REV, and total_pressure.

Here is the call graph for this function:

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::set_derivative_flags ( const std::vector< VariableNames > &  flags)
inlinevirtual

Method used to set the variables for which you would like to compute the derivatives in the catalyst layer.

It takes vector of VariableNames as an input argument. It also sets the derivative flags in the kinetics and electrolyte object of the catalyst layer.

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

References FuelCellShop::Layer::BaseLayer< dim >::derivative_flags, FuelCellShop::Layer::CatalystLayer< dim >::electrolyte, and FuelCellShop::Layer::CatalystLayer< dim >::kinetics.

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

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

Note
This member function is used when using the Instance Delivery protocol (HIGHLY RECOMMENDED)

Reimplemented in FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.

template<int dim>
void FuelCellShop::Layer::CatalystLayer< dim >::set_reaction_kinetics ( const std::string &  rxn_name)
inline

Member function used to specify the reaction for which the kinetic parameters are needed, for example for a Platinum catalyst, we can specify that we need the kinetic parameters for either the oxygen reduction reaction (ORR) or the hydrogen oxidation reaction (HOR)

References FuelCellShop::Layer::CatalystLayer< dim >::catalyst, and FuelCellShop::Layer::CatalystLayer< dim >::kinetics.

template<int dim>
virtual void FuelCellShop::Layer::CatalystLayer< dim >::set_solution ( const std::vector< SolutionVariable > &  )
virtual

This method is used to set the solution variable values in the kinetics object, at all quadrature points in the cell.

It takes vector of SolutionVariable structures as input argument. Each one of them corresponds to a particular solution variable, required in order to compute various terms such as non-linear current source terms etc.

Note
Use only for solution variables.

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

Friends And Related Function Documentation

template<int dim>
friend class ::AgglomerateCLTest
friend

Friend class for testing purposes.

Member Data Documentation

template<int dim>
boost::shared_ptr< FuelCellShop::Material::CatalystBase > FuelCellShop::Layer::CatalystLayer< dim >::catalyst
protected

Pointer to the catalyst object created in the application that is used to store the properties of the catalyst used in the layer.

Referenced by FuelCellShop::Layer::CatalystLayer< dim >::set_reaction_kinetics().

template<int dim>
boost::shared_ptr< FuelCellShop::Material::CatalystSupportBase > FuelCellShop::Layer::CatalystLayer< dim >::catalyst_support
protected

Pointer to the catalyst support object created in the application that is used to calculate the carbon black conductivity in the catalyst layer.

template<int dim>
std::string FuelCellShop::Layer::CatalystLayer< dim >::catalyst_support_type
protected

Catalyst Support type from input file.

template<int dim>
std::string FuelCellShop::Layer::CatalystLayer< dim >::catalyst_type
protected

Catalyst type from input file.

template<int dim>
bool FuelCellShop::Layer::CatalystLayer< dim >::default_materials
protected

If the default materials are used in the layer, this will be set to true.

If the materials are created in the application and passed down this will be false. Used for the destructor.

template<int dim>
std::string FuelCellShop::Layer::CatalystLayer< dim >::diffusion_species_name
protected

If CL properties are stored inside the class (e.g.

DummyCL) then, return the property stored under coefficient_name name

template<int dim>
boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase > FuelCellShop::Layer::CatalystLayer< dim >::electrolyte
protected

Pointer to the electrolyte object created in the application that is used to calculate the properties of the electrolyte in the catalyst layer.

Referenced by FuelCellShop::Layer::CatalystLayer< dim >::get_electrolyte(), FuelCellShop::Layer::CatalystLayer< dim >::set_constant_solution(), and FuelCellShop::Layer::CatalystLayer< dim >::set_derivative_flags().

template<int dim>
std::string FuelCellShop::Layer::CatalystLayer< dim >::electrolyte_type
protected

Electrolyte type from input file.

template<int dim>
boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics > FuelCellShop::Layer::CatalystLayer< dim >::kinetics
protected
template<int dim>
std::string FuelCellShop::Layer::CatalystLayer< dim >::kinetics_type
protected

Kinetic class type from input file.

template<int dim>
unsigned int FuelCellShop::Layer::CatalystLayer< dim >::n_quad
protected

Stores the number of quadrature points in the cell.

template<int dim>
VariableNames FuelCellShop::Layer::CatalystLayer< dim >::reactant
protected

Name of the reactant which is being solved for in the catalyst layer.

This is specifically used by the FuelCellShop::Layer::AgglomerateCL<dim> object.

template<int dim>
std::map<VariableNames ,SolutionVariable> FuelCellShop::Layer::CatalystLayer< dim >::solutions
protected

Map storing solution variables.

Key represents the name of the variable and Value represents the FuelCellShop::SolutionVariable structure.


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