ODT
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | List of all members
streams Class Reference

#include <streams.h>

Public Member Functions

void getProdOfCompleteComb (const double mixf, vector< double > &ypcc, double &hpcc, double &Tpcc)
 
void getMixingState (const double mixf, vector< double > &ymix, double &hmix, double &Tmix)
 
double getMixtureFraction (const double *y, const bool doBeta01=false)
 
 streams ()
 
void init (domain *p_domn, const vector< double > &gammas)
 
 ~streams ()
 

Public Attributes

domaindomn
 pointer to domain object
 
double T0
 stream mixf=0 temperature
 
double T1
 stream mixf=1 temperature
 
double h0
 stream mixf=0 enthalpy
 
double h1
 stream mixf=1 enthalpy
 
vector< double > y0
 stream mixf=0 composition vector
 
vector< double > y1
 stream mixf=1 composition vector
 
double M0
 stream mixf=0 mean molecular weight
 
double M1
 stream mixf=1 mean molecular weight
 
double rho0
 stream mixf=0 density
 
double rho1
 stream mixf=1 density
 
vector< double > D0
 stream mixf=0 diffusivities
 
vector< double > D1
 stream mixf=1 diffusivities
 
vector< double > hsp0
 stream mixf=0 species enthalpies
 
vector< double > hsp1
 stream mixf=1 species enthalpies
 
double mixfStoic
 stoichiometric mixture fraction
 
int nspc
 number of species in gas mechanism
 
double beta0
 $\text{mixf} = \frac{\beta-\beta_0}{\beta_1-\beta_0}$
 
double beta1
 mixf = (beta-beta0) / (beta1-beta0)
 
vector< double > gCHON
 gammas, as in beta = sum_i (y_i*gamma_i)
 
int comp2
 for premixed combustion to distinguish between different input possibilities for the mixture
 

Private Member Functions

void setStoicMixf ()
 
vector< double > setElementMassFracs (const double *y)
 
vector< double > setElementMoleFracs (const double *y)
 
vector< double > getElementMoles (const double *x, double &nOnotFromO2, double &nHnotFromH2O, double &nCnotFromCO2)
 

Detailed Description

Class implementing streams for use in mixing and or reaction problems. This is writting in terms of mixture fraction with streams defined in an input file. The class can implement products of complete combustion, or equilibrium (through the Cantera IdealGasMix object, if desired). This class holds a pointer to a Cantera IdealGasMix object (defined up front in main) that computes thermodynamic, kinetic, and transport data.

Author
David O. Lignell

Definition at line 26 of file streams.h.

Constructor & Destructor Documentation

◆ streams()

streams::streams ( )
inline

Definition at line 91 of file streams.h.

◆ ~streams()

streams::~streams ( )
inline

Definition at line 94 of file streams.h.

Member Function Documentation

◆ getElementMoles()

vector< double > streams::getElementMoles ( const double * x,
double & nOnotFromO2,
double & nHnotFromH2O,
double & nCnotFromCO2 )
private

Get amount of moles for each element.

Parameters
xinput: pointer to vector of species mole fractions.
nOnotFromO2input: number of moles of oxygen not from O2 (oxygen in the base fuel).
nHnotFromH2Oinput: number of moles of hydrogen not from H2O.
nCnotFromCO2input: number of moles of carbon not from CO2.
Returns
vector of element moles.

Definition at line 326 of file streams.cc.

◆ getMixingState()

void streams::getMixingState ( const double mixf,
vector< double > & ymix,
double & hmix,
double & Tmix )

Computes the temperature, enthalpy, and composition of mixing among streams.

Parameters
mixfinput: mixture fraction, defines elemental composition.
ymixoutput: mass fractions of products of complete combustion.
hmixoutput: enthalpy of products of complete combustion.
Tmixoutput: temperature of products of complete combustion.

Definition at line 106 of file streams.cc.

◆ getMixtureFraction()

double streams::getMixtureFraction ( const double * y,
const bool doBeta01 = false )

Compute the mixture fraction from the mass fractions using Bilger's mixf. Set doBeta01=true on first call to initialize members beta0, beta1. Later calls of this function only use the first parameter.

Parameters
yinput: vector of species mass fractions.
doBeta01input: flag=true on first call to set members beta0, beta1.
Returns
mixture fraction

Definition at line 363 of file streams.cc.

◆ getProdOfCompleteComb()

void streams::getProdOfCompleteComb ( const double mixf,
vector< double > & ypcc,
double & hpcc,
double & Tpcc )

Computes the temperature, enthalpy, and composition of complete combustion at the given mixf. For nonpremixed flames (don't do anything funny, like have oxygen in the fuel stream)

Parameters
mixfinput: mixture fraction, defines elemental composition.
ypccoutput: mass fractions of products of complete combustion.
hpccoutput: enthalpy of products of complete combustion.
Tpccoutput: temperature of products of complete combustion.

Definition at line 128 of file streams.cc.

◆ init()

void streams::init ( domain * p_domn,
const vector< double > & gammas )

Initialize

Parameters
p_domninput: pointer to domain object.

Definition at line 18 of file streams.cc.

◆ setElementMassFracs()

vector< double > streams::setElementMassFracs ( const double * y)
private

Sets the elements to have the correct Mass Fractions based on the specified array.

Parameters
yinput: mass fraction array to use to get corresponding element fractions.
Returns
vector of element mass fractions.

Definition at line 264 of file streams.cc.

◆ setElementMoleFracs()

vector< double > streams::setElementMoleFracs ( const double * y)
private

Sets the elements to have the correct Mole Fractions based on the specified array.

Parameters
yinput: mass fraction array to use to get corresponding element fractions.
Returns
vector of element mole fractions.

Definition at line 293 of file streams.cc.

◆ setStoicMixf()

void streams::setStoicMixf ( )
private

Set the stoichiometric mixture fraction using Bilger's definition

Definition at line 229 of file streams.cc.

Member Data Documentation

◆ beta0

double streams::beta0

$\text{mixf} = \frac{\beta-\beta_0}{\beta_1-\beta_0}$

mixf = (beta-beta0) / (beta1-beta0) $\text{mixf} = \frac{\beta-\beta_0}{\beta_1-\beta_0}$

Definition at line 54 of file streams.h.

◆ beta1

double streams::beta1

mixf = (beta-beta0) / (beta1-beta0)

Definition at line 56 of file streams.h.

◆ comp2

int streams::comp2

for premixed combustion to distinguish between different input possibilities for the mixture

Definition at line 60 of file streams.h.

◆ D0

vector<double> streams::D0

stream mixf=0 diffusivities

Definition at line 44 of file streams.h.

◆ D1

vector<double> streams::D1

stream mixf=1 diffusivities

Definition at line 45 of file streams.h.

◆ domn

domain* streams::domn

pointer to domain object

Definition at line 32 of file streams.h.

◆ gCHON

vector<double> streams::gCHON

gammas, as in beta = sum_i (y_i*gamma_i)

Definition at line 58 of file streams.h.

◆ h0

double streams::h0

stream mixf=0 enthalpy

Definition at line 36 of file streams.h.

◆ h1

double streams::h1

stream mixf=1 enthalpy

Definition at line 37 of file streams.h.

◆ hsp0

vector<double> streams::hsp0

stream mixf=0 species enthalpies

Definition at line 46 of file streams.h.

◆ hsp1

vector<double> streams::hsp1

stream mixf=1 species enthalpies

Definition at line 47 of file streams.h.

◆ M0

double streams::M0

stream mixf=0 mean molecular weight

Definition at line 40 of file streams.h.

◆ M1

double streams::M1

stream mixf=1 mean molecular weight

Definition at line 41 of file streams.h.

◆ mixfStoic

double streams::mixfStoic

stoichiometric mixture fraction

Definition at line 49 of file streams.h.

◆ nspc

int streams::nspc

number of species in gas mechanism

Definition at line 51 of file streams.h.

◆ rho0

double streams::rho0

stream mixf=0 density

Definition at line 42 of file streams.h.

◆ rho1

double streams::rho1

stream mixf=1 density

Definition at line 43 of file streams.h.

◆ T0

double streams::T0

stream mixf=0 temperature

Definition at line 34 of file streams.h.

◆ T1

double streams::T1

stream mixf=1 temperature

Definition at line 35 of file streams.h.

◆ y0

vector<double> streams::y0

stream mixf=0 composition vector

Definition at line 38 of file streams.h.

◆ y1

vector<double> streams::y1

stream mixf=1 composition vector

Definition at line 39 of file streams.h.


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