Cantera  2.1.2
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"
16 
17 namespace Cantera
18 {
19 //! Class SolidTransport implements transport properties for solids.
20 //! @ingroup tranprops
21 class SolidTransport : public Transport
22 {
23 public:
25  SolidTransport(const SolidTransport& right);
26  SolidTransport& operator=(const SolidTransport& right);
27  virtual Transport* duplMyselfAsTransport() const;
28 
29  virtual int model() const {
30  return cSolidTransport;
31  }
32 
33  //! Returns the ionic conductivity of the phase
34  /*!
35  * The thermo phase needs to be updated (temperature) prior to calling this.
36  * The ionConductivity calculation is handled by subclasses of
37  * LTPspecies as specified in the input file.
38  */
39  virtual doublereal ionConductivity() ;
40 
41  //! Returns the thermal conductivity of the phase
42  /*!
43  * The thermo phase needs to be updated (temperature) prior to calling this.
44  * The thermalConductivity calculation is handled by subclasses of
45  * LTPspecies as specified in the input file.
46  *
47  * There is also a legacy method to evaluate
48  * \f[
49  * \lambda = A T^n \exp(-E/RT)
50  * \f]
51  */
52  virtual doublereal thermalConductivity();
53 
54  //! Returns the electron conductivity of the phase
55  /*!
56  * The thermo phase needs to be updated (temperature) prior to calling
57  * this. The ionConductivity calculation is handled by subclasses of
58  * LTPspecies as specified in the input file.
59  *
60  * There is also a legacy multicomponent diffusion approach to electrical
61  * conductivity.
62  */
63  virtual doublereal electricalConductivity();
64 
65  /*!
66  * The diffusivity of defects in the solid (m^2/s). The thermo phase needs
67  * to be updated (temperature) prior to calling this. The
68  * defectDiffusivity calculation is handled by subclasses of LTPspecies
69  * as specified in the input file.
70  */
71  virtual doublereal defectDiffusivity();
72 
73  /**
74  * The activity of defects in the solid.
75  * At some point this should be variable and the diffusion coefficient should depend on it.
76  *
77  * The thermo phase needs to be updated (temperature) prior to calling this.
78  * The defectActivity calculation is handled by subclasses of
79  * LTPspecies as specified in the input file.
80  */
81  virtual doublereal defectActivity();
82 
83  /*
84  * The diffusion coefficients are computed from
85  *
86  * \f[
87  * D_k = A_k T^{n_k} \exp(-E_k/RT).
88  * \f]
89  *
90  * The diffusion coefficients are only non-zero for species for which
91  * parameters have been specified using method setParameters.
92  * @todo HEWSON WONDERS IF THE FOLLOWING ARE RELEVANT??
93  */
94  virtual void getMixDiffCoeffs(doublereal* const d);
95 
96  virtual void getMobilities(doublereal* const mobil);
97 
98  //! @deprecated
99  virtual void setParameters(const int n, const int k, const doublereal* const p);
100 
101  friend class TransportFactory;
102 
103 protected:
104  //! Initialize the transport object
105  /*!
106  * Here we change all of the internal dimensions to be sufficient. We get
107  * the object ready to do property evaluations. A lot of the input
108  * required to do property evaluations is contained in the
109  * SolidTransportParams class that is filled in TransportFactory.
110  *
111  * @param tr Transport parameters for all of the species
112  * in the phase.
113  */
114  virtual bool initSolid(SolidTransportData& tr);
115 
116 private:
117  //! Model type for the ionic conductivity
118  /*!
119  * shallow pointer that should be zero during destructor
120  */
122 
123  //! Model type for the thermal conductivity
124  /*!
125  * shallow pointer that should be zero during destructor
126  */
128 
129  //! Model type for the electrical conductivity
130  /*!
131  * shallow pointer that should be zero during destructor
132  */
134 
135  //! Model type for the defectDiffusivity -- or more like a defect diffusivity in the context of the solid phase.
136  /*!
137  * shallow pointer that should be zero during destructor
138  */
140 
141  //! Model type for the defectActivity
142  /*!
143  * shallow pointer that should be zero during destructor
144  */
146 
147  //! number of mobile species
148  size_t m_nmobile;
149 
150  //! Coefficient for the diffusivity of species within a solid
151  /*!
152  * This is with respect to the lattice
153  * units = m**2 / s
154  * vector of length m_nmobile
155  */
157 
158  //! Temperature power coefficient for the diffusivity of species in a solid
159  /*!
160  * vector of length m_nmobile
161  */
163 
164  //! Arrhenius factor for the species diffusivities of a solid
165  /*!
166  * units = temperature
167  * vector of length m_nmobile
168  */
170 
171  //! Index of mobile species to global species
172  /*!
173  * vector of length m_nmobile
174  */
176 
177  //! Coefficient for the thermal conductivity of a solid
178  /*!
179  * units = kg m / s3 /K = W/m/K
180  */
181  doublereal m_Alam;
182 
183  //! Temperature power coefficient for the thermal conductivity of a solid
184  doublereal m_Nlam;
185 
186  //! Arrhenius factor for the thermal conductivity of a solid
187  /*!
188  * units = temperature
189  */
190  doublereal m_Elam;
191 
192  //! extra fp array of length nSpecies()
194 };
195 }
196 #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:167
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 parameters for a specific liquid-phase species.
Definition: LTPspecies.h:73
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:165
Headers for the DenseMatrix object, which deals with dense rectangular matrices and description of th...
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.