19 #ifndef CT_TRANSPORTBASE_H
20 #define CT_TRANSPORTBASE_H
32 const int CK_Mode = 10;
363 const doublereal* grad_T,
365 const doublereal* grad_X,
367 const doublereal* grad_V,
368 doublereal* current) {
392 size_t ldx,
const doublereal*
const grad_X,
393 size_t ldf, doublereal*
const fluxes);
414 const doublereal* grad_T,
416 const doublereal* grad_X,
418 const doublereal* grad_Phi,
419 doublereal* fluxes) {
439 const doublereal* grad_T,
441 const doublereal* grad_X,
466 const doublereal* grad_T,
468 const doublereal* grad_X,
470 const doublereal* grad_Phi,
489 const doublereal*
const state2,
const doublereal delta,
490 doublereal*
const cfluxes) {
508 const doublereal* state2, doublereal delta,
509 doublereal* mfluxes) {
598 virtual void setParameters(
const int type,
const int k,
const doublereal*
const p);
658 virtual void setRoot(std::shared_ptr<Solution> root) {
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
An error indicating that an unimplemented function has been called.
Base class for a phase with thermodynamic properties.
Base class for transport property managers.
virtual void getMobilities(doublereal *const mobil_e)
Get the Electrical mobilities (m^2/V/s).
virtual void getMixDiffCoeffsMole(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
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.
void setNDim(const int ndim)
Set the number of dimensions to be expected in flux expressions.
size_t m_nDim
Number of dimensions used in flux expressions.
void checkSpeciesIndex(size_t k) const
Check that the specified species index is in range.
virtual void getFluidMobilities(doublereal *const mobil_f)
Get the fluid mobilities (s kmol/kg).
bool m_ready
true if finalize has been called
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 getThermalDiffCoeffs(doublereal *const dt)
Return a vector of Thermal diffusion coefficients [kg/m/sec].
void finalize()
Enable the transport object for use.
virtual void init(thermo_t *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
virtual doublereal bulkViscosity()
The bulk viscosity in Pa-s.
virtual doublereal ionConductivity()
The ionic conductivity in 1/ohm/m.
size_t nDim() const
Return the number of dimensions in flux expressions.
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.
Transport(thermo_t *thermo=0, size_t ndim=1)
Constructor.
virtual void getMixDiffCoeffsMass(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
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 void getSpeciesIonConductivity(doublereal *const ionCond)
Returns the pure species ionic conductivity.
virtual doublereal electricalConductivity()
The electrical conductivity (Siemens/m).
virtual void setRoot(std::shared_ptr< Solution > root)
Set root Solution holding all phase information.
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal *const d)
Returns the matrix of binary diffusion coefficients [m^2/s].
virtual void getSpeciesMobilityRatio(double **mobRat)
Returns the pure species limit of the mobility ratios.
virtual void mobilityRatio(double *mobRat)
Returns the pointer to the mobility ratios of the species in the phase.
thermo_t * m_thermo
pointer to the object representing the phase
virtual doublereal viscosity()
virtual std::string transportType() const
Identifies the Transport object type.
std::weak_ptr< Solution > m_root
reference to Solution
virtual void getMultiDiffCoeffs(const size_t ld, doublereal *const d)
Return the Multicomponent diffusion coefficients. Units: [m^2/s].
size_t m_nsp
Number of species.
virtual void setParameters(const int type, const int k, const doublereal *const p)
Set model parameters for derived classes.
virtual void getSpeciesViscosities(doublereal *const visc)
Returns the pure species viscosities.
void setVelocityBasis(VelocityBasis ivb)
Sets the velocity basis.
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,...
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.
void checkSpeciesArraySize(size_t kk) const
Check that an array size is at least nSpecies().
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity in W/m/K.
int m_velocityBasis
Velocity basis from which diffusion velocities are computed.
virtual doublereal getElectricConduct()
Compute the mixture electrical conductivity (S m-1) at the current conditions of the phase (Siemens m...
virtual void getMixDiffCoeffs(doublereal *const d)
Returns a vector of mixture averaged diffusion coefficients.
virtual void setThermo(thermo_t &thermo)
Specifies the ThermoPhase object.
VelocityBasis getVelocityBasis() const
Gets the velocity basis.
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...
int VelocityBasis
The diffusion fluxes must be referenced to a particular reference fluid velocity.
Namespace for the Cantera kernel.
const VelocityBasis VB_SPECIES_1
Diffusion velocities are based on the relative motion wrt species 1.
const VelocityBasis VB_MASSAVG
Diffusion velocities are based on the mass averaged velocity.
const VelocityBasis VB_SPECIES_2
Diffusion velocities are based on the relative motion wrt species 2.
const VelocityBasis VB_MOLEAVG
Diffusion velocities are based on the mole averaged velocities.
const VelocityBasis VB_SPECIES_3
Diffusion velocities are based on the relative motion wrt species 3.
const VelocityBasis VB_SPECIES_0
Diffusion velocities are based on the relative motion wrt species 0.