Cantera
2.3.0
|
Class SolidTransport implements transport properties for solids. More...
#include <SolidTransport.h>
Public Member Functions | |
SolidTransport (const SolidTransport &right) | |
SolidTransport & | operator= (const SolidTransport &right) |
virtual Transport * | duplMyselfAsTransport () const |
Duplication routine for objects which inherit from Transport. More... | |
virtual int | model () const |
Transport model. More... | |
virtual std::string | transportType () const |
Identifies the Transport object type. More... | |
virtual doublereal | ionConductivity () |
Returns the ionic conductivity of the phase. More... | |
virtual doublereal | thermalConductivity () |
Returns the thermal conductivity of the phase. More... | |
virtual doublereal | electricalConductivity () |
Returns the electron conductivity of the phase. More... | |
virtual doublereal | defectDiffusivity () |
virtual doublereal | defectActivity () |
The activity of defects in the solid. More... | |
virtual void | getMixDiffCoeffs (doublereal *const d) |
Returns a vector of mixture averaged diffusion coefficients. More... | |
virtual void | getMobilities (doublereal *const mobil) |
Get the Electrical mobilities (m^2/V/s). More... | |
virtual void | setParameters (const int n, const int k, const doublereal *const p) |
Public Member Functions inherited from Transport | |
Transport (thermo_t *thermo=0, size_t ndim=1) | |
Constructor. More... | |
Transport (const Transport &right) | |
Transport & | operator= (const Transport &right) |
thermo_t & | thermo () |
bool | ready () |
void | setNDim (const int ndim) |
Set the number of dimensions to be expected in flux expressions. More... | |
size_t | nDim () const |
Return the number of dimensions in flux expressions. More... | |
void | checkSpeciesIndex (size_t k) const |
Check that the specified species index is in range. More... | |
void | checkSpeciesArraySize (size_t kk) const |
Check that an array size is at least nSpecies(). More... | |
virtual doublereal | getElectricConduct () |
Compute the mixture electrical conductivity (S m-1) at the current conditions of the phase (Siemens m-1) More... | |
virtual void | getElectricCurrent (int ndim, const doublereal *grad_T, int ldx, const doublereal *grad_X, int ldf, const doublereal *grad_V, doublereal *current) |
Compute the electric current density in A/m^2. More... | |
virtual void | getSpeciesFluxes (size_t ndim, const doublereal *const grad_T, size_t ldx, const doublereal *const grad_X, size_t ldf, doublereal *const fluxes) |
Get the species diffusive mass fluxes wrt to the specified solution averaged velocity, given the gradients in mole fraction and temperature. More... | |
virtual void | getSpeciesFluxesES (size_t ndim, const doublereal *grad_T, size_t ldx, const doublereal *grad_X, size_t ldf, const doublereal *grad_Phi, doublereal *fluxes) |
Get the species diffusive mass fluxes wrt to the mass averaged velocity, given the gradients in mole fraction, temperature and electrostatic potential. More... | |
virtual void | getSpeciesVdiff (size_t ndim, const doublereal *grad_T, int ldx, const doublereal *grad_X, int ldf, doublereal *Vdiff) |
Get the species diffusive velocities wrt to the mass averaged velocity, given the gradients in mole fraction and temperature. More... | |
virtual void | getSpeciesVdiffES (size_t ndim, const doublereal *grad_T, int ldx, const doublereal *grad_X, int ldf, const doublereal *grad_Phi, doublereal *Vdiff) |
Get the species diffusive velocities wrt to the mass averaged velocity, given the gradients in mole fraction, temperature, and electrostatic potential. More... | |
virtual void | getMolarFluxes (const doublereal *const state1, const doublereal *const state2, const doublereal delta, doublereal *const cfluxes) |
Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points. More... | |
virtual void | getMassFluxes (const doublereal *state1, const doublereal *state2, doublereal delta, doublereal *mfluxes) |
Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two nearby points. More... | |
virtual void | getThermalDiffCoeffs (doublereal *const dt) |
Return a vector of Thermal diffusion coefficients [kg/m/sec]. More... | |
virtual void | getBinaryDiffCoeffs (const size_t ld, doublereal *const d) |
Returns the matrix of binary diffusion coefficients [m^2/s]. More... | |
virtual void | getMultiDiffCoeffs (const size_t ld, doublereal *const d) |
Return the Multicomponent diffusion coefficients. Units: [m^2/s]. More... | |
virtual void | getMixDiffCoeffsMole (doublereal *const d) |
Returns a vector of mixture averaged diffusion coefficients. More... | |
virtual void | getMixDiffCoeffsMass (doublereal *const d) |
Returns a vector of mixture averaged diffusion coefficients. More... | |
void | setVelocityBasis (VelocityBasis ivb) |
Sets the velocity basis. More... | |
VelocityBasis | getVelocityBasis () const |
Gets the velocity basis. More... | |
virtual doublereal | viscosity () |
virtual void | getSpeciesViscosities (doublereal *const visc) |
Returns the pure species viscosities. More... | |
virtual doublereal | bulkViscosity () |
The bulk viscosity in Pa-s. More... | |
virtual void | getSpeciesIonConductivity (doublereal *const ionCond) |
Returns the pure species ionic conductivity. More... | |
virtual void | mobilityRatio (double *mobRat) |
Returns the pointer to the mobility ratios of the species in the phase. More... | |
virtual void | getSpeciesMobilityRatio (double **mobRat) |
Returns the pure species limit of the mobility ratios. More... | |
virtual void | selfDiffusion (doublereal *const selfDiff) |
Returns the self diffusion coefficients of the species in the phase. More... | |
virtual void | getSpeciesSelfDiffusion (double **selfDiff) |
Returns the pure species self diffusion in solution of each species. More... | |
virtual void | getFluidMobilities (doublereal *const mobil_f) |
Get the fluid mobilities (s kmol/kg). More... | |
virtual void | init (thermo_t *thermo, int mode=0, int log_level=0) |
Initialize a transport manager. More... | |
virtual bool | initLiquid (LiquidTransportParams &tr) |
Called by TransportFactory to set parameters. More... | |
virtual void | setThermo (thermo_t &thermo) |
Specifies the ThermoPhase object. More... | |
Protected Member Functions | |
virtual bool | initSolid (SolidTransportData &tr) |
Initialize the transport object. More... | |
Protected Member Functions inherited from Transport | |
void | finalize () |
Enable the transport object for use. More... | |
Private Attributes | |
LTPspecies * | m_ionConductivity |
Model type for the ionic conductivity. More... | |
LTPspecies * | m_thermalConductivity |
Model type for the thermal conductivity. More... | |
LTPspecies * | m_electConductivity |
Model type for the electrical conductivity. More... | |
LTPspecies * | m_defectDiffusivity |
Model type for the defectDiffusivity – or more like a defect diffusivity in the context of the solid phase. More... | |
LTPspecies * | m_defectActivity |
Model type for the defectActivity. More... | |
size_t | m_nmobile |
number of mobile species More... | |
vector_fp | m_Adiff |
Coefficient for the diffusivity of species within a solid. More... | |
vector_fp | m_Ndiff |
Temperature power coefficient for the diffusivity of species in a solid. More... | |
vector_fp | m_Ediff |
Arrhenius factor for the species diffusivities of a solid. More... | |
vector_int | m_sp |
Index of mobile species to global species. More... | |
doublereal | m_Alam |
Coefficient for the thermal conductivity of a solid. More... | |
doublereal | m_Nlam |
Temperature power coefficient for the thermal conductivity of a solid. More... | |
doublereal | m_Elam |
Arrhenius factor for the thermal conductivity of a solid. More... | |
vector_fp | m_work |
extra fp array of length nSpecies() More... | |
Friends | |
class | TransportFactory |
Additional Inherited Members | |
Protected Attributes inherited from Transport | |
thermo_t * | m_thermo |
pointer to the object representing the phase More... | |
bool | m_ready |
true if finalize has been called More... | |
size_t | m_nsp |
Number of species. More... | |
size_t | m_nDim |
Number of dimensions used in flux expressions. More... | |
int | m_velocityBasis |
Velocity basis from which diffusion velocities are computed. More... | |
Class SolidTransport implements transport properties for solids.
Definition at line 30 of file SolidTransport.h.
|
virtual |
Duplication routine for objects which inherit from Transport.
This virtual routine can be used to duplicate objects derived from Transport even if the application only has a pointer to Transport to work with.
These routines are basically wrappers around the derived copy constructor.
Reimplemented from Transport.
Definition at line 58 of file SolidTransport.cpp.
|
inlinevirtual |
Transport model.
The transport model is the set of equations used to compute the transport properties. This method returns an integer flag that identifies the transport model implemented. The base class returns 0.
transportType()
instead. To be removed after Cantera 2.3. Reimplemented from Transport.
Definition at line 38 of file SolidTransport.h.
References Cantera::warn_deprecated().
|
inlinevirtual |
Identifies the Transport object type.
Each derived class should override this method to return a meaningful identifier.
Reimplemented from Transport.
Definition at line 44 of file SolidTransport.h.
|
virtual |
Returns the ionic conductivity of the phase.
The thermo phase needs to be updated (temperature) prior to calling this. The ionConductivity calculation is handled by subclasses of LTPspecies as specified in the input file.
Reimplemented from Transport.
Definition at line 106 of file SolidTransport.cpp.
References LTPspecies::getSpeciesTransProp(), and SolidTransport::m_ionConductivity.
|
virtual |
Returns the thermal conductivity of the phase.
The thermo phase needs to be updated (temperature) prior to calling this. The thermalConductivity calculation is handled by subclasses of LTPspecies as specified in the input file.
There is also a legacy method to evaluate
\[ \lambda = A T^n \exp(-E/RT) \]
Reimplemented from Transport.
Definition at line 129 of file SolidTransport.cpp.
References LTPspecies::getSpeciesTransProp(), SolidTransport::m_Alam, SolidTransport::m_Elam, SolidTransport::m_Nlam, SolidTransport::m_thermalConductivity, Transport::m_thermo, and Phase::temperature().
|
virtual |
Returns the electron conductivity of the phase.
The thermo phase needs to be updated (temperature) prior to calling this. The ionConductivity calculation is handled by subclasses of LTPspecies as specified in the input file.
There is also a legacy multicomponent diffusion approach to electrical conductivity.
Reimplemented from Transport.
Definition at line 112 of file SolidTransport.cpp.
References Phase::charge(), SolidTransport::getMobilities(), LTPspecies::getSpeciesTransProp(), SolidTransport::m_electConductivity, SolidTransport::m_nmobile, Transport::m_thermo, SolidTransport::m_work, Phase::molarDensity(), Phase::moleFraction(), and Phase::nSpecies().
|
virtual |
The diffusivity of defects in the solid (m^2/s). The thermo phase needs to be updated (temperature) prior to calling this. The defectDiffusivity calculation is handled by subclasses of LTPspecies as specified in the input file.
Definition at line 141 of file SolidTransport.cpp.
References LTPspecies::getSpeciesTransProp(), and SolidTransport::m_defectDiffusivity.
|
virtual |
The activity of defects in the solid.
At some point this should be variable and the diffusion coefficient should depend on it.
The thermo phase needs to be updated (temperature) prior to calling this. The defectActivity calculation is handled by subclasses of LTPspecies as specified in the input file.
Definition at line 147 of file SolidTransport.cpp.
References LTPspecies::getSpeciesTransProp(), and SolidTransport::m_defectActivity.
|
virtual |
Returns a vector of mixture averaged diffusion coefficients.
Mixture-averaged diffusion coefficients [m^2/s]. If the transport manager implements a mixture-averaged diffusion model, then this method returns the array of mixture-averaged diffusion coefficients. Otherwise it throws an exception.
d | Return vector of mixture averaged diffusion coefficients Units = m2/s. Length = n_sp |
Reimplemented from Transport.
Definition at line 163 of file SolidTransport.cpp.
Referenced by SolidTransport::getMobilities().
|
virtual |
Get the Electrical mobilities (m^2/V/s).
This function returns the mobilities. In some formulations this is equal to the normal mobility multiplied by Faraday's constant.
Frequently, but not always, the mobility is calculated from the diffusion coefficient using the Einstein relation
\[ \mu^e_k = \frac{F D_k}{R T} \]
mobil_e | Returns the mobilities of the species in array mobil_e . The array must be dimensioned at least as large as the number of species. |
Reimplemented from Transport.
Definition at line 153 of file SolidTransport.cpp.
References Cantera::Boltzmann, SolidTransport::getMixDiffCoeffs(), Transport::m_thermo, Phase::nSpecies(), and Phase::temperature().
Referenced by SolidTransport::electricalConductivity().
|
virtual |
Reimplemented from Transport.
Definition at line 81 of file SolidTransport.cpp.
References SolidTransport::m_Adiff, SolidTransport::m_Alam, SolidTransport::m_Ediff, SolidTransport::m_Elam, SolidTransport::m_Ndiff, SolidTransport::m_Nlam, SolidTransport::m_nmobile, SolidTransport::m_sp, Transport::m_thermo, SolidTransport::m_work, Phase::nSpecies(), and Cantera::warn_deprecated().
|
protectedvirtual |
Initialize the transport object.
Here we change all of the internal dimensions to be sufficient. We get the object ready to do property evaluations. A lot of the input required to do property evaluations is contained in the SolidTransportParams class that is filled in TransportFactory.
tr | Transport parameters for all of the species in the phase. |
Reimplemented from Transport.
Definition at line 64 of file SolidTransport.cpp.
References SolidTransportData::defectActivity, SolidTransportData::defectDiffusivity, SolidTransportData::electConductivity, SolidTransportData::ionConductivity, SolidTransport::m_defectActivity, SolidTransport::m_defectDiffusivity, SolidTransport::m_electConductivity, SolidTransport::m_ionConductivity, SolidTransport::m_thermalConductivity, Transport::m_thermo, SolidTransportData::thermalConductivity, and TransportParams::thermo.
|
private |
Model type for the ionic conductivity.
Definition at line 132 of file SolidTransport.h.
Referenced by SolidTransport::initSolid(), and SolidTransport::ionConductivity().
|
private |
Model type for the thermal conductivity.
Definition at line 135 of file SolidTransport.h.
Referenced by SolidTransport::initSolid(), and SolidTransport::thermalConductivity().
|
private |
Model type for the electrical conductivity.
Definition at line 138 of file SolidTransport.h.
Referenced by SolidTransport::electricalConductivity(), and SolidTransport::initSolid().
|
private |
Model type for the defectDiffusivity – or more like a defect diffusivity in the context of the solid phase.
Definition at line 142 of file SolidTransport.h.
Referenced by SolidTransport::defectDiffusivity(), and SolidTransport::initSolid().
|
private |
Model type for the defectActivity.
Definition at line 145 of file SolidTransport.h.
Referenced by SolidTransport::defectActivity(), and SolidTransport::initSolid().
|
private |
number of mobile species
Definition at line 148 of file SolidTransport.h.
Referenced by SolidTransport::electricalConductivity(), and SolidTransport::setParameters().
|
private |
Coefficient for the diffusivity of species within a solid.
This is with respect to the lattice units = m**2 / s vector of length m_nmobile
Definition at line 156 of file SolidTransport.h.
Referenced by SolidTransport::setParameters().
|
private |
Temperature power coefficient for the diffusivity of species in a solid.
vector of length m_nmobile
Definition at line 162 of file SolidTransport.h.
Referenced by SolidTransport::setParameters().
|
private |
Arrhenius factor for the species diffusivities of a solid.
units = temperature vector of length m_nmobile
Definition at line 169 of file SolidTransport.h.
Referenced by SolidTransport::setParameters().
|
private |
Index of mobile species to global species.
vector of length m_nmobile
Definition at line 175 of file SolidTransport.h.
Referenced by SolidTransport::setParameters().
|
private |
Coefficient for the thermal conductivity of a solid.
units = kg m / s3 /K = W/m/K
Definition at line 181 of file SolidTransport.h.
Referenced by SolidTransport::setParameters(), and SolidTransport::thermalConductivity().
|
private |
Temperature power coefficient for the thermal conductivity of a solid.
Definition at line 184 of file SolidTransport.h.
Referenced by SolidTransport::setParameters(), and SolidTransport::thermalConductivity().
|
private |
Arrhenius factor for the thermal conductivity of a solid.
units = temperature
Definition at line 190 of file SolidTransport.h.
Referenced by SolidTransport::setParameters(), and SolidTransport::thermalConductivity().
|
private |
extra fp array of length nSpecies()
Definition at line 193 of file SolidTransport.h.
Referenced by SolidTransport::electricalConductivity(), and SolidTransport::setParameters().