SootLib
Loading...
Searching...
No Matches
soot::state Class Reference

Detailed Description

Soot and gas state variables. Gas state includes T, P, yi (species mass fractions) density, molecular weight, viscosity. Soot state includes the soot variables (e.g., moments or number of particles in a section). Also includes scaling factors for soot.

Definition at line 17 of file state.h.

#include <state.h>

Public Member Functions

void setState (double T_, double P_, double rhoGas_, double muGas_, std::vector< double > yGas_, std::vector< double > yPAH_, std::vector< double > sootVar_, int nsoot_, double cMin_=100)
 
double getGasSpC (gasSp sp) const
 
double getGasSpP (gasSp sp) const
 
double getGasMeanFreePath () const
 
double get_pahSpC (pahSp sp) const
 
double get_pahSpP (pahSp sp) const
 
void setSootScales (std::vector< double > &sootScales_)
 
 state (size_t nsoot_=0)
 
 ~state ()=default
 

Public Attributes

double T = 0
 gas temperature (K) More...
 
double P = 0
 gas pressure (Pa) More...
 
double rhoGas = 0
 gas density (kg/m3) More...
 
double MWGas = 0
 gas mean molecular weight (kg/kmol) More...
 
double muGas = 0
 gas viscosity (kg/m*s) More...
 
std::vector< double > yGas
 gas species mass fractions More...
 
std::vector< double > yPah
 gas PAH species mass fractions More...
 
int nsoot
 # of soot variables More...
 
std::vector< double > sootVar
 soot variables (moments or # in sections> More...
 
std::vector< double > absc
 moment abscissas More...
 
std::vector< double > wts
 moment weights More...
 
std::vector< double > sootScales
 soot scales for external numerical solvers More...
 
double cMin = 100
 soot min num carbon atoms (dynamic for PAH nucleation) More...
 

Constructor & Destructor Documentation

◆ state()

soot::state::state ( size_t  nsoot_ = 0)
inline

Definition at line 65 of file state.h.

◆ ~state()

soot::state::~state ( )
default

Member Function Documentation

◆ setState()

void state::setState ( double  T_,
double  P_,
double  rhoGas_,
double  muGas_,
std::vector< double >  yGas_,
std::vector< double >  yPAH_,
std::vector< double >  sootVar_,
int  nsoot_,
double  cMin_ = 100 
)

Sets the thermodynamic state based on user input

Only point of contact between users and the state class. User provides relevant data to be assigned to sootlib's internal state variables.

Parameters
T_input: temperature (K)
P_input: pressure (Pa)
rhoGas_input: density of gas mixture (kg/m3)
muGas_input: dynamic viscosity (kg/m*s)
MWGas_input: gas mixture molecular weight (kg/kmol)
yGas_input: gas species mass fractions [H, H2, O, O2, OH, H2O, CO, C2H2]
yPAH_input: PAH species mass fractions [C10H8, C12H8, C12H10, C14H10, C16H10, C18H10]
sootVar_input: soot variable (moments or section values) values
nsoot_input: number of soot variables
cMin_input: minimum number of carbon atoms in a soot particle

IMPORTANT: gas and PAH species mass fractions MUST be provided in the order specified above within the yGas and yPAH vectors. Values must be non-negative. If a species is not represented or not present, DO NOT leave it out; instead, enter a mass fraction value of zero. If the user mechanism contains more than one species with the same molecular formula (C16H10 is a common culprit), enter the sum of the mass fractions for the applicable species. Any additional species information is not used by sootlib and will be ignored.

Definition at line 36 of file state.cc.

◆ getGasSpC()

double soot::state::getGasSpC ( gasSp  sp) const
inline

gas species concentration (kmol/m3)

Definition at line 46 of file state.h.

◆ getGasSpP()

double soot::state::getGasSpP ( gasSp  sp) const
inline

gas species partial pressure (Pa)

Definition at line 49 of file state.h.

◆ getGasMeanFreePath()

double soot::state::getGasMeanFreePath ( ) const
inline

gas mean free path

Definition at line 52 of file state.h.

◆ get_pahSpC()

double soot::state::get_pahSpC ( pahSp  sp) const
inline

PAH species concentration (kmol/m3)

Definition at line 55 of file state.h.

◆ get_pahSpP()

double soot::state::get_pahSpP ( pahSp  sp) const
inline

PAH species partial pressure (Pa)

Definition at line 58 of file state.h.

◆ setSootScales()

void soot::state::setSootScales ( std::vector< double > &  sootScales_)
inline

sets variable sootScales

Definition at line 61 of file state.h.

Member Data Documentation

◆ T

double soot::state::T = 0

gas temperature (K)

Definition at line 23 of file state.h.

◆ P

double soot::state::P = 0

gas pressure (Pa)

Definition at line 24 of file state.h.

◆ rhoGas

double soot::state::rhoGas = 0

gas density (kg/m3)

Definition at line 25 of file state.h.

◆ MWGas

double soot::state::MWGas = 0

gas mean molecular weight (kg/kmol)

Definition at line 26 of file state.h.

◆ muGas

double soot::state::muGas = 0

gas viscosity (kg/m*s)

Definition at line 27 of file state.h.

◆ yGas

std::vector<double> soot::state::yGas

gas species mass fractions

Definition at line 28 of file state.h.

◆ yPah

std::vector<double> soot::state::yPah

gas PAH species mass fractions

Definition at line 29 of file state.h.

◆ nsoot

int soot::state::nsoot

# of soot variables

Definition at line 31 of file state.h.

◆ sootVar

std::vector<double> soot::state::sootVar

soot variables (moments or # in sections>

Definition at line 32 of file state.h.

◆ absc

std::vector<double> soot::state::absc

moment abscissas

Definition at line 33 of file state.h.

◆ wts

std::vector<double> soot::state::wts

moment weights

Definition at line 34 of file state.h.

◆ sootScales

std::vector<double> soot::state::sootScales

soot scales for external numerical solvers

Definition at line 35 of file state.h.

◆ cMin

double soot::state::cMin = 100

soot min num carbon atoms (dynamic for PAH nucleation)

Definition at line 36 of file state.h.


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