Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ElectrodeKinetics.h
Go to the documentation of this file.
1 /**
2  * @file ElectrodeKinetics.h
3  *
4  * @ingroup chemkinetics
5  */
6 /*
7  * Copyright (2005) Sandia Corporation. Under the terms of
8  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
9  * U.S. Government retains certain rights in this software.
10  */
11 
12 #ifndef CT_ELECTRODEKINETICS_H
13 #define CT_ELECTRODEKINETICS_H
14 
15 #include "InterfaceKinetics.h"
16 
17 
18 namespace Cantera
19 {
20 
21 
22 //! A kinetics manager for heterogeneous reaction mechanisms. The
23 //! reactions are assumed to occur at a 2D interface between two 3D phases.
24 /*!
25  * This class is a slight addition to the InterfaceKinetics class, adding
26  * several concepts. First we explicitly identify the electrode and solution
27  * phases. We will also assume that there is an electron phase.
28  *
29  * @ingroup chemkinetics
30  * @deprecated Unfinished implementation to be removed after Cantera 2.2.
31  */
33 {
34 public:
35  //! Constructor
36  /*!
37  * @param thermo The optional parameter may be used to initialize
38  * the object with one ThermoPhase object.
39  * HKM Note -> Since the interface kinetics
40  * object will probably require multiple ThermoPhase
41  * objects, this is probably not a good idea
42  * to have this parameter.
43  */
45 
46  /// Destructor.
47  virtual ~ElectrodeKinetics();
48 
49  //! Copy Constructor
51 
52  //! Assignment operator
54 
55  //! Duplication function
56  /*!
57  * @param tpVector Vector of ThermoPhase pointers. These are shallow pointers to the
58  * ThermoPhase objects that will comprise the phases for the new object.
59  *
60  * @return Returns the duplicated object as the base class Kinetics object.
61  */
62  virtual Kinetics* duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const;
63 
64  virtual int type() const;
65 
66  //! Identify the metal phase and the electrons species
67  /*!
68  * We fill in the internal variables, metalPhaseIndex_ and kElectronIndex_ here
69  */
70  void identifyMetalPhase();
71 
72  //! Internal routine that updates the Rates of Progress of the reactions
73  /*!
74  * This is actually the guts of the functionality of the object
75  */
76  virtual void updateROP();
77 
78  virtual void determineFwdOrdersBV(ReactionData& rdata, std::vector<doublereal>& fwdFullorders);
79 
80  //void addGlobalReaction(ReactionData& r);
81 
82  double calcForwardROP_BV(size_t irxn, size_t iBeta, double ioc, double nStoich, double nu, doublereal ioNet);
83 
84  double calcForwardROP_BV_NoAct(size_t irxn, size_t iBeta, double ioc, double nStoich, double nu, doublereal ioNet);
85 
86  bool getExchangeCurrentDensityFormulation(size_t irxn, doublereal& nStoich, doublereal& OCV, doublereal& io,
87  doublereal& overPotential, doublereal& beta, doublereal& resistance);
88 
89  //! Calculate the open circuit voltage of a given reaction
90  /*!
91  * If the reaction has no electron transport, then return 0.0
92  *
93  * @param irxn Reaction id
94  */
95  double openCircuitVoltage(size_t irxn);
96 
97  double calcCurrentDensity(double nu, double nStoich, double io, double beta, double temp, doublereal resistivity = 0.0) const;
98 
99  double solveCurrentRes(doublereal nu, doublereal nStoich, doublereal ioc, doublereal beta, doublereal temp,
100  doublereal resistivity = 0.0, int iprob = 0) const;
101 
102  //! Prepare the class for the addition of reactions
103  /*!
104  * (virtual from Kinetics)
105  * We determine the metal phase and solution phase here
106  */
107  virtual void init();
108 
109  virtual void finalize();
110 
111  //! Vector of additional information about each reaction
112  /*!
113  * This vector contains information about the phase mole change for each reaction,
114  * for example.
115  */
116  std::vector<RxnMolChange*> rmcVector;
117 
118 protected:
119  //! Index of the metal phase in the list of phases for this kinetics object. This is the electron phase.
121 
122  //! Index of the solution phase in the list of phases for this surface
124 
125  //! Index of the electrons species in the list of species for this surface kinetics, if none set it to -1
127 
128 
129 
130 };
131 }
132 
133 #endif
size_t metalPhaseIndex_
Index of the metal phase in the list of phases for this kinetics object. This is the electron phase...
A kinetics manager for heterogeneous reaction mechanisms.
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
Definition: Kinetics.h:285
virtual void finalize()
Finish adding reactions and prepare for use.
virtual int type() const
Identifies the kinetics manager type.
void identifyMetalPhase()
Identify the metal phase and the electrons species.
std::vector< RxnMolChange * > rmcVector
Vector of additional information about each reaction.
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:97
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication function.
virtual void init()
Prepare the class for the addition of reactions.
A kinetics manager for heterogeneous reaction mechanisms.
double openCircuitVoltage(size_t irxn)
Calculate the open circuit voltage of a given reaction.
ElectrodeKinetics(thermo_t *thermo=0)
Constructor.
Public interface for kinetics managers.
Definition: Kinetics.h:128
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
Definition: ReactionData.h:22
virtual ~ElectrodeKinetics()
Destructor.
ElectrodeKinetics & operator=(const ElectrodeKinetics &right)
Assignment operator.
size_t kElectronIndex_
Index of the electrons species in the list of species for this surface kinetics, if none set it to -1...
virtual void updateROP()
Internal routine that updates the Rates of Progress of the reactions.
size_t solnPhaseIndex_
Index of the solution phase in the list of phases for this surface.