17 #ifndef _FUELCELLSHOP__BASE__PSD_H 
   18 #define _FUELCELLSHOP__BASE__PSD_H 
   21 #include <deal.II/base/parameter_handler.h> 
   22 #include <deal.II/base/point.h> 
   23 #include <deal.II/base/function.h> 
   24 #include <deal.II/lac/vector.h> 
   25 #include <deal.II/fe/fe_values.h> 
   38 using namespace dealii;
 
   40 namespace FuelCellShop
 
  168                          iterator->second->declare_parameters(param);
 
  185             static boost::shared_ptr<FuelCellShop::MicroScale::BasePSD<dim> > 
create_PSD (
const std::string& psd_section_name, 
 
  186                                                                                                      ParameterHandler ¶m)
 
  188                 boost::shared_ptr<FuelCellShop::MicroScale::BasePSD<dim> > pointer;
 
  190                 std::string concrete_name;
 
  192                 param.enter_subsection(
"PSD parameters");
 
  194                     param.enter_subsection(
"BasePSD");
 
  196                         concrete_name = param.get(
"psd type");
 
  198                     param.leave_subsection();
 
  200                 param.leave_subsection();
 
  206                     if (iterator->second)
 
  218                     FcstUtilities::log<<
"Concrete name in FuelCellShop::MicroScale::BasePSD::create_psd does not exist"<<std::endl;
 
  222                 pointer->initialize(param);
 
  250                 const std::type_info& info = 
typeid(*this);
 
  252                 << 
" called in Class " 
  253                 << info.name()  << std::endl;
 
  262                 this->por = porosity;
 
  280                 this->derivative_flags = flags;
 
  296                 constant_solutions[name] = value;
 
  310                 const std::type_info& info = 
typeid(*this);
 
  311                 deallog << 
"Pure function " << __FUNCTION__
 
  312                 << 
" called in Class " 
  313                 << info.name()  << std::endl;
 
  322                 const std::type_info& info = 
typeid(*this);
 
  323                 deallog << 
"Pure function " << __FUNCTION__
 
  324                 << 
" called in Class " 
  325                 << info.name()  << std::endl;
 
  334                 const std::type_info& info = 
typeid(*this);
 
  335                 deallog << 
"Pure function " << __FUNCTION__
 
  336                 << 
" called in Class " 
  337                 << info.name()  << std::endl;
 
  348                 const std::type_info& info = 
typeid(*this);
 
  349                 deallog << 
"Pure function " << __FUNCTION__
 
  350                 << 
" called in Class " 
  351                 << info.name()  << std::endl;
 
  360                 const std::type_info& info = 
typeid(*this);
 
  361                 deallog << 
"Pure function " << __FUNCTION__
 
  362                 << 
" called in Class " 
  363                 << info.name()  << std::endl;
 
  374                 const std::type_info& info = 
typeid(*this);
 
  375                 deallog << 
"Pure function " << __FUNCTION__
 
  376                 << 
" called in Class " 
  377                 << info.name()  << std::endl;
 
  388                 const std::type_info& info = 
typeid(*this);
 
  389                 deallog << 
"Pure function " << __FUNCTION__
 
  390                 << 
" called in Class " 
  391                 << info.name()  << std::endl;
 
  411                 const std::type_info& info = 
typeid(*this);
 
  412                 deallog << 
"Pure function " << __FUNCTION__
 
  413                 << 
" called in Class " 
  414                 << info.name()  << std::endl;
 
  429             virtual  void get_saturation(std::vector<double>& ) 
const = 0;
 
  430             virtual  void get_derivative_saturation(std::vector<double>& ) 
const = 0;
 
  436             virtual  void get_global_saturated_permeability(
double& ) 
const = 0;
 
  443             virtual  void get_relative_liquid_permeability(std::vector<double>& ) 
const = 0;
 
  450             virtual  void get_derivative_relative_liquid_permeability(std::vector<double>& ) 
const = 0;
 
  457             virtual  void get_relative_gas_permeability(std::vector<double>& ) 
const = 0;
 
  464             virtual  void get_liquid_gas_interfacial_surface(std::vector<double>& ) 
const = 0;
 
  471             virtual  void get_derivative_liquid_gas_interfacial_surface(std::vector<double>& ) 
const = 0;
 
  478             virtual  void get_wetted_wall_surface_area(std::vector<double>& ) 
const = 0;
 
  485             virtual  void get_knudsen_radius(std::vector<double>& ) 
const = 0;
 
  507             BasePSD(
const std::string& name);
 
  516             void virtual declare_parameters (ParameterHandler ¶m) 
const;
 
  522             void _initialize (ParameterHandler ¶m) ;
 
  594             virtual boost::shared_ptr<FuelCellShop::MicroScale::BasePSD<dim> > 
create_replica (
const std::string &name)
 
  596                 const std::type_info& info = 
typeid(*this);
 
  597                 deallog << 
"Pure function " << __FUNCTION__
 
  598                 << 
" called in Class " 
  599                 << info.name() << std::endl;
 
virtual void set_critical_radius()
Member function used to set the critical radius [nm] at every quadrature point inside the cell...
Definition: PSD_base.h:346
 
virtual boost::shared_ptr< FuelCellShop::MicroScale::BasePSD< dim > > create_replica(const std::string &name)
This member function is used to create an object of type gas diffusion layer. 
Definition: PSD_base.h:594
 
virtual ~BasePSD()
Destructor. 
Definition: PSD_base.h:138
 
double get_porosity() const 
Definition: PSD_base.h:268
 
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
 
std::vector< double > f_k
The f_k is the contribution of the log-normal distribution k to the total PSD. 
Definition: PSD_base.h:646
 
virtual void set_temperature(const SolutionVariable &T_in)
Member function used to set the temperature [Kelvin] at every quadrature point inside the cell...
Definition: PSD_base.h:320
 
This structure is used to encapsulate data from constant values and variable solution data that is us...
Definition: fcst_variables.h:86
 
const std::string & name_psd() const 
Return the name of the PSD. 
Definition: PSD_base.h:400
 
void set_porosity(double porosity)
Definition: PSD_base.h:260
 
static void declare_PSD_parameters(ParameterHandler ¶m)
Function used to declare all the data necessary in the parameter files for all BasePSD children...
Definition: PSD_base.h:162
 
double lamda
The lamda is measured from the mercury intrusion experiment. 
Definition: PSD_base.h:631
 
virtual void set_constant_solution(const double &value, const VariableNames &name)
Set those solution variables which are constant in the particular application. 
Definition: PSD_base.h:294
 
virtual void print_psd_properties() const 
This function prints out the psd properties. 
Definition: PSD_base.h:409
 
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well. 
 
std::map< VariableNames, double > constant_solutions
Map storing values of solution variables constant in a particular application. 
Definition: PSD_base.h:616
 
std::vector< VariableNames > derivative_flags
Flags for derivatives: These flags are used to request derivatives of material properties. 
Definition: PSD_base.h:611
 
virtual const std::type_info & get_base_type() const 
This member function return the name of the type of layer, i.e. 
Definition: PSD_base.h:248
 
const std::string name
Name of the psd. 
Definition: PSD_base.h:608
 
double por
The por is the porosity inherited from the layer class. 
Definition: PSD_base.h:661
 
std::vector< double > r_k
The r_k is the characteristic pore size of the distribution k. 
Definition: PSD_base.h:651
 
static _mapFactory * get_mapFactory()
Return the map library that stores all childrens of this class. 
Definition: PSD_base.h:582
 
double contact_angle
The contact_angle is the contact angle between air and water. 
Definition: PSD_base.h:626
 
virtual void initialize(ParameterHandler ¶m)
Member function used to set the saturation at every quadrature point inside the cell. 
Definition: PSD_base.h:386
 
virtual void set_solution(const std::vector< SolutionVariable > &)
If the effective properties in the psd depend on the solution, the solution for a given cell should b...
Definition: PSD_base.h:308
 
std::map< std::string, BasePSD< dim > * > _mapFactory
This object is used to store all objects of type psd. 
Definition: PSD_base.h:530
 
double gamma
The gamma is the Water-air interface surface tension. 
Definition: PSD_base.h:621
 
virtual void get_PSD_plot()
This function is used to create PSD configuration plot by outputing all the numbers. 
Definition: PSD_base.h:358
 
Pore Size Distribution. 
Definition: PSD_base.h:129
 
static boost::shared_ptr< FuelCellShop::MicroScale::BasePSD< dim > > create_PSD(const std::string &psd_section_name, ParameterHandler ¶m)
Function used to select the appropriate CatalystLayer type as specified in the ParameterHandler under...
Definition: PSD_base.h:185
 
double F_HO
The F_HO is the fraction of the total volume corresponding to the hydrophobic pores. 
Definition: PSD_base.h:641
 
virtual void set_saturation()
Member function used to set the saturation at every quadrature point inside the cell. 
Definition: PSD_base.h:372
 
double F_HI
The F_HI is the fraction of the total volume corresponding to the hydrophilic pores. 
Definition: PSD_base.h:636
 
BasePSD()
Constructor. 
Definition: PSD_base.h:501
 
virtual void set_capillary_pressure(const SolutionVariable &C_in)
Member function used to set the capillary pressure [psi] at every quadrature point inside the cell...
Definition: PSD_base.h:332
 
void set_derivative_flags(const std::vector< VariableNames > &flags)
Set the names of FCST solution variables with respect to which you would like to compute the derivati...
Definition: PSD_base.h:278
 
std::vector< double > s_k
The s_k is the spread of the distribution k. 
Definition: PSD_base.h:656