Cantera
3.1.0a1
|
Class DustyGasTransport implements the Dusty Gas model for transport in porous media. More...
#include <DustyGasTransport.h>
Class DustyGasTransport implements the Dusty Gas model for transport in porous media.
As implemented here, only species transport is handled. The viscosity, thermal conductivity, and thermal diffusion coefficients are not implemented.
The dusty gas model includes the effects of Darcy's law. There is a net flux of species due to a pressure gradient that is part of Darcy's law.
The dusty gas model expresses the value of the molar flux of species \( k \), \( J_k \) by the following formula.
\[ \sum_{j \ne k}{\frac{X_j J_k - X_k J_j}{D^e_{kj}}} + \frac{J_k}{\mathcal{D}^{e}_{k,knud}} = - \nabla C_k - \frac{C_k}{\mathcal{D}^{e}_{k,knud}} \frac{\kappa}{\mu} \nabla p \]
\( j \) is a sum over all species in the gas.
The effective Knudsen diffusion coefficients are given by the following form
\[ \mathcal{D}^e_{k,knud} = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2} \]
The effective knudsen diffusion coefficients take into account the effects of collisions of gas-phase molecules with the wall.
For references on the Dusty Gas Model, see Zhu and Kee [48]; Zhu, et al. [49]; Mason and Malinauskas [25]; and Veldsink, et al. [45].
Definition at line 52 of file DustyGasTransport.h.
Public Member Functions | |
DustyGasTransport ()=default | |
default constructor More... | |
string | transportModel () const override |
Identifies the model represented by this Transport object. More... | |
void | getMultiDiffCoeffs (const size_t ld, double *const d) override |
Return the Multicomponent diffusion coefficients. Units: [m^2/s]. More... | |
void | getMolarFluxes (const double *const state1, const double *const state2, const double delta, double *const fluxes) override |
Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points. More... | |
void | setPorosity (double porosity) |
Set the porosity (dimensionless) More... | |
void | setTortuosity (double tort) |
Set the tortuosity (dimensionless) More... | |
void | setMeanPoreRadius (double rbar) |
Set the mean pore radius (m) More... | |
void | setMeanParticleDiameter (double dbar) |
Set the mean particle diameter. More... | |
void | setPermeability (double B) |
Set the permeability of the media. More... | |
Transport & | gasTransport () |
Return a reference to the transport manager used to compute the gas binary diffusion coefficients and the viscosity. More... | |
Public Member Functions inherited from Transport | |
Transport ()=default | |
Constructor. More... | |
Transport (const Transport &)=delete | |
Transport & | operator= (const Transport &)=delete |
ThermoPhase & | thermo () |
Phase object. More... | |
void | checkSpeciesIndex (size_t k) const |
Check that the specified species index is in range. More... | |
void | checkSpeciesArraySize (size_t kk) const |
Check that an array size is at least nSpecies(). More... | |
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. More... | |
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. More... | |
virtual void | getThermalDiffCoeffs (double *const dt) |
Return a vector of Thermal diffusion coefficients [kg/m/sec]. More... | |
virtual void | getBinaryDiffCoeffs (const size_t ld, double *const d) |
Returns the matrix of binary diffusion coefficients [m^2/s]. More... | |
virtual void | getMixDiffCoeffs (double *const d) |
Returns a vector of mixture averaged diffusion coefficients. More... | |
virtual void | getMixDiffCoeffsMole (double *const d) |
Returns a vector of mixture averaged diffusion coefficients. More... | |
virtual void | getMixDiffCoeffsMass (double *const d) |
Returns a vector of mixture averaged diffusion coefficients. More... | |
virtual void | getViscosityPolynomial (size_t i, double *coeffs) const |
Return the polynomial fits to the viscosity of species i. More... | |
virtual void | getConductivityPolynomial (size_t i, double *coeffs) const |
Return the temperature fits of the heat conductivity of species i. More... | |
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) More... | |
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) More... | |
virtual void | setViscosityPolynomial (size_t i, double *coeffs) |
Modify the polynomial fits to the viscosity of species i. More... | |
virtual void | setConductivityPolynomial (size_t i, double *coeffs) |
Modify the temperature fits of the heat conductivity of species i. More... | |
virtual void | setBinDiffusivityPolynomial (size_t i, size_t j, double *coeffs) |
Modify the polynomial fits to the binary diffusivity of species pair (i, j) More... | |
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) More... | |
AnyMap | parameters () const |
Return the parameters for a phase definition which are needed to reconstruct an identical object using the newTransport function. More... | |
virtual double | viscosity () |
The viscosity in Pa-s. More... | |
virtual void | getSpeciesViscosities (double *const visc) |
Returns the pure species viscosities. More... | |
virtual double | bulkViscosity () |
The bulk viscosity in Pa-s. More... | |
virtual double | thermalConductivity () |
Returns the mixture thermal conductivity in W/m/K. More... | |
virtual double | electricalConductivity () |
The electrical conductivity (Siemens/m). More... | |
virtual void | getMobilities (double *const mobil_e) |
Get the Electrical mobilities (m^2/V/s). More... | |
virtual void | init (ThermoPhase *thermo, int mode=0, int log_level=0) |
Initialize a transport manager. More... | |
virtual bool | CKMode () const |
Boolean indicating the form of the transport properties polynomial fits. More... | |
Protected Member Functions | |
void | initialize (ThermoPhase *phase, Transport *gastr) |
Initialization routine called by TransportFactory. More... | |
Private Member Functions | |
void | updateTransport_T () |
Update temperature-dependent quantities within the object. More... | |
void | updateTransport_C () |
Update concentration-dependent quantities within the object. More... | |
void | updateBinaryDiffCoeffs () |
Private routine to update the dusty gas binary diffusion coefficients. More... | |
void | updateMultiDiffCoeffs () |
Update the Multicomponent diffusion coefficients that are used in the approximation. More... | |
void | updateKnudsenDiffCoeffs () |
Update the Knudsen diffusion coefficients. More... | |
void | eval_H_matrix () |
Calculate the H matrix. More... | |
Private Attributes | |
vector< double > | m_mw |
Local copy of the species molecular weights. More... | |
DenseMatrix | m_d |
binary diffusion coefficients More... | |
vector< double > | m_x |
mole fractions More... | |
vector< double > | m_dk |
Knudsen diffusion coefficients. More... | |
double | m_temp = -1.0 |
temperature More... | |
DenseMatrix | m_multidiff |
Multicomponent diffusion coefficients. More... | |
vector< double > | m_spwork |
work space of size m_nsp; More... | |
vector< double > | m_spwork2 |
work space of size m_nsp; More... | |
double | m_gradP = 0.0 |
Pressure Gradient. More... | |
bool | m_knudsen_ok = false |
Update-to-date variable for Knudsen diffusion coefficients. More... | |
bool | m_bulk_ok = false |
Update-to-date variable for Binary diffusion coefficients. More... | |
double | m_porosity = 0.0 |
Porosity. More... | |
double | m_tortuosity = 1.0 |
Tortuosity. More... | |
double | m_pore_radius = 0.0 |
Pore radius (meter) More... | |
double | m_diam = 0.0 |
Particle diameter. More... | |
double | m_perm = -1.0 |
Permeability of the media. More... | |
unique_ptr< Transport > | m_gastran |
Pointer to the transport object for the gas phase. More... | |
Friends | |
class | TransportFactory |
Make the TransportFactory object a friend, because this object has restricted its instantiation to classes which are friends. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Transport | |
ThermoPhase * | m_thermo |
pointer to the object representing the phase More... | |
size_t | m_nsp = 0 |
Number of species. More... | |
|
default |
default constructor
|
inlineoverridevirtual |
Identifies the model represented by this Transport object.
Each derived class should override this method to return a meaningful identifier.
Reimplemented from Transport.
Definition at line 60 of file DustyGasTransport.h.
|
overridevirtual |
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.
[in] | ld | The dimension of the inner loop of d (usually equal to m_nsp) |
[out] | d | flat 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 from Transport.
Definition at line 172 of file DustyGasTransport.cpp.
|
overridevirtual |
Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points.
\[ J_k = - \sum_{j = 1, N} \left[D^{multi}_{kj}\right]^{-1} \left( \nabla C_j + \frac{C_j}{\mathcal{D}^{knud}_j} \frac{\kappa}{\mu} \nabla p \right) \]
state1 | Array of temperature, density, and mass fractions for state 1. |
state2 | Array of temperature, density, and mass fractions for state 2. |
delta | Distance from state 1 to state 2 (m). |
fluxes | Vector of species molar fluxes due to diffusional driving force |
Reimplemented from Transport.
Definition at line 96 of file DustyGasTransport.cpp.
void setPorosity | ( | double | porosity | ) |
Set the porosity (dimensionless)
porosity | Set the value of the porosity |
Definition at line 205 of file DustyGasTransport.cpp.
void setTortuosity | ( | double | tort | ) |
Set the tortuosity (dimensionless)
Tortuosity is considered to be constant within the object
tort | Value of the tortuosity |
Definition at line 212 of file DustyGasTransport.cpp.
void setMeanPoreRadius | ( | double | rbar | ) |
Set the mean pore radius (m)
rbar | Value of the pore radius ( m) |
Definition at line 219 of file DustyGasTransport.cpp.
void setMeanParticleDiameter | ( | double | dbar | ) |
Set the mean particle diameter.
dbar | Set the mean particle diameter (m) |
Definition at line 225 of file DustyGasTransport.cpp.
void setPermeability | ( | double | B | ) |
Set the permeability of the media.
If not set, the value for close-packed spheres will be used by default.
The value for close-packed spheres is given below, where p is the porosity, t is the tortuosity, and d is the diameter of the sphere
\[ \kappa = \frac{p^3 d^2}{72 t (1 - p)^2} \]
B | set the permeability of the media (units = m^2) |
Definition at line 230 of file DustyGasTransport.cpp.
Transport & gasTransport | ( | ) |
Return a reference to the transport manager used to compute the gas binary diffusion coefficients and the viscosity.
Definition at line 235 of file DustyGasTransport.cpp.
|
protected |
Initialization routine called by TransportFactory.
The DustyGas model is a subordinate model to the gas phase transport model. Here we set the gas phase models.
This is a protected routine, so that initialization of the Model must occur within Cantera's setup
phase | Pointer to the underlying ThermoPhase model for the gas phase |
gastr | Pointer to the underlying Transport model for transport in the gas phase. |
Definition at line 17 of file DustyGasTransport.cpp.
|
private |
Update temperature-dependent quantities within the object.
The object keeps a value m_temp, which is the temperature at which quantities were last evaluated at. If the temperature is changed, update Booleans are set false, triggering recomputation.
Definition at line 182 of file DustyGasTransport.cpp.
|
private |
Update concentration-dependent quantities within the object.
The object keeps a value m_temp, which is the temperature at which quantities were last evaluated at. If the temperature is changed, update Booleans are set false, triggering recomputation.
Definition at line 192 of file DustyGasTransport.cpp.
|
private |
Private routine to update the dusty gas binary diffusion coefficients.
The dusty gas binary diffusion coefficients \( D^{dg}_{i,j} \) are evaluated from the binary gas-phase diffusion coefficients \( D^{bin}_{i,j} \) using the following formula
\[ D^{dg}_{i,j} = \frac{\phi}{\tau} D^{bin}_{i,j} \]
where \( \phi \) is the porosity of the media and \( \tau \) is the tortuosity of the media.
Definition at line 45 of file DustyGasTransport.cpp.
|
private |
Update the Multicomponent diffusion coefficients that are used in the approximation.
This routine updates the H matrix and then inverts it.
Definition at line 155 of file DustyGasTransport.cpp.
|
private |
Update the Knudsen diffusion coefficients.
The Knudsen diffusion coefficients are given by the following form
\[ \mathcal{D}^{knud}_k = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2} \]
Definition at line 62 of file DustyGasTransport.cpp.
|
private |
Calculate the H matrix.
The multicomponent diffusion H matrix \( H_{k,l} \) is given by the following form
\[ H_{k,l} = - \frac{X_k}{D_{k,l}} \]
\[ H_{k,k} = \frac{1}{\mathcal(D)^{knud}_{k}} + \sum_{j \ne k}^N{ \frac{X_j}{D_{k,j}} } \]
Definition at line 75 of file DustyGasTransport.cpp.
|
friend |
Make the TransportFactory object a friend, because this object has restricted its instantiation to classes which are friends.
Definition at line 133 of file DustyGasTransport.h.
|
private |
Local copy of the species molecular weights.
units kg /kmol length = m_nsp;
Definition at line 217 of file DustyGasTransport.h.
|
private |
binary diffusion coefficients
Definition at line 220 of file DustyGasTransport.h.
|
private |
mole fractions
Definition at line 223 of file DustyGasTransport.h.
|
private |
Knudsen diffusion coefficients.
Definition at line 226 of file DustyGasTransport.h.
|
private |
temperature
Definition at line 229 of file DustyGasTransport.h.
|
private |
Multicomponent diffusion coefficients.
Definition at line 232 of file DustyGasTransport.h.
|
private |
work space of size m_nsp;
Definition at line 235 of file DustyGasTransport.h.
|
private |
work space of size m_nsp;
Definition at line 238 of file DustyGasTransport.h.
|
private |
Pressure Gradient.
Definition at line 241 of file DustyGasTransport.h.
|
private |
Update-to-date variable for Knudsen diffusion coefficients.
Definition at line 244 of file DustyGasTransport.h.
|
private |
Update-to-date variable for Binary diffusion coefficients.
Definition at line 247 of file DustyGasTransport.h.
|
private |
Porosity.
Definition at line 250 of file DustyGasTransport.h.
|
private |
Tortuosity.
Definition at line 253 of file DustyGasTransport.h.
|
private |
Pore radius (meter)
Definition at line 256 of file DustyGasTransport.h.
|
private |
Particle diameter.
The medium is assumed to consist of particles of size m_diam. units = m
Definition at line 262 of file DustyGasTransport.h.
|
private |
Permeability of the media.
The permeability is the proportionality constant for Darcy's law which relates discharge rate and viscosity to the applied pressure gradient.
Below is Darcy's law, where \( \kappa \) is the permeability
\[ v = \frac{\kappa}{\mu} \frac{\delta P}{\delta x} \]
units are m2
Definition at line 277 of file DustyGasTransport.h.
|
private |
Pointer to the transport object for the gas phase.
Definition at line 280 of file DustyGasTransport.h.