19 #ifndef CT_TRANSPORTBASE_H 20 #define CT_TRANSPORTBASE_H 27 class LiquidTransportParams;
28 class SolidTransportData;
35 const int CK_Mode = 10;
407 const doublereal* grad_T,
409 const doublereal* grad_X,
411 const doublereal* grad_V,
412 doublereal* current) {
436 size_t ldx,
const doublereal*
const grad_X,
437 size_t ldf, doublereal*
const fluxes);
458 const doublereal* grad_T,
460 const doublereal* grad_X,
462 const doublereal* grad_Phi,
463 doublereal* fluxes) {
483 const doublereal* grad_T,
485 const doublereal* grad_X,
510 const doublereal* grad_T,
512 const doublereal* grad_X,
514 const doublereal* grad_Phi,
533 const doublereal*
const state2,
const doublereal delta,
534 doublereal*
const cfluxes) {
552 const doublereal* state2, doublereal delta,
553 doublereal* mfluxes) {
642 virtual void setParameters(
const int type,
const int k,
const doublereal*
const p);
virtual void getMixDiffCoeffsMole(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal *const d)
Returns the matrix of binary diffusion coefficients [m^2/s].
virtual void selfDiffusion(doublereal *const selfDiff)
Returns the self diffusion coefficients of the species in the phase.
Transport(thermo_t *thermo=0, size_t ndim=1)
Constructor.
void checkSpeciesArraySize(size_t kk) const
Check that an array size is at least nSpecies().
const VelocityBasis VB_SPECIES_1
Diffusion velocities are based on the relative motion wrt species 1.
An error indicating that an unimplemented function has been called.
size_t m_nDim
Number of dimensions used in flux expressions.
VelocityBasis getVelocityBasis() const
Gets the velocity basis.
thermo_t * m_thermo
pointer to the object representing the phase
virtual doublereal bulkViscosity()
The bulk viscosity in Pa-s.
void setVelocityBasis(VelocityBasis ivb)
Sets the velocity basis.
Base class for transport property managers.
virtual void getSpeciesMobilityRatio(double **mobRat)
Returns the pure species limit of the mobility ratios.
virtual bool initSolid(SolidTransportData &tr)
Called by TransportFactory to set parameters.
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.
virtual void init(thermo_t *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
virtual void getSpeciesViscosities(doublereal *const visc)
Returns the pure species viscosities.
void finalize()
Enable the transport object for use.
Base class for a phase with thermodynamic properties.
int VelocityBasis
The diffusion fluxes must be referenced to a particular reference fluid velocity. ...
Class LiquidTransportParams holds transport model parameters relevant to transport in mixtures...
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 f...
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.
const VelocityBasis VB_SPECIES_3
Diffusion velocities are based on the relative motion wrt species 3.
void checkSpeciesIndex(size_t k) const
Check that the specified species index is in range.
virtual void setParameters(const int type, const int k, const doublereal *const p)
Set model parameters for derived classes.
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 ...
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity in W/m/K.
virtual doublereal viscosity()
void setNDim(const int ndim)
Set the number of dimensions to be expected in flux expressions.
virtual doublereal ionConductivity()
The ionic conductivity in 1/ohm/m.
virtual void getMobilities(doublereal *const mobil_e)
Get the Electrical mobilities (m^2/V/s).
virtual void getSpeciesSelfDiffusion(double **selfDiff)
Returns the pure species self diffusion in solution of each species.
virtual void getMultiDiffCoeffs(const size_t ld, doublereal *const d)
Return the Multicomponent diffusion coefficients. Units: [m^2/s].
virtual void mobilityRatio(double *mobRat)
Returns the pointer to the mobility ratios of the species in the phase.
bool m_ready
true if finalize has been called
const VelocityBasis VB_MOLEAVG
Diffusion velocities are based on the mole averaged velocities.
virtual void getMixDiffCoeffs(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
virtual void getMixDiffCoeffsMass(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
virtual bool initLiquid(LiquidTransportParams &tr)
Called by TransportFactory to set parameters.
virtual doublereal electricalConductivity()
The electrical conductivity (Siemens/m).
virtual std::string transportType() const
Identifies the Transport object type.
size_t m_nsp
Number of species.
virtual void getThermalDiffCoeffs(doublereal *const dt)
Return a vector of Thermal diffusion coefficients [kg/m/sec].
const VelocityBasis VB_MASSAVG
Diffusion velocities are based on the mass averaged velocity.
virtual void setThermo(thermo_t &thermo)
Specifies the ThermoPhase object.
Namespace for the Cantera kernel.
size_t nDim() const
Return the number of dimensions in flux expressions.
virtual doublereal getElectricConduct()
Compute the mixture electrical conductivity (S m-1) at the current conditions of the phase (Siemens m...
const VelocityBasis VB_SPECIES_2
Diffusion velocities are based on the relative motion wrt species 2.
Header file for class ThermoPhase, the base class for phases with thermodynamic properties, and the text for the Module thermoprops (see Thermodynamic Properties and class ThermoPhase).
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.
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.
Class SolidTransportData holds transport parameters for a specific solid- phase species.
int m_velocityBasis
Velocity basis from which diffusion velocities are computed.
virtual void getFluidMobilities(doublereal *const mobil_f)
Get the fluid mobilities (s kmol/kg).
const VelocityBasis VB_SPECIES_0
Diffusion velocities are based on the relative motion wrt species 0.
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 f...
virtual void getSpeciesIonConductivity(doublereal *const ionCond)
Returns the pure species ionic conductivity.