19#ifndef CT_TRANSPORTBASE_H
20#define CT_TRANSPORTBASE_H
37const int CK_Mode = 10;
209 "Not implemented for transport model '{}'.",
transportType());
220 "Not implemented for transport model '{}'.",
transportType());
231 "Not implemented for transport model '{}'.",
transportType());
237 "Not implemented for transport model '{}'.",
transportType());
248 "Not implemented for transport model '{}'.",
transportType());
268 "Not implemented for transport model '{}'.",
transportType());
279 "Not implemented for transport model '{}'.",
transportType());
290 "Not implemented for transport model '{}'.",
transportType());
296 "Not implemented for transport model '{}'.",
transportType());
317 "Not implemented for transport model '{}'.",
transportType());
339 "Not implemented for transport model '{}'.",
transportType());
363 "Not implemented for transport model '{}'.",
transportType());
380 const doublereal* grad_T,
382 const doublereal* grad_X,
384 const doublereal* grad_V,
385 doublereal* current) {
387 "Not implemented for transport model '{}'.",
transportType());
410 size_t ldx,
const doublereal*
const grad_X,
411 size_t ldf, doublereal*
const fluxes) {
413 "Not implemented for transport model '{}'.",
transportType());
435 const doublereal* grad_T,
437 const doublereal* grad_X,
439 const doublereal* grad_Phi,
440 doublereal* fluxes) {
460 const doublereal* grad_T,
462 const doublereal* grad_X,
466 "Not implemented for transport model '{}'.",
transportType());
488 const doublereal* grad_T,
490 const doublereal* grad_X,
492 const doublereal* grad_Phi,
511 const doublereal*
const state2,
const doublereal delta,
512 doublereal*
const cfluxes) {
514 "Not implemented for transport model '{}'.",
transportType());
531 const doublereal* state2, doublereal delta,
532 doublereal* mfluxes) {
534 "Not implemented for transport model '{}'.",
transportType());
555 "Not implemented for transport model '{}'.",
transportType());
567 "Not implemented for transport model '{}'.",
transportType());
584 "Not implemented for transport model '{}'.",
transportType());
599 "Not implemented for transport model '{}'.",
transportType());
605 "Not implemented for transport model '{}'.",
transportType());
611 "Not implemented for transport model '{}'.",
transportType());
617 "Not implemented for transport model '{}'.",
transportType());
623 "Not implemented for transport model '{}'.",
transportType());
629 "Not implemented for transport model '{}'.",
transportType());
634 double* astar_coeffs,
635 double* bstar_coeffs,
636 double* cstar_coeffs)
const{
638 "Not implemented for transport model '{}'.",
transportType());
644 "Not implemented for transport model '{}'.",
transportType());
650 "Not implemented for transport model '{}'.",
transportType());
656 "Not implemented for transport model '{}'.",
transportType());
661 double* astar_coeffs,
662 double* bstar_coeffs,
663 double* cstar_coeffs,
bool flag){
665 "Not implemented for transport model '{}'.",
transportType());
683 virtual void setParameters(
const int type,
const int k,
const doublereal*
const p) {
685 "Not implemented for transport model '{}'.",
transportType());
752 virtual void setRoot(std::shared_ptr<Solution> root);
758 "Not implemented for transport model '{}'.",
transportType());
A map of string keys to values whose type can vary at runtime.
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 setThermo(ThermoPhase &thermo)
Specifies the ThermoPhase object.
ThermoPhase * m_thermo
pointer to the object representing the phase
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.
virtual void init(ThermoPhase *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
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 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)
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 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 setParameters(const int type, const int k, const doublereal *const p)
Set model parameters for derived classes.
virtual void setRoot(std::shared_ptr< Solution > root)
Set root Solution holding all phase information.
virtual void getViscosityPolynomial(size_t i, double *coeffs) const
Return the polynomial fits to the viscosity of species i.
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 getConductivityPolynomial(size_t i, double *coeffs) const
Return the temperature fits of the heat conductivity of species i.
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.
AnyMap parameters() const
Return the parameters for a phase definition which are needed to reconstruct an identical object usin...
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 setViscosityPolynomial(size_t i, double *coeffs)
Modify the polynomial fits to the viscosity of species i.
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.
virtual void setConductivityPolynomial(size_t i, double *coeffs)
Modify the temperature fits of the heat conductivity of species i.
virtual doublereal viscosity()
virtual std::string transportType() const
Identifies the Transport object type.
virtual bool CKMode() const
Boolean indicating the form of the transport properties polynomial fits.
std::weak_ptr< Solution > m_root
reference to Solution
Transport(ThermoPhase *thermo=0, size_t ndim=1)
Constructor.
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 getSpeciesViscosities(doublereal *const visc)
Returns the pure species viscosities.
void setVelocityBasis(VelocityBasis ivb)
Sets the velocity basis.
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 setBinDiffusivityPolynomial(size_t i, size_t j, double *coeffs)
Modify the polynomial fits to the binary diffusivity of species pair (i, j)
VelocityBasis getVelocityBasis() const
Gets the velocity basis.
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 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...
This file contains definitions of constants, types and terms that are used in internal routines and a...
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
const VelocityBasis VB_SPECIES_1
Diffusion velocities are based on the relative motion wrt species 1.
int VelocityBasis
The diffusion fluxes must be referenced to a particular reference fluid velocity.
const VelocityBasis VB_MASSAVG
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.
Namespace for the Cantera kernel.