OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
The base class for micro scale objects in OpenFCST. More...
#include <micro_scale_base.h>
Public Member Functions | |
virtual | ~MicroScaleBase () |
Destructor. More... | |
virtual SolutionMap | compute_current ()=0 |
Function used to compute the current density produced by the micro structure. More... | |
virtual std::vector< double > | compute_derivative_current () |
Function to compute the derivative of the current density at the local operating conditions. More... | |
virtual bool | has_derivatives ()=0 |
Returns true if the class instance can calculate current density derivatives. More... | |
virtual std::string | get_name ()=0 |
Return name of class instance, i.e. More... | |
virtual void | print_properties ()=0 |
Print out key micro-structural dimensions, defined by child. More... | |
virtual double | aux_volume_fraction ()=0 |
MicroScale object may have extra contribution to volume of layer, e.g. More... | |
virtual void | make_thread_safe (ParameterHandler ¶m, unsigned int thread_index)=0 |
Initalization | |
virtual void | set_solution (const std::map< VariableNames, SolutionVariable > &, const VariableNames &, const int &)=0 |
Function for setting the solution map(reactant concentration, phi_s, phi_m, etc.). More... | |
Static Public Member Functions | |
Instance Delivery (Functions) | |
static void | declare_MicroScale_parameters (ParameterHandler ¶m) |
Function used to declare all the data necessary in the parameter files for all MicroScale children. More... | |
static boost::shared_ptr < FuelCellShop::MicroScale::MicroScaleBase > | create_MicroStructure (ParameterHandler ¶m, FuelCellShop::Layer::MultiScaleCL< deal_II_dimension > *layer) |
Function used to select the appropriate MicroScale type as specified in the ParameterHandler under line. More... | |
Protected Types | |
Instance Delivery (Types) | |
typedef std::map< std::string, MicroScaleBase * > | _mapFactory |
This object is used to store all objects of type MicroScaleBase. More... | |
Protected Member Functions | |
void | set_layer (FuelCellShop::Layer::MultiScaleCL< deal_II_dimension > *_layer) |
virtual void | declare_parameters (ParameterHandler ¶m) const =0 |
virtual void | initialize (ParameterHandler ¶m)=0 |
MicroScaleBase () | |
virtual void | set_structure ()=0 |
Instance Delivery (Private functions) | |
virtual boost::shared_ptr < MicroScaleBase > | create_replica ()=0 |
This member function is used to create an object of MicroScaleBase. More... | |
Static Protected Member Functions | |
Instance Delivery (Protected functions) | |
static _mapFactory * | get_mapFactory () |
This member function is used to create an object of type MicroScaleBase. More... | |
Protected Attributes | |
FuelCellShop::Layer::MultiScaleCL < deal_II_dimension > * | layer |
The base class for micro scale objects in OpenFCST.
This polymorphic class specifies all the necessary interfaces that must be implemented by a micro scale object in order for it to work with OpenFCST's MultiScaleCl class.
Micro scale objects primary purpose are to determine reaction rates within the Cl whilst accounting for micro scale mass transport and other losses.
Used to calculate reaction rate of CL micro structure [A/cm^3] and micro scale effectiveness (a ratio of CL micro structure reaction rate normalized by reaction rate calculated using a macro scale homogeneous CL expression).
LIST OF INPUT PARAMETERS FOR THE CLASS.
The base class should be used to create an instance of itself, using a deal.ii parameter interface. First declare_MicroScale_parameters must be called. This function will declare all parameters for all children of the microscale base class (Ionomer filled analytical agglomerate, etc.). N.b The parameters will be entered within the current subsection of the parameter object. Once you have read/initialized your param object use the create_MicroStructure function to create your micro scale object. The object will be automatically initialized. Use the compute_current function to obtain values for current density and micro scale effectiveness. Function set_solution should be called before calling compute_current or compute_derivative_current, in order for the results to be valid for your present solution.
|
protected |
This object is used to store all objects of type MicroScaleBase.
|
inlinevirtual |
Destructor.
|
inlineprotected |
|
pure virtual |
MicroScale object may have extra contribution to volume of layer, e.g.
water.
Returns a fraction.
Implemented in FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::WaterConicalPoreAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerate, and FuelCellShop::MicroScale::HybridAgglomerate.
|
pure virtual |
Function used to compute the current density produced by the micro structure.
Several other functionals may be returned (effectiveness, coverages) Returns current density in [A/cm^3 of sold volume]
Solves for solution variables set by the last call to set_solution.
Implemented in FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerate, and FuelCellShop::MicroScale::WaterConicalPoreAgglomerate.
|
inlinevirtual |
Function to compute the derivative of the current density at the local operating conditions.
Returns current density derivatives in [A/cm^3 of solid/liquid phase micro structure]
Solves for solution variables set by the last call to set_solution.
Call has_derivatives to check if it is OK to call this function.
Reimplemented in FuelCellShop::MicroScale::AgglomerateBase, FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, and FuelCellShop::MicroScale::IonomerAgglomerateAnalytical.
|
inlinestatic |
Function used to select the appropriate MicroScale type as specified in the ParameterHandler under line.
current options are [ IonomerAgglomerateAnalytical | IonomerAgglomerateNumerical | IonomerAgglomerateSun | WaterAgglomerateNumerical | WaterConicalPoreAgglomerate]
The parameter object must already be set to the appropriate subsection.
The MultiScaleCL that calls this function must pass a pointer of itself so that the micro structure class can call MultiScaleCl->get_resources() and ->get_properties().
References get_mapFactory(), and FcstUtilities::log.
|
protectedpure virtual |
This member function is used to create an object of MicroScaleBase.
Implemented in FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::HybridAgglomerate, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::IonomerAgglomerate, and FuelCellShop::MicroScale::WaterConicalPoreAgglomerate.
|
inlinestatic |
Function used to declare all the data necessary in the parameter files for all MicroScale children.
This member function should be used instead of declare_parameters().
param | ParameterHandler object used to store all information about the simulation. Used to read the parameter file. The parameter object should already be set to the desired subsection. |
The parameter subsection would look as follows:
References get_mapFactory().
|
protectedpure virtual |
Implemented in FuelCellShop::MicroScale::AgglomerateBase, FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::IonomerAgglomerate, FuelCellShop::MicroScale::HybridAgglomerate, FuelCellShop::MicroScale::WaterConicalPoreAgglomerate, and FuelCellShop::MicroScale::NumericalAgglomerateBase.
|
inlinestaticprotected |
This member function is used to create an object of type MicroScaleBase.
Referenced by create_MicroStructure(), and declare_MicroScale_parameters().
|
pure virtual |
Return name of class instance, i.e.
concrete name.
Implemented in FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::WaterConicalPoreAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerate, and FuelCellShop::MicroScale::HybridAgglomerate.
|
pure virtual |
Returns true if the class instance can calculate current density derivatives.
Call this function if unsure whether or not to call compute_derivative_current.
Implemented in FuelCellShop::MicroScale::AgglomerateBase, FuelCellShop::MicroScale::PolyAgglomerate, and FuelCellShop::MicroScale::ICCP.
|
protectedpure virtual |
Implemented in FuelCellShop::MicroScale::AgglomerateBase, FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::IonomerAgglomerate, FuelCellShop::MicroScale::HybridAgglomerate, FuelCellShop::MicroScale::WaterConicalPoreAgglomerate, and FuelCellShop::MicroScale::NumericalAgglomerateBase.
|
pure virtual |
|
pure virtual |
Print out key micro-structural dimensions, defined by child.
Implemented in FuelCellShop::MicroScale::AgglomerateBase, FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::ICCP, and FuelCellShop::MicroScale::HybridAgglomerate.
|
inlineprotected |
References layer.
|
pure virtual |
Function for setting the solution map(reactant concentration, phi_s, phi_m, etc.).
First argument provide the map of SolutionVariable. The second argument provide the name of the primary reactant. The final argument is the index of the solution map that the micro scale object should solve for.
This function should be called immediatly before compute_current or compute_derivative_current.
Implemented in FuelCellShop::MicroScale::AgglomerateBase, FuelCellShop::MicroScale::PolyAgglomerate, and FuelCellShop::MicroScale::ICCP.
|
protectedpure virtual |
Implemented in FuelCellShop::MicroScale::PolyAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateSun, FuelCellShop::MicroScale::ICCP, FuelCellShop::MicroScale::WaterAgglomerate, FuelCellShop::MicroScale::IonomerAgglomerateAnalytical, FuelCellShop::MicroScale::IonomerAgglomerate, FuelCellShop::MicroScale::HybridAgglomerate, and FuelCellShop::MicroScale::WaterConicalPoreAgglomerate.
|
protected |
Referenced by FuelCellShop::MicroScale::WaterAgglomerate::aux_volume_fraction(), and set_layer().