3.2.0
-
DCA bug fixes:
dca.duong_cum— fixed linspace-inversion bug where cumulative volume integrated over a descending axis fort < 0.001(small-t inputs) and returned a negative value. Lower bound of the integration is nowmin(0.001, t * 0.001)so the grid is always ascending.dca.forecast— now validatesdt > 0,t_end > 0anduptimein(0, 1]at entry with clearValueErrormessages. Previouslydt = 0raised an opaqueZeroDivisionErrorand out-of-rangeuptimewas silently accepted.
-
Rachford-Rice solver consolidation:
simtools.rr_solveris now a thin wrapper that delegates to the canonicalpyrestoolbox.brine._lib_vle_engine.rr_solver(Nielsen & Lia 2022). Removes ~100 lines of duplicated iterative code plus the deadensure_numpy_arrayhelper. Inputs validated for length/sum before delegation; behaviour is preserved (EPS_T=1e-15,max_iter=100). -
Rust Sechenov fallback guard:
src/vle/mod.rs::flash_tp_rustno longer silently substitutes its S&W Eq 8ksfallback when a caller passes all-onesgammawithsalinity > 0. The caller-suppliedgammais now always trusted, eliminating any risk that Pythonframework='proposed'calls bypass the specialised Dubessy/Akinfiev/Li/Mao-Duan/Duan-Sunksmodels.calc_equilibrium_rustretains the S&W Eq 8 path but now carries a prominent doc warning. Python path unchanged (Python always passes the correctgamma). -
Convergence flag on
CO2_Brine_Mixture: New.convergedattribute on the class.Trueafter a successful Spycher-Pruess fugacity iteration,Falsewhen the 100-iteration limit is hit (matching the existingRuntimeWarning). Lets downstream callers detect non-convergence programmatically. -
sensitivity.tornadorobustness: RaisesValueErrorifbase_resultis not finite (NaN/Inf), and if anyranges[param]haslo > hi. Previously returnednanorinfsensitivities that silently corrupted tornado plots. -
layermodule dedup: Five copies of the EXP/LANG dispatch (B-clamp, flow-fraction evaluation) consolidated into three private helpers (_clamp_b,_b_max,_flow_fraction_at_x). No behaviour change. -
recommendmodule docstrings:sgonrecommend_gas_methodsandwell_typeonrecommend_vlp_methodare currently unused by the decision logic. Docstrings now flag them as reserved for future rules. Signatures preserved for backward compatibility. -
701 validation tests (up from 696 in 3.1.5).