Abstract
A two-parameter cubic equation of state (EoS) fixes its critical compressibility factor: Peng–Robinson (PR) with constants fitted to saturation data reaches only the surface and misplaces the critical volume of every real fluid. On a per-fluid basis, we calibrate a hybrid residual Helmholtz energy in which PR is an exact limit and a small neural correction is trained with the classical critical conditions as an anchor. One documented run of 276 units covered three synthetic cubic truths, held-out temperatures, eight fluids described by reference EoS of the National Institute of Standards and Technology (NIST), a sweep of the anchor weight and a noise study. For the eight fluids the anchor reduced the mean absolute relative error (MARE) in from 14.74% (refitted PR) to 0.32% and the root mean square relative error (RMSRE) in saturation pressure from 5.51% to 1.05%; against the unanchored hybrid, whose RMSRE was 0.46%, the cost was 0.59 percentage points, within a one-point margin for seven fluids. PR with reference constants kept a lower pressure RMSRE (0.83%) and a liquid density RMSRE 20 times larger. Without the anchor the inferred varied by up to 22% across initialisations. A revision run harmonised the ammonia anchor with the EoS behind its data, which removed a 3.7% offset in without lowering the pressure cost, and traced low-temperature solver failures to the solver. Learned critical isotherms are flatter in the pressure–density plane; dilute and supercritical gas states are not constrained (up to 41% pressure error at ), so the models apply to saturated states only. Prediction for unseen molecules is not tested.
1. Introduction
A cubic equation of state (EoS) needs three numbers to describe a pure fluid: the critical temperature , the critical pressure and the acentric factor . These numbers remain the entry point of most property-estimation workflows in process and molecular design, and their prediction from molecular structure has reached the uncertainty of the databases used to train the predictors. Ensembles of descriptor-based networks reach mean absolute percentage errors below 1.5% for , and on data of the Design Institute for Physical Properties (DIPPR) [1]; multitask message-passing networks use the correlation between , , and to improve the scarcer targets [2]; group-contribution models corrected by Gaussian processes add calibrated uncertainty [3]. What such predictors do not provide is an equation of state: their four outputs are regression targets, and the set they return is not the critical point of any Helmholtz energy from which pressure, chemical potential and the coexistence curve could be derived together.
A second line builds the EoS itself as a neural representation of the Helmholtz energy. When a network outputs and all other properties follow by automatic differentiation, integrability holds by construction: pressure and chemical potential derive from one potential and the Maxwell relations between them cannot be violated. Models of this kind reproduce the critical and triple points of model fluids without those points being imposed [4,5]; symplectic formulations keep the first law across phase transitions [6]; physically regularised EoS surfaces add mechanical stability inequalities and uncertainty estimates [7]. For mixtures, Gibbs–Duhem consistency has been imposed on activity coefficients as a loss term [8] and structurally, with the molecular graph as input [9], and the parameters of the perturbed-chain variant (PC-SAFT) of the statistical associating fluid theory (SAFT) are now predicted from the simplified molecular-input line-entry system (SMILES) representation of the molecule [10]. Table 1 places these works beside the present one. The combination examined here, a residual Helmholtz energy with a cubic EoS as an exact limit and the classical critical conditions imposed as an anchor, has not been reported; in every entry of the table, the critical point is a consequence of the model and in none is it a constraint on it. The perspective of Jirasek and Hasse [11] had already placed hybrid physics–machine learning (ML) models at the centre of the field.
Table 1.
Neighbouring approaches and the position of this work. “Critical anchor”: the critical conditions enter the training objective. “Unseen molecules”: the published evaluation includes molecules absent from training.
Flexibility near the critical point can also be obtained with analytic forms, which remain the established route. Multiparameter reference EoS explicit in the Helmholtz energy, such as the formulation of the International Association for the Properties of Water and Steam (IAPWS-95) for water [12] and the Span–Wagner EoS for CO2 [13], reproduce saturated states within experimental uncertainty with several tens of fitted terms. With far fewer constants, Kaplun and Meshalkin derived the form of a unified EoS for liquid and gas from rigorous thermodynamic relations and fitted the thermal data of monatomic, diatomic and polyatomic substances with three parameters [14]; Apfelbaum and Vorob’ev modified the virial expansion to obtain an EoS without empirical constants for the critical and supercritical regions [15]; and Ustyuzhanin et al. compared scaling equations, written with reference to the liquid–vapour critical point, for the coexisting densities of SF6 near [16]. The last study shares the premise of the present one, that the critical point should constrain the description of the coexistence curve instead of emerging from it. Here the constraint acts during training on a flexible correction, and a cubic EoS is kept as an exact limit.
The constraint that motivates the anchor is a known property of cubic EoS. A two-parameter cubic fixes its critical compressibility factor by its functional form: for van der Waals (vdW), for Soave–Redlich–Kwong (SRK) [17] and for Peng–Robinson (PR) [18], whereas real fluids lie between 0.22 and 0.29. If the three constants of PR are fitted to data, the model can reach only a two-dimensional surface of critical triplets , so it cannot match all three; the familiar overestimation of liquid volumes by PR is the same fact seen from the saturated liquid side. Volume translation relaxes the constraint with one empirical parameter, and we use it below as a comparator. SAFT-type EoS overestimate because of their mean-field treatment of critical fluctuations [19]. In each case, the critical point is fixed by the functional form. We postulate instead a residual Helmholtz energy in which PR is the exact base, a small neural correction that vanishes in the ideal gas limit adds flexibility near the critical region, and the critical conditions , and enter the loss as a critical anchor, together with a sampled strict criticality term that keeps and the convexity of on the critical isotherm.
The scope of this study is calibration. Each fluid is fitted separately, with its reference critical constants in the loss and its reference saturation curve as data, and the fit is then evaluated on the same curve and the same constants. The questions answered are therefore what the anchor adds to such a fit, what it costs along the coexistence curve, which comparators it beats and which it does not, and what the trained models look like. Prediction for molecules absent from training is a different question, which requires a molecular encoder and held-out molecules; the encoder is implemented in the released package, but its experiment (X6) was not executed in the reported run, so no claim about it is made. The data are saturated states with ; no single-phase gas or supercritical state enters the training, so properties of the dilute or supercritical gas are not part of the calibration. Section 2.10 measures how the models behave there, and the answer bounds their domain of use. Three hypotheses were written before the run and tested against explicit falsifiers (Section 4.5); one, a conjecture on the identifiability of from subcritical data, is rejected by the results.
The contributions are five. (i) Proposition 3 states the reachable critical set of a refitted cubic EoS in a form that predicts how PR distributes its error, and the numerical experiments confirm the prediction, including the collapse of the coexistence envelope when PR is anchored without a correction. (ii) One documented run of 276 training units (the original run; the revision run R1 of contribution (v) is a second, smaller run) (verification X0, synthetic truths X1, identifiability X2 with held-out temperatures, real fluids X3–X4 with a sweep of the anchor weight, noise X5) quantifies, with a single estimand and paired inference over fluids, the gain in the critical triplet and the cost along the envelope, against the refitted PR, PR with reference constants, two volume-translated PR variants and the unanchored hybrid. (iii) The run shows that the unanchored correction leaves weakly identified under the training protocol used, with initialisation-dependent values at every truncation of the data. (iv) Exploratory analyses of the stored models, declared as such, describe what the anchored model learns: a critical isotherm that is flatter in the pressure–density plane, i.e., with a smaller third derivative at the critical point, that sits at the lower bound of the strict criticality term for real fluids and not for cubic truths, an effective coexistence exponent closer to that of the reference EoS, an empirical relation between the residual errors in and , a second virial coefficient that saturation data leave unconstrained, and a non-identifiable decomposition between base and correction. (v) A revision run (R1) retrains ammonia with the critical anchor harmonised with the EoS behind its saturation table, audits the evaluation solver with a model-intrinsic, continuation-based solver and a global tangent-plane test, and evaluates the trained models on supercritical isotherms. Section 2 reports the results. Section 3 interprets them against the hypotheses, the comparators and the literature, and lists the limitations. Section 4 states the framework and its formal results, the loss, the implementation, the data and their provenance, the hypotheses with their decision rules, the metrics and the statistical protocol. Section 5 concludes.
2. Results
All numbers in this section except those of Section 2.6, Section 2.8 and Section 2.11, which come from the revision run R1 (Section 4.6), are produced from the result files of the original documented run by the script analysis/make_figures.py. The PR baseline of Stage 1 is deterministic; its standard deviation over seeds is zero because it has no random initialisation. Unless stated otherwise, the error estimand is the mean over fluids (or truths) of the mean over seeds of the absolute relative error, written MARE (Equation (9)), and errors along the coexistence curve are root mean square relative errors, RMSRE (Equation (10)); both are dimensionless and given in percent; signed means and standard deviations over seeds are reported separately where the sign or the dispersion carries information. Section 2.1, Section 2.2, Section 2.3, Section 2.4, Section 2.5 and Section 2.12 report the experiments fixed before the run; Section 2.7, Section 2.9, Section 2.10 and Section 2.13 report exploratory analyses of the stored per-unit files (Section 4.9). Table A1 and Table A2 document the reference-fluid data and the PR baseline. Table A3 and Table A4 report the identifiability and noise tests, Table A5 and Table A6 give solver and acentric-factor coverage, and Table A7 and Table A8 give effective exponents and training times.
2.1. Verification (X0)
Table 2 confirms Propositions 1 and 2 to machine precision: with the autograd pressure agrees with the closed-form PR pressure to , the multi-start Newton solver recovers the PR critical point from three initial guesses to , the saturation curve agrees with the cubic solver to , the second virial coefficient to , and the total loss of Equation (5) evaluated on PR-generated data at the PR limit is . The implementation contains PR exactly, which the two-stage protocol requires.
Table 2.
X0: verification of the implementation against the closed-form Peng–Robinson EoS (n-hexane constants).
2.2. Synthetic Truths with Known (X1)
Table 3 and Figure 1 and Figure 2 contain the first test of H1. PR with learned constants distributes its error as Proposition 3 allows: for the truth PT-0.270 () it misses by %, by % and by %, and for by %, % and %; its RMSREs in are 2.8–4.0%. PR with the anchor and without the correction brings within 0.7% and loses the envelope (RMSRE 36–78%), the numerical face of the last clause of Proposition 3. The unanchored hybrid fits the envelope (RMSRE 0.45–1.3%, 0.2–1.2%) and leaves the critical volume to the initialisation: its MARE in is 1.1, 8.8 and 16.1% for the three truths, with seed standard deviations of 1.5, 11.0 and 24.0%, and its MARE in reaches 7.8% for . The anchored hybrid () reproduces to 0.011%, to 0.021% and to 0.110% in the worst of the nine units, with RMSREs of 0.65, 0.53 and 0.92% in , 0.08–0.69% in and 0.26–2.2% in . Its acentric factor, a derived quantity, has a mean absolute error of 0.0017 (0.078 for PR, whose is evaluated at its own displaced ).
Table 3.
X1: signed relative deviations (Equation (8)) of the critical constants and RMSREs along the envelope for the three synthetic truths SRK, PT-0.270 and PT-0.240 of Section 4.4.1 (training set: 40 saturation points of each truth, ; evaluation on the same 40 temperatures), mean ± standard deviation (s.d.) over three seeds. , where is the acentric factor of the synthetic truth computed from its own saturation curve and the same quantity computed from the model’s own critical point and saturation curve. MAREs are given in the text.
Figure 1.
X1: absolute relative errors of the critical constants and RMSRE of for the three synthetic truths (training set as in Table 3) (individual seeds as dots, geometric mean as a bar; logarithmic scale, values below % clipped). From left to right: , , and RMSRE .
Figure 2.
X1: coexistence envelopes (top row) and relative error of along the curve (bottom row, symmetric logarithmic axis so that no residual is clipped) for seed 0 and the three synthetic truths (columns; training set as in Table 3). Blue denotes refitted PR, orange anchored PR, green the unanchored hybrid and purple the anchored hybrid. The truth is drawn in black over its complete coexistence curve up to its critical point (star), computed with analysis/cubic_truths.py. Dashed curves show model coexistence states. Each circle marks the critical point of the model of the same colour. Model curves are evaluated at the 40 training temperatures (); the dotted segments join the last evaluated temperature to the model’s own critical point and are a guide to the eye, not computed coexistence states. Temperatures at which the evaluation solver did not converge are absent from the model curves.
The inferential unit of X1 is the truth, of which there are three, so no paired test can reach at that level. Descriptively, the anchored hybrid has the lowest MARE in and of the four configurations for all three truths, a lower RMSRE than PR for all three and a lower RMSRE than the unanchored hybrid for two (0.65 vs. 0.45% for SRK is the exception). At the seed level, treated as nested replicates and not as independent fluids, every one of the nine truth–seed pairs improves in , and RMSRE over PR (one-sided exact sign-rank , nine ties impossible). The evaluation solver converged at 77.5, 92.5 and 90.0% of the temperatures for the anchored hybrids on SRK, and , so their envelope errors are conditional on that subset (Section 2.13). The third derivative of the anchored hybrids on these cubic truths stays between 18.7 and 31.5, of the same order as the PR value; this matters in Section 2.9.
2.3. Identifiability of from Subcritical Data (X2)
X2 is the one experiment of the run with held-out states: models are trained on the part of the curve with and evaluated on the whole curve. Conjecture 1 predicted a monotonic growth of the error of the unanchored hybrid as the training data are truncated further below . Figure 3 and Table A3 (Appendix D) reject the monotonic form: for the truth the MARE in of the unanchored hybrid is 6.0, 2.3, 4.7, 12.6 and 8.0% for , , , and (12, 19, 27, 34 and 38 training points), with seed standard deviations between 1.8 and 8.8%; for SRK, it is 1.4, 0.8, 1.9, 2.8 and 1.5%. What X2 establishes is weak practical identification of under this training protocol: three initialisations give values that differ by several percent at every truncation, and the dispersion does not shrink as data are added up to . A statement about structural non-identifiability would require sensitivity profiles of with the other parameters re-optimised, which were not computed. behaves differently: its MARE falls from 6.9% at to 0.50% at . The refitted PR changes little with the window, as Proposition 3 allows: its error moves from to % between and for (from to % for SRK), while its error falls from 6.3 to 3.2%. Truncation also exposes the extrapolation risk of an unconstrained correction: trained up to , the unanchored hybrid extrapolates the held-out part of the curve with an RMSRE in of 25.8% for the truth against 9.5% for PR (for SRK 3.9 vs. 4.6%), and its evaluation solver converges at 78% of the temperatures.
Figure 3.
X2: errors as a function of the maximum reduced temperature of the training data (mean ± s.d. over three seeds; evaluation on the full curve , so that every point above is held out). From left to right: , and RMSRE ; solid lines SRK truth, dashed lines PT-0.270 truth ().
2.4. Real Fluids (X3, X4)
Table 4 gives the structural error that motivates the anchor: with the packaged critical constants and no fitting, PR overestimates by 11–39%. Table 5 and Table 6 and Figure 4 and Figure 5 report the fitted models. PR with learned constants keeps an MARE in of 14.74% (7.9–19.4% over fluids) and, to fit the envelope with a fixed , moves by up to 23% (water) and by 1.8–3.4%; its RMSRE in is 5.51% on average. The unanchored hybrid fits the envelope best of all models (RMSRE 0.46%, 0.31–0.74% over fluids) and leaves the critical point to the initialisation: MARE 6.31% in and 11.04% in , with seed standard deviations of of 21.9% for water, 9.8% for methanol and 6.0% for ammonia.
Table 4.
X3: reference fluids ordered by increasing , critical constants used as anchors (values packaged with the code; their provenance is discussed in Section 4.4 and Appendix B), number of saturation points in , and the error of PR evaluated with these constants and no fitting over the complete downloaded table (triple point to ; Section 2.7 reports values on the evaluation window). .
Table 5.
X4: real fluids, signed errors as mean ± s.d. over three seeds (PR is deterministic). “conv.” is the percentage of evaluation temperatures at which the saturation solver converged; RMSREs are computed over those points. is the mean over the seeds for which could be evaluated (Table A6).
Table 6.
X4: mean absolute relative errors (MARE, mean over fluids of the mean over seeds of ) for PR with learned constants, the unanchored hybrid and the anchored hybrid at , with the paired difference over the eight fluids (anchored minus comparator; bootstrap 95% confidence interval (CI) of the mean; number of fluids in which the anchored model is better) and the two-sided exact Wilcoxon p-value adjusted by Holm’s method over the six metrics.
Figure 4.
X4: absolute relative errors in (left) and (centre) and RMSRE in (right) for eight real fluids ordered by increasing (seeds as dots, geometric mean as a bar).
Figure 5.
X4: coexistence envelopes (top row) and residuals along the curve (bottom row, symmetric logarithmic axis) for water, methanol, n-hexane and CO2 (columns; seed 0). Blue denotes refitted PR, green the unanchored hybrid and purple the anchored hybrid. Solid coloured lines in the lower panels give the corresponding pressure residuals. The reference EoS is drawn in black with its critical point as a star; above , where the training tables end, the reference curve is closed up to the critical point with CoolProp 8.0 [20] (EoS identifiers in Table A1), for drawing only. Dashed curves show model coexistence states. Each circle marks the critical point of the model of the same colour. Dotted segments join the last evaluated temperature of each model to its own critical point and are a guide to the eye.
The anchored hybrid with has an MARE of 0.09% in , 0.86% in and 0.32% in (per-fluid maxima 0.17, 1.83 and 0.53%; worst single unit 0.23, 2.3 and 0.72%), with RMSREs of 1.05% in (0.61–2.49%), 0.53% in and 1.10% in . Its acentric factor has a mean absolute error of 0.009 over the seven fluids for which it could be evaluated (0.022 for the unanchored hybrid, 0.086 for PR); for CO2 the value lies below the triple point ( K) and outside the data, and the evaluation failed in all three seeds at (Table A6). Paired over the eight fluids (Table 6), the anchored hybrid improves on PR in all eight for , , , and (Holm-adjusted for each) and in six for (); it improves on the unanchored hybrid in all eight for , and (), is worse in all eight for (mean difference points, 95% CI , ), and does not differ detectably in (, CI ) or (, CI ). With the MARE in the critical triplet falls to 0.04, 0.31 and 0.09% and the cost rises to points (CI ), with the error doubled (2.16%).
Figure 6 compares the training data with the calculated saturation curves of the anchored hybrid. On the scale of the coexistence curve the model and the data coincide for all eight fluids; the largest deviations in of these units (panel c) are 1.5–2.3% in absolute value for five fluids, 3.2% for n-hexane, 3.8% for propane and 8.1% for methanol, and they lie below , where Figure 7 places the cost of the anchor.
Figure 6.
X4: training data (circles, every 24th point) against the anchored hybrid at (lines; seed 0) for the eight fluids. (a) Reduced saturation pressure against ; (b) saturated liquid and vapour densities in reduced coordinates; (c) relative deviation of at every training temperature. Reduced with the reference critical constants of Table 4.
Figure 7.
X4: distribution of the error along the coexistence curve, RMSRE over all fluids and seeds in six bins of reduced temperature. (a) ; (b) saturated liquid density; (c) saturated vapour density. Only temperatures at which the evaluation solver converged enter the RMSRE; the converged fraction per bin is given in Table A5 (Appendix D).
Applying the decision rules of Section 4.5 gives the following outcomes. H1 at the 1% threshold holds for seven fluids at (methanol fails through , 1.83%) and for eight at ; at the seed level 18 of 24 and 23 of 24 units pass. The 50% reduction of relative to PR holds for all eight fluids at both weights. H2, read as non-inferiority of RMSRE against the unanchored hybrid with a one-point margin, holds at (mean cost 0.59 points, one-sided 95% upper bound 0.92 points; seven fluids within the margin, methanol at 1.75) and fails at (upper bound 1.72; six fluids within the margin, ammonia at 1.00 and methanol at 3.42).
Figure 7 and Table A5 locate the cost of the anchor along the curve. For the RMSRE in of the anchored hybrid () is 1.6–1.8%, against 0.4–0.9% for the unanchored one, and the RMSRE in is 0.5–1.9% against 0.2–0.7%. In the bin the order reverses: 0.59 against 0.67% in and 1.7 against 2.2% in , with 1.1 against 0.8% in . PR with learned constants errs most at low temperature (19% in and for ), where its fixed and its displaced both act. The stability term of Equation (5) was zero at convergence in 275 of the 276 units; in the remaining unit, a noise-study unit discussed in Section 2.12, 1.25% of the data points were mechanically unstable. The Newton residual of the critical-point solver was below in every unit.
2.5. Anchor Weight and Pareto Frontier
Table 7 and Figure 8 and Figure 9 map the trade-off. Raising from 1 to drives the MARE of the critical triplet from 0.09–0.86% to below 0.02%, while the envelope degrades at every step: RMSRE % and RMSRE %. The multi-start solver detected more than one solution of in 0, 2, 3 and 11 of the 24 units at , 10, and ; these are counts of roots detected from four starts; the domain was not searched exhaustively. The coverage of the saturation solver fell to 91% at . The derived acentric factor follows the same pattern (mean 0.009 at and 10, 0.019 at , 0.026 at ), and its evaluation failed in more units at (Table A6). The region in which a further unit of anchor accuracy costs least envelope accuracy is ; with the decision rules above, is the only weight at which H1 (seven of eight) and H2 both hold, and it was chosen after the sweep.
Table 7.
X4: sweep of the anchor weight, MARE over fluids [range over fluids]. is the dimensionless third derivative at the model’s critical point (PR: 26.7).
Figure 8.
X4: dependence on the anchor weight for the eight fluids (darker = lower ; per-fluid MARE over three seeds). From left to right: , , RMSRE and RMSRE .
Figure 9.
X4: envelope accuracy against critical-point accuracy for each fluid (per-fluid MARE). (a) and (b) versus RMSRE . Triangles: PR with learned constants; squares: unanchored hybrid; circles connected by lines: anchored hybrid at , 10, and , in order of increasing along each line.
2.6. Harmonised Ammonia Anchor (Revision Run R1-A)
The anchor of ammonia in X4 belongs to an older formulation than the table it was trained on (Appendix B): its is 3.66% below that of the EoS of Gao et al. [21], which generated the table. Table 8 isolates the effect. The re-implemented legacy configuration reproduces the X4 ammonia results within their seed scatter: at it has an RMSRE in of % (X4: %), (X4: ) and a cost of 0.70 points against the unanchored hybrid (X4: 0.64). Measured against the EoS behind the data, the legacy anchor leaves a error of % that no weight removes (% at ), although the model meets its own anchor to 0.09% and 0.005%. The harmonised anchor removes this offset: falls to 0.05% at and 0.005% at , to 0.90 and 0.08%, and the RMSRE in the saturated liquid density halves (0.71 to 0.36% at ; 1.23 to 0.47% at ). It does not reduce the cost along the envelope. Seed by seed, the RMSRE in is higher with the harmonised anchor by 0.12, 0.22 and 0.20 points at , and changes by , and points at ; the RMSRE in rises from 1.14 to 1.83% at . The third derivative at the critical point decreases by 2.0–4.0 at (from 13.8 to 11.0), so the harmonised model has a flatter critical isotherm, closer to the values of the other seven fluids in X4 (6.6–8.9). The acentric factor of the anchored models is 0.246–0.251 with either anchor, against 0.2557 for the EoS of Gao et al.
Table 8.
R1-A: ammonia trained on the 481 points of X4 with the legacy packaged anchor and with the anchor harmonised to the EoS of Gao et al. [21] that generated the data. All errors are relative to the harmonised constants, in % (mean ± s.d. over three seeds; PR is deterministic); RMSREs are computed with the model-intrinsic solver (coverage 100% in every unit). is the cost in RMSRE of relative to the unanchored hybrid of R1 (0.44%), in percentage points.
The X4 aggregates do not depend on ammonia. Recomputed on the other seven fluids, the anchored hybrid at has MAREs of 0.09, 0.88 and 0.35% in , and , an RMSRE in of 1.05%, and a cost of 0.58 points against the unanchored hybrid with a one-sided 95% upper bound of 0.97 points (eight fluids: 0.59 and 0.92); H1 holds for six of seven fluids and H2 still holds at and fails at (upper bound 1.85 points).
2.7. Fair Comparators and Solver Coverage (Post Hoc)
The refitted PR is the baseline that the two-stage protocol initialises from, and its 5.51% RMSRE in is the product of a joint fit of pressures and densities with a fixed . A reader may ask whether a model that does not refit at all does better on the pressure. It does (Table 9): PR with the reference constants has an RMSRE of 0.83% on the evaluation window, lower than the anchored hybrid in six of the eight fluids (two-sided exact ; mean difference points, CI ), and an RMSRE of 10.9% and of 2.4%, higher than the anchored hybrid in all eight fluids (). The values on the evaluation window differ from those of Table 4, which were computed over the complete downloaded tables (1.73 vs. 0.43% for n-hexane, for example), because the full tables include the region below and the last 3% below , where PR with a fixed is worst. Volume translation offers one parameter to fix , and the table shows that one parameter cannot serve both ends of the curve: c fixed by is 11–58 cm3 mol−1 and produces liquid density errors of 32–267%, whereas c fixed by is to cm3 mol−1, leaves the error at 14–33% and reduces the RMSRE in only to 6–13%. The anchored hybrid is the only model of the table with % and RMSRE % at once; the price it pays is 0.22 points of against the unfitted PR and 0.59 against the unanchored hybrid. A three-parameter cubic and a polynomial correction of comparable capacity were not run and remain comparators for the next run.
Table 9.
X4: comparators evaluated on the same temperatures and with the same metrics as the trained models (RMSRE in %). PR with reference constants: no fitting, so and are exact and carries the structural error. Translated PR: with c fixed either by the reference critical volume (critical triplet exact; unchanged) or by the saturated liquid density at (the usual choice). The anchored hybrid is the per-fluid MARE at .
Because every RMSRE of this paper is computed over converged points, Table 10 reports what the conditioning hides. On real fluids the coverage is 100% for PR, 99.5% for the unanchored hybrid and 99.4 and 98.9% for the anchored hybrid at and 10; the minimum over units is 94.3% at and 93.0% at 10, and all failures occur below . Recomputed on the common support, the RMSREs of the three hybrids change by less than 0.02 percentage points, and that of PR falls from 5.51 to 5.33% in because the excluded low-temperature points are where PR errs most; the ranking of the models is the same on both supports. The failures of the evaluation solver are nonetheless a limitation for use: four of 24 units at and seven at 10 fall below 99% coverage, against the target of at least 99% that a model intended for the whole window should meet, and on the synthetic truths the anchored hybrids reach only 77.5–92.5% (Section 2.2). The evaluation solver is initialised from the reference densities, so these figures describe convergence from a favourable start, and they do not include a global check of the common-tangent condition; the solver rejects the trivial root and mechanically unstable phases, and nothing more. Section 2.8 examines the cause of these failures with retrained models and a model-intrinsic solver.
Table 10.
X4: coverage of the evaluation saturation solver (fraction of the evaluation temperatures at which it converged; mean and minimum over the 24 units of each model), number of units below 99%, RMSREs over the converged points and over the common support (temperatures at which all four models converged, 98.5% of the grid on average), and the highest reduced temperature at which a failure occurred.
2.8. Solver Audit (Revision Run R1-B)
Table 11 answers whether the solver failures of the documented run belong to the solver or to the models. In the 26 R1 units both solvers converged at every training temperature, and the tangent-plane test found no violation: every converged pair is the globally stable coexistence on its isotherm within the scan of 4800 packing fractions (the smallest margin, in units of , is round-off). The audit retrained the configurations with the lowest coverage in the documented run (the SRK truth, anchored at and unanchored, with 77.5 and 80.0%; PT-0.240 with 90.0%; benzene at with 93.0 and 95.7%; methanol at with 94.3%) and obtained 100% in all of them. In the documented run, the failing temperatures of each synthetic truth were the same in its three seeds (nine temperatures with for SRK, the three lowest for PT-0.270, the four lowest for PT-0.240), although the three seeds produced different models; a property of the models would not repeat across initialisations in that way. The failures are therefore attributed to the numerical settings of the evaluation solver of the documented run (iteration budget, step control and acceptance tolerances, which the run did not record), and not to the absence of a stable coexistence solution. The attribution rests on retrained models: the weights of the 276 original units were not stored, so their curves cannot be re-evaluated. The RMSREs of the documented run were computed on converged points, and Table 10 shows that restricting them to the common support changes them by less than 0.02 points; the conditional statistics of Section 2.2, Section 2.3, Section 2.4, Section 2.5, Section 2.6 and Section 2.7 therefore stand, and the coverage limitation reported there applies to the solver used and not to the models. The model-intrinsic solver is part of the released revision package and is the recommended evaluator for these models.
Table 11.
R1-B: coverage of the saturation solvers on the training temperatures of the R1 units (mean and minimum over units). “Documented run”: coverage of the corresponding configuration in X1 or X4 (range over the seeds retrained here; “–” for the harmonised anchor, absent from X4). “Legacy-type”: Newton initialised from the reference densities, as in the documented run. “Intrinsic”: continuation from high to low temperature with spinodal-bracketed initialisation, no reference densities. Tangent-test failures: converged pairs for which a third density has a lower Gibbs energy at .
2.9. What the Anchored Model Learns (Post Hoc)
Table 12, Table A7 and Figure 10 describe the trained models beyond their errors. Four observations follow; all are exploratory.
Table 12.
X4: learned decomposition of the hybrid models (mean ± s.d. over seeds; PR is deterministic). , and are the base constants after training, with the packaged reference in parentheses; is the packing fraction at the model’s critical point (PR: 0.253); is the rms of the correction over the prior grid ; is the third derivative at the critical point (nominal lower bound 6.68).
Figure 10.
X4, exploratory characterisation of the learned models (colour: fluid, darker = lower ). (a) Third derivative at the model’s critical point versus the anchor weight (mean over seeds), with the PR value () and the nominal lower bound of the strict criticality term. (b) Effective order-parameter exponent from a fit of on for every unit (dots; model curves with the model’s own ), compared with the reference EoS (grey band: range over fluids; line: mean), the classical value and the three-dimensional Ising value [19]; other windows and the fit with the reference are in Table A7. (c) Error in against the error in multiplied by the slope of the reference vapour pressure curve near , for the 96 anchored units; the dotted line is the identity.
The decomposition is not identified; the sum is. In the anchored hybrid the base constants do not represent the fluid’s critical point: at the learned lies between % (propane) and % (methanol) of the reference , between and %, and ranges from 0.03 (ammonia, reference 0.256) to 0.45 (CO2, reference 0.224); the correction carries the difference, with between 0.12 (R-134a) and 0.84 (methanol) against a PR residual Helmholtz energy of order one. Across seeds the base constants scatter by up to 9.0% in (water) while the predicted scatters by at most 0.27%. The packing fraction at the critical point, fixed at in PR, becomes fluid-specific: 0.266 (ammonia) to 0.302 (methanol).
The learned critical isotherm is as flat as the sampled constraint allows, for real fluids only. At the third derivative at the located critical point is 6.6–8.9 for seven fluids (14.1 for ammonia) against 26.7 for PR; for benzene, n-hexane, propane and R-134a it lies within 15% of the nominal bound 6.68, and individual seeds reach 6.49. In the covolume-independent form , which removes the learned b from the comparison, the values are 0.58–1.00 against 1.71 for PR and 1.20–1.77 for the unanchored hybrid (5.3 for methanol). Since the continuous form of the quadratic bound would require (Proposition 4), the 21 of 24 units at and 24 of 24 at with show that the penalty, sampled at 15 densities, does not enforce the inequality between its sample points and that the located critical point need not coincide with the anchor at which the penalty was evaluated. On the cubic truths of X1 the same architecture keeps between 18.7 and 31.5, and the unanchored hybrid on real fluids between 14.3 and 45.2; the flattening is a response to the anchor combined with near-critical data of real fluids, whose reference EoS reproduce the non-classical flattening of the critical isotherm ( with instead of 3 [19]). Raising raises again (7.4–11.3 at , 10.3–16.6 at ). The effective order-parameter exponent tells the same story in a form that does not depend on b: on and with each model’s own , the reference EoS give (0.317–0.349 over fluids), PR with learned constants , the unanchored hybrid and the anchored hybrid at ; the windows and and the fit with the reference move these values by at most 0.01 for the anchored models (Table A7). An analytic model with an ordinary critical point has asymptotic exponent ; over a finite window measures how the model bends inside the data, and nothing about universality.
The residual error in tracks the error in . The anchor imposes to about (final anchor residual of median , maximum , over the 24 units at ), while the model’s own differs from by up to 0.23%. Over the 96 anchored units, correlates with at with slope 1.22, where near (Riedel’s parameter [22]) is 6.6–8.7 for the eight fluids. The 96 observations are nested in eight fluids and four weights, so the slope is a description of this run and not a law; a local expansion would include the anchor residual and the model’s own , which were not stored. What the correlation does show is that, in this run, the MARE of 0.86% in at is consistent with the amplification of a 0.09% error in by a factor near .
2.10. Dilute-Gas Limit: Second Virial Coefficient (Post Hoc)
Proposition 2 gives of the model in closed form, and the run stored its value at , and for every unit, so the dilute-gas limit, which no training datum constrains directly, can be compared with a reference EoS evaluated with CoolProp 8.0 [20] (Table 13). No model reproduces to better than about 10% on average. The values quoted here are MAREs over the eight fluids, defined as in the last column of Table 13 (mean over fluids of the absolute value of the seed-averaged relative error); the alternative estimand of Equation (9), the mean over fluids and seeds of the absolute per-seed error, differs from it by at most 1.3 points (28.2 instead of 26.9% for at ) and gives the same ranking. At , where the saturated vapour is dilute and carries some information on B, the unanchored hybrid is the best (MARE 6.1%, against 14.5% for PR with reference constants, 18.0% for the refitted PR and 12.1% for the anchored hybrid at and 10). At the learned models have MAREs of 13–20% (12.5% for the refitted PR, 19.8% for the unanchored hybrid and 18.4% for the anchored hybrid at and 10), and at of 27–38% (26.9% for the anchored hybrid at , 35.1 and 34.8% for the refitted PR and the unanchored hybrid, 37.6% at ); all are worse than PR with reference constants (11.3 and 21.2%). The error does not grow monotonically with : at the unanchored hybrid (35%) is worse than the anchored hybrid at (27%). Among the anchored models it grows with the weight once : over the full sweep of Section 2.5 the MARE rises from 18.4 to 21.3 and 25.8% at and from 26.9 to 37.6, 59.1 and 72.8% at for , 10, and (the last two rows of each block of Table 13). The seed-to-seed standard deviations reach 17% () and 42% (unanchored) at , and the single-fluid error of water at is %. The saturated vapour has for , so is reached by the data only through a short extrapolation in and only below ; above nothing acts on it except the prior of Equation (5), and the strict criticality term, which imposes at and , says nothing about B. The present models should not be used for supercritical or dilute-gas properties (Section 2.11 quantifies this on supercritical isotherms).
Table 13.
X4: relative error (%) of the second virial coefficient of the trained models at , and against the EoS implemented in CoolProp 8.0 [20] (mean over seeds, for the configurations of the main comparison and for the two largest anchor weights of the sweep, and ; last column: MARE over the eight fluids, i.e., the mean over fluids of the absolute value of the seed-averaged relative error). “PR, reference constants” is PR evaluated with the packaged , , . The reference B values, in m3 mol−1, and the identifier of the EoS behind each are cached with the analysis script; for ammonia and n-hexane that EoS is more recent than the one behind the training tables (Appendix B).
2.11. Supercritical and Dilute-Gas States, and the Complete Phase Diagram (Revision Run R1-C)
Figure 11a is the phase diagram of one anchored model computed from its residual Helmholtz energy alone. The subcritical isotherms show the van der Waals loops of an analytic EoS, with the equal-area tie line at the computed saturation pressure; the critical isotherm has a horizontal inflection at the model’s critical point (405.84 K, 11.430 MPa, 13.693 mol L−1, against 405.56 K, 11.363 MPa and 13.696 mol L−1 for the reference); and the coexistence curve, continued with the model-intrinsic solver from , closes at that point (Figure 11b). With the legacy anchor, the curve closes at a density 3.7% lower, at the anchor and away from the reference.
Figure 11.
R1, ammonia. (a) Phase diagram of the anchored hybrid (harmonised anchor, , seed 0) in the pressure–density plane: isotherms at , 0.90, 0.95, 1.00, 1.10 and 1.50 (solid; dotted inside the coexistence region, where the horizontal segment is the equal-area tie line computed by the model-intrinsic solver), supercritical isotherms of the reference EoS of Gao et al. (dashed), the model’s complete coexistence curve up to its own critical point (purple), training data (circles, every 30th point) and the reference critical point (star). (b) Coexistence curve in the temperature–density plane near the critical point for the anchored models with the harmonised and the legacy anchor (seed 0), computed by continuation up to each model’s own critical point (circles), with the reference EoS (black) and both anchors. (c) Compressibility factor on three supercritical isotherms: anchored hybrid (solid), unanchored hybrid (dotted), PR with reference constants (dash-dotted) and reference EoS (dashed black). (d) Second virial coefficient; the shaded band is the temperature range of the training data, which contains only saturated states.
Away from saturation, the picture changes (Table 14, Figure 11c,d). On the isotherm every hybrid stays within an RMSRE of 1.4–3.4% in P, comparable with PR (3.2–4.6%). At and the anchored models depart from the reference: at their RMSRE in P is 13–41%, against 6.3% for PR with reference constants, 2.6% for the refitted PR and 3.9% for the unanchored hybrid, and the seed-to-seed scatter is of the same size as the error. The deviation is largest at the highest densities of the isotherm, where the correction is evaluated at temperatures twice the critical one and no datum constrains it; restricted to the RMSRE at is 1.7–9.1%. In the anchored models miss the reference by to cm3 mol−1 at (reference ), by to at , and by up to cm3 mol−1 at , where the reference is ; the unanchored hybrid, which fits the dilute saturated vapour best, has the smallest deviation at (). These results confirm and extend Section 2.10: the anchor improves the saturated states and the critical point and degrades the supercritical gas, because it bends the correction near while nothing constrains it above. The calibrated models are valid for saturated states in and at the critical point. They must not be used for dilute or supercritical gas properties without further constraints, such as virial data in the loss or the prefactor discussed in Section 3.6.
Table 14.
R1-C: ammonia models of R1-A outside the training data. is the absolute deviation of the second virial coefficient from the EoS of Gao et al. [21] (reference values , , and cm3 mol−1 at , 1.0, 1.5 and 2.0); it is given in absolute terms because B changes sign near , where relative deviations diverge. RMSRE of P: 25 densities in on each supercritical isotherm. Mean ± s.d. over three seeds.
2.12. Noise and Capacity (X5)
With 0.5 and 1% relative noise in (half that in the densities) the anchored hybrid keeps %, % and % in all 36 units (Figure 12, Table A4), while the RMSRE in against the noisy data rises from 0.41% (mean over variants, no noise) to 2.1 and 1.8%. Doubling the width to reduces the noise-free error from 0.53 to 0.33% and halves it at 0.5% noise. Adaptive gradient-norm weighting gives no systematic benefit, and with at 1% noise, one unit (seed 2) converged at 40% of the temperatures with an RMSRE in of 15% and , although its critical volume was reproduced to 0.016%; that unit is the only one of the run with mechanically unstable data points at convergence and is the reason for the mean of % in of its variant. Four of the 36 units converged below 80%. Over-flexible corrections at low reduced temperature are the failure mode; the anchor is not. The falsifier of X5 (% at 1% noise) is not triggered, and a unit with 40% coverage would fail the coverage criterion that this paper adopts in Section 2.7.
Figure 12.
X5: anchored hybrid on the PT-0.270 truth () with relative Gaussian noise in the saturation data, network width h and adaptive loss weighting (mean ± s.d. over three seeds). From left to right: , and RMSRE against the noisy data.
2.13. Training Dynamics and Computational Cost
Figure 13 shows the course of a typical unit. Stage 1 reduces the data term of the PR base by more than two orders of magnitude within 150 Adam steps and then stalls at the limit of Proposition 3. Switching on the anchor at the start of Stage 2 raises the total loss to 0.16–1.2 (the anchor residual of the PR fit, whose critical point is displaced); Adam brings the anchor term to – while the data term first rises and then falls below its Stage-1 value, and the final L-BFGS refinement reduces the total loss by a factor of 2.0–12 (median 3.9 over the 24 anchored units at ) and leaves anchor residuals of median . With two threads per process a PR fit takes 42 s, an unanchored hybrid 172 s and an anchored hybrid 450–480 s (Table A8, Appendix D); the anchor is expensive because requires fourth-order derivatives of on a grid at three temperatures. The whole programme used 19.6 process-hours and min of wall-clock time on 31 worker processes of one workstation. No GPU benchmark was run; the choice of CPU execution with parallelism over units was a decision made before the run, based on the small network and the high derivative order, and is reported as such.
Figure 13.
Loss terms of Equation (5) along training for water, anchored hybrid with , seed 0. (a) Stage 1, PR base alone; (b) Stage 2, hybrid initialised from the Stage-1 state with the critical anchor switched on. Dashed segments: change produced by the final L-BFGS refinement. The stability term is non-zero only at the first Stage-1 step.
3. Discussion
3.1. What the Anchor Adds, What It Costs and Against Whom
Two questions are often merged and the results keep them apart. Can a flexible correction to a cubic EoS fit the coexistence envelope? Yes: the unanchored hybrid has the lowest RMSRE in of every model tested (0.46% on real fluids). Does the envelope fix the critical point? Under the training protocol used, no: without the anchor the inferred changes by up to 22% between initialisations on real fluids and by up to 24% on synthetic truths, by 2–11%, and the dispersion persists at every truncation of the data in X2. Saturated properties away from are governed by the low-density and liquid-like regions of , whereas is a statement about the curvature of the critical isotherm, which data at reach only through the analytic continuation of a flexible function. The anchor supplies that curvature, and Proposition 3 says why PR alone cannot absorb it.
The cost depends on the comparator, and Table 9 names three. Against the refitted PR, which is the model that the anchored hybrid is initialised from, the anchor wins on every metric with a paired improvement in eight of eight fluids for five of them. Against the unanchored hybrid, it costs 0.59 points of at , within a one-point margin for seven fluids and for the mean. Against PR with the reference constants and no fitting, the anchored hybrid loses 0.22 points of and gains a factor of 20 in and of 60 in . A reader whose only need is the vapour pressure curve of a fluid with known constants has no reason to train anything; the hybrid is for the case in which , , and the critical triplet are needed from one Helmholtz energy. Volume translation, the classical one-parameter remedy for , does not reach that case: a shift fixed by ruins the liquid density and a shift fixed by leaves the error at 14–33%, because PR’s volume error at the critical point (11–58 cm3 mol−1) and along the liquid branch ( to cm3 mol−1) have different sizes and, for four fluids, different signs. A three-parameter cubic and a polynomial correction of comparable capacity are the comparators still missing, and they belong to the next run together with the held-out protocol of Section 3.9.
The analysis along the envelope (Figure 7) places the cost below , away from the anchor, and shows the anchored model slightly more accurate than the unanchored one in the last 5% below . The anchor does not distort the critical region; it redistributes the capacity of a 32-unit correction that must serve the low-temperature liquid, the vapour branch and the critical curvature at once. The noise study, in which halves the noise-free error, points to capacity as the lever.
3.2. The Failure of PR with an Anchor Is the Argument
The most instructive configuration is the one that failed. PR with the critical anchor and without the correction reproduces within 0.7% and loses the envelope (RMSRE 36–78% on synthetic truths). Proposition 3 predicts the mechanism: a two-parameter cubic pinned to a critical density with must miss , and its saturation pressure inherits the mismatch as . The size of the loss at finite distance from is an empirical result of the fit; the proposition only fixes the limit. The two-stage protocol makes the attribution clean, since the anchored hybrid starts from the very PR fit it improves upon (Figure 13), and X2 adds that the error of a refitted PR moves by less than 0.1 points when the data window changes, so more subcritical data do not help a model whose is fixed by its form.
3.3. Meaning of the Learned Decomposition
The base constants of the anchored hybrid are not estimates of the fluid’s critical constants and should not be read as such: the learned and deviate from the reference values by tens of percent, differ between seeds by up to 9%, and are compensated by a correction whose rms magnitude is 0.1–0.8 in units of . The data and the anchor identify the sum , and they identify it well (seed spread of below 0.3%). Two consequences follow. The interpretable quantities of the model are the derived ones (, , , , , , , ), as in a multiparameter reference EoS. And a molecular encoder, if one is trained in a later stage, should target the derived critical point or a canonical decomposition fixed by construction (for instance , with the correction absorbing the mismatch) and leave the free base constants aside, since they are degenerate. The canonical decomposition is a one-line change in the released package and has not been trained.
3.4. Flatter Critical Isotherms in the Pressure–Density Plane
The anchored models have between 6.6 and 8.9 at for seven fluids, against 26.7 for PR, and between 0.58 and 1.00 against 1.71. A smaller third derivative is a flatter isotherm at in the pressure–density plane (equivalently, a smaller at fixed ), which is the direction in which real fluids depart from classical EoS: the true critical isotherm is non-analytic with and the coexistence curve closes with instead of the classical [19]. The reference EoS of the eight fluids, analytic themselves, reproduce these features within the accuracy of the data, and the anchored hybrid, made to pass through their critical point while fitting their near-critical envelope, inherits them as far as an analytic function can: against 0.339 for the reference EoS and 0.446 for PR, with a dependence on the window and on the choice of below 0.01. The same architecture on cubic truths keeps at 19–31, and the unanchored correction on real fluids keeps it at 14–45 with ; the flattening is learned from the data under the anchor. Two caveats bound the reading. The value was chosen before the run as a safeguard against degenerate critical points, and the trained models sit on it for four fluids, so the reported reflects the bound as well as the data; and the sampled quadratic penalty is weaker than its continuous form (21 of 24 units have below ), so neither the bound nor the inequality is certified between sample points. A lower bound, or a bound on the fourth derivative, would let the model flatten further; the comparison with crossover theories is a separate study. The model remains a classical EoS with a corrected and a flattened isotherm and must not be used to extrapolate critical exponents.
3.5. Why Is Less Accurate than and
The anchor fixes the pressure at the reference critical point to about , yet the error of the model’s own is ten times that of . The correlation of Figure 10c resolves the apparent contradiction for this run: the model’s critical point moves along the extension of the vapour pressure curve, whose logarithmic slope at is Riedel’s parameter [22], so a 0.09% error in appears as a 0.6–0.9% error in . The relation is empirical and nested in eight fluids; a local expansion would add the anchor residual and the model’s own thermal derivative, which the run did not store. If it holds beyond this run, a temperature-derivative term at the critical point, which the reference EoS provide, would improve at less cost than raising , which Figure 9 shows to buy little above 10.
3.6. The Dilute-Gas Limit Is Not Identified
The second virial coefficient is the one property for which the learned models are not better, and at supercritical temperatures clearly worse, than PR with reference constants. The saturated vapour reaches only by extrapolation from and only below ; at the network is evaluated where no datum and no constraint except the small prior acts, and it extrapolates with seed-dependent errors of tens of percent. The revision run shows the same on supercritical isotherms of ammonia: at the anchored models deviate from the reference by 13–41% in pressure, against 6.3% for PR with reference constants, and their can have the wrong sign (Table 14). The anchor sharpens the correction near , and nothing in the loss acts on it above . Two remedies follow from the structure of the model, and neither was tested. The prefactor in Equation (1) can be replaced by , which makes that of the PR base exactly and removes the correction’s freedom at low density; or , a closed-form output, can be anchored to virial data or to the Boyle temperature with a term analogous to the critical anchor, provided that reliable virial information exists for the fluid. A projection of the anchor onto a low-order polynomial in starting at , which would impose the three critical equalities exactly while preserving , was suggested during review and is a candidate for the next run. A reader who needs supercritical or dilute-gas properties should not use the present models outside the coexistence region.
3.7. Methanol and Associating Fluids
Methanol is the only fluid for which H2 fails at both anchor weights and H1 fails at (through , 1.83%). It is the most strongly associating fluid of the set (, ); its unanchored hybrid has the largest (45) and the largest spread among non-aqueous fluids, its anchored models need the largest correction () and the most displaced base ( 41% above ), and at the multi-start solver detects additional roots in two of three and three of three seeds. A PR base with a single is a poor prior for a hydrogen-bonded fluid, and a 32-unit correction has to carry the association physics and the critical curvature together. A cubic-plus-association (CPA) or SAFT-type base, or the wider correction of X5, is the obvious remedy; neither was run.
3.8. Relation to Previous Work
The novelty claimed here is delimited: the combination of a residual Helmholtz energy with a cubic EoS as an exact limit and the classical critical conditions as an anchor of the training objective. Table 1 lists the neighbours. Direct predictors report , and errors of about 1% on DIPPR compounds for molecules absent from training [1,2]; the present errors are in-sample calibration errors and cannot be compared with them. Neural Helmholtz EoS trained on simulation data of model fluids reproduce the critical point emergently [4,5]; the present model is anchored explicitly and keeps PR as an exact limit, which none of the fully neural EoS does. Physically regularised EoS surfaces [7] impose mechanical stability as an inequality; here the stability inequality was inactive at convergence in 275 of 276 units, and the work is done by the anchor and the sampled strict criticality term, whose limits Section 2.9 quantifies. Rittig and Mitsos [9] already take a molecular graph as input and build an excess Gibbs energy with Gibbs–Duhem consistency; their object is the mixture, and the two constructions could be combined. Among analytic EoS, the unified liquid–gas form of Kaplun and Meshalkin [14] and the constant-free near-critical EoS of Apfelbaum and Vorob’ev [15] reach accuracy in the coexistence region through the functional form itself, and the scaling equations compared by Ustyuzhanin et al. [16] impose the critical point and non-classical exponents on the saturation densities; the present model reaches its critical accuracy through a loss term on a flexible correction, which is cheaper to adapt to a new fluid and cannot reproduce non-classical asymptotics (Section 2.9). Winter et al. [10] close the molecule-to-EoS loop from the SAFT side, with the mean-field overestimation of as the known price; a critical anchor of the kind used here applies to such a base as well. An extension to mixtures requires the critical conditions in composition space (a vanishing eigenvalue of the stability Hessian with its directional derivative) and mixing rules for the base; it is future work and nothing in the present results bears on it.
3.9. Limitations
(i) The study is a per-fluid calibration: errors are in-sample fits of a saturation curve with a critical anchor, with the same curve and constants used for evaluation, except in X2, where temperatures above are held out. No molecule absent from training was evaluated; X6 was scheduled and not executed. (ii) The critical constants used as anchors were packaged with the code from REFPROP/NIST tabulations and were not confirmed online against the EoS behind each downloaded table. For ammonia, the downloaded table extends to K while the packaged is K, so the anchor and the data of that fluid come from different EoS. The revision run identified the EoS of the table (Gao et al. [21]) and retrained ammonia with the harmonised anchor (Section 2.6): the 3.7% offset in disappears and the liquid density error halves, but the cost along the envelope does not fall, so ammonia’s cost in X4 (0.64 points of ) belongs to the model and not to the inconsistency; the X4 aggregates are unchanged when ammonia is excluded. For the other seven fluids, the tables end at and no inconsistency is visible, which is not a proof of consistency; for methanol and n-hexane the EoS behind the tables was not identified, and a harmonised run for all eight fluids remains to be done. (iii) The data are values of reference EoS; their consistency with the anchor is a strength for the test of H1 and hides the scatter of real data (X5 covers 1% noise only), and the effective exponents are those of the reference EoS. (iv) Every RMSRE is conditional on solver convergence; coverage is 99.4% at on real fluids with four of 24 units below 99%, and 77.5–92.5% on synthetic truths; the solver is initialised from reference densities and does not check the common tangent globally. Retrained models of the configurations with the lowest coverage reach 100% with both a legacy-type and a model-intrinsic solver, with no tangent-plane violation (Section 2.8), so the failures are attributed to the evaluation solver of the documented run; the attribution is indirect because the original weights were not stored. (v) Proposition 4 is local to the critical isotherm; global uniqueness is not established, the sampled penalties are weaker than their continuous forms, and the counts of detected roots come from four starts. (vi) X2 shows weak practical identification of under the protocol used; structural non-identifiability was not established, and sensitivity profiles were not computed. (vii) The experimental programme was fixed in an archived configuration and documented by the run log before the results existed; no independent time-stamped registration exists, and the analyses of Section 2.7, Section 2.8, Section 2.9, Section 2.10 and Section 2.13 were added after the results were seen. (viii) The model is analytic, does not reproduce non-classical exponents, and does not identify the dilute-gas limit; on supercritical isotherms at the anchored models of ammonia deviate from the reference by 13–41% in pressure (Section 2.11), so their domain of validity is the saturated states used in training and the critical point. (ix) The statistical population is eight fluids; the confidence intervals of Table 6 are bootstrap intervals over that small set, and the Holm adjustment covers the six metrics within each comparison.
4. Materials and Methods
4.1. Hybrid Residual Helmholtz Energy and Formal Results
Let be the molar density, b the covolume, the packing variable and with the critical temperature of the base EoS. All energies are made dimensionless with , and denotes the dimensionless residual Helmholtz energy of the model, i.e., the molar Helmholtz energy minus that of the ideal gas at the same T and , divided by . Following the IUPAC recommendation [23], the quantity is called the Helmholtz energy throughout. The reduced temperature is used only with the reference critical temperature of a fluid, to describe data windows.
Postulate 1
(Hybrid residual Helmholtz energy). The residual Helmholtz energy of a pure fluid is the residual Helmholtz energy of the Peng–Robinson EoS plus a neural correction that vanishes in the ideal gas limit:
with , (the exact PR values, used in full precision; the four-digit values 0.4572 and 0.0778 are quoted only for reading) and [18].
In Equations (1) and (2), is the dimensionless residual Helmholtz energy of PR, its dimensionless attraction parameter and , its critical constants. The vector collects the three constants of the PR base: its critical temperature, its critical pressure and the acentric factor that enters PR through . These constants are learnable scalars per fluid and are not the critical constants or the acentric factor of the fluid, which are properties of the complete model (Section 2.9). The vector collects the weights and biases of the network . is a two-layer perceptron with tanh activations and inputs , where is reduced with the learned ; its last layer is initialised at zero, so that every hybrid training starts from the best PR fit. The prefactor makes as . A molecular embedding that would condition on the molecule is implemented in the released package and is absent from every model of this paper.
All properties follow from Equation (1) by automatic differentiation (AD):
where Z is the compressibility factor, the molar chemical potential, cancels in any isoactivity condition and B is the second virial coefficient. Writing with , the dimensionless critical residuals are
and a critical point is a solution of with . Since , the strict criticality term of the loss requires the fourth -derivative of ; the tanh network is infinitely differentiable with respect to its inputs, so all these derivatives exist and are continuous, and they are obtained by nested automatic differentiation and were checked against the closed-form PR expressions (Section 2.1). For PR at its own critical point and .
The following propositions are proved in Appendix A.
Proposition 1
(Reduction to Peng–Robinson). If , the model of Equation (1) is the PR EoS with constants : its critical point is with , and its saturation curve and acentric factor are those of PR.
Proposition 2
(Ideal gas limit). If and are bounded on for some (true for any finite tanh network), then and as , and .
Proposition 3
(Reachable critical set of a cubic base). For the PR base with free the set of reachable critical triplets is the two-dimensional surface . Hence, against a reference triplet with , the relative errors of any PR model satisfy , so at least one of them is non-zero, and a PR model whose critical point is pinned to has , so its saturation pressure misses as .
Proposition 3 does not say which of the three errors is non-zero; the fit decides that, and the results in Section 2 show how. It also does not say that the error of a refitted PR is independent of the data window; Section 2.3 measures that dependence.
Proposition 4
(Critical anchor on the critical isotherm). Let a model satisfy and at and for all η in a domain and some . Then is the only point of the isotherm at which , and necessarily . The values of , and ω are then determined by .
Proposition 4 is a statement about one isotherm. It does not exclude further solutions of at other temperatures: an explicit smooth residual energy with for all and two tangential critical points was communicated to us during review, and the hypotheses above are satisfied by it. Global uniqueness over the domain is therefore not claimed; it is screened numerically by a multi-start solver, whose findings are reported as counts of detected solutions (Section 2.5). The inequality matters for the loss: the strict criticality term of Section 4.2 uses , so the quadratic bound, if it held continuously, would imply at the anchor, a stronger condition than the nominal threshold ; Section 2.9 shows that the trained models violate the former while satisfying the latter, which quantifies how far a penalty sampled at 15 densities is from the continuous inequality.
Sensitivity of the located critical point to residuals of the anchor is a two-dimensional question. With as a function of , , the Jacobian at a non-degenerate critical point is , and residuals displace the solution by and . Along the critical isotherm alone, , so a residual in corresponds to , an absolute displacement in : with and , gives , i.e., 2.6% of , and a relative error of 0.1% in requires . These estimates motivate the second-order refinement with the limited-memory Broyden–Fletcher–Goldfarb–Shanno algorithm (L-BFGS) of Section 4.3; the per-component residuals and the thermal derivatives , were not stored by the run, so the two-dimensional estimate is not evaluated here.
4.2. Loss Function
Given saturation data and a critical anchor , the loss is
with ; the overbars denote means over the data points or over a grid of 15 densities on each of the three isotherms. The residuals of Equation (6) are chosen by scale: the liquid pressure residual is absolute and scaled by because the liquid branch is stiff (a relative residual reached at low reduced temperature during development and destroyed the optimisation), the vapour residual is relative because the vapour branch is soft, and enforces isoactivity. The strict criticality term implements the hypotheses of Proposition 4 on a sample: without it the network satisfied at the anchor while creating a second zero nearby (a plateau of ), so that the located critical point deviated by 6–12% in although at the anchor. Two properties of this term, established after the run, must be read with the results: its quadratic bound with implies in its continuous form (Proposition 4), a condition the trained models do not meet; and a penalty evaluated at 15 densities does not bound between them. The stability term penalises mechanically unstable data points, i.e., it acts on the two saturated phases and not on the homogeneous region between them, where is part of the description of coexistence. The prior keeps the correction small; recovers PR. Points with are excluded and is penalised (covolume barrier).
The consistency that Equation (1) provides is integrability: P, , B and the critical residuals derive from one potential, so the Maxwell relation between P and holds identically and the critical triplet and are those of one Helmholtz energy. Integrability does not imply thermal stability (), global phase stability or accuracy outside the data. Caloric properties require an ideal gas contribution that this work does not specify, and none is reported.
4.3. Implementation
The model, solvers and experiments are implemented in the package cpinn (Python 3.13.15 (Python Software Foundation, Beaverton, OR, USA), PyTorch 2.13.0+cpu (PyTorch Foundation) [24], double precision). The correction is a perceptron with two hidden layers of units (64 in the capacity study), tanh activations and inputs with reduced by the learned base temperature; its output layer is initialised at zero. Pressure, chemical potential (Equation (3)) and the residuals – (Equation (4)) are obtained by nested automatic differentiation with respect to , up to the fourth derivative of for ; the agreement of these derivatives with the closed-form PR expressions is part of X0. The critical point is located by damped Newton iteration on with an autograd Jacobian of , started from the PR critical point, from the anchor and from two displaced guesses; converged solutions with are counted, and the one reported is the lowest-temperature solution above the highest coexistence temperature observed. Saturation at a given T is obtained by Newton iteration on for the isobaric–isoactivity system, initialised from the reference densities, with rejection of the trivial solution and of mechanically unstable phases; no global common-tangent check is performed in the documented run; Section 4.6 describes the solver audit of the revision. The acentric factor is computed from the model’s own and when lies within the data and the solver converges there; otherwise, it is interpolated from the model’s own curve, and if that fails it is reported as missing (Table A6).
Training proceeds in two stages for every unit. Stage 1 fits the PR base alone (; learnable , , ) with Adam [25] (1500 steps, cosine schedule, initial rate ) followed by L-BFGS [26] (300 iterations, strong-Wolfe line search). The initial is read from the data as when lies within the data and is set to 0.30 otherwise (the case of CO2, whose data start above ); the initial are displaced within the PR family so that . Stage 2 activates the correction from the Stage-1 state (3000 Adam steps, 300 L-BFGS iterations) with or without the critical anchor. Loss weights are , , , and unless stated; is swept in the real-fluid study. Gradients are clipped at norm 10; the complete list of hyperparameters is in Appendix C. Optional gradient-norm balancing of the loss terms [27] is evaluated in the noise study.
Four trained configurations are compared: PR, learned (Stage 1 only); PR + critical anchor (Stage 1 with , no correction); hybrid, no anchor (Stage 2, ); and hybrid + critical anchor (Stage 2, ). Three untrained comparators are evaluated post hoc (Section 4.9).
4.4. Data and Provenance
4.4.1. Synthetic Truths
To test H1 with a known , we use three two-parameter cubic EoS as ground truth (“synthetic truths”). All have the form , which is the Patel–Teja (PT) EoS [28] with its third constant set to ; gives SRK and gives PR. The truths are (i) SRK (, ) with the Soave function , [17]; (ii) PT-0.270, the cubic with , for which ; and (iii) PT-0.240, with and (close to water, ); the two PT truths use the PR function of Equation (2). All three have , and in . The values of , and for each k follow from the critical conditions and are computed by analysis/cubic_truths.py, which reproduces the 40 stored saturation points of each truth to a relative deviation below . The truth’s acentric factor is computed from its own saturation curve. Forty saturation points in are generated by successive substitution on the fugacity coefficients; Gaussian relative noise of 0.5 and 1% in (half that in the densities) is added in the noise study.
4.4.2. Real Fluids
Eight fluids spanning –0.277 and –0.56 were taken from the NIST Chemistry WebBook, Standard Reference Database (SRD) 69 (NIST, Gaithersburg, MD, USA) [29], whose saturation tables are computed from a reference multiparameter EoS for each fluid (IAPWS-95 for water [12], Span–Wagner for CO2 [13] and, as established during the revision, the EoS of Gao et al. for ammonia [21], whose values reproduce the 481 downloaded ammonia points to in and in ; the EoS behind the other five tables were not individually verified and are cited through the WebBook). Tables of 600 rows from the triple point to the critical point were downloaded programmatically (fluid.cgi, type SatT; the request URL and date are stored for every fluid) and restricted to , giving 460–489 points per fluid; the configuration parameter n = 40 applies to the synthetic curves only and plays no part in the real-fluid tables. The critical constants used as anchors are values packaged with the code from Reference Fluid Thermodynamic and Transport Properties Database (REFPROP)/NIST tabulations; the run recorded them as “not confirmed online”, and the comparison with the downloaded tables in Appendix B shows them consistent with the table’s end point for seven fluids and inconsistent for ammonia, whose table extends above the packaged . The manuscript therefore does not claim that anchor and curve come from the same EoS for every fluid in the documented run. For ammonia the packaged constants (, , mol L−1) belong to an older formulation, whereas the table was generated with the EoS of Gao et al. (, , mol L−1) [21]; the revision run R1 retrains ammonia with the anchor harmonised to the latter (Section 4.6). A cross-check against CoolProp 8.0 (open-source CoolProp project) [20] gives identical values (to 0.01%) for water, CO2, R-134a, propane and benzene and differences for n-hexane, methanol and ammonia (Appendix B).
4.5. Hypotheses, Decision Rules and Experimental Programme
The hypotheses were written, with their falsifiers, in the configuration archived before the run (config_usada.json, time-stamped by the run log); no independent registration exists. Their decision rules were sharpened during revision, before the rules were applied to the results, in the way stated here.
Hypothesis 1
(H1, critical consistency). With , the hybrid model reproduces , and of a fluid with to better than 1% each (mean over seeds of , per fluid) and reduces by at least 50% relative to PR with learned constants. Falsifier: failure of the threshold in two or more fluids, or no reduction of in a paired comparison over fluids. The two clauses are reported separately, per fluid and per seed unit, at each anchor weight.
Hypothesis 2
(H2, no degradation of the envelope). At some anchor weight, the critical anchor degrades the RMSRE of by at most one percentage point relative to the unanchored hybrid, as non-inferiority: the one-sided 95% upper confidence bound of the mean difference over fluids lies below one point. Falsifier: no anchor weight meets the bound. The anchor weight is chosen after the sweep, so the test is confirmatory only for a weight fixed in advance; here it is descriptive for , which was selected on the same data.
Conjecture 1
(Identifiability of from subcritical data). Without the anchor, the information on carried by saturation data truncated at decays with , so that the error in grows monotonically as decreases. Falsifier: a non-monotonic dependence for a truth.
Experimental Programme
Table 15 summarises the programme and Table 16 the decisions. A seventh experiment (graph encoder conditioning with leave-one-fluid-out validation) was scheduled and skipped by the orchestrator because the chemistry toolkit was not installed on the computing node; it is not reported and no claim depends on it.
Table 15.
Experiments of the documented run. All units use three seeds unless stated.
Table 16.
Decision table for the hypotheses, applied to the results of X4 and X2.
4.6. Revision Run R1: Harmonised Ammonia Anchor, Solver Audit and Gas-Phase Diagnostics
Three questions raised in review required new training: whether the inconsistency of the ammonia anchor drives that fluid’s results, whether the failures of the evaluation solver at low reduced temperature belong to the solver or to the models, and how the models behave in the dilute and supercritical gas. The documented run stored per-unit records and coexistence curves but not the network weights, so its models could not be re-evaluated. R1 therefore re-implements the model of Equation (1), the loss of Equation (5) and the two-stage training of Section 4.3 in a stand-alone script (revision/cpinn_rev.py; PyTorch 2.15, double precision, one thread per unit) with the hyperparameters of Appendix C. The equivalence with cpinn was checked on the deterministic Stage 1. On the 481 ammonia points of the documented run, the re-implemented loss evaluated at the stored Stage-1 constants equals the stored final loss, , to 15 significant digits, and the re-implemented Stage 1 converges to base constants that differ from the stored ones by at most in relative terms (, , ), with an RMSRE in of 3.757% (stored: 3.757%). Hybrid units differ from those of the documented run in the random initialisation of the network, so R1 results are compared with each other and with X4 only at the level of means.
R1-A, harmonised ammonia anchor. The 481 ammonia points of X4 are kept. Two anchors are compared: the legacy packaged constants of the documented run and the constants of the EoS of Gao et al. [21] that generated the table (, , mol L−1, read from CoolProp 8.0 [20]). The configurations are PR with learned constants (1 unit), the unanchored hybrid (3 seeds) and the anchored hybrid at and 10 with each anchor (12 units). The critical triplet of every unit is evaluated against the harmonised constants, which belong to the EoS behind the data; for the legacy-anchored units the errors against their own anchor are also recorded.
R1-B, solver audit. Every R1 model is evaluated at its training temperatures by two saturation solvers. The legacy-type solver reproduces the procedure of the documented run (Newton iteration on initialised from the reference densities, with rejection of the trivial root and of mechanically unstable phases). The model-intrinsic solver uses no reference density: temperatures are processed from the highest to the lowest and each Newton solve starts from the solution at the previous temperature; if that fails, the van der Waals loop of the model isotherm is located on 1800 packing fractions in , and Newton starts from the vapour and liquid roots, at a common pressure between the two spinodal pressures, with the smallest difference in chemical potential; the reference densities are tried last. Every converged pair is submitted to a global tangent-plane test on its isotherm: with , the function , proportional to the molar Gibbs energy at pressure up to a function of T, must satisfy on 4800 points in ; a violation would show that the computed pair is metastable or unstable with respect to a third density. Besides the 16 units of R1-A, the audit retrains the cases with the lowest coverage in the documented run: the anchored hybrid on the SRK truth at (77.5% coverage in X1, 3 seeds) and the unanchored hybrid on the same truth (1 seed), the anchored hybrid on PT-0.240 at (90.0%, 2 seeds), benzene at (93.0% minimum in X4, 2 seeds) and methanol at (94.3% minimum, 2 seeds). The data of these units are the stored training curves of the corresponding X1 and X4 units.
R1-C, gas-phase diagnostics. For every R1-A unit, from Equation (3) is compared at , 1.0, 1.5 and 2.0 with the value of the Gao EoS, obtained as at mol m−3, and the pressure is compared with that EoS along the supercritical isotherms , 1.5 and 2.0 for . The coexistence curve of each unit is also continued from to the model’s own critical point at 25 temperatures with the model-intrinsic solver, which provides complete envelopes and the phase diagram of Section 2.11. The scripts, the trained weights and the per-unit records of R1 (26 units) are supplied in the Supplementary Materials.
4.7. Metrics and Statistical Protocol
All error metrics of this work are relative and dimensionless and are reported in percent; the only absolute error is that of the dimensionless acentric factor. For a scalar property of one training unit the signed relative deviation is
Aggregated over fluids (or truths) and seeds , the mean absolute relative error is
which is the quantity often called the mean absolute percentage error (MAPE). For a property evaluated at the temperatures at which the saturation solver converged, the root mean square relative error of one unit is
and tables and text report its mean over seeds and fluids. Neither quantity carries the unit of X or Y; the term mean absolute error (MAE), which would carry that unit, is not used. Metrics are therefore for , , and , the absolute error , the RMSREs of , and over the evaluation points at which the saturation solver converged (coverage and the RMSRE over the common support of the compared models are reported together), the number of distinct solutions of detected by the multi-start solver, and at the located critical point. The estimand of every MARE is Equation (9), the mean over fluids (or truths) of the mean over seeds of ; signed means and standard deviations over seeds are reported for experiments X1 and X4 to separate bias from dispersion. The inferential unit for real fluids is the fluid (), with seeds as nested replicates; for synthetic truths it is the truth (), so seed-level tests are reported as nested information only. Paired differences between models are summarised by their mean with a percentile bootstrap 95% confidence interval (20,000 resamples over fluids), by the number of fluids in which one model is better, and by the two-sided exact Wilcoxon signed-rank p-value, adjusted by Holm’s method over the six metrics of each comparison. The non-inferiority bound of H2 uses the one-sided 95% upper limit of the mean difference from the t distribution with seven degrees of freedom, cross-checked with the bootstrap. All statistics are computed by the analysis script from the per-unit records.
4.8. Computational Protocol
The run was executed on one workstation (AMD64 Family 23 Model 49 processor (Advanced Micro Devices, Inc., Santa Clara, CA, USA), 64 logical and an estimated 32 physical cores; memory not recorded) under Windows (build 20348, Microsoft Corporation, Redmond, WA, USA), with 31 worker processes of two PyTorch threads each; the 276 units took min of wall-clock time and 19.6 process-hours. Parallelism was applied at the level of units and the run used the central processing unit (CPU) only; no graphics processing unit (GPU) benchmark was performed. Seeds, software versions, configuration, per-unit logs, training histories, evaluated coexistence curves and result records are supplied in the Supplementary Materials.
4.9. Post Hoc Analyses
After the results of the programme had been examined, the following analyses were added; they use only the per-unit files written during the run and involve no new training. (i) A single estimand (MARE, Equation (9)) was applied to every table and statement, and the inference protocol above was applied to the eight fluids. (ii) Three untrained comparators were evaluated on the evaluation temperatures of each fluid with the same metrics: PR with the packaged reference constants, PR translated by (critical triplet exact), and PR translated by the shift that matches the reference saturated liquid density at the evaluation temperature closest to . (iii) Coverage of the evaluation solver was tabulated per unit and the RMSREs were recomputed on the common support. (iv) The RMSREs of , and were recomputed in six bins of reduced temperature. (v) The trained , , and over the prior grid were tabulated per unit, and the number of units with was counted. (vi) was regressed on over three windows (, , ) with the model’s own and with the reference ; the slope of the reference vapour pressure curve was obtained by the same regression over ; and was regressed on over the 96 anchored units. (vii) The stored , and were compared with CoolProp 8.0 [20]; the reference values, in m3 mol−1, and the EoS identifier returned by the library for each fluid are cached with the script. (viii) The loss terms recorded during training were plotted for one unit and summarised over the anchored units, and the wall-clock times were tabulated. All eight are implemented in analysis/make_figures.py, which regenerates every figure, table and statistic of this manuscript from the released per-unit files without network access and fails explicitly if a file is missing.
5. Conclusions
A hybrid residual Helmholtz energy with Peng–Robinson as an exact limit and the classical critical conditions as an anchor of the training objective has been calibrated for three synthetic cubic truths and eight reference fluids, and the calibration has been measured against five comparators with one estimand and paired inference over fluids. The refitted PR cannot leave the surface (Proposition 3); it errs by 14.74% in on average (MARE), the error does not move with the data window, and PR pinned to the reference critical point loses the envelope. The unanchored correction fits the envelope to an RMSRE of 0.46% in and leaves to the initialisation, with spreads of up to 22% that no truncation of the data in X2 removes. The anchored correction at reproduces , and to MAREs of 0.09, 0.86 and 0.32% and to a mean absolute deviation of 0.009, fits , and to RMSREs of 1.05, 0.53 and 1.10%, and does so within a one-point margin of the unanchored hybrid for seven of eight fluids. It loses 0.22 points of to PR with reference constants, which in turn has liquid density errors 20 times larger, and it is the only model of the comparison that holds and the RMSRE in below 1% at once; volume translation cannot, because PR’s volume error differs in size and sign between the critical point and the liquid branch. H1 holds for seven fluids at and for eight at ; H2 holds at and fails at ; the identifiability conjecture is rejected. Retrained with an anchor harmonised to the EoS behind its table, ammonia loses a 3.7% offset in and half of its liquid density error and keeps its cost in , and the X4 conclusions hold without ammonia.
The exploratory analyses bound what the calibrated models are. Their decomposition into base and correction is degenerate while their predictions are reproducible, so only derived quantities carry meaning. Their critical isotherm is flatter in the pressure–density plane than that of PR, as flat as the sampled strict criticality term allows for real fluids and classical for cubic truths, with of 0.6–1.0 against 1.7 for PR and an effective coexistence exponent of 0.363 against 0.339 for the reference EoS; the sampled penalty is weaker than its continuous form, so this flattening is bounded by the loss as much as by the data. The residual error in tracks the error in with a slope near Riedel’s parameter. The second virial coefficient is unconstrained by saturation data and degrades with the anchor weight above ; on supercritical isotherms of ammonia at the anchored models deviate by 13–41% in pressure. The models are calibrated for saturated states and the critical point and are not to be used for dilute or supercritical gas properties without further constraints. The evaluation solver of the documented run fails below in four of 24 anchored units on real fluids and more often on synthetic truths; retrained models of the worst cases converge at every temperature with a model-intrinsic solver and pass a global tangent-plane test, which places the failures in the solver and not in the models.
The next run is defined by what this one could not settle: anchors harmonised with the EoS behind each table for all eight fluids (done here for ammonia), a held-out protocol with blocks of temperatures that include the near-critical band, the model-intrinsic evaluation solver with its tangent-plane test applied to every unit, a three-parameter cubic and a polynomial correction as comparators, an anchor on the second virial coefficient or an prefactor to extend the domain of validity to the gas, a temperature-derivative term at the critical point, and sensitivity profiles of in place of seed dispersion. Prediction for molecules absent from training requires the molecular encoder, held-out molecules and constants that never enter the inputs or the normalisation; the encoder exists in the released package and its claim remains untested.
Supplementary Materials
The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/ijms272310720/s1, The submitted package contains the supporting files for the original run and revision run R1.
Author Contributions
Conceptualisation, L.R.-V., P.R. and J.G.; methodology, L.R.-V., V.B., P.R. and J.G.; software, L.R.-V. and L.R.; formal analysis, L.R.-V. and V.B.; validation, L.R.-V., V.B., P.R. and J.G.; investigation, L.R.-V., L.R. and V.B.; resources, P.R. and J.G.; data curation, L.R.-V. and L.R.; writing—original draft preparation, L.R.-V.; writing—review and editing, L.R.-V., L.R., V.B., P.R. and J.G.; visualization, L.R.-V. and L.R.; supervision, P.R. and J.G.; project administration, P.R. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable. This computational study did not involve humans or animals.
Informed Consent Statement
Not applicable.
Data Availability Statement
All results analysed in this study were produced by the supplied code in two documented runs: the original run (276 training units, experiments X0–X5) and, as a second run, the revision run R1 (26 training units, Section 4.6), which retrains ammonia with the harmonised anchor (R1-A), audits the saturation solver (R1-B) and evaluates the models in the supercritical and dilute gas (R1-C). For both runs the configuration, seeds, environment and per-unit outputs are released in full. The reference-fluid saturation data and the critical constants used as anchors in the original run were obtained from the NIST Chemistry WebBook, SRD 69 [29], and the reference values of the second virial coefficient from CoolProp 8.0 [20]; both are public and their provenance is recorded per fluid. No confidential, proprietary or third-party experimental data set was used, and the molecule-conditioned experiment X6 was not executed. The package includes analysis and revision-run code, frozen configuration, per-unit result records, training histories, coexistence curves, cached reference values, figure and table scripts and this manuscript’s sources. An immutable copy of the archive with a persistent identifier will be deposited upon acceptance. The second run, revision run R1 (scripts, re-implemented model, trained weights, per-unit records and the derived tables and figure), is released in the folder revision/ of the submitted package; it uses the 481 ammonia points and the stored training curves of the original documented run, and the constants of the EoS of Gao et al. [21] as implemented in CoolProp 8.0 [20]. The public data archive is available at https://github.com/luisrojasvaldivia-sudo/Critical-Point-Informed-Neural-Helmholtz-Equations-of-State (accessed on 18 November 2026).
Acknowledgments
The authors thank the Pontificia Universidad Católica de Valparaíso and its Escuela de Ingeniería Química for institutional support, and GMT Group for access to its computing infrastructure. Luis Rios thanks the Agencia Chilena de Cooperación Internacional para el Desarrollo (AGCID), Chile, 2023 South–South Cooperation Scholarship Program and Doctorado en Industria Inteligente, Facultad de Ingeniería, Pontificia Universidad Católica de Valparaíso for the support provided. Pedro Robles thanks the Pontificia Universidad Católica de Valparaíso for the support provided. The run reported here was executed on one workstation with an AMD processor of 64 logical threads (recorded by the run as AMD64 Family 23 Model 49, with 32 physical cores estimated and memory not measured); no other machine contributed to the reported results. During manuscript preparation, the authors used Claude Opus 5.5 (Anthropic) and GPT-5 (OpenAI) for language editing, formatting and bibliographic checks. During proof correction, ChatGPT (GPT-5, OpenAI) also assisted with cross-reference checks and with changes to the Python code for the labels and legend in Figure 10. The authors take full responsibility for the content of this publication.
Conflicts of Interest
Luis Rojas-Valdivia serves as CEO of GMT Group, which provided access to computing infrastructure for this study. The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| AD | Automatic differentiation |
| AGCID | Agencia Chilena de Cooperación Internacional para el Desarrollo |
| CI | Confidence interval |
| CPA | Cubic-plus-association equation of state |
| CPU | Central processing unit |
| DIPPR | Design Institute for Physical Properties |
| EoS | Equation of state |
| GPU | Graphics processing unit |
| IAPWS | International Association for the Properties of Water and Steam |
| IUPAC | International Union of Pure and Applied Chemistry |
| L-BFGS | Limited-memory Broyden–Fletcher–Goldfarb–Shanno algorithm |
| MAPE | Mean absolute percentage error |
| MARE | Mean absolute relative error, Equation (9); dimensionless, in % |
| ML | Machine learning |
| NIST | National Institute of Standards and Technology |
| PC-SAFT | Perturbed-chain statistical associating fluid theory |
| PR | Peng–Robinson equation of state |
| REFPROP | Reference Fluid Thermodynamic and Transport Properties Database |
| PT | Patel–Teja-type cubic equation of state () |
| R1 | Revision run (Section 4.6) |
| rms | Root mean square |
| RMSRE | Root mean square relative error, Equation (10); dimensionless, in % |
| SAFT | Statistical associating fluid theory |
| s.d. | Standard deviation |
| SMILES | Simplified molecular-input line-entry system |
| SRD | Standard Reference Database |
| SRK | Soave–Redlich–Kwong equation of state |
| vdW | van der Waals equation of state |
Appendix A. Formal Results and Proofs
This appendix proves the propositions stated in Section 4.1 and records the limit of Proposition 4.
Proof of Proposition 1.
Proof of Proposition 2.
Write . If is bounded on then as , and because . For Z one needs , which holds if is bounded on ; boundedness of alone does not give it. A finite tanh network is infinitely differentiable, with bounded derivatives on any compact set of inputs, so both conditions hold. Then , and . □
Proof of Proposition 3.
For PR with any constants, at its own critical point, so the reachable set is contained in the surface; the surface is reached, since are free. Dividing by gives , so the three errors cannot all vanish when the ratio differs from one. If the critical point is pinned to then and , i.e., , and as whatever is. □
Proof of Proposition 4.
On the isotherm the hypothesis with gives for every in the domain, so is the only zero of on that isotherm, and in particular the only point of it at which . For the second claim, expand around on the isotherm: with and continuous, . Dividing the hypothesis by and letting gives . Once is fixed, , and from are functions of . □
- Limit of Proposition 4. The proposition says nothing about other isotherms. A smooth residual energy with for all and two points at which and , one at and one above it, can be written down in closed form (the construction, communicated during review, uses with , which is PR plus a bounded smooth correction on any compact domain with ); it satisfies every hypothesis above. Global uniqueness over the domain therefore requires additional assumptions, for instance strict positivity of above , which a penalty of the form does not impose. In this work the hypotheses are imposed as penalties sampled at 15 densities on three isotherms, and uniqueness is screened by counting the solutions found by a multi-start solver; neither is a certificate. The quantitative consequence of the factor two is reported in Section 2.9: with , the continuous inequality would need at the anchor, and 21 of 24 anchored units at have at the critical point they locate.
Appendix B. Reference Fluids and Data Provenance
Saturation tables were downloaded from the NIST Chemistry WebBook, SRD 69 [29] (fluid.cgi, Type=SatT, units K, MPa, mol L−1, 600 rows from the triple point to the critical point); the complete request URL and the retrieval date of each download are stored with the results. The critical constants used as anchors are the values packaged in cpinn/data_nist.py from REFPROP/NIST tabulations; the run recorded their provenance as “packaged reference values, not confirmed online”. Table A1 compares, for each fluid, the packaged with the last temperature of the downloaded table and with the constants of the EoS implemented in CoolProp 8.0 [20], whose identifier the library reports. For seven fluids, the table ends at (methanol at ), consistent with a table generated from an EoS whose equals the packaged value, which is evidence of consistency and not a verification. For ammonia, the table extends to K, above the packaged : the table was generated from an EoS with a higher critical temperature, and the packaged constants (, , mol L−1) belong to an older formulation. CoolProp’s ammonia EoS (Gao et al. [21], as identified by the library) gives , and higher by 0.04, 0.26 and 3.66%. The anchor and the training data of ammonia are therefore from different EoS, and its results carry that inconsistency; the training window excludes the rows above the packaged , so the inconsistency sits in the anchor and leaves the data untouched. During the revision the EoS of the table was identified: the EoS of Gao et al. [21] (identifier Gao-JPCRD-2020 in CoolProp 8.0) reproduces the 481 training points to in and in , and its places the last row of the table at , the ratio found for the other seven tables. The harmonised anchor of R1-A uses the critical constants of that EoS (Section 2.6). For water, CO2, R-134a, benzene and propane the CoolProp constants agree with the packaged ones to 0.01% or better; for n-hexane CoolProp’s EoS gives higher by 0.33%, and for methanol , and higher by 0.15, 1.39 and 2.15%, without a visible inconsistency between the packaged and the WebBook table. The EoS behind the WebBook tables of n-hexane, methanol, R-134a, propane and benzene were not verified individually; they are cited through the WebBook.
Table A1.
Provenance check per fluid: packaged critical temperature, last temperature of the downloaded WebBook table, their ratio, differences of the CoolProp 8.0 critical constants and acentric factor relative to the packaged values, and the EoS identifier reported by CoolProp.
The reference values of the second virial coefficient used in Section 2.10 were computed with CoolProp 8.0 from the EoS listed in Table A1; for ammonia and n-hexane these are more recent than the EoS behind the WebBook tables, so the virial comparison for these two fluids carries an additional, unquantified EoS-to-EoS difference. Table A2 lists the error of PR evaluated with the packaged constants and no fitting over the complete downloaded table, the starting point that Stage 1 improves; the same model on the evaluation window is in Table 9.
Table A2.
PR with packaged constants, no fitting: RMSREs over the complete downloaded table (triple point to ).
Appendix C. Hyperparameters
Stage 1 (PR base): Adam, 1500 steps, learning rate with cosine decay to , then L-BFGS 300 iterations (rate 0.5, strong-Wolfe line search, history 50). Stage 2 (hybrid): Adam 3000 steps and L-BFGS 300 iterations with the same settings; separate parameter groups for the base constants and the network. Network: two hidden layers of 32 units (64 in X5), tanh, inputs with (learned base temperature) and (learned covolume), zero-initialised output layer. Loss weights: , (default; 1, , in the sweep), , , ; (see Proposition 4 for the factor two between the two); prior grid ( points); strict criticality isotherm grid (15 points) at , and , with the reference value of the anchor. Gradient clipping at norm 10; double precision throughout; seeds 0, 1, 2. Covolume barrier: points with excluded, penalty . Initialisation: from the data at when that temperature lies within the data, 0.30 otherwise (CO2); displaced within the PR family so that . The configuration parameter nist.n = 40 is unused for downloaded tables, which keep every row within . Multi-start critical solver: four starts (PR critical point, anchor, two displaced guesses), damped Newton on , tolerance on . Evaluation saturation solver: Newton on initialised from the reference densities, with rejection of the trivial root and of mechanically unstable phases. Revision run R1 (Section 4.6): the same settings, re-implemented in revision/cpinn_rev.py (PyTorch 2.15, one thread per unit); model-intrinsic saturation solver with continuation from high to low temperature, spinodal-bracketed initialisation on 1800 packing fractions in , Newton tolerance , acceptance tolerance on the pressure and chemical potential residuals, and a tangent-plane test on 4800 packing fractions in .
Appendix D. Additional Numerical Results
Table A3.
X2: identifiability study (mean ± s.d. over three seeds of the absolute relative errors , in %; evaluation on the full curve, so that temperatures above are held out).
Table A4.
X5: anchored hybrid on the PT-0.270 truth () with noise in (half that level in the densities).
Table A5.
X4: RMSREs (%) along the coexistence curve in bins of reduced temperature (all fluids and seeds), and the fraction of temperatures in each bin at which the evaluation saturation solver converged; data of Figure 7.
Table A6.
X4: number of seeds (of three) for which the acentric factor could be evaluated, per fluid and model. CO2 fails because lies below its triple point.
Table A7.
X4: effective order-parameter exponent from in three windows of reduced temperature, with the model’s own and with the reference (mean over fluids and seeds). For PR, the fit with the reference is dominated by its displaced critical temperature and is shown for completeness only.
Table A8.
Wall-clock time per training unit (two PyTorch threads per process) by experiment and model.
References
- Bounaceur, R.; Paes, F.; Privat, R.; Jaubert, J.N. AI-powered prediction of critical properties and boiling points: A hybrid ensemble learning and QSPR approach. J. Cheminform. 2025, 17, 132. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Biswas, S.; Chung, Y.; Ramirez, J.; Wu, H.; Green, W.H. Predicting Critical Properties and Acentric Factors of Fluids Using Multitask Machine Learning. J. Chem. Inf. Model. 2023, 63, 4574–4588. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Agbodekhe, B.P.; Carlozo, M.N.; Abranches, D.O.; Jones, K.D.; Dowling, A.W.; Maginn, E.J. Enhanced thermophysical property prediction with uncertainty quantification using group contribution-Gaussian process regression. Mol. Syst. Des. Eng. 2025, 11, 85–106. [Google Scholar] [CrossRef] [Scilit]
- Chaparro, G.; Müller, E.A. Development of thermodynamically consistent machine-learning equations of state: Application to the Mie fluid. J. Chem. Phys. 2023, 158, 184505. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chaparro, G.; Müller, E.A. Development of a Helmholtz free energy equation of state for fluid and solid phases via artificial neural networks. Commun. Phys. 2024, 7, 406. [Google Scholar] [CrossRef] [Scilit]
- Kevrekidis, G.A.; Serino, D.A.; Kaltenborn, M.A.R.; Gammel, J.T.; Burby, J.W.; Klasky, M.L. Neural network representations of multiphase equations of state. Sci. Rep. 2024, 14, 30288. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kuang, D.; Li, S.; Wang, B.; Xiong, C.; Zhang, S.; Zhang, Y. Joint learning equation of state surfaces with uncertainty-aware physically regularized neural networks. Sci. Rep. 2025, 15, 27046. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rittig, J.G.; Felton, K.C.; Lapkin, A.A.; Mitsos, A. Gibbs–Duhem-informed neural networks for binary activity coefficient prediction. Digit. Discov. 2023, 2, 1752–1767. [Google Scholar] [CrossRef] [Scilit]
- Rittig, J.G.; Mitsos, A. Thermodynamics-consistent graph neural networks. Chem. Sci. 2024, 15, 18504–18512. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Winter, B.; Rehner, P.; Esper, T.; Schilling, J.; Bardow, A. Understanding the language of molecules: Predicting pure component parameters for the PC-SAFT equation of state from SMILES. Digit. Discov. 2025, 4, 1142. [Google Scholar] [CrossRef] [Scilit]
- Jirasek, F.; Hasse, H. Perspective: Machine Learning of Thermophysical Properties. Fluid Phase Equilib. 2021, 549, 113206. [Google Scholar] [CrossRef] [Scilit]
- Wagner, W.; Pruß, A. The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use. J. Phys. Chem. Ref. Data 2002, 31, 387–535. [Google Scholar] [CrossRef] [Scilit]
- Span, R.; Wagner, W. A New Equation of State for Carbon Dioxide Covering the Fluid Region from the Triple-Point Temperature to 1100 K at Pressures up to 800 MPa. J. Phys. Chem. Ref. Data 1996, 25, 1509–1596. [Google Scholar] [CrossRef] [Scilit]
- Kaplun, A.B.; Meshalkin, A.B. Thermodynamic Validation of the Form of Unified Equation of State for Liquid and Gas. High Temp. 2003, 41, 319–326. [Google Scholar] [CrossRef] [Scilit]
- Apfelbaum, E.M.; Vorob’ev, V.S. Universal Equation of State for Critical and Supercritical Regions. High Temp. 2022, 60, S339–S346. [Google Scholar] [CrossRef] [Scilit]
- Ustyuzhanin, E.E.; Rykov, S.V.; Ochkov, V.F.; Rykov, V.A.; Boyarskikh, K.A.; Kudryavtseva, I.V.; Khishchenko, K.V. Comparative Study of Scaling Equations Describing the Density of SF6 on the Saturation Line. Bull. Russ. Acad. Sci. Phys. 2025, 89, 2118–2123. [Google Scholar] [CrossRef] [Scilit]
- Soave, G. Equilibrium constants from a modified Redlich–Kwong equation of state. Chem. Eng. Sci. 1972, 27, 1197–1203. [Google Scholar] [CrossRef] [Scilit]
- Peng, D.Y.; Robinson, D.B. A New Two-Constant Equation of State. Ind. Eng. Chem. Fundam. 1976, 15, 59–64. [Google Scholar] [CrossRef] [Scilit]
- Sengers, J.V.; Levelt Sengers, J.M.H. Thermodynamic behavior of fluids near the critical point. Annu. Rev. Phys. Chem. 1986, 37, 189–222. [Google Scholar] [CrossRef]
- Bell, I.H.; Wronski, J.; Quoilin, S.; Lemort, V. Pure and Pseudo-pure Fluid Thermophysical Property Evaluation and the Open-Source Thermophysical Property Library CoolProp. Ind. Eng. Chem. Res. 2014, 53, 2498–2508. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gao, K.; Wu, J.; Bell, I.H.; Harvey, A.H.; Lemmon, E.W. A Reference Equation of State with an Associating Term for the Thermodynamic Properties of Ammonia. J. Phys. Chem. Ref. Data 2023, 52, 013102. [Google Scholar] [CrossRef] [Scilit]
- Riedel, L. Eine neue universelle Dampfdruckformel. Untersuchungen über eine Erweiterung des Theorems der übereinstimmenden Zustände. Teil I. Chem. Ing. Tech. 1954, 26, 83–89. [Google Scholar] [CrossRef] [Scilit]
- International Union of Pure and Applied Chemistry. Helmholtz energy. In IUPAC Compendium of Chemical Terminology (the “Gold Book”), 5th ed.; online version 5.0.0; International Union of Pure and Applied Chemistry: Zürich, Switzerland, 2025. [Google Scholar] [CrossRef] [Scilit]
- Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Proceedings of the Advances in Neural Information Processing Systems 32, Vancouver, BC, Canada, 8–14 December 2019; Curran Associates, Inc.: Red Hook, NY, USA, 2019; pp. 8024–8035. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Liu, D.C.; Nocedal, J. On the limited memory BFGS method for large scale optimization. Math. Program. 1989, 45, 503–528. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Teng, Y.; Perdikaris, P. Understanding and Mitigating Gradient Flow Pathologies in Physics-Informed Neural Networks. SIAM J. Sci. Comput. 2021, 43, A3055–A3081. [Google Scholar] [CrossRef] [Scilit]
- Patel, N.C.; Teja, A.S. A New Cubic Equation of State for Fluids and Fluid Mixtures. Chem. Eng. Sci. 1982, 37, 463–473. [Google Scholar] [CrossRef] [Scilit]
- Lemmon, E.W.; McLinden, M.O.; Friend, D.G. Thermophysical Properties of Fluid Systems. In NIST Chemistry WebBook, NIST Standard Reference Database Number 69; Linstrom, P.J., Mallard, W.G., Eds.; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2026. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.












