Cantera  3.0.0
Loading...
Searching...
No Matches
Transport Class Reference

Base class for transport property managers. More...

#include <Transport.h>

Inheritance diagram for Transport:
[legend]

Detailed Description

Base class for transport property managers.

All classes that compute transport properties for a single phase derive from this class. Class Transport is meant to be used as a base class only. It is possible to instantiate it, but its methods throw exceptions if called.

Relationship of the Transport class to the ThermoPhase Class

This section describes how calculations are carried out within the Transport class. The Transport class and derived classes of the the Transport class necessarily use the ThermoPhase class to obtain the list of species and the thermodynamic state of the phase.

No state information is stored within Transport classes. Queries to the underlying ThermoPhase object must be made to obtain the state of the system.

An exception to this however is the state information concerning the the gradients of variables. This information is not stored within the ThermoPhase objects. It may be collected within the Transport objects. In fact, the meaning of const operations within the Transport class refers to calculations which do not change the state of the system nor the state of the first order gradients of the system.

When a const operation is evoked within the Transport class, it is also implicitly assumed that the underlying state within the ThermoPhase object has not changed its values.

Diffusion Fluxes and their Relationship to Reference Velocities

The diffusion fluxes must be referenced to a particular reference fluid velocity. Most typical is to reference the diffusion fluxes to the mass averaged velocity, but referencing to the mole averaged velocity is suitable for some liquid flows, and referencing to a single species is suitable for solid phase transport within a lattice. Currently, the identity of the reference velocity is coded into each transport object as a typedef named VelocityBasis, which is equated to an integer. Negative values of this variable refer to mass or mole-averaged velocities. Zero or positive quantities refers to the reference velocity being referenced to a particular species. Below are the predefined constants for its value.

  • VB_MASSAVG Diffusion velocities are based on the mass averaged velocity
  • VB_MOLEAVG Diffusion velocities are based on the mole averaged velocities
  • VB_SPECIES_0 Diffusion velocities are based on the relative motion wrt species 0
  • ...
  • VB_SPECIES_3 Diffusion velocities are based on the relative motion wrt species 3

All transport managers specify a default reference velocity in their default constructors. All gas phase transport managers by default specify the mass- averaged velocity as their reference velocities.

Todo:
Provide a general mechanism to store the gradients of state variables within the system.

Definition at line 145 of file Transport.h.

Public Member Functions

 Transport (ThermoPhase *thermo=0, size_t ndim=npos)
 Constructor.
 
 Transport (const Transport &)=delete
 
Transportoperator= (const Transport &)=delete
 
virtual string transportModel () const
 Identifies the model represented by this Transport object.
 
string transportType () const
 Identifies the Transport object type.
 
ThermoPhasethermo ()
 Phase object.
 
bool ready ()
 Returns true if the transport manager is ready for use.
 
void setNDim (const int ndim)
 Set the number of dimensions to be expected in flux expressions.
 
size_t nDim () const
 Return the number of dimensions in flux expressions.
 
void checkSpeciesIndex (size_t k) const
 Check that the specified species index is in range.
 
void checkSpeciesArraySize (size_t kk) const
 Check that an array size is at least nSpecies().
 
virtual double getElectricConduct ()
 Compute the mixture electrical conductivity (S m-1) at the current conditions of the phase (Siemens m-1)
 
virtual void getElectricCurrent (int ndim, const double *grad_T, int ldx, const double *grad_X, int ldf, const double *grad_V, double *current)
 Compute the electric current density in A/m^2.
 
virtual void getSpeciesFluxes (size_t ndim, const double *const grad_T, size_t ldx, const double *const grad_X, size_t ldf, double *const fluxes)
 Get the species diffusive mass fluxes wrt to the specified solution averaged velocity, given the gradients in mole fraction and temperature.
 
virtual void getSpeciesFluxesES (size_t ndim, const double *grad_T, size_t ldx, const double *grad_X, size_t ldf, const double *grad_Phi, double *fluxes)
 Get the species diffusive mass fluxes wrt to the mass averaged velocity, given the gradients in mole fraction, temperature and electrostatic potential.
 
virtual void getSpeciesVdiff (size_t ndim, const double *grad_T, int ldx, const double *grad_X, int ldf, double *Vdiff)
 Get the species diffusive velocities wrt to the mass averaged velocity, given the gradients in mole fraction and temperature.
 
virtual void getSpeciesVdiffES (size_t ndim, const double *grad_T, int ldx, const double *grad_X, int ldf, const double *grad_Phi, double *Vdiff)
 Get the species diffusive velocities wrt to the mass averaged velocity, given the gradients in mole fraction, temperature, and electrostatic potential.
 
virtual void getMolarFluxes (const double *const state1, const double *const state2, const double delta, double *const cfluxes)
 Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points.
 
virtual void getMassFluxes (const double *state1, const double *state2, double delta, double *mfluxes)
 Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two nearby points.
 
virtual void getThermalDiffCoeffs (double *const dt)
 Return a vector of Thermal diffusion coefficients [kg/m/sec].
 
virtual void getBinaryDiffCoeffs (const size_t ld, double *const d)
 Returns the matrix of binary diffusion coefficients [m^2/s].
 
virtual void getMultiDiffCoeffs (const size_t ld, double *const d)
 Return the Multicomponent diffusion coefficients. Units: [m^2/s].
 
virtual void getMixDiffCoeffs (double *const d)
 Returns a vector of mixture averaged diffusion coefficients.
 
virtual void getMixDiffCoeffsMole (double *const d)
 Returns a vector of mixture averaged diffusion coefficients.
 
virtual void getMixDiffCoeffsMass (double *const d)
 Returns a vector of mixture averaged diffusion coefficients.
 
virtual void getViscosityPolynomial (size_t i, double *coeffs) const
 Return the polynomial fits to the viscosity of species i.
 
virtual void getConductivityPolynomial (size_t i, double *coeffs) const
 Return the temperature fits of the heat conductivity of species i.
 
virtual void getBinDiffusivityPolynomial (size_t i, size_t j, double *coeffs) const
 Return the polynomial fits to the binary diffusivity of species pair (i, j)
 
virtual void getCollisionIntegralPolynomial (size_t i, size_t j, double *astar_coeffs, double *bstar_coeffs, double *cstar_coeffs) const
 Return the polynomial fits to the collision integral of species pair (i, j)
 
virtual void setViscosityPolynomial (size_t i, double *coeffs)
 Modify the polynomial fits to the viscosity of species i.
 
virtual void setConductivityPolynomial (size_t i, double *coeffs)
 Modify the temperature fits of the heat conductivity of species i.
 
virtual void setBinDiffusivityPolynomial (size_t i, size_t j, double *coeffs)
 Modify the polynomial fits to the binary diffusivity of species pair (i, j)
 
virtual void setCollisionIntegralPolynomial (size_t i, size_t j, double *astar_coeffs, double *bstar_coeffs, double *cstar_coeffs, bool flag)
 Modify the polynomial fits to the collision integral of species pair (i, j)
 
virtual void setParameters (const int type, const int k, const double *const p)
 Set model parameters for derived classes.
 
AnyMap parameters () const
 Return the parameters for a phase definition which are needed to reconstruct an identical object using the newTransport function.
 
void setVelocityBasis (VelocityBasis ivb)
 Sets the velocity basis.
 
VelocityBasis getVelocityBasis () const
 Gets the velocity basis.
 
Transport Properties
virtual double viscosity ()
 The viscosity in Pa-s.
 
virtual void getSpeciesViscosities (double *const visc)
 Returns the pure species viscosities.
 
virtual double bulkViscosity ()
 The bulk viscosity in Pa-s.
 
virtual double ionConductivity ()
 The ionic conductivity in 1/ohm/m.
 
virtual void getSpeciesIonConductivity (double *const ionCond)
 Returns the pure species ionic conductivity.
 
virtual void mobilityRatio (double *mobRat)
 Returns the pointer to the mobility ratios of the species in the phase.
 
virtual void getSpeciesMobilityRatio (double **mobRat)
 Returns the pure species limit of the mobility ratios.
 
virtual double thermalConductivity ()
 Returns the mixture thermal conductivity in W/m/K.
 
virtual double electricalConductivity ()
 The electrical conductivity (Siemens/m).
 
virtual void getMobilities (double *const mobil_e)
 Get the Electrical mobilities (m^2/V/s).
 
virtual void getFluidMobilities (double *const mobil_f)
 Get the fluid mobilities (s kmol/kg).
 

Protected Attributes

ThermoPhasem_thermo
 pointer to the object representing the phase
 
bool m_ready = false
 true if finalize has been called
 
size_t m_nsp = 0
 Number of species.
 
size_t m_nDim
 Number of dimensions used in flux expressions.
 
int m_velocityBasis = VB_MASSAVG
 Velocity basis from which diffusion velocities are computed.
 
std::weak_ptr< Solutionm_root
 reference to Solution
 

Transport manager construction

These methods are used during construction.

virtual void init (ThermoPhase *thermo, int mode=0, int log_level=0)
 Initialize a transport manager.
 
virtual void setThermo (ThermoPhase &thermo)
 Specifies the ThermoPhase object.
 
virtual void setRoot (shared_ptr< Solution > root)
 Set root Solution holding all phase information.
 
virtual bool CKMode () const
 Boolean indicating the form of the transport properties polynomial fits.
 
void finalize ()
 Enable the transport object for use.
 

Constructor & Destructor Documentation

◆ Transport()

Transport ( ThermoPhase thermo = 0,
size_t  ndim = npos 
)

Constructor.

New transport managers should be created using TransportFactory, not by calling the constructor directly.

Parameters
thermoPointer to the ThermoPhase class representing this phase.
ndimDimension of the flux vector used in the calculation.
Deprecated:
The thermo and ndim parameters will be removed after Cantera 3.0. The ThermoPhase object should be specifed when calling the init method.
See also
TransportFactory

Definition at line 15 of file Transport.cpp.

◆ ~Transport()

virtual ~Transport ( )
inlinevirtual

Definition at line 163 of file Transport.h.

Member Function Documentation

◆ transportModel()

virtual string transportModel ( ) const
inlinevirtual

Identifies the model represented by this Transport object.

Each derived class should override this method to return a meaningful identifier.

Since
New in Cantera 3.0. The name returned by this method corresponds to the canonical name used in the YAML input format.

Reimplemented in DustyGasTransport, HighPressureGasTransport, IonGasTransport, MixTransport, MultiTransport, UnityLewisTransport, and WaterTransport.

Definition at line 173 of file Transport.h.

◆ transportType()

string transportType ( ) const
inline

Identifies the Transport object type.

Each derived class should override this method to return a meaningful identifier.

Deprecated:
To be removed after Cantera 3.0. Replaced by transportModel

Definition at line 180 of file Transport.h.

◆ thermo()

ThermoPhase & thermo ( )
inline

Phase object.

Every transport manager is designed to compute properties for a specific phase of a mixture, which might be a liquid solution, a gas mixture, a surface, etc. This method returns a reference to the object representing the phase itself.

Definition at line 192 of file Transport.h.

◆ ready()

bool ready ( )

Returns true if the transport manager is ready for use.

Deprecated:
To be removed after Cantera 3.0.

Definition at line 32 of file Transport.cpp.

◆ setNDim()

void setNDim ( const int  ndim)

Set the number of dimensions to be expected in flux expressions.

Parameters
ndimNumber of dimensions in flux expressions
Deprecated:
Unused. To be removed after Cantera 3.0.

Definition at line 38 of file Transport.cpp.

◆ nDim()

size_t nDim ( ) const
inline

Return the number of dimensions in flux expressions.

Deprecated:
Unused. To be removed after Cantera 3.0.

Definition at line 211 of file Transport.h.

◆ checkSpeciesIndex()

void checkSpeciesIndex ( size_t  k) const

Check that the specified species index is in range.

Throws an exception if k is greater than nSpecies()

Definition at line 44 of file Transport.cpp.

◆ checkSpeciesArraySize()

void checkSpeciesArraySize ( size_t  kk) const

Check that an array size is at least nSpecies().

Throws an exception if kk is less than nSpecies(). Used before calls which take an array pointer.

Definition at line 51 of file Transport.cpp.

◆ viscosity()

virtual double viscosity ( )
inlinevirtual

The viscosity in Pa-s.

Reimplemented in GasTransport, HighPressureGasTransport, IonGasTransport, and WaterTransport.

Definition at line 230 of file Transport.h.

◆ getSpeciesViscosities()

virtual void getSpeciesViscosities ( double *const  visc)
inlinevirtual

Returns the pure species viscosities.

The units are Pa-s and the length is the number of species

Parameters
viscVector of viscosities

Reimplemented in GasTransport.

Definition at line 241 of file Transport.h.

◆ bulkViscosity()

virtual double bulkViscosity ( )
inlinevirtual

The bulk viscosity in Pa-s.

The bulk viscosity is only non-zero in rare cases. Most transport managers either overload this method to return zero, or do not implement it, in which case an exception is thrown if called.

Reimplemented in WaterTransport.

Definition at line 252 of file Transport.h.

◆ ionConductivity()

virtual double ionConductivity ( )
inlinevirtual

The ionic conductivity in 1/ohm/m.

Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 259 of file Transport.h.

◆ getSpeciesIonConductivity()

virtual void getSpeciesIonConductivity ( double *const  ionCond)
inlinevirtual

Returns the pure species ionic conductivity.

The units are 1/ohm/m and the length is the number of species

Parameters
ionCondVector of ionic conductivities
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 272 of file Transport.h.

◆ mobilityRatio()

virtual void mobilityRatio ( double *  mobRat)
inlinevirtual

Returns the pointer to the mobility ratios of the species in the phase.

Parameters
mobRatReturns a matrix of mobility ratios for the current problem. The mobility ratio mobRat(i,j) is defined as the ratio of the mobility of species i to species j.

mobRat(i,j) = mu_i / mu_j

It is returned in fortran-ordering format. That is, it is returned as mobRat[k], where

   k = j * nsp + i

The size of mobRat must be at least equal to nsp*nsp

Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 294 of file Transport.h.

◆ getSpeciesMobilityRatio()

virtual void getSpeciesMobilityRatio ( double **  mobRat)
inlinevirtual

Returns the pure species limit of the mobility ratios.

The value is dimensionless and the length is the number of species

Parameters
mobRatVector of mobility ratios
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 307 of file Transport.h.

◆ thermalConductivity()

virtual double thermalConductivity ( )
inlinevirtual

Returns the mixture thermal conductivity in W/m/K.

Units are in W / m K or equivalently kg m / s3 K

Returns
thermal conductivity in W/m/K.

Reimplemented in HighPressureGasTransport, IonGasTransport, MixTransport, MultiTransport, and WaterTransport.

Definition at line 318 of file Transport.h.

◆ electricalConductivity()

virtual double electricalConductivity ( )
inlinevirtual

The electrical conductivity (Siemens/m).

Reimplemented in IonGasTransport.

Definition at line 324 of file Transport.h.

◆ getMobilities()

virtual void getMobilities ( double *const  mobil_e)
inlinevirtual

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} \]

Parameters
mobil_eReturns the mobilities of the species in array mobil_e. The array must be dimensioned at least as large as the number of species.

Reimplemented in IonGasTransport, and MixTransport.

Definition at line 345 of file Transport.h.

◆ getFluidMobilities()

virtual void getFluidMobilities ( double *const  mobil_f)
inlinevirtual

Get the fluid mobilities (s kmol/kg).

This function returns the fluid mobilities. Usually, you have to multiply Faraday's constant into the resulting expression to general a species flux expression.

Frequently, but not always, the mobility is calculated from the diffusion coefficient using the Einstein relation

\[ \mu^f_k = \frac{D_k}{R T} \]

Parameters
mobil_fReturns the mobilities of the species in array mobil. The array must be dimensioned at least as large as the number of species.
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 369 of file Transport.h.

◆ getElectricConduct()

virtual double getElectricConduct ( )
inlinevirtual

Compute the mixture electrical conductivity (S m-1) at the current conditions of the phase (Siemens m-1)

The electrical conductivity, \( \sigma \), relates the electric current density, J, to the electric field, E.

\[ \vec{J} = \sigma \vec{E} \]

We assume here that the mixture electrical conductivity is an isotropic quantity, at this stage. Tensors may be included at a later time.

The conductivity is the reciprocal of the resistivity.

The units are Siemens m-1, where 1 S = 1 A / volt = 1 s^3 A^2 /kg /m^2

Deprecated:
To be removed after Cantera 3.0. Replaced by electricalConductivity()

Definition at line 395 of file Transport.h.

◆ getElectricCurrent()

virtual void getElectricCurrent ( int  ndim,
const double *  grad_T,
int  ldx,
const double *  grad_X,
int  ldf,
const double *  grad_V,
double *  current 
)
inlinevirtual

Compute the electric current density in A/m^2.

Calculates the electric current density as a vector, given the gradients of the field variables.

Parameters
ndimThe number of spatial dimensions (1, 2, or 3).
grad_TThe temperature gradient (ignored in this model).
ldxLeading dimension of the grad_X array.
grad_XThe gradient of the mole fraction
ldfLeading dimension of the grad_V and current vectors.
grad_VThe electrostatic potential gradient.
currentThe electric current in A/m^2. This is a vector of length ndim
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 415 of file Transport.h.

◆ getSpeciesFluxes()

virtual void getSpeciesFluxes ( size_t  ndim,
const double *const  grad_T,
size_t  ldx,
const double *const  grad_X,
size_t  ldf,
double *const  fluxes 
)
inlinevirtual

Get the species diffusive mass fluxes wrt to the specified solution averaged velocity, given the gradients in mole fraction and temperature.

Units for the returned fluxes are kg m-2 s-1.

Usually the specified solution average velocity is the mass averaged velocity. This is changed in some subclasses, however.

Parameters
ndimNumber of dimensions in the flux expressions
grad_TGradient of the temperature (length = ndim)
ldxLeading dimension of the grad_X array (usually equal to m_nsp but not always)
grad_XGradients of the mole fraction Flat vector with the m_nsp in the inner loop. length = ldx * ndim
ldfLeading dimension of the fluxes array (usually equal to m_nsp but not always)
fluxesOutput of the diffusive mass fluxes. Flat vector with the m_nsp in the inner loop. length = ldx * ndim

Reimplemented in MixTransport, and MultiTransport.

Definition at line 445 of file Transport.h.

◆ getSpeciesFluxesES()

virtual void getSpeciesFluxesES ( size_t  ndim,
const double *  grad_T,
size_t  ldx,
const double *  grad_X,
size_t  ldf,
const double *  grad_Phi,
double *  fluxes 
)
inlinevirtual

Get the species diffusive mass fluxes wrt to the mass averaged velocity, given the gradients in mole fraction, temperature and electrostatic potential.

Units for the returned fluxes are kg m-2 s-1.

Parameters
[in]ndimNumber of dimensions in the flux expressions
[in]grad_TGradient of the temperature. (length = ndim)
[in]ldxLeading dimension of the grad_X array (usually equal to m_nsp but not always)
[in]grad_XGradients of the mole fraction. Flat vector with the m_nsp in the inner loop. length = ldx * ndim.
[in]ldfLeading dimension of the fluxes array (usually equal to m_nsp but not always).
[in]grad_PhiGradients of the electrostatic potential (length = ndim)
[out]fluxesThe diffusive mass fluxes. Flat vector with the m_nsp in the inner loop. length = ldx * ndim.
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 472 of file Transport.h.

◆ getSpeciesVdiff()

virtual void getSpeciesVdiff ( size_t  ndim,
const double *  grad_T,
int  ldx,
const double *  grad_X,
int  ldf,
double *  Vdiff 
)
inlinevirtual

Get the species diffusive velocities wrt to the mass averaged velocity, given the gradients in mole fraction and temperature.

Parameters
[in]ndimNumber of dimensions in the flux expressions
[in]grad_TGradient of the temperature (length = ndim)
[in]ldxLeading dimension of the grad_X array (usually equal to m_nsp but not always)
[in]grad_XGradients of the mole fraction. Flat vector with the m_nsp in the inner loop. length = ldx * ndim
[in]ldfLeading dimension of the fluxes array (usually equal to m_nsp but not always)
[out]VdiffDiffusive velocities wrt the mass- averaged velocity. Flat vector with the m_nsp in the inner loop. length = ldx * ndim. units are m / s.
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 499 of file Transport.h.

◆ getSpeciesVdiffES()

virtual void getSpeciesVdiffES ( size_t  ndim,
const double *  grad_T,
int  ldx,
const double *  grad_X,
int  ldf,
const double *  grad_Phi,
double *  Vdiff 
)
inlinevirtual

Get the species diffusive velocities wrt to the mass averaged velocity, given the gradients in mole fraction, temperature, and electrostatic potential.

Parameters
[in]ndimNumber of dimensions in the flux expressions
[in]grad_TGradient of the temperature (length = ndim)
[in]ldxLeading dimension of the grad_X array (usually equal to m_nsp but not always)
[in]grad_XGradients of the mole fraction. Flat vector with the m_nsp in the inner loop. length = ldx * ndim.
[in]ldfLeading dimension of the fluxes array (usually equal to m_nsp but not always)
[in]grad_PhiGradients of the electrostatic potential (length = ndim)
[out]VdiffDiffusive velocities wrt the mass-averaged velocity. Flat vector with the m_nsp in the inner loop. length = ldx
  • ndim. units are m / s.
Deprecated:
To be removed after Cantera 3.0. Not implemented by any model.

Definition at line 529 of file Transport.h.

◆ getMolarFluxes()

virtual void getMolarFluxes ( const double *const  state1,
const double *const  state2,
const double  delta,
double *const  cfluxes 
)
inlinevirtual

Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points.

Parameters
[in]state1Array of temperature, density, and mass fractions for state 1.
[in]state2Array of temperature, density, and mass fractions for state 2.
[in]deltaDistance from state 1 to state 2 (m).
[out]cfluxesOutput array containing the diffusive molar fluxes of species from state1 to state2. This is a flat vector with m_nsp in the inner loop. length = ldx * ndim. Units are [kmol/m^2/s].

Reimplemented in DustyGasTransport, and MultiTransport.

Definition at line 552 of file Transport.h.

◆ getMassFluxes()

virtual void getMassFluxes ( const double *  state1,
const double *  state2,
double  delta,
double *  mfluxes 
)
inlinevirtual

Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two nearby points.

Parameters
[in]state1Array of temperature, density, and mass fractions for state 1.
[in]state2Array of temperature, density, and mass fractions for state 2.
[in]deltaDistance from state 1 to state 2 (m).
[out]mfluxesOutput array containing the diffusive mass fluxes of species from state1 to state2. This is a flat vector with m_nsp in the inner loop. length = ldx * ndim. Units are [kg/m^2/s].

Reimplemented in MultiTransport.

Definition at line 572 of file Transport.h.

◆ getThermalDiffCoeffs()

virtual void getThermalDiffCoeffs ( double *const  dt)
inlinevirtual

Return a vector of Thermal diffusion coefficients [kg/m/sec].

The thermal diffusion coefficient \( D^T_k \) is defined so that the diffusive mass flux of species k induced by the local temperature gradient is given by the following formula:

\[ M_k J_k = -D^T_k \nabla \ln T. \]

The thermal diffusion coefficient can be either positive or negative.

Parameters
dtOn return, dt will contain the species thermal diffusion coefficients. Dimension dt at least as large as the number of species. Units are kg/m/s.

Reimplemented in HighPressureGasTransport, MixTransport, and MultiTransport.

Definition at line 595 of file Transport.h.

◆ getBinaryDiffCoeffs()

virtual void getBinaryDiffCoeffs ( const size_t  ld,
double *const  d 
)
inlinevirtual

Returns the matrix of binary diffusion coefficients [m^2/s].

Parameters
[in]ldInner stride for writing the two dimension diffusion coefficients into a one dimensional vector
[out]dDiffusion coefficient matrix (must be at least m_k * m_k in length.

Reimplemented in GasTransport, and HighPressureGasTransport.

Definition at line 607 of file Transport.h.

◆ getMultiDiffCoeffs()

virtual void getMultiDiffCoeffs ( const size_t  ld,
double *const  d 
)
inlinevirtual

Return the Multicomponent diffusion coefficients. Units: [m^2/s].

If the transport manager implements a multicomponent diffusion model, then this method returns the array of multicomponent diffusion coefficients. Otherwise it throws an exception.

Parameters
[in]ldThe dimension of the inner loop of d (usually equal to m_nsp)
[out]dflat vector of diffusion coefficients, fortran ordering. d[ld*j+i] is the D_ij diffusion coefficient (the diffusion coefficient for species i due to concentration gradients in species j). Units: m^2/s

Reimplemented in DustyGasTransport, HighPressureGasTransport, and MultiTransport.

Definition at line 624 of file Transport.h.

◆ getMixDiffCoeffs()

virtual void getMixDiffCoeffs ( double *const  d)
inlinevirtual

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.

Parameters
dReturn vector of mixture averaged diffusion coefficients Units = m2/s. Length = n_sp

Reimplemented in GasTransport, IonGasTransport, and UnityLewisTransport.

Definition at line 639 of file Transport.h.

◆ getMixDiffCoeffsMole()

virtual void getMixDiffCoeffsMole ( double *const  d)
inlinevirtual

Returns a vector of mixture averaged diffusion coefficients.

Reimplemented in GasTransport, and UnityLewisTransport.

Definition at line 645 of file Transport.h.

◆ getMixDiffCoeffsMass()

virtual void getMixDiffCoeffsMass ( double *const  d)
inlinevirtual

Returns a vector of mixture averaged diffusion coefficients.

Reimplemented in GasTransport, and UnityLewisTransport.

Definition at line 651 of file Transport.h.

◆ getViscosityPolynomial()

virtual void getViscosityPolynomial ( size_t  i,
double *  coeffs 
) const
inlinevirtual

Return the polynomial fits to the viscosity of species i.

Reimplemented in GasTransport.

Definition at line 657 of file Transport.h.

◆ getConductivityPolynomial()

virtual void getConductivityPolynomial ( size_t  i,
double *  coeffs 
) const
inlinevirtual

Return the temperature fits of the heat conductivity of species i.

Reimplemented in GasTransport.

Definition at line 663 of file Transport.h.

◆ getBinDiffusivityPolynomial()

virtual void getBinDiffusivityPolynomial ( size_t  i,
size_t  j,
double *  coeffs 
) const
inlinevirtual

Return the polynomial fits to the binary diffusivity of species pair (i, j)

Reimplemented in GasTransport.

Definition at line 669 of file Transport.h.

◆ getCollisionIntegralPolynomial()

virtual void getCollisionIntegralPolynomial ( size_t  i,
size_t  j,
double *  astar_coeffs,
double *  bstar_coeffs,
double *  cstar_coeffs 
) const
inlinevirtual

Return the polynomial fits to the collision integral of species pair (i, j)

Reimplemented in GasTransport.

Definition at line 675 of file Transport.h.

◆ setViscosityPolynomial()

virtual void setViscosityPolynomial ( size_t  i,
double *  coeffs 
)
inlinevirtual

Modify the polynomial fits to the viscosity of species i.

Reimplemented in GasTransport.

Definition at line 684 of file Transport.h.

◆ setConductivityPolynomial()

virtual void setConductivityPolynomial ( size_t  i,
double *  coeffs 
)
inlinevirtual

Modify the temperature fits of the heat conductivity of species i.

Reimplemented in GasTransport.

Definition at line 690 of file Transport.h.

◆ setBinDiffusivityPolynomial()

virtual void setBinDiffusivityPolynomial ( size_t  i,
size_t  j,
double *  coeffs 
)
inlinevirtual

Modify the polynomial fits to the binary diffusivity of species pair (i, j)

Reimplemented in GasTransport.

Definition at line 696 of file Transport.h.

◆ setCollisionIntegralPolynomial()

virtual void setCollisionIntegralPolynomial ( size_t  i,
size_t  j,
double *  astar_coeffs,
double *  bstar_coeffs,
double *  cstar_coeffs,
bool  flag 
)
inlinevirtual

Modify the polynomial fits to the collision integral of species pair (i, j)

Reimplemented in GasTransport.

Definition at line 702 of file Transport.h.

◆ setParameters()

virtual void setParameters ( const int  type,
const int  k,
const double *const  p 
)
inlinevirtual

Set model parameters for derived classes.

This method may be derived in subclasses to set model-specific parameters. The primary use of this class is to set parameters while in the middle of a calculation without actually having to dynamically cast the base Transport pointer.

Parameters
typeSpecifies the type of parameters to set 0 : Diffusion coefficient 1 : Thermal Conductivity The rest are currently unused.
kSpecies index to set the parameters on
pVector of parameters. The length of the vector varies with the parameterization
Deprecated:
To be removed after Cantera 3.0.

Definition at line 726 of file Transport.h.

◆ parameters()

AnyMap parameters ( ) const

Return the parameters for a phase definition which are needed to reconstruct an identical object using the newTransport function.

This excludes the individual species transport properties, which are handled separately.

Definition at line 58 of file Transport.cpp.

◆ setVelocityBasis()

void setVelocityBasis ( VelocityBasis  ivb)
inline

Sets the velocity basis.

What the transport object does with this parameter is up to the individual operator. Currently, this is not functional for most transport operators including all of the gas-phase operators.

Parameters
ivbSpecies the velocity basis
Deprecated:
To be removed after Cantera 3.0.

Definition at line 746 of file Transport.h.

◆ getVelocityBasis()

VelocityBasis getVelocityBasis ( ) const
inline

Gets the velocity basis.

What the transport object does with this parameter is up to the individual operator. Currently, this is not functional for most transport operators including all of the gas-phase operators.

Returns
the velocity basis
Deprecated:
To be removed after Cantera 3.0.

Definition at line 759 of file Transport.h.

◆ init()

virtual void init ( ThermoPhase thermo,
int  mode = 0,
int  log_level = 0 
)
inlinevirtual

Initialize a transport manager.

This routine sets up a transport manager. It calculates the collision integrals and populates species-dependent data structures.

Parameters
thermoPointer to the ThermoPhase object
modeChemkin compatible mode or not. This alters the specification of the collision integrals. defaults to no.
log_levelDefaults to zero, no logging

Reimplemented in IonGasTransport, GasTransport, MixTransport, MultiTransport, and WaterTransport.

Definition at line 778 of file Transport.h.

◆ setThermo()

void setThermo ( ThermoPhase thermo)
virtual

Specifies the ThermoPhase object.

We have relaxed this operation so that it will succeed when the underlying old and new ThermoPhase objects have the same number of species and the same names of the species in the same order. The idea here is to allow copy constructors and duplicators to work. In order for them to work, we need a method to switch the internal pointer within the Transport object after the duplication takes place. Also, different thermodynamic instantiations of the same species should also work.

Parameters
thermoReference to the ThermoPhase object that the transport object will use
Deprecated:
To be removed after Cantera 3.0. The ThermoPhase object should be set as part of the call to init.

Reimplemented in DustyGasTransport.

Definition at line 68 of file Transport.cpp.

◆ setRoot()

void setRoot ( shared_ptr< Solution root)
virtual

Set root Solution holding all phase information.

Deprecated:
Unused. To be removed after Cantera 3.0.

Definition at line 95 of file Transport.cpp.

◆ CKMode()

virtual bool CKMode ( ) const
inlinevirtual

Boolean indicating the form of the transport properties polynomial fits.

Returns true if the Chemkin form is used.

Reimplemented in GasTransport.

Definition at line 803 of file Transport.h.

◆ finalize()

void finalize ( )
protected

Enable the transport object for use.

Once finalize() has been called, the transport manager should be ready to compute any supported transport property, and no further modifications to the model parameters should be made.

Deprecated:
To be removed after Cantera 3.0.

Definition at line 101 of file Transport.cpp.

Member Data Documentation

◆ m_thermo

ThermoPhase* m_thermo
protected

pointer to the object representing the phase

Definition at line 821 of file Transport.h.

◆ m_ready

bool m_ready = false
protected

true if finalize has been called

Deprecated:
To be removed after Cantera 3.0

Definition at line 825 of file Transport.h.

◆ m_nsp

size_t m_nsp = 0
protected

Number of species.

Definition at line 828 of file Transport.h.

◆ m_nDim

size_t m_nDim
protected

Number of dimensions used in flux expressions.

Deprecated:
To be removed after Cantera 3.0

Definition at line 832 of file Transport.h.

◆ m_velocityBasis

int m_velocityBasis = VB_MASSAVG
protected

Velocity basis from which diffusion velocities are computed.

Defaults to the mass averaged basis = -2

Deprecated:
To be removed after Cantera 3.0.

Definition at line 837 of file Transport.h.

◆ m_root

std::weak_ptr<Solution> m_root
protected

reference to Solution

Deprecated:
To be removed after Cantera 3.0

Definition at line 841 of file Transport.h.


The documentation for this class was generated from the following files: