OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
Virtual class used to characterize a generic layer interface. More...
#include <base_layer.h>
Public Member Functions | |
Initialization | |
virtual void | set_derivative_flags (const std::vector< VariableNames > &flags) |
Set the variables for which you would like to compute the derivatives. | |
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. | |
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 > &) |
If the effective properties in the layer depend on the solution, the solution for a given cell should be passed to the class using this member function. | |
Accessors and info | |
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 const std::type_info & | get_base_type () const |
This member function return the name of the type of layer, i.e. | |
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 () |
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. | |
Protected Member Functions | |
Constructors, destructor, and initalization | |
BaseLayer () | |
Constructor. | |
BaseLayer (const std::string &name) | |
Constructor. | |
virtual | ~BaseLayer () |
Destructor. | |
virtual void | declare_parameters (const std::string &object_name, ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
virtual void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters for a parameter file. | |
virtual void | set_parameters (const std::string &object_name, const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m) |
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 ¶m) |
Set parameters in parameter file. | |
virtual void | initialize (ParameterHandler ¶m) |
Member function used to read in data and initialize the necessary data to compute the coefficients. | |
Protected Attributes | |
Basic layer information | |
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< VariableNames > | derivative_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. | |
Virtual class used to characterize a generic layer interface.
Note that his class does not contain enough information to characterize any useful layer yet. Please see children.
The base layer is used to store an identification number for the layer and the geometry of the layer.
|
inlineprotected |
Constructor.
|
protected |
Constructor.
|
protectedvirtual |
Destructor.
bool FuelCellShop::Layer::BaseLayer< dim >::belongs_to_material | ( | const char | material_id | ) |
Check if a given cell belongs to the catalyst layer.
|
inlineprotectedvirtual |
Declare parameters for a parameter file.
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >, FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::PorousLayer< dim >, FuelCellShop::Layer::DesignFibrousGDL< dim >, FuelCellShop::Layer::DummyCL< dim >, FuelCellShop::Layer::DummyGDL< dim >, FuelCellShop::Layer::NafionMembrane< dim >, FuelCellShop::Layer::SGL24BA< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.
Referenced by FuelCellShop::Layer::PorousLayer< dim >::declare_parameters().
|
inlineprotectedvirtual |
Declare parameters for a parameter file.
Reimplemented in FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::PorousLayer< dim >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::SGL24BA< dim >, FuelCellShop::Layer::DesignFibrousGDL< dim >, FuelCellShop::Layer::SGL24BC< dim >, FuelCellShop::Layer::DummyGDL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::SolidLayer< dim >.
|
inlinevirtual |
This member function return the name of the type of layer, 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
but the name of the parent class.
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >, FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::MembraneLayer< dim >, and FuelCellShop::Layer::SolidLayer< dim >.
|
inline |
Return the material id of the layer.
|
protectedvirtual |
Member function used to read in data and initialize the necessary data to compute the coefficients.
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >, FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::PorousLayer< dim >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::NafionMembrane< dim >, FuelCellShop::Layer::HomogeneousCL< dim >, FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::DesignFibrousGDL< dim >, FuelCellShop::Layer::DummyGDL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::SolidLayer< dim >.
|
inline |
Return the name of the layer.
|
virtual |
This member function is a virtual class that can be used to output to screen information from the layer.
This function should be re-implemented in each layer with data that is relevant in each case.
Reimplemented in FuelCellShop::Layer::AgglomerateCL< dim >, FuelCellShop::Layer::PorousLayer< dim >, and FuelCellShop::Layer::ConventionalCL< dim >.
|
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:
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >, and FuelCellShop::Layer::MembraneLayer< dim >.
Referenced by FuelCellShop::Layer::MembraneLayer< dim >::set_constant_solution(), and FuelCellShop::Layer::CatalystLayer< dim >::set_constant_solution().
|
inlinevirtual |
Set the variables for which you would like to compute the derivatives.
It takes a vector of VariableNames as an input argument.
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >, and FuelCellShop::Layer::MembraneLayer< dim >.
|
inlineprotectedvirtual |
Member function used to change the values in the parameter file for a given list of parameters.
Note that this is a static function, therefore it requires as the first argument the string with the name of the section you would like to create for the object of this class.
Reimplemented in FuelCellShop::Layer::PorousLayer< dim >.
Referenced by FuelCellShop::Layer::PorousLayer< dim >::set_parameters().
|
inlineprotectedvirtual |
Set parameters in parameter file.
Reimplemented in FuelCellShop::Layer::PorousLayer< dim >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::DummyGDL< dim >, and FuelCellShop::Layer::SolidLayer< dim >.
|
inline |
Member function used by some applications such as dummyGDL in order to know which value to return.
For other classes this class is not used.
|
inlinevirtual |
If the effective properties in the layer depend on the solution, the solution for a given cell should be passed to the class using this member function.
It is used to set SolutionVariable structure inside the layer. This structure stores the solution variable values at all quadrature points in the cell. For sample usage details, please see documentation of FuelCellShop::SolutionVariable structure.
Note, this function in the base layer sets the interface. It has to be reimplemented in respective child layer classes for respective uses.
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >.
References FuelCellShop::Layer::BaseLayer< dim >::name.
|
inlinevirtual |
This virtual class should be used for any derived class to be able to test the functionality of the class.
|
protected |
Map storing values of solution variables constant in a particular application.
|
protected |
Flags for derivatives: These flags are used to request derivatives.
Referenced by FuelCellShop::Layer::MembraneLayer< dim >::set_derivative_flags(), and FuelCellShop::Layer::CatalystLayer< dim >::set_derivative_flags().
|
protected |
Identification number.
|
protected |
Name of the layer.
This value is used as a header in a subsection for the parameter file where all the information concerning this layer is held
Referenced by FuelCellShop::Layer::NafionMembrane< dim >::create_replica(), FuelCellShop::Layer::DummyCL< dim >::create_replica(), FuelCellShop::Layer::DummyCL< dim >::declare_parameters(), FuelCellShop::Layer::AgglomerateCL< dim >::declare_parameters(), FuelCellShop::Layer::MembraneLayer< dim >::declare_parameters(), FuelCellShop::Layer::AgglomerateCL< dim >::set_parameters(), and FuelCellShop::Layer::BaseLayer< dim >::set_solution().
|
protected |
Coordinates of the point where we would like to compute the effective properties.