21 #ifndef CT_TRANSPORTBASE_H
22 #define CT_TRANSPORTBASE_H
29 class LiquidTransportParams;
30 class SolidTransportData;
37 const int CK_Mode = 10;
41 const int cMulticomponent = 200;
42 const int CK_Multicomponent = 202;
43 const int cMixtureAveraged = 210;
44 const int CK_MixtureAveraged = 211;
45 const int cHighP = 270;
46 const int cSolidTransport = 300;
47 const int cDustyGasTransport = 400;
48 const int cUserTransport = 500;
49 const int cFtnTransport = 600;
50 const int cLiquidTransport = 700;
51 const int cAqueousTransport = 750;
52 const int cSimpleTransport = 770;
53 const int cRadiativeTransport = 800;
54 const int cWaterTransport = 721;
55 const int cPecosTransport = 900;
450 const doublereal* grad_T,
452 const doublereal* grad_X,
454 const doublereal* grad_V,
455 doublereal* current) {
482 size_t ldx,
const doublereal*
const grad_X,
483 size_t ldf, doublereal*
const fluxes);
504 const doublereal* grad_T,
506 const doublereal* grad_X,
508 const doublereal* grad_Phi,
509 doublereal* fluxes) {
529 const doublereal* grad_T,
531 const doublereal* grad_X,
556 const doublereal* grad_T,
558 const doublereal* grad_X,
560 const doublereal* grad_Phi,
579 const doublereal*
const state2,
const doublereal delta,
580 doublereal*
const cfluxes) {
598 const doublereal* state2, doublereal delta,
599 doublereal* mfluxes) {
689 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].
void checkSpeciesIndex(size_t k) const
Check that the specified species index is in range Throws an exception if k is greater than nSpecies(...
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.
virtual int model() const
Transport model.
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.
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.
size_t nDim() const
Return the number of dimensions in flux expressions.
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.
VelocityBasis getVelocityBasis() const
Gets the velocity basis.
const VelocityBasis VB_SPECIES_3
Diffusion velocities are based on the relative motion wrt species 3.
void checkSpeciesArraySize(size_t kk) const
Check that an array size is at least nSpecies() Throws an exception if kk is less than nSpecies()...
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()
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.
virtual Transport * duplMyselfAsTransport() const
Duplication routine for objects which inherit from Transport.
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.