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

This class characterizes a catalyst layer and uses this information to compute effective transport properties and interfacial areas for phase change or electrochemical reactions. More...

#include <agglomerate_CL.h>

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

Public Member Functions

Constructors, destructor, and initalization
 AgglomerateCL ()
 Prototype Constructor.
 
 AgglomerateCL (std::string name)
 Constructor.
 
 ~AgglomerateCL ()
 Destructor.
 
void declare_parameters (ParameterHandler &param) const
 Declare all necessary parameters in order to compute the coefficients.
 
void set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, 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.
 
Accessors and info
double get_n () const
 Inline member function that returns the number of agglomerates in the catalyst layer.
 
virtual void current_density (std::vector< double > &current)
 This member function will use a FuelCellShop::Kinetics class in order to compute the current density production in the CL Returns the current density at each quadrature point.
 
virtual void current_density (std::vector< double > &current, std::vector< double > &effectiveness)
 This member function will use a FuelCellShop::Kinetics class in order to compute the current density production in the CL Returns the current density at each quadrature point.
 
virtual void derivative_current_density (std::map< VariableNames, std::vector< double > > &)
 This member function will use a FuelCellShop::Kinetics class in order to compute the derivative of the current density with respect to the variables setup in set_derivative_flags (std::vector< std::string > &flags)
 
virtual void print_layer_properties () const
 Print out composition and micro-structural properties of the catalyst layer.
 
void return_mesh_final (std::vector< double > &temp, std::vector< double > &temp1)
 
void set_mesh (std::vector< double > &temp)
 
- Public Member Functions inherited from FuelCellShop::Layer::ConventionalCL< dim >
 ConventionalCL ()
 
 ~ConventionalCL ()
 Destructor.
 
virtual void get_volume_fraction (double &epsilon_S_out, double &epsilon_V_out, double &epsilon_N_out) const
 Get the volume fractions in the catalyst layer.
 
virtual double get_V_Pt () const
 Return the platinum loading per cm3 catalyst layer.
 
double get_active_area_Pt () const
 Get the active area of platinum per unit volume of CL.
 
virtual void effective_gas_diffusivity (const double &, double &) const
 Compute the effective diffusivty in the CL.
 
virtual void effective_gas_diffusivity (Table< 2, Tensor< 2, dim > > &) const
 Compute the effective diffusivty in the CL.
 
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 as an anisotropic tensor.
 
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 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.
 
- Public Member Functions inherited from FuelCellShop::Layer::CatalystLayer< dim >
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)
 
const std::type_info & get_base_type () const
 This member function returns a type_info object with the name of the base layer type the inherited class belongs to, i.e.
 
virtual 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 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 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.
 
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 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 Attributes

static const std::string concrete_name
 Concrete name used for objects of this class.
 
- Static Public Attributes inherited from FuelCellShop::Layer::ConventionalCL< dim >
static const std::string concrete_name
 Concrete name used for objects of this class.
 

Protected Member Functions

Constructors and declarations
void declare_parameters (const std::string &cl_section_name, ParameterHandler &param) const
 Constructor.
 
void set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &cl_section_name, ParameterHandler &param) const
 Member function used to set new parameters values in the optimization loop.
 
Instance Delivery (Replica creator)
virtual boost::shared_ptr
< FuelCellShop::Layer::CatalystLayer
< dim > > 
create_replica (const std::string &cl_section_name)
 This member function is used to create an object of type gas diffusion layer.
 
Internal member functions
void compute_void_fraction ()
 Compute porosity and volume fraction of solid and ionomer in the catalyst layer.
 
void initialize_aggs ()
 Creates the agg objects populating the aggs object.
 
boost::shared_ptr
< FuelCellShop::MicroScale::AgglomerateBase
get_agg ()
 Function for creating shared pointer object of an unique (multithreadable) agglomerate object.
 
double compute_n () const
 Member function to compute the number of agglomerates.
 
double compute_thickness_agg ()
 Member function used to calculate the sensitivities of the number of agglomerates with respect to the dependent variables.
 
double epsilon_N_agg (const double delta_agg) const
 Inline function used to compute the amount of electrolyte in the catalyst layer.
 
double depsilonN_dthickness_agg (const double thickness_agg) const
 Inline function to compute

\[ \frac{\partial \epsilon_N^{cat}}{\partial thickness_{agg}} \]

This function should only be used to calculate the thin film thickness using Newton's method.

 
double micro_scale_current (boost::shared_ptr< FuelCellShop::MicroScale::AgglomerateBase > &_agg, std::map< VariableNames, SolutionVariable > &solutionMap, const unsigned int &index, double &E_r)
 Private member functions for solving current density given an agglomerate.
 
void choose_agglomerate (boost::shared_ptr< FuelCellShop::MicroScale::AgglomerateBase > &agg_)
 Private member functions for choosing agglomerate type.
 
void solve_current_derivatives_average (std::map< VariableNames, std::vector< double > > &Dcurrent)
 Private member functions for solving for current derivatives in an averaging approach.
 
void solve_current_derivatives_at_each_node (std::map< VariableNames, std::vector< double > > &Dcurrent)
 Private member functions for solving for current derivatives in a per node approach.
 
bool check_micro_scale_initial_guess (const double &x_O2, const double &phi_m, const double &phi_s, const double lambda, const double radius, const double film_thickness, const double porosity)
 
bool get_micro_scale_initial_guess (const double &x_O2, const double &phi_m, const double &phi_s, const double lambda, boost::shared_ptr< FuelCellShop::MicroScale::AgglomerateBase > &_agg, const double radius, const double film_thickness, const double porosity)
 
void commit_data_to_db (std::vector< std::vector< double >> agg_data, std::vector< std::string > agg_column_titles, const double &x_R, const double &phi_m, const double &phi_s, const double lambda, const double radius, const double film_thickness, const double porosity)
 
- Protected Member Functions inherited from FuelCellShop::Layer::ConventionalCL< dim >
void compute_volume_fraction ()
 Compute porosity and volume fraction of solid and ionomer in the catalyst layer.
 
void compute_Av ()
 Compute the active area of catalyst in the layer by the specified method.
 
void derivative_effective_proton_conductivity_wrt_electrolyte_loading (double &) const
 Compute the derivative of the effective proton conductivity w.r.t.
 
void derivative_volume_fractions (double &Depsilon_S, double &Depsilon_V, double &Depsilon_N) const
 Function to compute the partial derivative of the volume fraction the different phases in the catalyst layer with respect to the design variables of the optimization problem.
 
void get_method_transport_property_pores (std::string &method)
 Get the effective transport method in the pores.
 
void get_method_transport_property_electrolyte (std::string &method)
 Get the effective transport method in the electrolyte.
 
void get_method_transport_property_solid (std::string &method)
 Get the effective transport method in the solid phase.
 
double depsilon_S_cat_dprc_Pt (const double V_Pt, const double prc_Pt) const
 Inline function to compute

\[ \frac{\partial \epsilon_S^{cat}}{\partial \%Pt} \]

.

 
double depsilon_S_cat_dVPt (const double prc_Pt) const
 Inline function to compute

\[ \frac{\partial \epsilon_S^{cat}}{\partial m_{Pt}} \]

.

 
double depsilon_V_cat_depsilon_S_cat () const
 Inline function to compute

\[ \frac{\partial \epsilon_V^{cat}}{\partial \epsilon_S^{cat}} \]

.

 
double depsilon_V_cat_depsilon_N_cat () const
 Inline function to compute

\[ \frac{\partial \epsilon_V^{cat}}{\partial \epsilon_S^{cat}} \]

.

 
 ConventionalCL (std::string name)
 Constructor.
 
void declare_parameters (const std::string &cl_section_name, ParameterHandler &param) const
 Declare parameters for a parameter file.
 
void set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, const std::string &cl_section_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.
 
- Protected Member Functions inherited from FuelCellShop::Layer::CatalystLayer< dim >
 CatalystLayer ()
 
 ~CatalystLayer ()
 Destructor.
 
 CatalystLayer (const std::string &name)
 Constructor.
 
- Protected Member Functions inherited from FuelCellShop::Layer::PorousLayer< dim >
 PorousLayer (const std::string &name)
 Constructor.
 
 PorousLayer ()
 Constructor.
 
virtual ~PorousLayer ()
 Destructor.
 
void set_parameters (const std::string &object_name, const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler &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.
 

Protected Attributes

Internal variables
bool aggs_initialized
 Bool for noting if the agglomerates have been initialized.
 
std::string type_agg
 Type of agglomerate.
 
std::string comp_agg
 Composition of the agglomerate, e.g.
 
std::vector< double > agglomerateLoadingWeigths
 Double vector for storing agglomerate loading profiles.
 
bool water_agg
 Check to see if the agglomerate is water-filled.
 
std::string solver_agg
 Choose the analytical or numerical solver for the agglomerate problem.
 
bool average_cell_current
 Boolean value to choose whether to average the current over the cell.
 
double r_agg
 Radius of the agglomerate.
 
double thickness_agg
 Thickness electrolyte film.
 
double epsilon_agg
 Porosity of the agglomerate.
 
double n_agg
 Number of agglomerates (computed from known quantities)
 
double pi
 Pi.
 
std::vector< double > mesh_final
 Stores the node locations used to solve the numerical agglomerate.
 
std::vector< double > co2_final
 Stores the oxygen concentration profile across the agglomerate.
 
double cond_factor
 Factor to be applied to the proton conductivity.
 
std::vector< boost::shared_ptr
< FuelCellShop::MicroScale::AgglomerateBase > > 
aggs
 Vector of shared_ptr agg objects used for calculating current density and current density derivatives.
 
std::vector< std::vector
< double > > 
micro_scale_initial_guess
 Storage for micro scale object (i.e.
 
FcstUtilities::FCSTdatabase db
 Database object for getting and storing initial guess data.
 
double IC_x_R
 
double IC_phi_m
 
double IC_phi_s
 
double IC_lambda
 
double IC_tolerance
 
double IC_radius
 
double IC_film_thickness
 
double IC_porosity
 
- Protected Attributes inherited from FuelCellShop::Layer::ConventionalCL< dim >
double epsilon_N
 Volume fraction of Nafion in the cathode catalyst layer.
 
double epsilon_V
 Void volume fraction (Porosity) of the catalyst layer.
 
double epsilon_S
 Solid volume fraction in the catalyst layer.
 
double epsilon_W
 Volume fraction of water in the cathode catalyst layer.
 
double rho_Pt
 Density of platinum.
 
double rho_c
 Density of support material.
 
double prc_Pt
 Percentage of platinum per carbon on the catalyst layer.
 
double V_Pt
 Platinum loading at the catalyst layer per unit volume.
 
double M_Pt
 Platinum loading at the catalyst layer per unit area.
 
double Av
 Active area of catalyst per unit volume of catalyst layer.
 
std::string method_Av
 Method to compute active area.
 
std::string method_porosity
 Method to compute porosity.
 
double L_CL
 Layer thickness.
 
double rho_N
 Density of electrolyte.
 
double loading_N
 Electrolyte loading.
 
double prc_N
 Percentage (mass fraction) of electrolyte in the catalyst layer.
 
std::string method_eff_property_pores
 Method used to compute effective properties – Type of network.
 
double porosity_th
 Porous network threshold.
 
double porosity_mu
 Porous network constant.
 
double porosity_gamma
 
std::string method_eff_property_solid
 Method used to compute effective properties – Type of network.
 
double solid_electron_conductivity
 Input electron conductivity.
 
double solid_th
 Solid phase network threshold.
 
double solid_mu
 Solid phase network constant.
 
std::string method_eff_property_electrolyte
 Method used to compute effective properties – Type of network.
 
double electrolyte_proton_conductivity
 Input electrolyte proton conductivity.
 
double electrolyte_th
 Electrolyte network threshold.
 
double electrolyte_mu
 Electrolyte network constant.
 
double sigma_p
 Electrolyte proton conductivity.
 
double E0
 Theoretical open-circuit voltage under the operating conditions.
 
- Protected Attributes inherited from FuelCellShop::Layer::CatalystLayer< dim >
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.
 

Static Protected Attributes

Instance Delivery (Prototype)
static AgglomerateCL< dim > const * PROTOTYPE
 

Additional Inherited Members

- Static Public Member Functions inherited from FuelCellShop::Layer::CatalystLayer< dim >
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 inherited from FuelCellShop::Layer::CatalystLayer< dim >
typedef std::map< std::string,
CatalystLayer< dim > * > 
_mapFactory
 This object is used to store all objects of type CatalystLayer.
 
- Static Protected Member Functions inherited from FuelCellShop::Layer::CatalystLayer< dim >
static _mapFactoryget_mapFactory ()
 Return the map library that stores all childrens of this class.
 
Friend class for Unit Testing

Detailed Description

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

This class characterizes a catalyst layer and uses this information to compute effective transport properties and interfacial areas for phase change or electrochemical reactions.

Author
M. Secanell, 2009-13
P. Dobson, 2009-11
M. Moore, 2010-12
M. Bhaiya, 2011-13
P. Wardlaw, 2012-13

Constructor & Destructor Documentation

Prototype Constructor.

Warning
For internal use only
template<int dim>
FuelCellShop::Layer::AgglomerateCL< dim >::AgglomerateCL ( std::string  name)

Constructor.

Warning
To be private in release 1.1
Deprecated:
Use create_CatalystLayer

Destructor.

Member Function Documentation

template<int dim>
bool FuelCellShop::Layer::AgglomerateCL< dim >::check_micro_scale_initial_guess ( const double &  x_O2,
const double &  phi_m,
const double &  phi_s,
const double  lambda,
const double  radius,
const double  film_thickness,
const double  porosity 
)
protected
template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::choose_agglomerate ( boost::shared_ptr< FuelCellShop::MicroScale::AgglomerateBase > &  agg_)
protected

Private member functions for choosing agglomerate type.

template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::commit_data_to_db ( std::vector< std::vector< double >>  agg_data,
std::vector< std::string >  agg_column_titles,
const double &  x_R,
const double &  phi_m,
const double &  phi_s,
const double  lambda,
const double  radius,
const double  film_thickness,
const double  porosity 
)
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::compute_n ( ) const
protected

Member function to compute the number of agglomerates.

The number of agglomerates is computed differently depending on the type of agglomerate and depends on the agglomerate radius, amount of ionomer per agglomerate and the solid phase volume fraction in the CL.

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::compute_thickness_agg ( )
protected

Member function used to calculate the sensitivities of the number of agglomerates with respect to the dependent variables.

Medium Priority Todo:
NOT WORKING YET – Might need some thinking... Note that ideally I would have a "get" and a "compute"

Member function to compute the thickness of the agglomerate thin film based on the radius and structure

template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::compute_void_fraction ( )
protected

Compute porosity and volume fraction of solid and ionomer in the catalyst layer.

template<int dim>
virtual boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > FuelCellShop::Layer::AgglomerateCL< dim >::create_replica ( const std::string &  cl_section_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 from FuelCellShop::Layer::CatalystLayer< dim >.

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

This member function will use a FuelCellShop::Kinetics class in order to compute the current density production in the CL Returns the current density at each quadrature point.

If the current is averaged over the cell, the average current is assigned to each quadrature point in the cell.

Parameters
currentis an empty vector to be filled with current density values. Will be resized to the size of the solution given in set_solution()

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

template<int dim>
virtual void FuelCellShop::Layer::AgglomerateCL< dim >::current_density ( std::vector< double > &  current,
std::vector< double > &  effectiveness 
)
virtual

This member function will use a FuelCellShop::Kinetics class in order to compute the current density production in the CL Returns the current density at each quadrature point.

If the current is averaged over the cell, the average current is assigned to each quadrature point in the cell.

Parameters
currentis an empty vector to be filled with current density values. Will be resized to the size of the solution given in set_solution()
effectivenessis an empty vector to be filled with agglomerate effectiveness values.

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

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

Declare all necessary parameters in order to compute the coefficients.

Deprecated:
Use declare_all_CatalystLayer_parameters

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

References FuelCellShop::Layer::BaseLayer< dim >::name.

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

Constructor.

Constructor that also intialises the pointers to the catalyst, catalyst support and electrolyte objects. Declare parameters for a parameter file.

Parameters that can be declared are defined in:

subsection Fuel cell data
(...)
subsection Cathode catalyst layer <- This is the name of the CL subsection specified in cl_section_name
(...)
NOTE: Here you will need info on ConventionalCL since information from ConventionalCL is used for AgglomerateCL
(...)
subsection AgglomerateCL <- This is the subsection specified by concrete_name
set Agglomerate type = spherical #["spherical|cylindrical"]
set Agglomerate composition = ionomer # [ionomer | water], Compositon of the agglomerate core
set Agglomerate solver = numerical # [analytical | numerical], Method to solve the agglomerate problem
set Average current in cell = false # Decide whether to take the average current density in the cell
set Radius of the agglomerate [nm] = 200
set Agglomerate porosity = 0.25
set Agglomerate Loading Profile = 1 # A list of doubles of the form "1,2.2,3...", used to wait the Pt. loading profile
set Conductivity factor = 1.0 # Allows the user to directly multiplay pronton conductivity, used for model observations
set Initial condition tolerance factor = 0.05 # Tolerance factor for numerical agglomerate initial conditions
end
end
end

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

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::depsilonN_dthickness_agg ( const double  thickness_agg) const
protected

Inline function to compute

\[ \frac{\partial \epsilon_N^{cat}}{\partial thickness_{agg}} \]

This function should only be used to calculate the thin film thickness using Newton's method.

Physically, the thickness of the thin film should not have an effect on the volume fractions defined in ConventionalCL

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

This member function will use a FuelCellShop::Kinetics class in order to compute the derivative of the current density with respect to the variables setup in set_derivative_flags (std::vector< std::string > &flags)

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

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::epsilon_N_agg ( const double  delta_agg) const
protected

Inline function used to compute the amount of electrolyte in the catalyst layer.

This is given by the agglomerate sturcture and the amount of solid phase. In particular,

\[ \epsilon_N^{cat} = n \frac{4.0}{3.0}3.1416({r_agg*1e-7})^{3.0}*(\epsilon_agg-1) + (r_{agg}1e-4 + \delta_{agg}1e-4)^{3.0}; \]

where n is computed by another function. For details on this equation and other see, M.Secanell et al., "",...

template<int dim>
boost::shared_ptr<FuelCellShop::MicroScale::AgglomerateBase> FuelCellShop::Layer::AgglomerateCL< dim >::get_agg ( )
protected

Function for creating shared pointer object of an unique (multithreadable) agglomerate object.

template<int dim>
bool FuelCellShop::Layer::AgglomerateCL< dim >::get_micro_scale_initial_guess ( const double &  x_O2,
const double &  phi_m,
const double &  phi_s,
const double  lambda,
boost::shared_ptr< FuelCellShop::MicroScale::AgglomerateBase > &  _agg,
const double  radius,
const double  film_thickness,
const double  porosity 
)
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::get_n ( ) const
inline

Inline member function that returns the number of agglomerates in the catalyst layer.

References FuelCellShop::Layer::AgglomerateCL< dim >::n_agg.

template<int dim>
void FuelCellShop::Layer::AgglomerateCL< 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>
void FuelCellShop::Layer::AgglomerateCL< dim >::initialize_aggs ( )
protected

Creates the agg objects populating the aggs object.

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::micro_scale_current ( boost::shared_ptr< FuelCellShop::MicroScale::AgglomerateBase > &  _agg,
std::map< VariableNames, SolutionVariable > &  solutionMap,
const unsigned int &  index,
double &  E_r 
)
protected

Private member functions for solving current density given an agglomerate.

template<int dim>
virtual void FuelCellShop::Layer::AgglomerateCL< dim >::print_layer_properties ( ) const
virtual

Print out composition and micro-structural properties of the catalyst layer.

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

template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::return_mesh_final ( std::vector< double > &  temp,
std::vector< double > &  temp1 
)
inline
template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::set_mesh ( std::vector< double > &  temp)
inline
template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::set_parameters ( const std::vector< std::string > &  name_dvar,
const std::vector< double > &  value_dvar,
ParameterHandler &  param 
) const
inline

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

Deprecated:
Use set_all_CatalystLayer_parameters

References FuelCellShop::Layer::BaseLayer< dim >::name.

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

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

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

template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::solve_current_derivatives_at_each_node ( std::map< VariableNames, std::vector< double > > &  Dcurrent)
protected

Private member functions for solving for current derivatives in a per node approach.

template<int dim>
void FuelCellShop::Layer::AgglomerateCL< dim >::solve_current_derivatives_average ( std::map< VariableNames, std::vector< double > > &  Dcurrent)
protected

Private member functions for solving for current derivatives in an averaging approach.

Member Data Documentation

template<int dim>
std::vector<double> FuelCellShop::Layer::AgglomerateCL< dim >::agglomerateLoadingWeigths
protected

Double vector for storing agglomerate loading profiles.

template<int dim>
std::vector<boost::shared_ptr<FuelCellShop::MicroScale::AgglomerateBase> > FuelCellShop::Layer::AgglomerateCL< dim >::aggs
protected

Vector of shared_ptr agg objects used for calculating current density and current density derivatives.

template<int dim>
bool FuelCellShop::Layer::AgglomerateCL< dim >::aggs_initialized
protected

Bool for noting if the agglomerates have been initialized.

template<int dim>
bool FuelCellShop::Layer::AgglomerateCL< dim >::average_cell_current
protected

Boolean value to choose whether to average the current over the cell.

template<int dim>
std::vector<double> FuelCellShop::Layer::AgglomerateCL< dim >::co2_final
protected

Stores the oxygen concentration profile across the agglomerate.

Referenced by FuelCellShop::Layer::AgglomerateCL< dim >::return_mesh_final().

template<int dim>
std::string FuelCellShop::Layer::AgglomerateCL< dim >::comp_agg
protected

Composition of the agglomerate, e.g.

ionomer or water

template<int dim>
const std::string FuelCellShop::Layer::AgglomerateCL< 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 Catalyst layer type = DummyCL # <-here I select the type of object of type CatalystLayer
subsection DummyCL # <- this is the concrete_name for this class
set all info relevant to this object
end
end
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::cond_factor
protected

Factor to be applied to the proton conductivity.

Database object for getting and storing initial guess data.

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::epsilon_agg
protected

Porosity of the agglomerate.

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_film_thickness
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_lambda
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_phi_m
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_phi_s
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_porosity
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_radius
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_tolerance
protected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::IC_x_R
protected
template<int dim>
std::vector<double> FuelCellShop::Layer::AgglomerateCL< dim >::mesh_final
protected

Stores the node locations used to solve the numerical agglomerate.

Referenced by FuelCellShop::Layer::AgglomerateCL< dim >::return_mesh_final(), and FuelCellShop::Layer::AgglomerateCL< dim >::set_mesh().

template<int dim>
std::vector<std::vector<double> > FuelCellShop::Layer::AgglomerateCL< dim >::micro_scale_initial_guess
protected

Storage for micro scale object (i.e.

agglomerate) initial data

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::n_agg
protected

Number of agglomerates (computed from known quantities)

Referenced by FuelCellShop::Layer::AgglomerateCL< dim >::get_n().

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::pi
protected

Pi.

template<int dim>
AgglomerateCL<dim> const* FuelCellShop::Layer::AgglomerateCL< dim >::PROTOTYPE
staticprotected
template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::r_agg
protected

Radius of the agglomerate.

template<int dim>
std::string FuelCellShop::Layer::AgglomerateCL< dim >::solver_agg
protected

Choose the analytical or numerical solver for the agglomerate problem.

template<int dim>
double FuelCellShop::Layer::AgglomerateCL< dim >::thickness_agg
protected

Thickness electrolyte film.

template<int dim>
std::string FuelCellShop::Layer::AgglomerateCL< dim >::type_agg
protected

Type of agglomerate.

template<int dim>
bool FuelCellShop::Layer::AgglomerateCL< dim >::water_agg
protected

Check to see if the agglomerate is water-filled.


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