16 #ifndef _FUELCELLSHOP__LAYER_CATALYST_LAYER_H
17 #define _FUELCELLSHOP__LAYER_CATALYST_LAYER_H
20 #include<base/parameter_handler.h>
21 #include<base/point.h>
22 #include <base/function.h>
23 #include <lac/vector.h>
24 #include <fe/fe_values.h>
46 class MultiScaleCLTest;
48 namespace FuelCellShop
141 friend class ::MultiScaleCLTest;
168 ParameterHandler ¶m)
174 iterator->second->declare_parameters(cl_section_name, param);
191 static boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> >
create_CatalystLayer (
const std::string& cl_section_name,
192 ParameterHandler ¶m)
194 boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> > pointer;
196 std::string concrete_name;
197 param.enter_subsection(
"Fuel cell data");
199 param.enter_subsection(cl_section_name);
201 concrete_name = param.get(
"Catalyst layer type");
204 param.leave_subsection();
206 param.leave_subsection();
212 if (iterator->second)
224 FcstUtilities::log<<
"Concrete name in FuelCellShop::Layer::CatalystLayer<dim>::create_CatalystLayer does not exist"<<std::endl;
228 pointer->initialize(param);
277 virtual void set_solution(
const std::vector< SolutionVariable >&);
286 this->
kinetics->set_derivative_flags(flags);
297 this->
kinetics->set_reaction_kinetics(rxn_name);
298 this->
catalyst->set_reaction_kinetics(rxn_name);
338 const std::type_info& info =
typeid(*this);
340 <<
" called in Class "
341 << info.name() << std::endl;
354 const std::type_info& info =
typeid(*this);
356 <<
" called in Class "
357 << info.name() << std::endl;
370 const std::type_info& info =
typeid(*this);
372 <<
" called in Class "
373 << info.name() << std::endl;
386 const std::type_info& info =
typeid(*this);
388 <<
" called in Class "
389 << info.name() << std::endl;
402 const std::type_info& info =
typeid(*this);
404 <<
" called in Class "
405 << info.name() << std::endl;
416 const std::type_info& info =
typeid(*this);
418 <<
" called in Class "
419 << info.name() << std::endl;
434 const std::type_info& info =
typeid(*this);
436 <<
" called in Class "
437 << info.name() << std::endl;
445 const std::type_info& info =
typeid(*this);
447 <<
" called in Class "
448 << info.name() << std::endl;
455 const std::type_info& info =
typeid(*this);
457 <<
" called in Class "
458 << info.name() << std::endl;
467 const std::type_info& info =
typeid(*this);
469 <<
" called in Class "
470 << info.name() << std::endl;
479 const std::type_info& info =
typeid(*this);
481 <<
" called in Class "
482 << info.name() << std::endl;
490 const std::type_info& info =
typeid(*this);
492 <<
" called in Class "
493 << info.name() << std::endl;
500 const std::type_info& info =
typeid(*this);
502 <<
" called in Class "
503 << info.name() << std::endl;
512 const std::type_info& info =
typeid(*this);
514 <<
" called in Class "
515 << info.name() << std::endl;
523 const std::type_info& info =
typeid(*this);
525 <<
" called in Class "
526 << info.name() << std::endl;
533 const std::type_info& info =
typeid(*this);
535 <<
" called in Class "
536 << info.name() << std::endl;
543 const std::type_info& info =
typeid(*this);
545 <<
" called in Class "
546 << info.name() << std::endl;
555 const std::type_info& info =
typeid(*this);
557 <<
" called in Class "
558 << info.name() << std::endl;
567 const std::type_info& info =
typeid(*this);
569 <<
" called in Class "
570 << info.name() << std::endl;
578 const std::type_info& info =
typeid(*this);
580 <<
" called in Class "
581 << info.name() << std::endl;
589 const std::type_info& info =
typeid(*this);
591 <<
" called in Class "
592 << info.name() << std::endl;
602 const std::type_info& info =
typeid(*this);
604 <<
" called in Class "
605 << info.name() << std::endl;
614 const std::type_info& info =
typeid(*this);
616 <<
" called in Class "
617 << info.name() << std::endl;
627 const std::type_info& info =
typeid(*this);
629 <<
" called in Class "
630 << info.name() << std::endl;
638 const std::type_info& info =
typeid(*this);
640 <<
" called in Class "
641 << info.name() << std::endl;
648 const std::type_info& info =
typeid(*this);
650 <<
" called in Class "
651 << info.name() << std::endl;
660 const std::type_info& info =
typeid(*this);
662 <<
" called in Class "
663 << info.name() << std::endl;
672 const std::type_info& info =
typeid(*this);
674 <<
" called in Class "
675 << info.name() << std::endl;
683 const std::type_info& info =
typeid(*this);
685 <<
" called in Class "
686 << info.name() << std::endl;
695 const std::type_info& info =
typeid(*this);
697 <<
" called in Class "
698 << info.name() << std::endl;
706 const std::type_info& info =
typeid(*this);
708 <<
" called in Class "
709 << info.name() << std::endl;
716 const std::type_info& info =
typeid(*this);
718 <<
" called in Class "
719 << info.name() << std::endl;
728 const std::type_info& info =
typeid(*this);
730 <<
" called in Class "
731 << info.name() << std::endl;
740 const std::type_info& info =
typeid(*this);
742 <<
" called in Class "
743 << info.name() << std::endl;
752 const std::type_info& info =
typeid(*this);
754 <<
" called in Class "
755 << info.name() << std::endl;
768 const std::type_info& info =
typeid(*this);
770 <<
" called in Class "
771 << info.name() << std::endl;
778 virtual void current_density(std::vector<double>¤t, std::vector<double>&effectiveness)
780 for (
unsigned int i = 0; i<effectiveness.size(); ++i)
781 effectiveness[i] = 0;
792 const std::type_info& info =
typeid(*this);
794 <<
" called in Class "
795 << info.name() << std::endl;
801 const std::type_info& info =
typeid(*this);
803 <<
" called in Class "
804 << info.name() << std::endl;
950 virtual boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> >
create_replica (
const std::string &
name)
952 const std::type_info& info =
typeid(*this);
954 <<
" called in Class "
955 << info.name() << std::endl;
989 boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase >
electrolyte;
1001 boost::shared_ptr< FuelCellShop::Material::CatalystBase >
catalyst;
1004 boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics >
kinetics;
1007 boost::shared_ptr< FuelCellShop::MicroScale::BasePSD<dim> >
PSD;
1029 std::vector<VariableNames> common_names;
1041 #endif // _FUELCELLSHOP__LAYER__CATALYST_LAYER_H
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...
Definition: catalyst_layer.h:1001
virtual void gas_permeablity(double &) const
Compute the CL gas permeability.
Definition: catalyst_layer.h:636
virtual void effective_thermal_conductivity(double &) const
Compute the effective thermal conductivity in the CL.
Definition: catalyst_layer.h:521
virtual void liquid_permeablity(std::vector< Tensor< 2, dim > > &) const
Compute the anisotropic CL liquid permeability , at all quadrature points in the cell.
Definition: catalyst_layer.h:681
boost::shared_ptr< FuelCellShop::MicroScale::BasePSD< dim > > PSD
Definition: catalyst_layer.h:1007
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 solu...
Definition: catalyst_layer.h:510
virtual void interfacial_surface_area(std::vector< double > &) const
Compute the liquid-gas interfacial surface area per unit volume, , at all quadrature points in the CL...
Definition: catalyst_layer.h:738
virtual void effective_thermal_conductivity(Tensor< 2, dim > &) const
Compute the effective thermal conductivity in the CL.
Definition: catalyst_layer.h:531
virtual void effective_thermal_conductivity(std::vector< Tensor< 2, dim > > &) const
Compute the effective thermal conductivity as a Tensor at all quadrature points.
Definition: catalyst_layer.h:541
virtual FuelCellShop::Kinetics::BaseKinetics * get_kinetics() const
Method to provide access to pointer of the kinetic object of the catalyst layer.
Definition: catalyst_layer.h:816
virtual SolutionMap get_coverages()
Method for getting coverages from kinetics objects (overloaded by MultiScaleCL)
virtual void effective_water_diffusivity(double &) const
Compute the effective water diffusivity (lambda diffusivity) in the CL.
Definition: catalyst_layer.h:576
virtual void effective_gas_diffusivity(const double &, const double &, double &) const
Compute the effective property in the pores of the CL.
Definition: catalyst_layer.h:384
std::string diffusion_species_name
If CL properties are stored inside the class (e.g.
Definition: catalyst_layer.h:964
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 s...
Definition: catalyst_layer.h:477
virtual void dpcapillary_dsat(std::vector< double > &) const
Compute , at all quadrature points in the CL.
Definition: catalyst_layer.h:714
void set_reaction_kinetics(const ReactionNames rxn_name)
Member function used to specify the reaction for which the kinetic parameters are needed...
Definition: catalyst_layer.h:295
virtual void effective_thermoosmotic_diffusivity(std::vector< double > &) const
Compute the effective thermo-osmotic diffusivity of lambda (sorbed water), at all quadrature points i...
Definition: catalyst_layer.h:612
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:62
virtual void derivative_effective_thermoosmotic_diffusivity(std::map< VariableNames, std::vector< double > > &) const
Compute the derivative of the effective thermo-osmotic diffusivity of lambda (sorbed water) in the CL...
Definition: catalyst_layer.h:625
Convenient storage object for SolutionVariables.
Definition: fcst_variables.h:447
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 soluti...
Definition: catalyst_layer.h:658
virtual void set_constant_solution(const double &value, const VariableNames &name)
Set those solution variables which are constant in the particular application.
Definition: catalyst_layer.h:250
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 soluti...
Definition: catalyst_layer.h:670
~CatalystLayer()
Destructor.
virtual void declare_parameters(const std::string &name, ParameterHandler ¶m) const
Default virtual declare parameters for a parameter file.
virtual void get_loadings(std::map< std::string, double > &)
Return loadings.
Definition: catalyst_layer.h:352
virtual void set_constant_solution(const double &value, const VariableNames &name)
Set those solution variables which are constant in the particular application.
Definition: base_layer.h:113
const std::string name
Name of the layer.
Definition: base_layer.h:336
virtual void effective_electron_conductivity(Tensor< 2, dim > &) const
Compute the effective electron conductivity in the CL.
Definition: catalyst_layer.h:453
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 CL...
Definition: catalyst_layer.h:400
virtual void get_volume_fractions(std::map< std::string, double > &)
Compute the volume fractions of each phase.
Definition: catalyst_layer.h:336
Definition: system_management.h:75
VariableNames reactant
Name of the reactant which is being solved for in the catalyst layer.
Definition: catalyst_layer.h:1018
Definition: system_management.h:72
virtual void derivative_dpcapillary_dsat(std::map< VariableNames, std::vector< double > > &) const
Compute the derivative of in the CL, with respect to either the solution or design parameters...
Definition: catalyst_layer.h:726
virtual void derivative_effective_thermal_conductivity(std::vector< Tensor< 2, dim > > &) const
Compute the derivative of the effective thermal conductivity in the CL with respect to either the sol...
Definition: catalyst_layer.h:565
bool default_materials
If the default materials are used in the layer, this will be set to true.
Definition: catalyst_layer.h:969
std::string PSD_type
PSD class type from input file.
Definition: catalyst_layer.h:984
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 o...
Definition: catalyst_layer.h:790
std::string electrolyte_type
Electrolyte type from input file.
Definition: catalyst_layer.h:978
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...
Definition: catalyst_layer.h:600
std::string catalyst_type
Catalyst type from input file.
Definition: catalyst_layer.h:972
virtual void effective_gas_diffusivity(Table< 2, Tensor< 2, dim > > &) const
Compute the effective property in the pores of the CL.
Definition: catalyst_layer.h:432
void initialize(ParameterHandler ¶m)
Member function used to read in data and initialize the necessary data to compute the coefficients...
virtual void derivative_liquid_permeablity(std::map< VariableNames, std::vector< Tensor< 2, dim > > > &) const
Compute the derivative of the anisotropic liquid permeability in the CL with respect to either the so...
Definition: catalyst_layer.h:693
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
ReactionNames
Definition: system_management.h:148
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 s...
Definition: catalyst_layer.h:465
virtual FuelCellShop::Material::PolymerElectrolyteBase * get_electrolyte() const
Method to provide access to pointer of the electrolyte object of the catalyst layer.
Definition: catalyst_layer.h:809
virtual void effective_water_diffusivity(std::vector< double > &) const
Compute the effective water diffusivity (lambda diffusivity) at all quadrature points in the CL...
Definition: catalyst_layer.h:587
virtual void current_density(std::vector< double > ¤t, std::vector< double > &effectiveness)
This member function will use a FuelCellShop::BaseKinetics class in order to compute the current dens...
Definition: catalyst_layer.h:778
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 CL.
Definition: catalyst_layer.h:750
This class implements the interface to compute the properties of a "standard" polymer electrolyte mem...
Definition: polymer_electrolyte_material_base.h:62
boost::shared_ptr< FuelCellShop::Material::CatalystSupportBase > catalyst_support
Pointer to the catalyst support object created in the application that is used to calculate the carbo...
Definition: catalyst_layer.h:995
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:107
std::map< std::string, CatalystLayer< dim > * > _mapFactory
This object is used to store all objects of type CatalystLayer.
Definition: catalyst_layer.h:883
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 poi...
Definition: system_management.h:91
static void declare_CatalystLayer_parameters(const std::string &cl_section_name, ParameterHandler ¶m)
Function used to declare all the data necessary in the parameter files former all CatalystLayer child...
Definition: catalyst_layer.h:167
virtual void gas_permeablity(Tensor< 2, dim > &) const
Compute the CL gas permeability.
Definition: catalyst_layer.h:646
std::map< VariableNames,SolutionVariable > solutions
Map storing solution variables.
Definition: catalyst_layer.h:1015
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 ...
Definition: catalyst_layer.h:283
virtual double get_active_area_Pt() const
Get the active area of platinum per unit volume of CL.
Definition: catalyst_layer.h:799
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.
Definition: catalyst_layer.h:950
virtual void current_density(std::vector< double > &)
This member function will use a FuelCellShop::BaseKinetics class in order to compute the current dens...
Definition: catalyst_layer.h:766
boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics > kinetics
Pointer to a kinetics object.
Definition: catalyst_layer.h:1004
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 cl...
Definition: catalyst_layer.h:321
Virtual class used to implement properties that are characteristic of a porous layer.
Definition: porous_layer.h:65
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 nonisot...
Definition: catalyst_layer.h:414
unsigned int n_quad
Stores the number of quadrature points in the cell.
Definition: catalyst_layer.h:1012
std::string kinetics_type
Kinetic class type from input file.
Definition: catalyst_layer.h:981
std::vector< VariableNames > derivative_flags
Flags for derivatives: These flags are used to request derivatives.
Definition: base_layer.h:348
std::string catalyst_support_type
Catalyst Support type from input file.
Definition: catalyst_layer.h:975
static _mapFactory * get_mapFactory()
Return the map library that stores all childrens of this class.
Definition: catalyst_layer.h:938
virtual void derivative_effective_thermal_conductivity(std::vector< double > &) const
Compute the derivative of the effective thermal conductivity in the CL with respect to either the sol...
Definition: catalyst_layer.h:553
virtual void pcapillary(std::vector< double > &) const
Compute , at all quadrature points in the cell.
Definition: catalyst_layer.h:704
virtual void effective_proton_conductivity(double &) const
Compute the effective proton conductivity in the CL.
Definition: catalyst_layer.h:488
virtual void effective_electron_conductivity(double &) const
Compute the effective electron conductivity in the CL.
Definition: catalyst_layer.h:443
Virtual class used to provide the interface for all CatalystLayer children.
Definition: catalyst_layer.h:130
boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase > electrolyte
Pointer to the electrolyte object created in the application that is used to calculate the properties...
Definition: catalyst_layer.h:989
std::string get_kinetics_type()
Method for getting string describing kinetics type (corresponding to kinetics class concrete names) ...
Definition: catalyst_layer.h:824
static boost::shared_ptr< FuelCellShop::Layer::CatalystLayer< dim > > create_CatalystLayer(const std::string &cl_section_name, ParameterHandler ¶m)
Function used to select the appropriate CatalystLayer type as specified in the ParameterHandler under...
Definition: catalyst_layer.h:191
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...
Definition: catalyst_layer.h:498
virtual void set_cell_id(const unsigned int &id)
Function for setting current cell_id from applications.
Definition: catalyst_layer.h:369