Cantera  2.4.0
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 // This file is part of Cantera. See License.txt in the top-level directory or
9 // at http://www.cantera.org/license.txt for license and copyright information.
10 
11 #ifndef CT_SOLIDTRAN_H
12 #define CT_SOLIDTRAN_H
13 
14 #include "LTPspecies.h"
15 #include "TransportBase.h"
16 
17 namespace Cantera
18 {
19 //! Class SolidTransport implements transport properties for solids.
20 //! @ingroup tranprops
21 /*!
22  * @deprecated To be removed after Cantera 2.4
23  *
24  * @attention This class currently does not have any test cases or examples. Its
25  * implementation may be incomplete, and future changes to Cantera may
26  * unexpectedly cause this class to stop working. If you use this class,
27  * please consider contributing examples or test cases. In the absence of
28  * new tests or examples, this class may be deprecated and removed in a
29  * future version of Cantera. See
30  * https://github.com/Cantera/cantera/issues/267 for additional information.
31  */
32 class SolidTransport : public Transport
33 {
34 public:
36 
37  virtual std::string transportType() const {
38  return "Solid";
39  }
40 
41  //! Returns the ionic conductivity of the phase
42  /*!
43  * The thermo phase needs to be updated (temperature) prior to calling this.
44  * The ionConductivity calculation is handled by subclasses of LTPspecies as
45  * specified in the input file.
46  */
47  virtual doublereal ionConductivity();
48 
49  //! Returns the thermal conductivity of the phase
50  /*!
51  * The thermo phase needs to be updated (temperature) prior to calling this.
52  * The thermalConductivity calculation is handled by subclasses of
53  * LTPspecies as specified in the input file.
54  *
55  * There is also a legacy method to evaluate
56  * \f[
57  * \lambda = A T^n \exp(-E/RT)
58  * \f]
59  */
60  virtual doublereal thermalConductivity();
61 
62  //! Returns the electron conductivity of the phase
63  /*!
64  * The thermo phase needs to be updated (temperature) prior to calling
65  * this. The ionConductivity calculation is handled by subclasses of
66  * LTPspecies as specified in the input file.
67  *
68  * There is also a legacy multicomponent diffusion approach to electrical
69  * conductivity.
70  */
71  virtual doublereal electricalConductivity();
72 
73  /*!
74  * The diffusivity of defects in the solid (m^2/s). The thermo phase needs
75  * to be updated (temperature) prior to calling this. The defectDiffusivity
76  * calculation is handled by subclasses of LTPspecies as specified in the
77  * input file.
78  */
79  virtual doublereal defectDiffusivity();
80 
81  /**
82  * The activity of defects in the solid. At some point this should be
83  * variable and the diffusion coefficient should depend on it.
84  *
85  * The thermo phase needs to be updated (temperature) prior to calling this.
86  * The defectActivity calculation is handled by subclasses of
87  * LTPspecies as specified in the input file.
88  */
89  virtual doublereal defectActivity();
90 
91  /*
92  * The diffusion coefficients are computed from
93  *
94  * \f[
95  * D_k = A_k T^{n_k} \exp(-E_k/RT).
96  * \f]
97  *
98  * The diffusion coefficients are only non-zero for species for which
99  * parameters have been specified using method setParameters.
100  * @todo HEWSON WONDERS IF THE FOLLOWING ARE RELEVANT??
101  */
102  virtual void getMixDiffCoeffs(doublereal* const d);
103 
104  virtual void getMobilities(doublereal* const mobil);
105 
106  virtual void setParameters(const int n, const int k, const doublereal* const p);
107 
108  friend class TransportFactory;
109 
110 protected:
111  //! Initialize the transport object
112  /*!
113  * Here we change all of the internal dimensions to be sufficient. We get
114  * the object ready to do property evaluations. A lot of the input
115  * required to do property evaluations is contained in the
116  * SolidTransportParams class that is filled in TransportFactory.
117  *
118  * @param tr Transport parameters for all of the species in the phase.
119  */
120  virtual bool initSolid(SolidTransportData& tr);
121 
122 private:
123  //! Model type for the ionic conductivity
125 
126  //! Model type for the thermal conductivity
128 
129  //! Model type for the electrical conductivity
131 
132  //! Model type for the defectDiffusivity -- or more like a defect
133  //! diffusivity in the context of the solid phase.
135 
136  //! Model type for the defectActivity
138 
139  //! number of mobile species
140  size_t m_nmobile;
141 
142  //! Coefficient for the diffusivity of species within a solid
143  /*!
144  * This is with respect to the lattice
145  * units = m**2 / s
146  * vector of length m_nmobile
147  */
149 
150  //! Temperature power coefficient for the diffusivity of species in a solid
151  /*!
152  * vector of length m_nmobile
153  */
155 
156  //! Arrhenius factor for the species diffusivities of a solid
157  /*!
158  * units = temperature
159  * vector of length m_nmobile
160  */
162 
163  //! Index of mobile species to global species
164  /*!
165  * vector of length m_nmobile
166  */
168 
169  //! Coefficient for the thermal conductivity of a solid
170  /*!
171  * units = kg m / s3 /K = W/m/K
172  */
173  doublereal m_Alam;
174 
175  //! Temperature power coefficient for the thermal conductivity of a solid
176  doublereal m_Nlam;
177 
178  //! Arrhenius factor for the thermal conductivity of a solid
179  /*!
180  * units = temperature
181  */
182  doublereal m_Elam;
183 
184  //! extra fp array of length nSpecies()
186 };
187 }
188 #endif
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)
Set model parameters for derived classes.
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 std::string transportType() const
Identifies the Transport object type.
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:78
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.
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:8
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.