Multi-fluid Solver â Tier-1 Fluid Layer Validation
This page exercises the new Tier-1 multi-fluid solver fluid layer live in the browser, calling the public /api/v1/fluid-layer compute surface. Two capabilities are demonstrated: flash-based phase detection (resolve a fluid and determine its phase / quality / density / viscosity at a given P, T) and the marching kernel (integrate an optionally-heated pipe segment-by-segment, detecting phase change and tracking the vapor-fraction profile along its length). Together these are the foundational building blocks for FluidFlow-class compressible and two-phase pipe-flow analysis.
Resolve a fluid and flash it at (P, T). The fluid layer returns the equilibrium phase, vapor fraction (quality), density and viscosity. Try waterat 1.01325 bar / 298.15 K (liquid, Ï â 997) and at 500 K (vapor).
component name (e.g. water)
absolute pressure; sent as Pa
absolute temperature
March an optionally-heated pipe segment-by-segment from the inlet state, detecting phase change along the length. The default case (water, L=20 m, D=0.05 m, áđ=0.05 kg/s, q=5000 W/m, Tin=370 K) boils the stream and reaches outlet quality â 0.85. For a genuine two-phase inlet set an inlet quality; an inclination drives the two-phase Ïinsitu·g·sin Îļ static head â try the vertical wet-steam riser preset.
component name
sent as Pa
blank = single-phase; 0â1 = wet inlet
+up; 90 = vertical
two-phase model
2â400
The same 1e-10-validated head-based GGA, now solving an incompressible non-Newtonian network â no new solver. A fixed looped branch network is solved twice: as water (Newtonian) and as a Bingham slurry with a yield stress. The friction viscosity is routed through a RheologyFluidProvider (Ξapp(ÎģĖ) = Ïy/ÎģĖ + Ξp). The yield stress raises the pressure gradient and shifts the flow split.
0 â Newtonian
Register case A8 is closed: a compressible nitrogen + TCV net now routes to the marching engine (not the incompressible GGA). The valve is modelled as an IEC 60534-2-1 gas throttle (real-gas EOS density, xT choke factor, Y expansion factor). Isenthalpic Joule-Thomson cooling is applied across the valve â Tout drops from Tin(real-gas JT coefficient). The valve chokes when x âĨ FÎģ·xT â critical flow, independent of downstream pressure, with Y pinned at 2â3 (IEC 60534 choked branch). Oracle: test_solve_valve_marching.
upstream of TCV
downstream of TCV
valve flow coefficient
Backend: backend/api/v1/endpoints/fluid_layer.py · deken_thermo fluid layer + core/marching/pipe_kernel.py · stateless, public, no auth.