OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
FuelCellShop::Mixture::ChapmanEnskog Class Reference

This class uses the Chapman Enskog theory for mono-atomic gases to estimate the binary diffusion diffusivity between two gases. More...

#include <BinaryDiffusion.h>

Inheritance diagram for FuelCellShop::Mixture::ChapmanEnskog:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::Mixture::ChapmanEnskog:
Collaboration graph
[legend]

Public Member Functions

 ChapmanEnskog ()
 
 ChapmanEnskog (FuelCellShop::Material::PureGas &species1, FuelCellShop::Material::PureGas &species2)
 
virtual ~ChapmanEnskog ()
 
virtual char * get_name ()
 
virtual char * get_description ()
 
virtual enDiffusionModelID get_ID ()
 
virtual double getSikmaAB (const double &sikma_A, const double &sikma_B)
 
virtual double getTstarAB (const double &Tstar_A, const double &Tstar_B)
 
virtual double getOmegaAB (const double &Tstar)
 
virtual void compute_diffusion (double &D)
 Comupute the diffusion coefficient [in m^2/s] at a given temperature [K] and pressure [atm].
 
virtual void compute_diffusion (std::vector< double > &D_vec)
 Compute a vector of diffusion coefficients [in m^2/s] for a non-isothermal, isobaric case.
 
virtual double compute_diffusion (const double &T, const double &p)
 Comupute the diffusion coefficient [in m^2/s] at a given temperature [K] and pressure [atm].
 
virtual void compute_diffusion (double &D, std::vector< double > &dD)
 Comupute diffusion coefficient [in m^2/s] and the sensitivity of the diffusion coefficient with respect to temperature and pressure.
 
virtual void compute_diffusion (const double &T, const double &p, double &D, std::vector< double > &dD)
 Comupute diffusion coefficient [in m^2/s] and the sensitivity of the diffusion coefficient with respect to temperature and pressure at a given temperature [K] and pressure [atm].
 
virtual void compute_dD (std::vector< double > &dD)
 
virtual double compute_dD_dP (const double &T, const double &p)
 
virtual double compute_dD_dT (const double &T, const double &p)
 
virtual void compute_dD_dT (std::vector< double > &dD_dT_vec)
 Method to compute derivative of diffusion coefficient with respect to temperature [in m^2/(s-K)] for a non-isothermal, isobaric case, at all quadrature points of the cell.
 
virtual void scan ()
 
virtual void report ()
 
virtual void report2file (char *filename)
 
- Public Member Functions inherited from FuelCellShop::Mixture::VaporDiffusion
 VaporDiffusion ()
 
 VaporDiffusion (FuelCellShop::Material::PureGas &species1, FuelCellShop::Material::PureGas &species2)
 
virtual ~VaporDiffusion ()
 
- Public Member Functions inherited from FuelCellShop::Mixture::BinaryDiffusion
 BinaryDiffusion ()
 
 BinaryDiffusion (FuelCellShop::Material::PureGas &species1, FuelCellShop::Material::PureGas &species2)
 
virtual ~BinaryDiffusion ()
 
void set_T_and_p (const double &T, const double &p)
 Method used to set temperature (T) and pressure (p) for diffusion coefficient computation.
 
void set_p (const double &p_atm)
 Method to set pressure (p) for isobaric diffusion coefficient case.
 
void set_temperature (const FuelCellShop::SolutionVariable &T_vec)
 Method to set a vector of temperatures (T) for nonisothermal diffusion coefficient computation.
 
void set_species (FuelCellShop::Material::PureGas &species1, FuelCellShop::Material::PureGas &species2)
 

Private Attributes

double M_A
 
double M_B
 
double Tnb_A
 
double Tnb_B
 
double Vl_A
 
double Vl_B
 
double sikma_A
 
double sikma_B
 
double Tstar_A
 
double Tstar_B
 
double sikma_AB
 
double Tstar_AB
 
double omega_DAB
 

Additional Inherited Members

- Protected Attributes inherited from FuelCellShop::Mixture::BinaryDiffusion
FuelCellShop::Material::PureGasspecies1
 
FuelCellShop::Material::PureGasspecies2
 
double T
 Temperature [in K] used to compute the diffusion coefficient, unless specified as an input to the member function.
 
double p
 Pressure [in atm] used to compute the diffusion coefficient, unless specified as an input to the member function.
 
FuelCellShop::SolutionVariable T_vector
 Temperature [in K] used to compute the diffusion coefficient.
 

Detailed Description

This class uses the Chapman Enskog theory for mono-atomic gases to estimate the binary diffusion diffusivity between two gases.

The gases are input using the member function set_species(). Using member functions such as compute_diffusion() and compute_dD() the diffusion coefficient in units of m/s and the analytical derivatives of the diffusion coefficient with respect of temperature and pressure respectively can be obtained. Note that this class requires two objects of type FuelCellShop::Material::PureGas. In order to compute the binary diffusion coefficient for a gas that has not been implemented, a new child of FuelCellShop::Material::PureGas needs to be implemented with the properties specified in the base class obtained from experimental data or from the literature.

This class is publicly derived class of VaporDiffusion

Usage details

In order to use this class, you will need to specify the two gases for which you would like to compute the diffusion diffusion coefficient. For example, in the sample code below, we will compute the binary diffusion coefficient for oxygen in nitrogen. So, first we create an object oxygen and nitrogen gas from FuelCellShop::Material::PureGas. Then, we set these gases as the gases for which we will compute the coefficients. The diffusion coefficient is a function of temperature and pressure, therefore, we next set these values. The class takes these values in units of temperature [K] and pressure atm. Using compute_diffusion() the diffusion coefficient in units fo m2/s is returned. Note that the analytical derivatives of the diffusion coefficient with respect of temperature and pressure can also be obtained.

double Diff_coef(0);
CE.set_species(O2,N2);
double temperature(353); //Temperature in K
double pressure(1); //Pressure in atm
CE.set_T_and_p(temperature,pressure);
CE.compute_diffusion(Diff_coef);
std::cout<<"Diffusion coeff: "<<Diff_coef<<" in m2/s"<<std::endl;
Author
A. MalekpourKoupaei and M. Secanell
Date
2009-2013

Constructor & Destructor Documentation

FuelCellShop::Mixture::ChapmanEnskog::ChapmanEnskog ( )
FuelCellShop::Mixture::ChapmanEnskog::ChapmanEnskog ( FuelCellShop::Material::PureGas species1,
FuelCellShop::Material::PureGas species2 
)
virtual FuelCellShop::Mixture::ChapmanEnskog::~ChapmanEnskog ( )
virtual

Member Function Documentation

virtual void FuelCellShop::Mixture::ChapmanEnskog::compute_dD ( std::vector< double > &  dD)
virtual
virtual double FuelCellShop::Mixture::ChapmanEnskog::compute_dD_dP ( const double &  T,
const double &  p 
)
virtual
virtual double FuelCellShop::Mixture::ChapmanEnskog::compute_dD_dT ( const double &  T,
const double &  p 
)
virtual
virtual void FuelCellShop::Mixture::ChapmanEnskog::compute_dD_dT ( std::vector< double > &  dD_dT_vec)
virtual

Method to compute derivative of diffusion coefficient with respect to temperature [in m^2/(s-K)] for a non-isothermal, isobaric case, at all quadrature points of the cell.

To specify temperatures, use the member function #set_T_vector and to specify pressure, use the member function set_p. The given temperatures and pressure should be in Kelvin and atmospheres.

Implements FuelCellShop::Mixture::BinaryDiffusion.

virtual void FuelCellShop::Mixture::ChapmanEnskog::compute_diffusion ( double &  D)
virtual

Comupute the diffusion coefficient [in m^2/s] at a given temperature [K] and pressure [atm].

To specify tempertaure and pressure use the member function set_T_and_p(). The given temperature and pressure should be in Kelvin and atmospheres.

Implements FuelCellShop::Mixture::BinaryDiffusion.

virtual void FuelCellShop::Mixture::ChapmanEnskog::compute_diffusion ( std::vector< double > &  D_vec)
virtual

Compute a vector of diffusion coefficients [in m^2/s] for a non-isothermal, isobaric case.

To specify temperatures, use the member function set_T_vector and to specify pressure, use the member function set_p. The given temperatures and pressure should be in Kelvin and atmospheres.

Implements FuelCellShop::Mixture::BinaryDiffusion.

virtual double FuelCellShop::Mixture::ChapmanEnskog::compute_diffusion ( const double &  T,
const double &  p 
)
virtual

Comupute the diffusion coefficient [in m^2/s] at a given temperature [K] and pressure [atm].

Implements FuelCellShop::Mixture::BinaryDiffusion.

virtual void FuelCellShop::Mixture::ChapmanEnskog::compute_diffusion ( double &  D,
std::vector< double > &  dD 
)
virtual

Comupute diffusion coefficient [in m^2/s] and the sensitivity of the diffusion coefficient with respect to temperature and pressure.

To specify tempertaure and pressure use the member function set_T_and_p(). The given temperature and pressure should be in Kelvin and atmospheres

Implements FuelCellShop::Mixture::BinaryDiffusion.

virtual void FuelCellShop::Mixture::ChapmanEnskog::compute_diffusion ( const double &  T,
const double &  p,
double &  D,
std::vector< double > &  dD 
)
virtual

Comupute diffusion coefficient [in m^2/s] and the sensitivity of the diffusion coefficient with respect to temperature and pressure at a given temperature [K] and pressure [atm].

Implements FuelCellShop::Mixture::BinaryDiffusion.

virtual char* FuelCellShop::Mixture::ChapmanEnskog::get_description ( )
virtual
virtual enDiffusionModelID FuelCellShop::Mixture::ChapmanEnskog::get_ID ( )
virtual
virtual char* FuelCellShop::Mixture::ChapmanEnskog::get_name ( )
virtual
virtual double FuelCellShop::Mixture::ChapmanEnskog::getOmegaAB ( const double &  Tstar)
virtual
virtual double FuelCellShop::Mixture::ChapmanEnskog::getSikmaAB ( const double &  sikma_A,
const double &  sikma_B 
)
virtual
virtual double FuelCellShop::Mixture::ChapmanEnskog::getTstarAB ( const double &  Tstar_A,
const double &  Tstar_B 
)
virtual
virtual void FuelCellShop::Mixture::ChapmanEnskog::report ( )
virtual
virtual void FuelCellShop::Mixture::ChapmanEnskog::report2file ( char *  filename)
virtual
virtual void FuelCellShop::Mixture::ChapmanEnskog::scan ( )
virtual

Member Data Documentation

double FuelCellShop::Mixture::ChapmanEnskog::M_A
private
double FuelCellShop::Mixture::ChapmanEnskog::M_B
private
double FuelCellShop::Mixture::ChapmanEnskog::omega_DAB
private
double FuelCellShop::Mixture::ChapmanEnskog::sikma_A
private
double FuelCellShop::Mixture::ChapmanEnskog::sikma_AB
private
double FuelCellShop::Mixture::ChapmanEnskog::sikma_B
private
double FuelCellShop::Mixture::ChapmanEnskog::Tnb_A
private
double FuelCellShop::Mixture::ChapmanEnskog::Tnb_B
private
double FuelCellShop::Mixture::ChapmanEnskog::Tstar_A
private
double FuelCellShop::Mixture::ChapmanEnskog::Tstar_AB
private
double FuelCellShop::Mixture::ChapmanEnskog::Tstar_B
private
double FuelCellShop::Mixture::ChapmanEnskog::Vl_A
private
double FuelCellShop::Mixture::ChapmanEnskog::Vl_B
private

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