OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
catalyst_support_base.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: base_kinetics.h
11 // - Description: Implements the properties of a "standard" carbon black support
12 // - Developers: M. Secanell and Madhur Bhaiya
13 // - $Id: catalyst_support_base.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__CATALYST_SUPPORT_BASE_H
18 #define _FUELCELLSHOP__CATALYST_SUPPORT_BASE_H
19 
20 // Include FCST classes
22 
23 
24 namespace FuelCellShop
25 {
26  namespace Material
27  {
48  :
49  public BaseMaterial
50  {
51  public:
53 
58  static void declare_CatalystSupport_parameters (ParameterHandler &param)
59  {
60 
61  for (typename FuelCellShop::Material::CatalystSupportBase::_mapFactory::iterator iterator = FuelCellShop::Material::CatalystSupportBase::get_mapFactory()->begin();
63  iterator++)
64  {
65  iterator->second->declare_parameters(param);
66  }
67  }
68 
87  static boost::shared_ptr<FuelCellShop::Material::CatalystSupportBase > create_CatalystSupport (ParameterHandler &param,
88  std::string support_name)
89  {
90 
91  boost::shared_ptr<FuelCellShop::Material::CatalystSupportBase > pointer;
92 
93  typename FuelCellShop::Material::CatalystSupportBase::_mapFactory::iterator iterator = FuelCellShop::Material::CatalystSupportBase::get_mapFactory()->find(support_name);
94 
96  {
97  if (iterator->second)
98  {
99  pointer = iterator->second->create_replica();
100  }
101  else
102  {
103  FcstUtilities::log<<"Pointer not initialized"<<std::endl;
104  abort();
105  }
106  }
107  else
108  {
109  FcstUtilities::log<<"Concrete name in FuelCellShop::Material::CatalystSupportBase::create_CatalystSupport does not exist"<<std::endl;
110  abort();
111  }
112 
113  pointer->initialize(param);
114 
115  return pointer;
116  }
118 
119 
121 
122 
126  virtual double get_electrical_conductivity() const
127  {
128  const std::type_info& info = typeid(*this);
129  FcstUtilities::log << "Pure function " << __FUNCTION__
130  << " called in Class "
131  << info.name() << std::endl;
132  return 0;
133  };
134 
138  virtual double get_thermal_conductivity() const
139  {
140  const std::type_info& info = typeid(*this);
141  FcstUtilities::log << "Pure function " << __FUNCTION__
142  << " called in Class "
143  << info.name() << std::endl;
144  return 0;
145  };
146 
150  virtual double get_density() const
151  {
152  const std::type_info& info = typeid(*this);
153  FcstUtilities::log << "Pure function " << __FUNCTION__
154  << " called in Class "
155  << info.name() << std::endl;
156  return 0;
157  };
159 
160  protected:
162 
163 
166  :
167  BaseMaterial()
168  {};
169 
178  :
179  BaseMaterial(name)
180  {};
181 
184  {};
185 
192  virtual void declare_parameters(ParameterHandler &param) const
193  {
194  const std::type_info& info = typeid(*this);
195  FcstUtilities::log << "Pure function " << __FUNCTION__
196  << " called in Class "
197  << info.name() << std::endl;
198  };
199 
203  virtual void initialize (ParameterHandler &param)
204  {
205  const std::type_info& info = typeid(*this);
206  FcstUtilities::log << "Pure function " << __FUNCTION__
207  << " called in Class "
208  << info.name() << std::endl;
209  };
211 
213 
216  typedef std::map< std::string, FuelCellShop::Material::CatalystSupportBase* > _mapFactory;
218 
220 
221 
225  {
226  static _mapFactory mapFactory;
227  return &mapFactory;
228  }
230 
232 
233 
238  virtual boost::shared_ptr<FuelCellShop::Material::CatalystSupportBase > create_replica ()
239  {
240  const std::type_info& info = typeid(*this);
241  FcstUtilities::log << "Pure function " << __FUNCTION__
242  << " called in Class "
243  << info.name() << std::endl;
244  }
246 
248 
251 
254 
256  double density;
257 
259  };
260  }
261 }
262 
263 #endif
~CatalystSupportBase()
Destructor.
Definition: catalyst_support_base.h:183
CatalystSupportBase(std::string name)
Constructor The constructor initialize parameters using the default values.
Definition: catalyst_support_base.h:177
virtual double get_thermal_conductivity() const
Obtain the thermal conductivity [W/(cm-K )].
Definition: catalyst_support_base.h:138
virtual double get_electrical_conductivity() const
Obtain the electrical conductivity [S/cm].
Definition: catalyst_support_base.h:126
virtual boost::shared_ptr< FuelCellShop::Material::CatalystSupportBase > create_replica()
This member function is used to create an object of type CatalystSupportBase.
Definition: catalyst_support_base.h:238
double thermal_conductivity
Thermal conductivity [W/(cm-K )] of catalyst support extrapolated to 100% solid phase.
Definition: catalyst_support_base.h:253
const std::string name
Name of the layer.
Definition: base_material.h:155
static _mapFactory * get_mapFactory()
Definition: catalyst_support_base.h:224
CatalystSupportBase()
Constructor.
Definition: catalyst_support_base.h:165
static boost::shared_ptr< FuelCellShop::Material::CatalystSupportBase > create_CatalystSupport(ParameterHandler &param, std::string support_name)
Function called in create_CatalystLayer and used to select the appropriate CatalystSupportBase childr...
Definition: catalyst_support_base.h:87
This class implements the interface to compute the properties of a &quot;standard&quot; catalyst support...
Definition: catalyst_support_base.h:47
double density
Density of catalyst support [gm/cm^3].
Definition: catalyst_support_base.h:256
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
std::map< std::string, FuelCellShop::Material::CatalystSupportBase * > _mapFactory
This object is used to store all objects of type CatalystSupportBase.
Definition: catalyst_support_base.h:216
virtual void initialize(ParameterHandler &param)
Initialize parameters.
Definition: catalyst_support_base.h:203
double electrical_conductivity
Electrical conductivity [S/cm] of catalyst support extrapolated to 100% solid phase.
Definition: catalyst_support_base.h:250
virtual double get_density() const
Obtain the density [gm/cm^3].
Definition: catalyst_support_base.h:150
static void declare_CatalystSupport_parameters(ParameterHandler &param)
Function used to declare all the data necessary in the parameter files for all CatalystSupportBase ch...
Definition: catalyst_support_base.h:58
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters for a parameter file.
Definition: catalyst_support_base.h:192
Virtual class used to provide the interface for all material classes.
Definition: base_material.h:54