Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
MixtureModel Class Reference

Host side of the mixture gas model: the mechanism, a host copy of the thermodynamics for setup, and the device model. More...

#include <mixture.h>

Public Member Functions

const chemistry::Mechanism & mechanism () const
 
const Mixture & device () const
 
bool viscous () const
 
uint32_t n_species () const
 
std::vector< std::string > species_names () const
 
std::vector< double > mass_fractions (const toml::value &table, const std::string &where) const
 Mass fractions from a table of the input holding X (mole fractions) or Y, by species name; normalized, unlisted species zero.
 
std::vector< double > mass_fractions_from_mole (const std::vector< double > &X) const
 Mass fractions from mole fractions.
 
std::vector< double > mole_fractions (const std::vector< double > &Y) const
 Mole fractions from mass fractions.
 
double gas_constant (const std::vector< double > &Y) const
 Gas constant of a composition [J/(kg K)].
 
double energy (double T, const std::vector< double > &Y) const
 Internal energy per unit mass at T [J/kg].
 
void surrogates (double T, const std::vector< double > &Y, double &gamma, double &e0) const
 Frozen gamma and energy offset e0 = e - cv T at T.
 
void conservatives (double p, double T, const rtype *u, const std::vector< double > &Y, rtype *U, rtype *rhoY) const
 Conservatives and partial densities at pressure p, temperature T, velocity u and mass fractions Y.
 
logging::Items summary () const
 Display lines for the run log.
 

Static Public Member Functions

static MixtureModel from_input (const toml::value &input)
 From the [physics] table: mechanism and optional phase; for type = "navier_stokes" the transport model ("mixture_averaged", "unity_lewis" or "constant_lewis" with lewis = { species = Le }), and soret = true for thermal diffusion (mixture_averaged).
 
static bool composition_varies (const toml::value &table)
 Whether the X or Y of a table varies in space: some value is an expression (a string) or a balance species is named.
 

Detailed Description

Host side of the mixture gas model: the mechanism, a host copy of the thermodynamics for setup, and the device model.

Member Function Documentation

◆ composition_varies()

bool MixtureModel::composition_varies ( const toml::value &  table)
static

Whether the X or Y of a table varies in space: some value is an expression (a string) or a balance species is named.

◆ conservatives()

void MixtureModel::conservatives ( double  p,
double  T,
const rtype *  u,
const std::vector< double > &  Y,
rtype *  U,
rtype *  rhoY 
) const

Conservatives and partial densities at pressure p, temperature T, velocity u and mass fractions Y.

◆ device()

const Mixture & MixtureModel::device ( ) const
inline

◆ energy()

double MixtureModel::energy ( double  T,
const std::vector< double > &  Y 
) const

Internal energy per unit mass at T [J/kg].

◆ from_input()

MixtureModel MixtureModel::from_input ( const toml::value &  input)
static

From the [physics] table: mechanism and optional phase; for type = "navier_stokes" the transport model ("mixture_averaged", "unity_lewis" or "constant_lewis" with lewis = { species = Le }), and soret = true for thermal diffusion (mixture_averaged).

◆ gas_constant()

double MixtureModel::gas_constant ( const std::vector< double > &  Y) const

Gas constant of a composition [J/(kg K)].

◆ mass_fractions()

std::vector< double > MixtureModel::mass_fractions ( const toml::value &  table,
const std::string &  where 
) const

Mass fractions from a table of the input holding X (mole fractions) or Y, by species name; normalized, unlisted species zero.

Parameters
tableTable holding X or Y.
whereName of the table for error messages.

◆ mass_fractions_from_mole()

std::vector< double > MixtureModel::mass_fractions_from_mole ( const std::vector< double > &  X) const

Mass fractions from mole fractions.

◆ mechanism()

const chemistry::Mechanism & MixtureModel::mechanism ( ) const
inline

◆ mole_fractions()

std::vector< double > MixtureModel::mole_fractions ( const std::vector< double > &  Y) const

Mole fractions from mass fractions.

◆ n_species()

uint32_t MixtureModel::n_species ( ) const
inline

◆ species_names()

std::vector< std::string > MixtureModel::species_names ( ) const
inline

◆ summary()

logging::Items MixtureModel::summary ( ) const

Display lines for the run log.

◆ surrogates()

void MixtureModel::surrogates ( double  T,
const std::vector< double > &  Y,
double &  gamma,
double &  e0 
) const

Frozen gamma and energy offset e0 = e - cv T at T.

◆ viscous()

bool MixtureModel::viscous ( ) const
inline

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