Thermodynamic Properties#
- n_species(g::Union{Solution, ThermoPhase})
Number of chemical species in the phase.
n_species(mp::MultiPhase)
Total number of species across all phases.
- n_elements(g::Union{Solution, ThermoPhase})
Number of elements in the phase.
n_elements(mp::MultiPhase)
Number of elements in the mixture.
- species_name(g::Union{Solution, ThermoPhase}, k::Integer)
Name of species
k(1-based).
- species_names(g::Union{Solution, ThermoPhase})
Vector of all species names.
- species_index(gas, name) -> Int
1-based index of species
name, or0if it is not present.
- element_name(g::Union{Solution, ThermoPhase}, m::Integer)
Name of element
m(1-based).
- element_names(g::Union{Solution, ThermoPhase})
Vector of all element names.
- temperature(g::Union{Solution, ThermoPhase})
Temperature [K].
temperature(mp::MultiPhase)
Temperature [K].
temperature(sa::SolutionArray)
Temperatures [K] of all stored states.
- pressure(g::Union{Solution, ThermoPhase})
Pressure [Pa].
pressure(mp::MultiPhase)
Pressure [Pa].
pressure(sa::SolutionArray)
Pressures [Pa] of all stored states.
- density(g::Union{Solution, ThermoPhase})
Mass density [kg/m^3].
density(sa::SolutionArray)
Mass densities [kg/m^3] of all stored states.
- molar_density(g::Union{Solution, ThermoPhase})
Molar density [kmol/m^3].
- mean_molecular_weight(g::Union{Solution, ThermoPhase})
Mean molecular weight [kg/kmol].
- gibbs_mole(g::Union{Solution, ThermoPhase})
Molar Gibbs free energy [J/kmol].
- internal_energy_mass(r::Reactor)
Specific internal energy [J/kg].
- internal_energy_mole(g::Union{Solution, ThermoPhase})
Molar internal energy [J/kmol].
- cv_mole(g::Union{Solution, ThermoPhase})
Molar heat capacity at constant volume [J/kmol/K].
- gibbs_mass(g::Union{Solution, ThermoPhase})
Specific Gibbs free energy [J/kg].
- cv_mass(g::Union{Solution, ThermoPhase})
Specific heat capacity at constant volume [J/kg/K].
- enthalpy_mass(r::Reactor)
Specific enthalpy [J/kg].
- enthalpy_mole(g::Union{Solution, ThermoPhase})
Molar enthalpy [J/kmol].
- cp_mole(g::Union{Solution, ThermoPhase})
Molar heat capacity at constant pressure [J/kmol/K].
- cp_mass(g::Union{Solution, ThermoPhase})
Specific heat capacity at constant pressure [J/kg/K].
- entropy_mole(g::Union{Solution, ThermoPhase})
Molar entropy [J/kmol/K].
- entropy_mass(g::Union{Solution, ThermoPhase})
Specific entropy [J/kg/K].
- isothermal_compressibility(g::Union{Solution, ThermoPhase})
Isothermal compressibility [1/Pa].
- thermal_expansion_coeff(g::Union{Solution, ThermoPhase})
Thermal (volumetric) expansion coefficient [1/K].
- max_temp(g::Union{Solution, ThermoPhase})
Maximum temperature [K] for which the phase’s thermo data are valid.
max_temp(mp::MultiPhase)
Maximum temperature [K] of the mixture’s valid range.
- min_temp(g::Union{Solution, ThermoPhase})
Minimum temperature [K] for which the phase’s thermo data are valid.
min_temp(mp::MultiPhase)
Minimum temperature [K] of the mixture’s valid range.
- reference_pressure(g::Union{Solution, ThermoPhase})
Reference pressure [Pa] used for standard-state thermo data.
- electric_potential(g::Union{Solution, ThermoPhase})
Electric potential [V] of the phase.
- set_electric_potential!(g::Union{Solution, ThermoPhase}, v)
Set the electric potential [V] of the phase.
- sound_speed(g::Union{Solution, ThermoPhase})
Speed of sound
sqrt(cp/cv · p/ρ)[m/s].
- volume_mass(g::Union{Solution, ThermoPhase})
Specific volume [m^3/kg].
- volume_mole(g::Union{Solution, ThermoPhase})
Molar volume [m^3/kmol].
- critical_temperature(g::Union{Solution, ThermoPhase})
Critical temperature [K].
- critical_pressure(g::Union{Solution, ThermoPhase})
Critical pressure [Pa].
- critical_density(g::Union{Solution, ThermoPhase})
Critical density [kg/m^3].
- vapor_fraction(g::Union{Solution, ThermoPhase})
Vapor fraction (quality) of a two-phase state.
- sat_temperature(g::Union{Solution, ThermoPhase}, p)
Saturation temperature [K] at pressure
p[Pa].
- sat_pressure(g::Union{Solution, ThermoPhase}, T)
Saturation pressure [Pa] at temperature
T[K].
- element_index(gas, name) -> Int
1-based index of element
name, or0if it is not present.element_index(mp::MultiPhase, name) -> Int
1-based global index of element
name, or0if not present.
- n_atoms(g::Union{Solution, ThermoPhase}, k::Integer, m::Integer)
Number of atoms of element
m(1-based) in speciesk(1-based).n_atoms(mp::MultiPhase, k, m) -> Float64
Number of atoms of element
min global speciesk(both 1-based).
- atomic_weights(g::Union{Solution, ThermoPhase})
Atomic weights of all elements [kg/kmol].
- atomic_weight(g::Union{Solution, ThermoPhase}, m::Integer)
Atomic weight of element
m(1-based) [kg/kmol].
- charges(g::Union{Solution, ThermoPhase})
Species electric charges (per elementary charge).
- elemental_mole_fraction(gas, m) -> Float64
Mole fraction of element
m(1-based) — moles of that element per mole of all elements in the mixture.
- elemental_mass_fraction(gas, m) -> Float64
Mass fraction of element
m(1-based) in the mixture.
- equivalence_ratio(gas) -> Float64
Fuel/air equivalence ratio from the elemental composition (C, H, O, S), using complete-combustion available-oxygen accounting:
φ = (2·Z_C + Z_H/2 + 2·Z_S) / Z_O.
- set_equivalence_ratio!(gas, phi, fuel, oxidizer)
Set the mixture composition to the given equivalence ratio
phifor the givenfuelandoxidizercompositions (name-value strings), holding T and p.
- standard_gibbs_RT(g::Union{Solution, ThermoPhase})
Nondimensional standard-state species Gibbs energies g°_k/RT.
- standard_entropies_R(g::Union{Solution, ThermoPhase})
Nondimensional standard-state species entropies s°_k/R.
- standard_cp_R(g::Union{Solution, ThermoPhase})
Nondimensional standard-state species heat capacities cp°_k/R.
- standard_enthalpies_RT(g::Union{Solution, ThermoPhase})
Nondimensional standard-state species enthalpies h°_k/RT.
- standard_int_energies_RT(g::Union{Solution, ThermoPhase})
Nondimensional standard-state species internal energies u°_k/RT.
- molecular_weights(g::Union{Solution, ThermoPhase})
Molecular weights of all species [kg/kmol].
- molecular_weights!(out, g::Union{Solution, ThermoPhase})
In-place
molecular_weights.
- mole_fractions(g::Union{Solution, ThermoPhase})
Mole fractions of all species.
mole_fractions(sa::SolutionArray)
Mole fractions of all stored states,
nSpecies x nStates.
- mole_fractions!(out, g::Union{Solution, ThermoPhase})
In-place
mole_fractions.
- mass_fractions(g::Union{Solution, ThermoPhase})
Mass fractions of all species.
mass_fractions(r::Reactor)
Mass fractions in the reactor.
mass_fractions(sa::SolutionArray)
Mass fractions of all stored states,
nSpecies x nStates.
- mass_fractions!(out, g::Union{Solution, ThermoPhase})
In-place
mass_fractions.
- concentrations(g::Union{Solution, ThermoPhase})
Species concentrations [kmol/m^3].
- partial_molar_int_energies(g::Union{Solution, ThermoPhase})
Partial molar internal energies of the species [J/kmol].
- partial_molar_volumes(g::Union{Solution, ThermoPhase})
Partial molar volumes of the species [m^3/kmol].
- electrochemical_potentials(g::Union{Solution, ThermoPhase})
Electrochemical potentials of the species [J/kmol].
- partial_molar_cp(g::Union{Solution, ThermoPhase})
Partial molar heat capacities at constant pressure [J/kmol/K].
- partial_molar_entropies(g::Union{Solution, ThermoPhase})
Partial molar entropies of the species [J/kmol/K].
- chemical_potentials(mp::MultiPhase)
Chemical potentials of the species [J/kmol].
chemical_potentials(mp::MultiPhase) -> Vector{Float64}
Chemical potentials [J/kmol] of all global species.
- partial_molar_enthalpies(g::Union{Solution, ThermoPhase})
Partial molar enthalpies of the species [J/kmol].
- chemical_potentials!(out, g::Union{Solution, ThermoPhase})
In-place
chemical_potentials.
- partial_molar_entropies!(out, g::Union{Solution, ThermoPhase})
In-place
partial_molar_entropies.
- partial_molar_enthalpies!(out, g::Union{Solution, ThermoPhase})
In-place
partial_molar_enthalpies.
- partial_molar_cp!(out, g::Union{Solution, ThermoPhase})
In-place
partial_molar_cp.
- set_mole_fractions!(gas, X)
Set mole fractions from a numeric vector or a composition string (e.g.
"CH4:1, O2:2"). The values are normalized by Cantera.
- set_mass_fractions!(gas, Y)
Set mass fractions from a numeric vector or a composition string.
- set_TP!(g::Union{Solution, ThermoPhase}, T, P)
Set temperature [K] and pressure [Pa].
- set_TPX!(gas, T, p, X)
Set temperature, pressure and mole fractions in one call.
Xmay be a numeric vector or a composition string.
- set_TPY!(gas, T, p, Y)
Set temperature, pressure and mass fractions in one call.
Ymay be a numeric vector or a composition string.
- set_TD!(g::Union{Solution, ThermoPhase}, T, rho)
Set temperature
T[K] and densityrho[kg/m^3].
- set_DP!(g::Union{Solution, ThermoPhase}, rho, p)
Set density
rho[kg/m^3] and pressurep[Pa].
- set_UV!(g::Union{Solution, ThermoPhase}, u, v)
Set specific internal energy
u[J/kg] and specific volumev[m^3/kg].
- set_SP!(g::Union{Solution, ThermoPhase}, s, p)
Set specific entropy
s[J/kg/K] and pressurep[Pa].
- set_SV!(g::Union{Solution, ThermoPhase}, s, v)
Set specific entropy
s[J/kg/K] and specific volumev[m^3/kg].
- set_HP!(g::Union{Solution, ThermoPhase}, h, p)
Set specific enthalpy
h[J/kg] and pressurep[Pa].
- equilibrate!(gas, XY; solver="auto", rtol=1e-9, max_steps=1000,
max_iter=100, estimate_equil=0)
Set the phase to a state of chemical equilibrium holding the property pair
XY(e.g."TP","HP","UV") fixed.equilibrate!(mp::MultiPhase, XY; solver="auto", rtol=1e-9, max_steps=1000, max_iter=200, estimate_equil=0)
Bring the mixture to chemical equilibrium holding the property pair
XY(e.g."TP") fixed.
- report(gas; show_thermo=true, threshold=1e-14) -> String
Return Cantera’s formatted state report for the phase.