Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SolidTransport.h
Go to the documentation of this file.
1 /**
2  * @file SolidTransport.h
3  * Header file for defining the class SolidTransport, which handles transport
4  * of ions within solid phases
5  * (see \ref tranprops and \link Cantera::SolidTransport SolidTransport \endlink).
6  */
7 
8 // Copyright 2003 California Institute of Technology
9 
10 #ifndef CT_SOLIDTRAN_H
11 #define CT_SOLIDTRAN_H
12 
13 #include "LTPspecies.h"
14 #include "TransportBase.h"
15 
16 namespace Cantera
17 {
18 //! Class SolidTransport implements transport properties for solids.
19 //! @ingroup tranprops
20 class SolidTransport : public Transport
21 {
22 public:
24  SolidTransport(const SolidTransport& right);
25  SolidTransport& operator=(const SolidTransport& right);
26  virtual Transport* duplMyselfAsTransport() const;
27 
28  virtual int model() const {
29  return cSolidTransport;
30  }
31 
32  //! Returns the ionic conductivity of the phase
33  /*!
34  * The thermo phase needs to be updated (temperature) prior to calling this.
35  * The ionConductivity calculation is handled by subclasses of
36  * LTPspecies as specified in the input file.
37  */
38  virtual doublereal ionConductivity() ;
39 
40  //! Returns the thermal conductivity of the phase
41  /*!
42  * The thermo phase needs to be updated (temperature) prior to calling this.
43  * The thermalConductivity calculation is handled by subclasses of
44  * LTPspecies as specified in the input file.
45  *
46  * There is also a legacy method to evaluate
47  * \f[
48  * \lambda = A T^n \exp(-E/RT)
49  * \f]
50  */
51  virtual doublereal thermalConductivity();
52 
53  //! Returns the electron conductivity of the phase
54  /*!
55  * The thermo phase needs to be updated (temperature) prior to calling
56  * this. The ionConductivity calculation is handled by subclasses of
57  * LTPspecies as specified in the input file.
58  *
59  * There is also a legacy multicomponent diffusion approach to electrical
60  * conductivity.
61  */
62  virtual doublereal electricalConductivity();
63 
64  /*!
65  * The diffusivity of defects in the solid (m^2/s). The thermo phase needs
66  * to be updated (temperature) prior to calling this. The
67  * defectDiffusivity calculation is handled by subclasses of LTPspecies
68  * as specified in the input file.
69  */
70  virtual doublereal defectDiffusivity();
71 
72  /**
73  * The activity of defects in the solid.
74  * At some point this should be variable and the diffusion coefficient should depend on it.
75  *
76  * The thermo phase needs to be updated (temperature) prior to calling this.
77  * The defectActivity calculation is handled by subclasses of
78  * LTPspecies as specified in the input file.
79  */
80  virtual doublereal defectActivity();
81 
82  /*
83  * The diffusion coefficients are computed from
84  *
85  * \f[
86  * D_k = A_k T^{n_k} \exp(-E_k/RT).
87  * \f]
88  *
89  * The diffusion coefficients are only non-zero for species for which
90  * parameters have been specified using method setParameters.
91  * @todo HEWSON WONDERS IF THE FOLLOWING ARE RELEVANT??
92  */
93  virtual void getMixDiffCoeffs(doublereal* const d);
94 
95  virtual void getMobilities(doublereal* const mobil);
96 
97  //! @deprecated
98  virtual void setParameters(const int n, const int k, const doublereal* const p);
99 
100  friend class TransportFactory;
101 
102 protected:
103  //! Initialize the transport object
104  /*!
105  * Here we change all of the internal dimensions to be sufficient. We get
106  * the object ready to do property evaluations. A lot of the input
107  * required to do property evaluations is contained in the
108  * SolidTransportParams class that is filled in TransportFactory.
109  *
110  * @param tr Transport parameters for all of the species
111  * in the phase.
112  */
113  virtual bool initSolid(SolidTransportData& tr);
114 
115 private:
116  //! Model type for the ionic conductivity
117  /*!
118  * shallow pointer that should be zero during destructor
119  */
121 
122  //! Model type for the thermal conductivity
123  /*!
124  * shallow pointer that should be zero during destructor
125  */
127 
128  //! Model type for the electrical conductivity
129  /*!
130  * shallow pointer that should be zero during destructor
131  */
133 
134  //! Model type for the defectDiffusivity -- or more like a defect diffusivity in the context of the solid phase.
135  /*!
136  * shallow pointer that should be zero during destructor
137  */
139 
140  //! Model type for the defectActivity
141  /*!
142  * shallow pointer that should be zero during destructor
143  */
145 
146  //! number of mobile species
147  size_t m_nmobile;
148 
149  //! Coefficient for the diffusivity of species within a solid
150  /*!
151  * This is with respect to the lattice
152  * units = m**2 / s
153  * vector of length m_nmobile
154  */
156 
157  //! Temperature power coefficient for the diffusivity of species in a solid
158  /*!
159  * vector of length m_nmobile
160  */
162 
163  //! Arrhenius factor for the species diffusivities of a solid
164  /*!
165  * units = temperature
166  * vector of length m_nmobile
167  */
169 
170  //! Index of mobile species to global species
171  /*!
172  * vector of length m_nmobile
173  */
175 
176  //! Coefficient for the thermal conductivity of a solid
177  /*!
178  * units = kg m / s3 /K = W/m/K
179  */
180  doublereal m_Alam;
181 
182  //! Temperature power coefficient for the thermal conductivity of a solid
183  doublereal m_Nlam;
184 
185  //! Arrhenius factor for the thermal conductivity of a solid
186  /*!
187  * units = temperature
188  */
189  doublereal m_Elam;
190 
191  //! extra fp array of length nSpecies()
193 };
194 }
195 #endif
virtual int model() const
Transport model.
virtual void getMixDiffCoeffs(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
virtual doublereal thermalConductivity()
Returns the thermal conductivity of the phase.
Factory class for creating new instances of classes derived from Transport.
vector_fp m_Adiff
Coefficient for the diffusivity of species within a solid.
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
virtual void setParameters(const int n, const int k, const doublereal *const p)
virtual Transport * duplMyselfAsTransport() const
Duplication routine for objects which inherit from Transport.
Base class for transport property managers.
virtual doublereal electricalConductivity()
Returns the electron conductivity of the phase.
Header file defining class LTPspecies and its child classes.
virtual void getMobilities(doublereal *const mobil)
Get the Electrical mobilities (m^2/V/s).
vector_fp m_Ndiff
Temperature power coefficient for the diffusivity of species in a solid.
Class SolidTransport implements transport properties for solids.
std::vector< int > vector_int
Vector of ints.
Definition: ct_defs.h:159
virtual doublereal ionConductivity()
Returns the ionic conductivity of the phase.
virtual doublereal defectDiffusivity()
LTPspecies * m_electConductivity
Model type for the electrical conductivity.
LTPspecies * m_ionConductivity
Model type for the ionic conductivity.
LTPspecies * m_defectDiffusivity
Model type for the defectDiffusivity – or more like a defect diffusivity in the context of the solid ...
doublereal m_Alam
Coefficient for the thermal conductivity of a solid.
LTPspecies * m_thermalConductivity
Model type for the thermal conductivity.
virtual doublereal defectActivity()
The activity of defects in the solid.
doublereal m_Elam
Arrhenius factor for the thermal conductivity of a solid.
Class LTPspecies holds transport parameterizations for a specific liquid-phase species.
Definition: LTPspecies.h:72
vector_int m_sp
Index of mobile species to global species.
virtual bool initSolid(SolidTransportData &tr)
Initialize the transport object.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:157
vector_fp m_work
extra fp array of length nSpecies()
doublereal m_Nlam
Temperature power coefficient for the thermal conductivity of a solid.
LTPspecies * m_defectActivity
Model type for the defectActivity.
size_t m_nmobile
number of mobile species
Class SolidTransportData holds transport parameters for a specific solid-phase species.
vector_fp m_Ediff
Arrhenius factor for the species diffusivities of a solid.