18 #ifndef _FUELCELLSHOP__GAS_DIFFUSION_LAYER_H
19 #define _FUELCELLSHOP__GAS_DIFFUSION_LAYER_H
29 #include <base/parameter_handler.h>
30 #include <base/point.h>
31 #include <base/function.h>
32 #include <lac/vector.h>
33 #include <fe/fe_values.h>
39 using namespace dealii;
41 namespace FuelCellShop
189 iterator->second->declare_parameters(gdl_section_name, param);
206 static boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> >
create_GasDiffusionLayer (
const std::string& gld_section_name,
207 ParameterHandler ¶m)
210 boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > pointer;
212 std::string concrete_name;
213 param.enter_subsection(
"Fuel cell data");
215 param.enter_subsection(gld_section_name);
217 concrete_name = param.get(
"Gas diffusion layer type");
220 param.leave_subsection();
222 param.leave_subsection();
228 if (iterator->second)
240 FcstUtilities::log<<
"Concrete name in FuelCellShop::Layer::GasDiffusionLayer<dim>::create_GasDiffusionLayer does not exist"<<std::endl;
244 pointer->initialize(param);
261 Assert((name !=
"oxygen" || name !=
"nitrogen" || name !=
"water" || name !=
"electron"),
262 ExcNotImplemented());
263 diffusion_species_name = name;
293 virtual void test_class()
const;
306 const std::type_info& info =
typeid(*this);
308 <<
" called in Class "
309 << info.name() << std::endl;
319 const std::type_info& info =
typeid(*this);
321 <<
" called in Class "
322 << info.name() << std::endl;
333 const std::type_info& info =
typeid(*this);
335 <<
" called in Class "
336 << info.name() << std::endl;
347 const std::type_info& info =
typeid(*this);
349 <<
" called in Class "
350 << info.name() << std::endl;
359 virtual void effective_gas_diffusivity(Table<2, double>& D_eff )
const;
367 virtual void effective_gas_diffusivity(Table< 2, Tensor<2,dim> > &D_eff )
const;
375 const std::type_info& info =
typeid(*this);
377 <<
" called in Class "
378 << info.name() << std::endl;
386 const std::type_info& info =
typeid(*this);
388 <<
" called in Class "
389 << info.name() << std::endl;
397 const std::type_info& info =
typeid(*this);
399 <<
" called in Class "
400 << info.name() << std::endl;
407 const std::type_info& info =
typeid(*this);
409 <<
" called in Class "
410 << info.name() << std::endl;
420 const std::type_info& info =
typeid(*this);
422 <<
" called in Class "
423 << info.name() << std::endl;
430 const std::type_info& info =
typeid(*this);
432 <<
" called in Class "
433 << info.name() << std::endl;
440 const std::type_info& info =
typeid(*this);
442 <<
" called in Class "
443 << info.name() << std::endl;
451 const std::type_info& info =
typeid(*this);
453 <<
" called in Class "
454 << info.name() << std::endl;
463 const std::type_info& info =
typeid(*this);
465 <<
" called in Class "
466 << info.name() << std::endl;
473 const std::type_info& info =
typeid(*this);
475 <<
" called in Class "
476 << info.name() << std::endl;
483 const std::type_info& info =
typeid(*this);
485 <<
" called in Class "
486 << info.name() << std::endl;
495 const std::type_info& info =
typeid(*this);
497 <<
" called in Class "
498 << info.name() << std::endl;
507 const std::type_info& info =
typeid(*this);
509 <<
" called in Class "
510 << info.name() << std::endl;
519 const std::type_info& info =
typeid(*this);
521 <<
" called in Class "
522 << info.name() << std::endl;
530 const std::type_info& info =
typeid(*this);
532 <<
" called in Class "
533 << info.name() << std::endl;
540 const std::type_info& info =
typeid(*this);
542 <<
" called in Class "
543 << info.name() << std::endl;
552 const std::type_info& info =
typeid(*this);
554 <<
" called in Class "
555 << info.name() << std::endl;
564 const std::type_info& info =
typeid(*this);
566 <<
" called in Class "
567 << info.name() << std::endl;
576 const std::type_info& info =
typeid(*this);
578 <<
" called in Class "
579 << info.name() << std::endl;
590 typedef std::map< std::string, GasDiffusionLayer<dim>* >
_mapFactory;
636 this->declare_parameters(this->name, param);
643 virtual void declare_parameters (
const std::string& name,
644 ParameterHandler ¶m)
const;
652 void initialize (ParameterHandler ¶m);
662 virtual boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> >
create_replica (
const std::string &name)
664 const std::type_info& info =
typeid(*this);
666 <<
" called in Class "
667 << info.name() << std::endl;
710 boost::shared_ptr< FuelCellShop::MicroScale::BasePSD<dim> >
PSD;
719 #endif // _FUELCELLSHOP__GAS_DIFFUSION_LAYER_H
void declare_parameters(ParameterHandler ¶m) const
Declare parameters for a parameter file.
Definition: gas_diffusion_layer.h:634
virtual void pcapillary(std::vector< double > &) const
Compute , at all quadrature points in the cell.
Definition: gas_diffusion_layer.h:528
double porosity
Porosity of the GDL.
Definition: gas_diffusion_layer.h:684
Virtual class used to provide the interface for all GasDiffusionLayer children.
Definition: gas_diffusion_layer.h:117
virtual void effective_electron_conductivity(double &) const
Compute the effective electron conductivity in the GDL.
Definition: gas_diffusion_layer.h:373
virtual void set_diffusion_species_name(std::string &name)
Member function used by some applications such as dummyGDL in order to know which value to return...
Definition: gas_diffusion_layer.h:259
virtual void interfacial_surface_area(std::vector< double > &) const
Compute the liquid-gas interfacial surface area per unit volume, , at all quadrature points in the GD...
Definition: gas_diffusion_layer.h:562
boost::shared_ptr< FuelCellShop::MicroScale::BasePSD< dim > > PSD
Definition: gas_diffusion_layer.h:710
virtual void liquid_permeablity(std::vector< Tensor< 2, dim > > &) const
Compute the anisotropic GDL liquid permeability , at all quadrature points in the cell...
Definition: gas_diffusion_layer.h:505
virtual void effective_electron_conductivity(const double &, double &) const
Compute the effective electron conductivity in the GDL.
Definition: gas_diffusion_layer.h:384
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:62
virtual void effective_gas_diffusivity(const double &, const double &, double &) const
Compute the effective property in the pores of the GDL.
Definition: gas_diffusion_layer.h:304
virtual void effective_electron_conductivity(const double &, Tensor< 2, dim > &) const
Compute the effective electron conductivity in the GDL.
Definition: gas_diffusion_layer.h:405
virtual void effective_thermal_conductivity(double &) const
Compute the effective thermal conductivity (isotropic) in the GDL.
Definition: gas_diffusion_layer.h:428
virtual void derivative_liquid_permeablity(std::map< VariableNames, std::vector< Tensor< 2, dim > > > &) const
Compute the derivative of the anisotropic liquid permeability in the GDL with respect to either the s...
Definition: gas_diffusion_layer.h:517
Tensor< 2, dim > electron_conductivity_tensor
Tensor storing the effective electronic conductivity of the layer.
Definition: gas_diffusion_layer.h:707
static const std::string concrete_name
Concrete name used for objects of this class.
Definition: gas_diffusion_layer.h:138
virtual void derivative_interfacial_surface_area(std::map< VariableNames, std::vector< double > > &) const
Compute the derivative of the liquid-gas interfacial surface area per unit volume, with respect to either the solution variables or design parameters, at all quadrature points in the GDL.
Definition: gas_diffusion_layer.h:574
virtual void derivative_gas_permeablity(std::vector< Tensor< 2, dim > > &) const
Compute the derivative of the effective gas permeability in the GDL with respect to either the soluti...
Definition: gas_diffusion_layer.h:493
static _mapFactory * get_mapFactory()
Definition: gas_diffusion_layer.h:599
virtual void derivative_dpcapillary_dsat(std::map< VariableNames, std::vector< double > > &) const
Compute the derivative of in the GDL, with respect to either the solution or design parameters...
Definition: gas_diffusion_layer.h:550
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: gas_diffusion_layer.h:285
std::map< std::string, GasDiffusionLayer< dim > * > _mapFactory
This object is used to store all objects of type GasDiffusionLayer.
Definition: gas_diffusion_layer.h:590
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
Tensor< 2, dim > tortuosity_tensor
Tortuosity tensor of the GDL.
Definition: gas_diffusion_layer.h:689
virtual boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer< dim > > create_replica(const std::string &name)
This member function is used to create an object of type gas diffusion layer.
Definition: gas_diffusion_layer.h:662
virtual void effective_electron_conductivity(Tensor< 2, dim > &) const
Compute the effective electron conductivity in the GDL.
Definition: gas_diffusion_layer.h:395
static boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer< dim > > create_GasDiffusionLayer(const std::string &gld_section_name, ParameterHandler ¶m)
Function used to select the appropriate GasDiffusionLayer type as specified in the ParameterHandler u...
Definition: gas_diffusion_layer.h:206
virtual void derivative_effective_gas_diffusivity(std::map< VariableNames, std::vector< Tensor< 2, dim > > > &) const
Return the derivative of effective diffusivity w.r.t solution variables/design parameters for nonisot...
Definition: gas_diffusion_layer.h:345
virtual void derivative_effective_electron_conductivity(std::vector< Tensor< 2, dim > > &) const
Compute the derivative of the effective electron conductivity in the GDL with respect to either the s...
Definition: gas_diffusion_layer.h:418
virtual void effective_thermal_conductivity(std::vector< Tensor< 2, dim > > &) const
Compute the effective thermal conductivity (anisotropic) in the GDL, dependent on various solution va...
Definition: gas_diffusion_layer.h:449
virtual void dpcapillary_dsat(std::vector< double > &) const
Compute , at all quadrature points in the GDL.
Definition: gas_diffusion_layer.h:538
static void declare_GasDiffusionLayer_parameters(const std::string &gdl_section_name, ParameterHandler ¶m)
Function used to declare all the data necessary in the parameter files for all GasDiffusionLayer chil...
Definition: gas_diffusion_layer.h:182
virtual void gas_permeablity(Tensor< 2, dim > &) const
Compute the GDL gas permeability.
Definition: gas_diffusion_layer.h:481
virtual void derivative_effective_thermal_conductivity(std::vector< Tensor< 2, dim > > &) const
Compute the derivative of the effective thermal conductivity in the GDL with respect to either the so...
Definition: gas_diffusion_layer.h:461
Tensor< 2, dim > thermal_conductivity_tensor
Tensor storing the effective thermal conductivity of the layer.
Definition: gas_diffusion_layer.h:695
std::string diffusion_species_name
If GDL properties are stored inside the class (e.g.
Definition: gas_diffusion_layer.h:676
virtual void effective_gas_diffusivity(const double &, const double &, Tensor< 2, dim > &) const
Compute the effective property in the pores of the GDL.
Definition: gas_diffusion_layer.h:317
std::string PSD_type
PSD class type from input file.
Definition: gas_diffusion_layer.h:679
virtual void gas_permeablity(double &) const
Compute the GDL gas permeability.
Definition: gas_diffusion_layer.h:471
Virtual class used to implement properties that are characteristic of a porous layer.
Definition: porous_layer.h:65
double electron_conductivity
Double storing the electric conductivity of the GDL is the layer is isotropic.
Definition: gas_diffusion_layer.h:701
virtual void effective_thermal_conductivity(Tensor< 2, dim > &) const
Compute the effective thermal conductivity (anisotropic) in the GDL.
Definition: gas_diffusion_layer.h:438
virtual void effective_gas_diffusivity(std::vector< Tensor< 2, dim > > &) const
Return the effective diffusivity [m^2/s] for nonisothermal with/without two-phase case in the GDL...
Definition: gas_diffusion_layer.h:331