OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
experimental_porous_layer.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-2013 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: experimental_porous_layer.h
11 // - Description: This class describes a porous layer
12 // - Developers: Valentin N. Zingan, University of Alberta
13 // - Id: $Id: experimental_porous_layer.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 // ----------------------------------------------------------------------------
16 
17 #ifndef _FCST_FUELCELLSHOP_LAYER_EXPERIMENTAL_POROUS_LAYER_H_
18 #define _FCST_FUELCELLSHOP_LAYER_EXPERIMENTAL_POROUS_LAYER_H_
19 
20 #include <layers/base_layer.h>
22 #include <materials/GasMixture.h>
24 
25 namespace FuelCellShop
26 {
27  namespace Layer
28  {
29 
69  template<int dim>
70  class ExperimentalPorousLayer : public BaseLayer<dim>
71  {
72  public:
73 
75 
76 
80  ExperimentalPorousLayer(const std::string& name);
81 
85  ExperimentalPorousLayer(const std::string& name,
88 
92  ExperimentalPorousLayer(const std::string& name,
95 
99  virtual ~ExperimentalPorousLayer();
100 
109  {
110  fluid = &rfluid;
111  gas_mixture = nullptr;
112  solid = &rsolid;
113  }
114 
123  {
124  fluid = nullptr;
125  gas_mixture = &rgas_mixture;
126  solid = &rsolid;
127  }
128 
136  void initialize(const bool& rporosity_is_constant,
137  const bool& rpermeability_is_constant,
138  const bool& rtortuosity_is_constant)
139  {
140  porosity_is_constant = rporosity_is_constant;
141  permeability_is_constant = rpermeability_is_constant;
142  tortuosity_is_constant = rtortuosity_is_constant;
143  }
144 
148  virtual void declare_parameters(ParameterHandler& param) const;
149 
153  virtual void initialize(ParameterHandler& param);
154 
156 
158 
159 
165  {
166  return fluid;
167  }
168 
174  {
175  return gas_mixture;
176  }
177 
183  {
184  return solid;
185  }
186 
191  const bool& get_porosity_is_constant() const
192  {
193  return porosity_is_constant;
194  }
195 
200  const bool& get_permeability_is_constant() const
201  {
203  }
204 
209  const bool& get_tortuosity_is_constant() const
210  {
211  return tortuosity_is_constant;
212  }
213 
218  void get_porosity(std::vector<double>& dst) const;
219 
224  void get_porosity(std::vector<double>& dst,
225  const std::vector< Point<dim> >& points) const;
226 
231  void get_permeability(std::vector< SymmetricTensor<2,dim> >& dst) const;
232 
237  void get_permeability(std::vector< SymmetricTensor<2,dim> >& dst,
238  const std::vector< Point<dim> >& points) const;
239 
244  void get_SQRT_permeability(std::vector< SymmetricTensor<2,dim> >& dst) const;
245 
250  void get_SQRT_permeability(std::vector< SymmetricTensor<2,dim> >& dst,
251  const std::vector< Point<dim> >& points) const;
252 
257  void get_permeability_INV(std::vector< SymmetricTensor<2,dim> >& dst) const;
258 
263  void get_permeability_INV(std::vector< SymmetricTensor<2,dim> >& dst,
264  const std::vector< Point<dim> >& points) const;
265 
270  void get_SQRT_permeability_INV(std::vector< SymmetricTensor<2,dim> >& dst) const;
271 
276  void get_SQRT_permeability_INV(std::vector< SymmetricTensor<2,dim> >& dst,
277  const std::vector< Point<dim> >& points) const;
278 
283  void get_Forchheimer_permeability(std::vector< SymmetricTensor<2,dim> >& dst) const;
284 
289  void get_Forchheimer_permeability(std::vector< SymmetricTensor<2,dim> >& dst,
290  const std::vector< Point<dim> >& points) const;
291 
296  void get_tortuosity(std::vector< SymmetricTensor<2,dim> >& dst) const;
297 
302  void get_tortuosity(std::vector< SymmetricTensor<2,dim> >& dst,
303  const std::vector< Point<dim> >& points) const;
304 
317  const std::type_info& get_base_type() const
318  {
319  return typeid(ExperimentalPorousLayer<dim>);
320  }
321 
326  virtual void print_layer_properties() const;
327 
329 
330  protected:
331 
333 
334 
341  void print_caller_name(const std::string& caller_name) const;
342 
344 
346  // DATA //
348 
350 
351 
361 
366 
371 
377 
383 
389 
393  double porosity;
394 
398  SymmetricTensor<2,dim> permeability;
399 
403  SymmetricTensor<2,dim> SQRT_permeability;
404 
408  SymmetricTensor<2,dim> permeability_INV;
409 
413  SymmetricTensor<2,dim> SQRT_permeability_INV;
414 
418  SymmetricTensor<2,dim> Forchheimer_permeability;
419 
423  SymmetricTensor<2,dim> tortuosity;
424 
426 
427  };
428 
429  } // Layer
430 
431 } // FuelCellShop
432 
433 #endif
double porosity
User defined constant porosity.
Definition: experimental_porous_layer.h:393
bool permeability_is_constant
Variable defining if the permeability is constant.
Definition: experimental_porous_layer.h:382
SymmetricTensor< 2, dim > SQRT_permeability_INV
Inverse of square root of user defined constant permeability, 1/m.
Definition: experimental_porous_layer.h:413
void get_tortuosity(std::vector< SymmetricTensor< 2, dim > > &dst) const
This function computes constant tortuosity in quadrature points of a mesh entity. ...
const std::type_info & get_base_type() const
This function returns typeid of this class.
Definition: experimental_porous_layer.h:317
This class describes a solid.
Definition: experimental_solid.h:38
FuelCellShop::Material::GasMixture * gas_mixture
Gas mixture.
Definition: experimental_porous_layer.h:365
void get_SQRT_permeability(std::vector< SymmetricTensor< 2, dim > > &dst) const
This function computes square root of constant permeability in quadrature points of a mesh entity...
virtual void print_layer_properties() const
This function prints out the layer properties.
void get_SQRT_permeability_INV(std::vector< SymmetricTensor< 2, dim > > &dst) const
This function computes inverse of square root of constant permeability in quadrature points of a mesh...
bool tortuosity_is_constant
Variable defining if the tortuosity is constant.
Definition: experimental_porous_layer.h:388
void get_porosity(std::vector< double > &dst) const
This function computes constant porosity in quadrature points of a mesh entity.
ExperimentalPorousLayer(const std::string &name)
Constructor.
FuelCellShop::Material::ExperimentalFluid * fluid
Definition: experimental_porous_layer.h:360
const std::string name
Name of the layer.
Definition: base_layer.h:336
bool porosity_is_constant
Variable defining if the porosity is constant.
Definition: experimental_porous_layer.h:376
const FuelCellShop::Material::ExperimentalFluid *const get_fluid() const
This function returns fluid.
Definition: experimental_porous_layer.h:164
void get_Forchheimer_permeability(std::vector< SymmetricTensor< 2, dim > > &dst) const
This function computes constant Forchheimer permeability in quadrature points of a mesh entity...
void print_caller_name(const std::string &caller_name) const
This function is used to print out the name of another function that has been declared in the scope o...
const bool & get_tortuosity_is_constant() const
This function returns tortuosity_is_constant.
Definition: experimental_porous_layer.h:209
void initialize(FuelCellShop::Material::ExperimentalFluid &rfluid, FuelCellShop::Material::ExperimentalSolid &rsolid)
Initialize.
Definition: experimental_porous_layer.h:107
void get_permeability(std::vector< SymmetricTensor< 2, dim > > &dst) const
This function computes constant permeability in quadrature points of a mesh entity.
This class describes a porous layer and stores pointers to.
Definition: experimental_porous_layer.h:70
SymmetricTensor< 2, dim > permeability
User defined constant permeability, m^2.
Definition: experimental_porous_layer.h:398
SymmetricTensor< 2, dim > Forchheimer_permeability
User defined constant Forchheimer permeability, 1/m.
Definition: experimental_porous_layer.h:418
void initialize(const bool &rporosity_is_constant, const bool &rpermeability_is_constant, const bool &rtortuosity_is_constant)
Initialize.
Definition: experimental_porous_layer.h:136
void initialize(FuelCellShop::Material::GasMixture &rgas_mixture, FuelCellShop::Material::ExperimentalSolid &rsolid)
Initialize.
Definition: experimental_porous_layer.h:121
SymmetricTensor< 2, dim > permeability_INV
Inverse of user defined constant permeability, 1/m^2.
Definition: experimental_porous_layer.h:408
This class describes properties of gas mixtures.
Definition: GasMixture.h:102
SymmetricTensor< 2, dim > SQRT_permeability
Square root of user defined constant permeability, m.
Definition: experimental_porous_layer.h:403
const FuelCellShop::Material::ExperimentalSolid *const get_solid() const
This function returns solid.
Definition: experimental_porous_layer.h:182
void get_permeability_INV(std::vector< SymmetricTensor< 2, dim > > &dst) const
This function computes inverse of constant permeability in quadrature points of a mesh entity...
const bool & get_permeability_is_constant() const
This function returns permeability_is_constant.
Definition: experimental_porous_layer.h:200
SymmetricTensor< 2, dim > tortuosity
User defined constant tortuosity.
Definition: experimental_porous_layer.h:423
const bool & get_porosity_is_constant() const
This function returns porosity_is_constant.
Definition: experimental_porous_layer.h:191
This class describes.
Definition: experimental_fluid.h:44
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters.
const FuelCellShop::Material::GasMixture *const get_gas_mixture() const
This function returns gas_mixture.
Definition: experimental_porous_layer.h:173
FuelCellShop::Material::ExperimentalSolid * solid
Solid.
Definition: experimental_porous_layer.h:370