The 3D scene solves the Peng-Robinson cubic-in-Z equation with a closed-form Cardano/trigonometric root formula and reports a single density number. This 2D companion solves the same equation of state by a completely different numerical method — Newton-Raphson iteration directly on the molar volume V, seeded near the co-volume b so it converges to the dense, liquid-like root:
f(V) = RT/(V−b) − aα(T)/(V²+2bV−b²) − P = 0
f'(V) = −RT/(V−b)² + aα(T)·(2V+2b)/(V²+2bV−b²)²
V ← V − f(V)/f'(V), repeated to convergence
Both methods are shown live side-by-side as "Z₁ — Newton-Raphson" and "Z₁ — closed-form cubic": a standalone Node verification (see below) confirms they agree to better than 1 part in 10¹² across the whole slider range, which is exactly what should happen for two independent numerical routes to the same equation of state.
The real payoff of solving for the full volume, not just one density number, is the P-v isotherm plot at the top of the canvas: it sweeps pressure at the current compressor-inlet temperature and plots real specific volume (Newton-solved) against the ideal-gas specific volume (v=RT/PM) at the same conditions. Near the CO2 critical point (31.1 °C, 7.38 MPa) the real isotherm bulges sharply inward of the ideal-gas line — that visible gap is the physical reason compression work drops in this cycle, shown as a shape instead of a single printed number.
The T-s diagram below it plots the six cycle stations using the same idealized cp/γ thermodynamic model as the 3D scene (so isentropic legs read as exactly vertical — verified: |Δs| < 10⁻⁹ J/kg/K on both the compression and expansion legs), letting you see recuperation and heat rejection as areas on the diagram rather than only as temperatures.
- Turbine inlet temperature / pressure ratio / recuperator effectiveness — same cycle parameters as the 3D scene; they reshape the T-s loop and shift net work and efficiency identically.
- Compressor inlet temperature — the critical one: push it toward 32 °C (just above Tc=31.1 °C) and watch the P-v bulge grow and the Newton/closed-form density readouts both climb together.