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

This class is used to represent a solid layer. More...

#include <solid_layer.h>

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

Public Member Functions

Effective property calculators
virtual void effective_electron_conductivity (Tensor< 2, dim > &) const
 Compute the effective electron conductivity in the SolidLayer. More...
 
virtual void effective_electron_conductivity (std::vector< Tensor< 2, dim >> &) const
 Compute the effective electron conductivity in the SolidLayer This class is used for both isotropic and anisotropic materials. More...
 
virtual void derivative_effective_electron_conductivity (std::map< VariableNames, Tensor< 2, dim >> &) const
 Compute the derivative of the effective electron conductivity in the SolidLayer with respect to temperature solutionvariable. More...
 
virtual void derivative_effective_electron_conductivity (std::vector< std::map< VariableNames, Tensor< 2, dim > > > &) const
 Compute the derivative of the effective electron conductivity in the SolidLayer with respect to temperature solutionvariable. More...
 
virtual void effective_thermal_conductivity (Tensor< 2, dim > &) const
 Compute the effective thermal conductivity in the SolidLayer. More...
 
virtual void effective_thermal_conductivity (std::vector< Tensor< 2, dim > > &) const
 Compute the effective thermal conductivity in the SolidLayer, dependent on various solution variables, eg: Temperature. More...
 
virtual void derivative_effective_thermal_conductivity (std::map< VariableNames, Tensor< 2, dim > > &) const
 Compute the derivative of the effective thermal conductivity in the SolidLayer with respect to temperature solutionvariable. More...
 
virtual void derivative_effective_thermal_conductivity (std::vector< std::map< VariableNames, Tensor< 2, dim > > > &) const
 Compute the derivative of the effective thermal conductivity in the SolidLayer with respect to temperature solutionvariable. More...
 
void set_solution (std::map< VariableNames, SolutionVariable > &sol)
 Member function used to set the solution [Kelvin] at every quadrature point inside the cell. More...
 
Accessors and info
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. More...
 
- Public Member Functions inherited from FuelCellShop::Layer::BaseLayer< dim >
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...
 
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 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 initialization

Class test

 SolidLayer (const std::string &section_layer_name, ParameterHandler &param)
 Constructor. More...
 
 ~SolidLayer ()
 Destructor. More...
 
void declare_parameters (const std::string &solidlayer_section_name, ParameterHandler &param) const
 Function used to select the appropriate SolidLayer type as specified in the ParameterHandler under line. More...
 
void initialize (ParameterHandler &param)
 Member function used to read in data and initialize the necessary data to compute the coefficients. More...
 
- Protected Member Functions inherited from FuelCellShop::Layer::BaseLayer< dim >
 BaseLayer ()
 Constructor. More...
 
 BaseLayer (const std::string &name)
 Constructor. More...
 
virtual ~BaseLayer ()
 Destructor. More...
 
virtual void declare_parameters (ParameterHandler &param) 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 &param)
 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 &param)
 Set parameters in parameter file. More...
 

Protected Attributes

Internal variables
std::vector< unsigned int > boundary_ids
 Boundary ids. More...
 
boost::shared_ptr
< FuelCellShop::Material::PureSolid
solid
 Data member that stores the solid material the layer is made of. More...
 
std::string concrete_solid_name
 Name in the input file used to select the material. More...
 
SolutionVariable T_vector
 Solution Varaible at each quadrature point. More...
 
std::map< VariableNames,
SolutionVariable
Solutions
 Solutions at every quadrature point inside the cell. More...
 
std::map< VariableNames,
SolutionVariable >::iterator 
solution_iterator
 
VariableNames temperature_enum
 
- Protected Attributes inherited from FuelCellShop::Layer::BaseLayer< dim >
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< VariableNamesderivative_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...
 

Detailed Description

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

This class is used to represent a solid layer.

It takes only two arguments from the input file, the material ID and the material name representing the mesh element number for the layer and the type of material you would like the layer to return the properties for respectively. Then, it creates a child object of PureSolid of the desired type and uses it to compute all properties such as thermal conductivity.

Theory

This class is to compute the material properties at each quadrature points base on the PureSolid class

Input parameters

The input parameter section for this class looks like:

* subsection Fuel cell data
* subsection solidlayer_section_name
* set Material id = 2
* set Solid material type = Graphite
* end
* end
*

*

Usage details

//Create an object of SolidLayer FuelCellShop::TemplateClass example; // Set necessary variables temp = 358; example.set_variable(temp); // You can now request info from your class. double temp = example.get_variable(); //Print to screen all properties example.print_data();

Author
J. Zhou and M. Secanell, 2014

Constructor & Destructor Documentation

template<int dim>
FuelCellShop::Layer::SolidLayer< dim >::SolidLayer ( const std::string &  section_layer_name,
ParameterHandler &  param 
)
protected

Constructor.

template<int dim>
FuelCellShop::Layer::SolidLayer< dim >::~SolidLayer ( )
protected

Destructor.

Member Function Documentation

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

Function used to select the appropriate SolidLayer type as specified in the ParameterHandler under line.

* subsection Fuel cell data
* subsection solidlayer_section_name
* set Solid material type = Graphite
* end
* end
*

current options are see FuelCellShop::Material::PureSolid

The class will read the appropriate section in the parameter file, i.e. the one with name

Parameters
gld_section_name,createan object of the desired type and return it.

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

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::derivative_effective_electron_conductivity ( std::map< VariableNames, Tensor< 2, dim >> &  ) const
virtual

Compute the derivative of the effective electron conductivity in the SolidLayer with respect to temperature solutionvariable.

The map will contain the VariableNames and the derivative.

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::derivative_effective_electron_conductivity ( std::vector< std::map< VariableNames, Tensor< 2, dim > > > &  ) const
virtual

Compute the derivative of the effective electron conductivity in the SolidLayer with respect to temperature solutionvariable.

The map will contain the VariableNames and the derivative.

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::derivative_effective_thermal_conductivity ( std::map< VariableNames, Tensor< 2, dim > > &  ) const
virtual

Compute the derivative of the effective thermal conductivity in the SolidLayer with respect to temperature solutionvariable.

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::derivative_effective_thermal_conductivity ( std::vector< std::map< VariableNames, Tensor< 2, dim > > > &  ) const
virtual

Compute the derivative of the effective thermal conductivity in the SolidLayer with respect to temperature solutionvariable.

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::effective_electron_conductivity ( Tensor< 2, dim > &  ) const
virtual

Compute the effective electron conductivity in the SolidLayer.

This class is used for both isotropic and anisotropic materials.

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::effective_electron_conductivity ( std::vector< Tensor< 2, dim >> &  ) const
virtual

Compute the effective electron conductivity in the SolidLayer This class is used for both isotropic and anisotropic materials.

It will return the conductivity at each quadrature point based on the the solution provided in set_solution()

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::effective_thermal_conductivity ( Tensor< 2, dim > &  ) const
virtual

Compute the effective thermal conductivity in the SolidLayer.

template<int dim>
virtual void FuelCellShop::Layer::SolidLayer< dim >::effective_thermal_conductivity ( std::vector< Tensor< 2, dim > > &  ) const
virtual

Compute the effective thermal conductivity in the SolidLayer, dependent on various solution variables, eg: Temperature.

Note it is a vector because it returns the solution at each quadrature point using set_solution to obtain the solution at each location

template<int dim>
const std::type_info& FuelCellShop::Layer::SolidLayer< dim >::get_base_type ( ) const
inlinevirtual

This member function returns a type_info object with the name of the base layer type the inherited class belongs to, 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

const std::type_info& name = typeid(*this)

but the name of the parent class.

Note
Do not re-implement this class in children classes

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

template<int dim>
void FuelCellShop::Layer::SolidLayer< dim >::initialize ( ParameterHandler &  param)
protectedvirtual

Member function used to read in data and initialize the necessary data to compute the coefficients.

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

template<int dim>
void FuelCellShop::Layer::SolidLayer< dim >::set_solution ( std::map< VariableNames, SolutionVariable > &  sol)
inline

Member function used to set the solution [Kelvin] at every quadrature point inside the cell.

This function should particulary be used in the case of whether the solution solutionvariable is right or wrong.

Member Data Documentation

template<int dim>
std::vector<unsigned int> FuelCellShop::Layer::SolidLayer< dim >::boundary_ids
protected

Boundary ids.

template<int dim>
std::string FuelCellShop::Layer::SolidLayer< dim >::concrete_solid_name
protected

Name in the input file used to select the material.

template<int dim>
boost::shared_ptr<FuelCellShop::Material::PureSolid> FuelCellShop::Layer::SolidLayer< dim >::solid
protected

Data member that stores the solid material the layer is made of.

template<int dim>
std::map<VariableNames, SolutionVariable>::iterator FuelCellShop::Layer::SolidLayer< dim >::solution_iterator
protected
template<int dim>
std::map<VariableNames, SolutionVariable> FuelCellShop::Layer::SolidLayer< dim >::Solutions
protected

Solutions at every quadrature point inside the cell.

for this mapping key is the Enumerator of VariableName_of_REV the mapped value is of type SolutionVariable

template<int dim>
SolutionVariable FuelCellShop::Layer::SolidLayer< dim >::T_vector
protected

Solution Varaible at each quadrature point.

template<int dim>
VariableNames FuelCellShop::Layer::SolidLayer< dim >::temperature_enum
protected

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