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. More... | |
void | set_position (const std::vector< Point< dim > > &p) |
Member function used by some applications such as dummyGDL in order to know which value to return. More... | |
virtual void | set_local_material_id (const unsigned int &id) |
Function for setting local material id, for unit testing purposes. More... | |
void | unset_local_material_id () |
Function for unsetting local material id, so that it isn't incorrectly used later Once the key is "unset" to some invalid value, an error will be thrown if the key is requested again without being set. More... | |
virtual void | set_constant_solution (const double &value, const VariableNames &name) |
Set those solution variables which are constant in the particular application. More... | |
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. More... | |
Accessors and info | |
bool | belongs_to_material (const unsigned int material_id) |
Check if a given cell belongs to the catalyst layer and assign. More... | |
const std::string & | name_layer () const |
Return the name of the layer. More... | |
virtual const std::type_info & | get_base_type () const |
This member function return the name of the type of layer, i.e. More... | |
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. More... | |
virtual bool | test_layer () |
This virtual class should be used for any derived class to be able to test the functionality of the class. More... | |
std::vector< unsigned int > | get_material_ids () |
Return the local material id of the layer. More... | |
unsigned int | local_material_id () const |
Return the local material id of the layer, performs a check. More... | |
Protected Member Functions | |
Constructors, destructor, and initalization | |
BaseLayer () | |
Constructor. More... | |
BaseLayer (const std::string &name) | |
Constructor. More... | |
virtual | ~BaseLayer () |
Destructor. More... | |
virtual void | declare_parameters (const std::string &object_name, ParameterHandler ¶m) const |
Declare parameters for a parameter file. More... | |
virtual void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters for a parameter file. More... | |
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. More... | |
virtual void | set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m) |
Set parameters in parameter file. More... | |
virtual void | initialize (ParameterHandler ¶m) |
Member function used to read in data and initialize the necessary data to compute the coefficients. More... | |
Basic layer information | |
const std::string | name |
Name of the layer. More... | |
std::vector< unsigned int > | material_ids |
List of material IDs that belong to the layer. More... | |
std::vector< Point< dim > > | point |
Coordinates of the point where we would like to compute the effective properties. More... | |
std::vector< VariableNames > | derivative_flags |
Flags for derivatives: These flags are used to request derivatives. More... | |
std::map< VariableNames, double > | constant_solutions |
Map storing values of solution variables constant in a particular application. More... | |
unsigned int | local_material_id_ |
Local material ID to select the appropriate properties. More... | |
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 unsigned int | material_id | ) |
Check if a given cell belongs to the catalyst layer and assign.
material_id | to current_local_material_id_ of layers that are graded. |
|
inlineprotectedvirtual |
Declare parameters for a parameter file.
Reimplemented in FuelCellShop::Layer::CatalystLayer< dim >, FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::PorousLayer< dim >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::MultiScaleCL< dim >, FuelCellShop::Layer::MultiScaleCL< deal_II_dimension >, FuelCellShop::Layer::DesignFibrousGDL< dim >, FuelCellShop::Layer::SolidLayer< dim >, FuelCellShop::Layer::NafionMembrane< dim >, FuelCellShop::Layer::DummyCL< dim >, FuelCellShop::Layer::DummyGDL< dim >, FuelCellShop::Layer::SGL24BA< dim >, and FuelCellShop::Layer::HomogeneousCL< dim >.
|
inlineprotectedvirtual |
Declare parameters for a parameter file.
Reimplemented in FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::PorousLayer< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::MultiScaleCL< dim >, FuelCellShop::Layer::MultiScaleCL< deal_II_dimension >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::ExperimentalPorousLayer< dim >, FuelCellShop::Layer::SGL24BA< dim >, FuelCellShop::Layer::Channel< dim >, FuelCellShop::Layer::SGL24BC< dim >, FuelCellShop::Layer::DummyGDL< dim >, FuelCellShop::Layer::DummyCL< dim >, and FuelCellShop::Layer::DummyMPL< 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::ExperimentalPorousLayer< dim >, FuelCellShop::Layer::GasDiffusionLayer< dim >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::SolidLayer< dim >, and FuelCellShop::Layer::Channel< dim >.
References FcstUtilities::log.
Referenced by FuelCellShop::PostProcessing::WaterSorptionResponse< dim >::compute_responses().
|
inline |
Return the local 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::PorousLayer< dim >, FuelCellShop::Layer::ConventionalCL< dim >, FuelCellShop::Layer::MembraneLayer< dim >, FuelCellShop::Layer::MultiScaleCL< dim >, FuelCellShop::Layer::MultiScaleCL< deal_II_dimension >, FuelCellShop::Layer::MicroPorousLayer< dim >, FuelCellShop::Layer::SolidLayer< dim >, FuelCellShop::Layer::NafionMembrane< dim >, FuelCellShop::Layer::DesignMPL< dim >, FuelCellShop::Layer::ExperimentalPorousLayer< dim >, FuelCellShop::Layer::HomogeneousCL< dim >, FuelCellShop::Layer::SGL24BA< dim >, FuelCellShop::Layer::Channel< dim >, FuelCellShop::Layer::SGL24BC< dim >, FuelCellShop::Layer::DummyGDL< dim >, FuelCellShop::Layer::DummyCL< dim >, FuelCellShop::Layer::DummyMPL< dim >, and FuelCellShop::Layer::DesignFibrousGDL< dim >.
|
inline |
Return the local material id of the layer, performs a check.
Referenced by FuelCellShop::Layer::DummyCL< dim >::get_active_area_Pt(), and FuelCellShop::Layer::MultiScaleCL< deal_II_dimension >::get_properties().
|
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::PorousLayer< dim >, FuelCellShop::Layer::ExperimentalPorousLayer< dim >, FuelCellShop::Layer::Channel< dim >, FuelCellShop::Layer::MultiScaleCL< dim >, FuelCellShop::Layer::MultiScaleCL< deal_II_dimension >, 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::MembraneLayer< dim >, and FuelCellShop::Layer::CatalystLayer< dim >.
Referenced by FuelCellShop::Layer::CatalystLayer< dim >::set_constant_solution(), and FuelCellShop::Layer::MembraneLayer< 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 >.
|
inlinevirtual |
Function for setting local material id, for unit testing purposes.
Reimplemented in FuelCellShop::Layer::ConventionalCL< dim >.
Referenced by FuelCellShop::Layer::ConventionalCL< dim >::set_local_material_id().
|
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.
|
inlineprotectedvirtual |
Set parameters in parameter file.
Reimplemented in FuelCellShop::Layer::DesignMPL< 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 FcstUtilities::log.
|
inlinevirtual |
This virtual class should be used for any derived class to be able to test the functionality of the class.
References FcstUtilities::log.
|
inline |
Function for unsetting local material id, so that it isn't incorrectly used later Once the key is "unset" to some invalid value, an error will be thrown if the key is requested again without being set.
The programmer should be concious of which material id they are using the layer for, therfore the must always set it before using the layer. Manually unsetting the key is a good practise to ensure that you do not solve for the wrong layer id.
|
protected |
Map storing values of solution variables constant in a particular application.
Referenced by FuelCellShop::Layer::MultiScaleCL< deal_II_dimension >::get_properties().
|
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().
|
private |
Local material ID to select the appropriate properties.
This value is used in graded layers which within the given layer have several properties
This variable is private, it should be accessed by acessor local_material_id_() which performs debug checks
|
protected |
List of material IDs that belong to the layer.
The parameter local_material_id_ is an integer in this list
|
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::MultiScaleCL< deal_II_dimension >::declare_parameters(), and FuelCellShop::Layer::MembraneLayer< dim >::declare_parameters().
|
protected |
Coordinates of the point where we would like to compute the effective properties.