Thermoelastic HDF5 payload
Thermoelasticity uses the common Quantas envelope and stores its scientific
payload under /results. The module-local payload schema is currently
1.0 and is recorded as the thermoelastic_schema_version attribute.
A thermoelastic file can represent:
a calibration result containing the cold reference EOS and component fits;
a reconstructed pressure–temperature grid;
one or more named geological profiles;
any combination of the above when later analyses have been appended to the result object before writing a new file.
Root payload
/results
attributes: thermoelastic_schema_version, jobname, completed
/independent_labels
/temperature
/pressure
/equilibrium_volume
/density
/elastic_extrapolation
/qha_extrapolation
... optional grid arrays
/reference_eos
/component_fits/<label>
/profiles/<name>
/mechanical_stability # optional
/metadata
Grid axis order
Let nT be the number of temperatures, nP the number of pressures, and
nC the number of independent elastic components. Grid arrays use axis
order:
(temperature, pressure, ...)
The coordinate arrays are one-dimensional. A property evaluated at all states
uses shape (nT, nP) followed by component or tensor axes.
Core grid datasets
Dataset |
Shape |
Unit and meaning |
|---|---|---|
|
|
K; archived temperature axis. |
|
|
GPa; archived pressure axis. |
|
|
Angstrom cubed; QHA equilibrium volume. |
|
|
One-sigma volume uncertainty. |
|
|
kg m-3. |
|
|
Equilibrium volume outside the calibrated elastic-volume interval. |
|
|
Requested state outside the archived QHA coordinate grid. |
The two extrapolation masks describe different support failures and must not be combined without preserving their meaning.
Independent and full stiffness fields
independent_labels is a UTF-8 array of length nC defining the last axis
of independent-component arrays.
Dataset |
Shape |
Meaning |
|---|---|---|
|
|
Independent isothermal components in GPa. |
|
|
One-sigma estimates in GPa. |
|
|
Full covariance among independent components in GPa squared. |
|
|
Full symmetry-constrained Wallace tensor in GPa. |
|
|
Element-wise one-sigma estimates in GPa. |
A missing optional array means that the file represents calibration only or that the requested analysis did not calculate that quantity. Absence does not mean zero.
Reference EOS
/results/reference_eos stores the shared cold EOS used by all component
fits.
Attributes include:
eos;reference_volume_A3;bulk_modulus_GPa;bulk_modulus_derivative;bulk_modulus_second_derivative_GPa-1.
Optional covariance_V0_K0_Kprime stores the covariance of the parameters
actually propagated by the component model. The fit child contains the
complete generic fit result and metadata stores scientific provenance and
normalization details.
Component fits
Every independent component appears below:
/results/component_fits/C11
attributes: active, zero_by_tolerance, wallace_delta
/entries
/volumes
/pressures
/observed
/fitted
/residuals
/relative_residuals
/symmetry_spread
/fit # absent for exact-zero components
/quality # when classified
/metadata
entries records the tensor positions and signs contributing to the
symmetry-reduced component. observed and fitted are in GPa.
volumes and pressures preserve the sampled static states.
zero_by_tolerance = True means that the component was represented as exactly
zero rather than passed to a numerical fit. It is not a failed fit.
Fit support and quality
quality may contain:
classification and machine-readable issue identifiers;
finite-strain span and reference-volume bracketing;
design rank and normalized condition number;
point leverage;
symmetry spread;
leave-one-out sensitivity;
order sensitivity;
thresholds used for classification.
These fields describe support. They do not alter the fitted parameters. External analyses should retain both the numerical fit and its quality classification.
Adiabatic fields
When the QHA source supplies all required thermodynamic fields and adiabatic conversion is enabled, the root payload may contain:
Dataset |
Shape |
Meaning |
|---|---|---|
|
|
J cell-1 K-1. |
|
|
One-sigma heat-capacity estimate. |
|
|
Cartesian expansion tensor in K-1. |
|
|
One-sigma tensor estimate. |
|
|
Adiabatic stiffness in GPa. |
|
|
One-sigma estimate. |
|
|
Stored |
|
|
Voigt vector |
|
|
Validity of the conversion. |
At non-zero temperature, invalid adiabatic states are represented by False
in the validity mask and NaN-valued arrays. They are not silently replaced by
isothermal values.
Mechanical stability
A reconstructed grid may contain /results/mechanical_stability with:
eigenvaluesof shape(nT, nP, 6)in GPa;minimum_eigenvalueof shape(nT, nP);stable_mask;indeterminate_mask;criterionandtolerance_GPaattributes;a
metadatamapping describing tensor convention and references.
The stability field applies to the reconstructed isothermal Wallace tensor. Read it together with extrapolation masks.
Depth-profile payloads
Named profiles are stored under /results/profiles/<name>. A slash is not
allowed in the profile name because it would change the HDF5 hierarchy.
For nD depth points, required arrays are:
Dataset |
Shape |
Meaning |
|---|---|---|
|
|
Depth in km. |
|
|
Pressure in GPa. |
|
|
Temperature in K. |
|
|
Equilibrium volume and density. |
|
|
Independent components. |
|
|
Component covariance. |
|
|
Full tensor along the path. |
extrapolation masks |
|
QHA-coordinate and elastic-volume support. |
Adiabatic and mechanical-stability groups may appear inside each profile using the corresponding one-dimensional leading shape.
Profile metadata stores model names, citations, joins, offsets, interpolation
choices, and other provenance from the profile specification.
Explicit absence markers
Optional thermoelastic arrays use explicit <name>_is_none attributes when
absent. This distinguishes a quantity that was not available from an empty
array. The public reader reconstructs these markers as None.
Typed reading
import numpy as np
from quantas.api import thermoelasticity
envelope = thermoelasticity.read_result("thermoelastic.hdf5")
data = thermoelasticity.get_result(envelope)
print(data.reference_eos.eos)
print(data.independent_labels)
print(data.component_fits.keys())
if data.stiffness_isothermal is not None:
c11 = np.asarray(data.stiffness_isothermal)[..., 0, 0]
supported = ~np.asarray(data.extrapolation_mask)
print(np.nanmin(np.where(supported, c11, np.nan)))
for name, profile in data.profiles.items():
print(name, profile.depth.shape)