optmat.gas.mixture_validation#
The multi-fluid mixture models against the measured data (OEP 4, section 8; TC-778).
Every curated measured virial coefficient of a pair (cross, excess or of a mixture) and
every mixture compressibility factor or density between 250 and 350 K, up to the
mixture’s optical-domain density, is compared with CoolProp’s multi-fluid model of the
pair. A point passes within twice the combined uncertainty; a pair qualifies when at
least 95 % of its counted points pass in each kind, with at least three counted points.
The rule was fixed before the comparison (TC-778); data/gas/mixture_pairs.toml
records its result per pair, and a test keeps the two in step.
Module Attributes
The temperatures of the comparison, K (OEP 4, section 7.4). |
|
The multi-fluid models' own stated relative density uncertainty, read as standard (Gernert's gas-phase statements, gernert_2013); Tkaczuk et al. state none. |
Functions
Return every point of the comparison, under TC-778's rule. |
|
|
Return a multi-fluid model's effective cross second virial coefficient. |
Return the fallback's points against the measured mixture densities. |
|
Return each pair's fallback qualification against the measured densities. |
|
Return each compared pair's multi-fluid qualification under TC-778's rule. |
Classes
|
One measured point against the multi-fluid model. |
|
A pair's comparison under TC-778's rule. |
- class optmat.gas.mixture_validation.Comparison(dataset, pair, kind, temperature, abscissa, measured, model, sigma, counted, passed)[source]#
Bases:
objectOne measured point against the multi-fluid model.
- Attributes:
- datasetstr
The dataset,
<source>/<id>.- pairtuple of str
The pair, sorted.
- kindstr
virialordensity.- temperaturefloat
- abscissafloat
The temperature (a virial), or the pressure (Pa) or density (m^-3) of a point.
- measured, modelfloat
The values, in the dataset’s unit.
- sigmafloat
The combined standard uncertainty; NaN where the measurement states none.
- countedbool
Whether the point counts for the pair’s qualification.
- passedbool
Whether
|model - measured| <= 2 sigma.
- optmat.gas.mixture_validation.MODEL_DENSITY_UNCERTAINTY: Final = {('Ar', 'N2'): 0.005, ('Ar', 'O2'): 0.01, ('N2', 'O2'): 0.001}#
The multi-fluid models’ own stated relative density uncertainty, read as standard (Gernert’s gas-phase statements, gernert_2013); Tkaczuk et al. state none.
- class optmat.gas.mixture_validation.PairResult(pair, counted, passed, qualified)[source]#
Bases:
objectA pair’s comparison under TC-778’s rule.
- Attributes:
- pairtuple of str
The pair, sorted.
- counteddict
Per kind, the number of counted points.
- passeddict
Per kind, the number that pass.
- qualifiedbool
At least 95 % pass in each kind with counted points, and at least three counted in all.
- optmat.gas.mixture_validation.TEMPERATURES: Final = (250.0, 350.0)#
The temperatures of the comparison, K (OEP 4, section 7.4).
- optmat.gas.mixture_validation.comparisons()[source]#
Return every point of the comparison, under TC-778’s rule.
- Returns:
- tuple of Comparison
In the datasets’ order; pairs without a fitted multi-fluid model are left out.
- optmat.gas.mixture_validation.effective_cross_virial(species, partner, temperature, fraction=0.5)[source]#
Return a multi-fluid model’s effective cross second virial coefficient.
- Parameters:
- species, partnerstr
The pair.
- temperaturefloat
- fractionfloat, optional
The mole fraction of
species; 1/2 by default.
- Returns:
- float
[B_mix(x) - x^2 B_11 - (1 - x)^2 B_22] / [2 x (1 - x)], m^3/mol.
Examples
>>> f"{effective_cross_virial('Ar', 'N2', 300.0) * 1e6:.2f}" '-10.03'
- optmat.gas.mixture_validation.fallback_comparisons()[source]#
Return the fallback’s points against the measured mixture densities.
The same rule as
comparisons(), for the pairs with a cross virial, within the fallback’s truncation bound and measured temperatures.- Returns:
- tuple of Comparison
In the datasets’ order.