Cantera  2.3.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  * @attention This class currently does not have any test cases or examples. Its
23  * implementation may be incomplete, and future changes to Cantera may
24  * unexpectedly cause this class to stop working. If you use this class,
25  * please consider contributing examples or test cases. In the absence of
26  * new tests or examples, this class may be deprecated and removed in a
27  * future version of Cantera. See
28  * https://github.com/Cantera/cantera/issues/267 for additional information.
29  */
30 class SolidTransport : public Transport
31 {
32 public:
34  SolidTransport(const SolidTransport& right);
35  SolidTransport& operator=(const SolidTransport& right);
36  virtual Transport* duplMyselfAsTransport() const;
37 
38  virtual int model() const {
39  warn_deprecated("SolidTransport::model",
40  "To be removed after Cantera 2.3.");
41  return cSolidTransport;
42  }
43 
44  virtual std::string transportType() const {
45  return "Solid";
46  }
47 
48  //! Returns the ionic conductivity of the phase
49  /*!
50  * The thermo phase needs to be updated (temperature) prior to calling this.
51  * The ionConductivity calculation is handled by subclasses of LTPspecies as
52  * specified in the input file.
53  */
54  virtual doublereal ionConductivity();
55 
56  //! Returns the thermal conductivity of the phase
57  /*!
58  * The thermo phase needs to be updated (temperature) prior to calling this.
59  * The thermalConductivity calculation is handled by subclasses of
60  * LTPspecies as specified in the input file.
61  *
62  * There is also a legacy method to evaluate
63  * \f[
64  * \lambda = A T^n \exp(-E/RT)
65  * \f]
66  */
67  virtual doublereal thermalConductivity();
68 
69  //! Returns the electron conductivity of the phase
70  /*!
71  * The thermo phase needs to be updated (temperature) prior to calling
72  * this. The ionConductivity calculation is handled by subclasses of
73  * LTPspecies as specified in the input file.
74  *
75  * There is also a legacy multicomponent diffusion approach to electrical
76  * conductivity.
77  */
78  virtual doublereal electricalConductivity();
79 
80  /*!
81  * The diffusivity of defects in the solid (m^2/s). The thermo phase needs
82  * to be updated (temperature) prior to calling this. The defectDiffusivity
83  * calculation is handled by subclasses of LTPspecies as specified in the
84  * input file.
85  */
86  virtual doublereal defectDiffusivity();
87 
88  /**
89  * The activity of defects in the solid. At some point this should be
90  * variable and the diffusion coefficient should depend on it.
91  *
92  * The thermo phase needs to be updated (temperature) prior to calling this.
93  * The defectActivity calculation is handled by subclasses of
94  * LTPspecies as specified in the input file.
95  */
96  virtual doublereal defectActivity();
97 
98  /*
99  * The diffusion coefficients are computed from
100  *
101  * \f[
102  * D_k = A_k T^{n_k} \exp(-E_k/RT).
103  * \f]
104  *
105  * The diffusion coefficients are only non-zero for species for which
106  * parameters have been specified using method setParameters.
107  * @todo HEWSON WONDERS IF THE FOLLOWING ARE RELEVANT??
108  */
109  virtual void getMixDiffCoeffs(doublereal* const d);
110 
111  virtual void getMobilities(doublereal* const mobil);
112 
113  //! @deprecated
114  virtual void setParameters(const int n, const int k, const doublereal* const p);
115 
116  friend class TransportFactory;
117 
118 protected:
119  //! Initialize the transport object
120  /*!
121  * Here we change all of the internal dimensions to be sufficient. We get
122  * the object ready to do property evaluations. A lot of the input
123  * required to do property evaluations is contained in the
124  * SolidTransportParams class that is filled in TransportFactory.
125  *
126  * @param tr Transport parameters for all of the species in the phase.
127  */
128  virtual bool initSolid(SolidTransportData& tr);
129 
130 private:
131  //! Model type for the ionic conductivity
133 
134  //! Model type for the thermal conductivity
136 
137  //! Model type for the electrical conductivity
139 
140  //! Model type for the defectDiffusivity -- or more like a defect
141  //! diffusivity in the context of the solid phase.
143 
144  //! Model type for the defectActivity
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 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)
Base class for transport property managers.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Definition: global.cpp:54
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 Transport * duplMyselfAsTransport() const
Duplication routine for objects which inherit from Transport.
virtual int model() const
Transport model.
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:76
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: application.cpp:29
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.