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 STL
21 #include<cmath>
22 #include<iostream>
23 #include "base_material.h"
24 
25 
26 namespace FuelCellShop
27 {
28  namespace Material
29  {
50  :
51  public BaseMaterial
52  {
53  public:
55 
60  static void declare_CatalystSupport_parameters (ParameterHandler &param)
61  {
62 
63  for (typename FuelCellShop::Material::CatalystSupportBase::_mapFactory::iterator iterator = FuelCellShop::Material::CatalystSupportBase::get_mapFactory()->begin();
65  iterator++)
66  {
67  iterator->second->declare_parameters(param);
68  }
69  }
70 
89  static boost::shared_ptr<FuelCellShop::Material::CatalystSupportBase > create_CatalystSupport (ParameterHandler &param,
90  std::string support_name)
91  {
92 
93  boost::shared_ptr<FuelCellShop::Material::CatalystSupportBase > pointer;
94 
95  typename FuelCellShop::Material::CatalystSupportBase::_mapFactory::iterator iterator = FuelCellShop::Material::CatalystSupportBase::get_mapFactory()->find(support_name);
96 
98  {
99  if (iterator->second)
100  {
101  pointer = iterator->second->create_replica();
102  }
103  else
104  {
105  FcstUtilities::log<<"Pointer not initialized"<<std::endl;
106  abort();
107  }
108  }
109  else
110  {
111  FcstUtilities::log<<"Concrete name in FuelCellShop::Material::CatalystSupportBase::create_CatalystSupport does not exist"<<std::endl;
112  abort();
113  }
114 
115  pointer->initialize(param);
116 
117  return pointer;
118  }
120 
121 
123 
124 
128  virtual double get_electrical_conductivity() const
129  {
130  const std::type_info& info = typeid(*this);
131  FcstUtilities::log << "Pure function " << __FUNCTION__
132  << " called in Class "
133  << info.name() << std::endl;
134  return 0;
135  };
136 
140  virtual double get_thermal_conductivity() const
141  {
142  const std::type_info& info = typeid(*this);
143  FcstUtilities::log << "Pure function " << __FUNCTION__
144  << " called in Class "
145  << info.name() << std::endl;
146  return 0;
147  };
148 
152  virtual double get_density() const
153  {
154  const std::type_info& info = typeid(*this);
155  FcstUtilities::log << "Pure function " << __FUNCTION__
156  << " called in Class "
157  << info.name() << std::endl;
158  return 0;
159  };
161 
162  protected:
164 
165 
168  :
169  BaseMaterial()
170  {};
171 
180  :
181  BaseMaterial(name)
182  {};
183 
186  {};
187 
194  virtual void declare_parameters(ParameterHandler &param) const
195  {
196  const std::type_info& info = typeid(*this);
197  FcstUtilities::log << "Pure function " << __FUNCTION__
198  << " called in Class "
199  << info.name() << std::endl;
200  };
201 
205  virtual void initialize (ParameterHandler &param)
206  {
207  const std::type_info& info = typeid(*this);
208  FcstUtilities::log << "Pure function " << __FUNCTION__
209  << " called in Class "
210  << info.name() << std::endl;
211  };
213 
215 
218  typedef std::map< std::string, FuelCellShop::Material::CatalystSupportBase* > _mapFactory;
220 
222 
223 
227  {
228  static _mapFactory mapFactory;
229  return &mapFactory;
230  }
232 
234 
235 
240  virtual boost::shared_ptr<FuelCellShop::Material::CatalystSupportBase > create_replica ()
241  {
242  const std::type_info& info = typeid(*this);
243  FcstUtilities::log << "Pure function " << __FUNCTION__
244  << " called in Class "
245  << info.name() << std::endl;
246  }
248 
250 
253 
256 
258  double density;
259 
261  };
262  }
263 }
264 
265 #endif
~CatalystSupportBase()
Destructor.
Definition: catalyst_support_base.h:185
CatalystSupportBase(std::string name)
Constructor The constructor initialize parameters using the default values.
Definition: catalyst_support_base.h:179
virtual double get_thermal_conductivity() const
Obtain the thermal conductivity [W/(cm-K )].
Definition: catalyst_support_base.h:140
virtual double get_electrical_conductivity() const
Obtain the electrical conductivity [S/cm].
Definition: catalyst_support_base.h:128
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:240
double thermal_conductivity
Thermal conductivity [W/(cm-K )] of catalyst support extrapolated to 100% solid phase.
Definition: catalyst_support_base.h:255
const std::string name
Name of the layer.
Definition: base_material.h:155
static _mapFactory * get_mapFactory()
Definition: catalyst_support_base.h:226
CatalystSupportBase()
Constructor.
Definition: catalyst_support_base.h:167
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:89
This class implements the interface to compute the properties of a &quot;standard&quot; catalyst support...
Definition: catalyst_support_base.h:49
double density
Density of catalyst support [gm/cm^3].
Definition: catalyst_support_base.h:258
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:218
virtual void initialize(ParameterHandler &param)
Initialize parameters.
Definition: catalyst_support_base.h:205
double electrical_conductivity
Electrical conductivity [S/cm] of catalyst support extrapolated to 100% solid phase.
Definition: catalyst_support_base.h:252
virtual double get_density() const
Obtain the density [gm/cm^3].
Definition: catalyst_support_base.h:152
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:60
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters for a parameter file.
Definition: catalyst_support_base.h:194
Virtual class used to provide the interface for all material classes.
Definition: base_material.h:54