OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
solid_layer.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2011-13 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT License.
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: solid_layer.h
11 // - Description: Solid layer class
12 // - Developers: M. Secanell and Jie Zhou
13 // - $Id: solid_layer.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__SOLID_LAYER_H
18 #define _FUELCELLSHOP__SOLID_LAYER_H
19 
20 // FCST classes
22 #include <layers/base_layer.h>
23 #include <materials/carbon.h>
24 #include <materials/fiber_base.h>
25 #include <materials/carbon_fiber.h>
26 #include <materials/PureSolid.h>
27 
28 // Include deal.II classes
29 #include <deal.II/base/parameter_handler.h>
30 #include <deal.II/base/point.h>
31 #include <deal.II/base/function.h>
32 #include <deal.II/lac/vector.h>
33 #include <deal.II/fe/fe_values.h>
34 
35 //Include STL
36 #include<cmath>
37 #include<iostream>
38 
39 using namespace dealii;
40 
41 namespace FuelCellShop
42 {
43  namespace Layer
44  {
82  template <int dim>
83  class SolidLayer :
84  public BaseLayer<dim>
85  {
86  public:
87 
89 
90 
94  virtual void effective_electron_conductivity(Tensor<2,dim>& ) const;
95 
101  virtual void effective_electron_conductivity(std::vector<Tensor<2,dim>>& ) const;
102 
109  virtual void derivative_effective_electron_conductivity(std::map<VariableNames, Tensor<2,dim>>& ) const;
110 
117  virtual void derivative_effective_electron_conductivity(std::vector< std::map<VariableNames, Tensor<2,dim> > >& ) const;
118 
122  virtual void effective_thermal_conductivity(Tensor<2,dim>& ) const;
123 
131  virtual void effective_thermal_conductivity(std::vector< Tensor<2,dim> >&) const;
132 
137  virtual void derivative_effective_thermal_conductivity(std::map<VariableNames, Tensor<2,dim> >& ) const;
138 
143  virtual void derivative_effective_thermal_conductivity(std::vector< std::map<VariableNames, Tensor<2,dim> > >& ) const;
144 
149  inline void set_solution (std::map<VariableNames, SolutionVariable>& sol)
150  {
151 
152  for (std::map<VariableNames, SolutionVariable>::iterator iterator = sol.begin();
153  iterator != sol.end();
154  iterator++)
155  {
156  Assert( iterator->second.get_variablename() == iterator->first, ExcMessage("Wrong solution variable passed in PureSolid::set_solution.") );
157  }
158 
159  this->Solutions = sol;
160  }
162 
164 
165 
181  const std::type_info& get_base_type() const
182  {
183  return typeid(SolidLayer<dim>);
184  }
186 
187 // /**
188 // * Class test
189 // */
190 // virtual void test_class();
191 
192  protected:
193 
195 
196 
199  SolidLayer(const std::string &section_layer_name, ParameterHandler& param);
200 
204  ~SolidLayer();
205 
223  void declare_parameters (const std::string& solidlayer_section_name,
224  ParameterHandler &param) const;
225 
230  void initialize (ParameterHandler &param) ;
231 
233 
235 
236 
238  std::vector<unsigned int> boundary_ids;
239 
241  boost::shared_ptr<FuelCellShop::Material::PureSolid> solid;
242 
244  std::string concrete_solid_name;
245 
248 
253  std::map <VariableNames, SolutionVariable> Solutions;
254 
255  /*
256  * Define an iterator for the mapping from VariableNames to SolutionVariable
257  */
258  std::map <VariableNames, SolutionVariable>::iterator solution_iterator;
259 
260  /*
261  * Define an VariableNames of Enumerator of VariableName_of_REV
262  */
264 
266  };
267  }
268 } // FuelCellShop
269 
270 #endif // _FUELCELLSHOP__SOLID_LAYER_H
std::map< VariableNames, SolutionVariable > Solutions
Solutions at every quadrature point inside the cell.
Definition: solid_layer.h:253
std::vector< unsigned int > boundary_ids
Boundary ids.
Definition: solid_layer.h:238
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
This structure is used to encapsulate data from constant values and variable solution data that is us...
Definition: fcst_variables.h:86
void set_solution(std::map< VariableNames, SolutionVariable > &sol)
Member function used to set the solution [Kelvin] at every quadrature point inside the cell...
Definition: solid_layer.h:149
boost::shared_ptr< FuelCellShop::Material::PureSolid > solid
Data member that stores the solid material the layer is made of.
Definition: solid_layer.h:241
This class is used to represent a solid layer.
Definition: solid_layer.h:83
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: solid_layer.h:181
std::string concrete_solid_name
Name in the input file used to select the material.
Definition: solid_layer.h:244
SolutionVariable T_vector
Solution Varaible at each quadrature point.
Definition: solid_layer.h:247
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
std::map< VariableNames, SolutionVariable >::iterator solution_iterator
Definition: solid_layer.h:258
VariableNames temperature_enum
Definition: solid_layer.h:263