Cantera  3.1.0a1
Loading...
Searching...
No Matches
DustyGasTransport Class Reference

Class DustyGasTransport implements the Dusty Gas model for transport in porous media. More...

#include <DustyGasTransport.h>

Inheritance diagram for DustyGasTransport:
[legend]

Detailed Description

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
 
string transportModel () const override
 Identifies the model represented by this Transport object.
 
void getMultiDiffCoeffs (const size_t ld, double *const d) override
 Return the Multicomponent diffusion coefficients. Units: [m^2/s].
 
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.
 
void setPorosity (double porosity)
 Set the porosity (dimensionless)
 
void setTortuosity (double tort)
 Set the tortuosity (dimensionless)
 
void setMeanPoreRadius (double rbar)
 Set the mean pore radius (m)
 
void setMeanParticleDiameter (double dbar)
 Set the mean particle diameter.
 
void setPermeability (double B)
 Set the permeability of the media.
 
TransportgasTransport ()
 Return a reference to the transport manager used to compute the gas binary diffusion coefficients and the viscosity.
 
- Public Member Functions inherited from Transport
 Transport ()=default
 Constructor.
 
 Transport (const Transport &)=delete
 
Transportoperator= (const Transport &)=delete
 
virtual string transportModel () const
 Identifies the model represented by this Transport object.
 
ThermoPhasethermo ()
 Phase object.
 
void checkSpeciesIndex (size_t k) const
 Check that the specified species index is in range.
 
void checkSpeciesArraySize (size_t kk) const
 Check that an array size is at least nSpecies().
 
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.
 
virtual void getMolarFluxes (const double *const state1, const double *const state2, const double delta, double *const cfluxes)
 Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points.
 
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.
 
virtual void getThermalDiffCoeffs (double *const dt)
 Return a vector of Thermal diffusion coefficients [kg/m/sec].
 
virtual void getBinaryDiffCoeffs (const size_t ld, double *const d)
 Returns the matrix of binary diffusion coefficients [m^2/s].
 
virtual void getMultiDiffCoeffs (const size_t ld, double *const d)
 Return the Multicomponent diffusion coefficients. Units: [m^2/s].
 
virtual void getMixDiffCoeffs (double *const d)
 Returns a vector of mixture averaged diffusion coefficients.
 
virtual void getMixDiffCoeffsMole (double *const d)
 Returns a vector of mixture averaged diffusion coefficients.
 
virtual void getMixDiffCoeffsMass (double *const d)
 Returns a vector of mixture averaged diffusion coefficients.
 
virtual void getViscosityPolynomial (size_t i, double *coeffs) const
 Return the polynomial fits to the viscosity of species i.
 
virtual void getConductivityPolynomial (size_t i, double *coeffs) const
 Return the temperature fits of the heat conductivity of species i.
 
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 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 setViscosityPolynomial (size_t i, double *coeffs)
 Modify the polynomial fits to the viscosity of species i.
 
virtual void setConductivityPolynomial (size_t i, double *coeffs)
 Modify the temperature fits of the heat conductivity of species i.
 
virtual void setBinDiffusivityPolynomial (size_t i, size_t j, double *coeffs)
 Modify 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)
 
AnyMap parameters () const
 Return the parameters for a phase definition which are needed to reconstruct an identical object using the newTransport function.
 
virtual double viscosity ()
 The viscosity in Pa-s.
 
virtual void getSpeciesViscosities (double *const visc)
 Returns the pure species viscosities.
 
virtual double bulkViscosity ()
 The bulk viscosity in Pa-s.
 
virtual double thermalConductivity ()
 Returns the mixture thermal conductivity in W/m/K.
 
virtual double electricalConductivity ()
 The electrical conductivity (Siemens/m).
 
virtual void getMobilities (double *const mobil_e)
 Get the Electrical mobilities (m^2/V/s).
 
virtual void init (ThermoPhase *thermo, int mode=0, int log_level=0)
 Initialize a transport manager.
 
virtual bool CKMode () const
 Boolean indicating the form of the transport properties polynomial fits.
 

Protected Member Functions

void initialize (ThermoPhase *phase, Transport *gastr)
 Initialization routine called by TransportFactory.
 

Private Member Functions

void updateTransport_T ()
 Update temperature-dependent quantities within the object.
 
void updateTransport_C ()
 Update concentration-dependent quantities within the object.
 
void updateBinaryDiffCoeffs ()
 Private routine to update the dusty gas binary diffusion coefficients.
 
void updateMultiDiffCoeffs ()
 Update the Multicomponent diffusion coefficients that are used in the approximation.
 
void updateKnudsenDiffCoeffs ()
 Update the Knudsen diffusion coefficients.
 
void eval_H_matrix ()
 Calculate the H matrix.
 

Private Attributes

vector< double > m_mw
 Local copy of the species molecular weights.
 
DenseMatrix m_d
 binary diffusion coefficients
 
vector< double > m_x
 mole fractions
 
vector< double > m_dk
 Knudsen diffusion coefficients.
 
double m_temp = -1.0
 temperature
 
DenseMatrix m_multidiff
 Multicomponent diffusion coefficients.
 
vector< double > m_spwork
 work space of size m_nsp;
 
vector< double > m_spwork2
 work space of size m_nsp;
 
double m_gradP = 0.0
 Pressure Gradient.
 
bool m_knudsen_ok = false
 Update-to-date variable for Knudsen diffusion coefficients.
 
bool m_bulk_ok = false
 Update-to-date variable for Binary diffusion coefficients.
 
double m_porosity = 0.0
 Porosity.
 
double m_tortuosity = 1.0
 Tortuosity.
 
double m_pore_radius = 0.0
 Pore radius (meter)
 
double m_diam = 0.0
 Particle diameter.
 
double m_perm = -1.0
 Permeability of the media.
 
unique_ptr< Transportm_gastran
 Pointer to the transport object for the gas phase.
 

Friends

class TransportFactory
 Make the TransportFactory object a friend, because this object has restricted its instantiation to classes which are friends.
 

Additional Inherited Members

- Protected Attributes inherited from Transport
ThermoPhasem_thermo
 pointer to the object representing the phase
 
size_t m_nsp = 0
 Number of species.
 

Constructor & Destructor Documentation

◆ DustyGasTransport()

DustyGasTransport ( )
default

default constructor

Member Function Documentation

◆ transportModel()

string transportModel ( ) const
inlineoverridevirtual

Identifies the model represented by this Transport object.

Each derived class should override this method to return a meaningful identifier.

Since
New in Cantera 3.0. The name returned by this method corresponds to the canonical name used in the YAML input format.

Reimplemented from Transport.

Definition at line 60 of file DustyGasTransport.h.

◆ getMultiDiffCoeffs()

void getMultiDiffCoeffs ( const size_t  ld,
double *const  d 
)
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.

Parameters
[in]ldThe dimension of the inner loop of d (usually equal to m_nsp)
[out]dflat 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.

◆ getMolarFluxes()

void getMolarFluxes ( const double *const  state1,
const double *const  state2,
const double  delta,
double *const  fluxes 
)
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) \]

Parameters
state1Array of temperature, density, and mass fractions for state 1.
state2Array of temperature, density, and mass fractions for state 2.
deltaDistance from state 1 to state 2 (m).
fluxesVector of species molar fluxes due to diffusional driving force

Reimplemented from Transport.

Definition at line 96 of file DustyGasTransport.cpp.

◆ setPorosity()

void setPorosity ( double  porosity)

Set the porosity (dimensionless)

Parameters
porositySet the value of the porosity

Definition at line 205 of file DustyGasTransport.cpp.

◆ setTortuosity()

void setTortuosity ( double  tort)

Set the tortuosity (dimensionless)

Tortuosity is considered to be constant within the object

Parameters
tortValue of the tortuosity

Definition at line 212 of file DustyGasTransport.cpp.

◆ setMeanPoreRadius()

void setMeanPoreRadius ( double  rbar)

Set the mean pore radius (m)

Parameters
rbarValue of the pore radius ( m)

Definition at line 219 of file DustyGasTransport.cpp.

◆ setMeanParticleDiameter()

void setMeanParticleDiameter ( double  dbar)

Set the mean particle diameter.

Parameters
dbarSet the mean particle diameter (m)

Definition at line 225 of file DustyGasTransport.cpp.

◆ setPermeability()

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} \]

Parameters
Bset the permeability of the media (units = m^2)

Definition at line 230 of file DustyGasTransport.cpp.

◆ gasTransport()

Transport & gasTransport ( )

Return a reference to the transport manager used to compute the gas binary diffusion coefficients and the viscosity.

Returns
a reference to the gas transport object

Definition at line 235 of file DustyGasTransport.cpp.

◆ initialize()

void initialize ( ThermoPhase phase,
Transport gastr 
)
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

Parameters
phasePointer to the underlying ThermoPhase model for the gas phase
gastrPointer to the underlying Transport model for transport in the gas phase.

Definition at line 17 of file DustyGasTransport.cpp.

◆ updateTransport_T()

void updateTransport_T ( )
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.

◆ updateTransport_C()

void updateTransport_C ( )
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.

◆ updateBinaryDiffCoeffs()

void updateBinaryDiffCoeffs ( )
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.

◆ updateMultiDiffCoeffs()

void updateMultiDiffCoeffs ( )
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.

◆ updateKnudsenDiffCoeffs()

void updateKnudsenDiffCoeffs ( )
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.

◆ eval_H_matrix()

void eval_H_matrix ( )
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.

Friends And Related Symbol Documentation

◆ TransportFactory

friend class TransportFactory
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.

Member Data Documentation

◆ m_mw

vector<double> m_mw
private

Local copy of the species molecular weights.

units kg /kmol length = m_nsp;

Definition at line 217 of file DustyGasTransport.h.

◆ m_d

DenseMatrix m_d
private

binary diffusion coefficients

Definition at line 220 of file DustyGasTransport.h.

◆ m_x

vector<double> m_x
private

mole fractions

Definition at line 223 of file DustyGasTransport.h.

◆ m_dk

vector<double> m_dk
private

Knudsen diffusion coefficients.

See also
updateKnudsenDiffCoeffs()

Definition at line 226 of file DustyGasTransport.h.

◆ m_temp

double m_temp = -1.0
private

temperature

Definition at line 229 of file DustyGasTransport.h.

◆ m_multidiff

DenseMatrix m_multidiff
private

Multicomponent diffusion coefficients.

See also
eval_H_matrix()

Definition at line 232 of file DustyGasTransport.h.

◆ m_spwork

vector<double> m_spwork
private

work space of size m_nsp;

Definition at line 235 of file DustyGasTransport.h.

◆ m_spwork2

vector<double> m_spwork2
private

work space of size m_nsp;

Definition at line 238 of file DustyGasTransport.h.

◆ m_gradP

double m_gradP = 0.0
private

Pressure Gradient.

Definition at line 241 of file DustyGasTransport.h.

◆ m_knudsen_ok

bool m_knudsen_ok = false
private

Update-to-date variable for Knudsen diffusion coefficients.

Definition at line 244 of file DustyGasTransport.h.

◆ m_bulk_ok

bool m_bulk_ok = false
private

Update-to-date variable for Binary diffusion coefficients.

Definition at line 247 of file DustyGasTransport.h.

◆ m_porosity

double m_porosity = 0.0
private

Porosity.

Definition at line 250 of file DustyGasTransport.h.

◆ m_tortuosity

double m_tortuosity = 1.0
private

Tortuosity.

Definition at line 253 of file DustyGasTransport.h.

◆ m_pore_radius

double m_pore_radius = 0.0
private

Pore radius (meter)

Definition at line 256 of file DustyGasTransport.h.

◆ m_diam

double m_diam = 0.0
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.

◆ m_perm

double m_perm = -1.0
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.

◆ m_gastran

unique_ptr<Transport> m_gastran
private

Pointer to the transport object for the gas phase.

Definition at line 280 of file DustyGasTransport.h.


The documentation for this class was generated from the following files: