Validation/Compressible free-surface flow
A compressed ullage
A sealed tank whose gas space is squeezed like a piston, against p V^γ = constant with γ read out of the product’s own thermophysical properties.
Why this case
The compressible free-surface family — volume-of-fluid where at least one phase is compressible — had no reference behind it at all. The obvious cheap case for it would have been a still tank, and a still tank is exactly the wrong case: the incompressible solver next door passes that too, so a benchmark built on stillness would verify nothing about compressibility.
So the gas is squeezed and asked what it does. Seal the top of the product’s own tank, turn the floor into an inlet, and push water in at a fixed rate. The water is constant-density, so the gas space has nowhere to go: the ullage is compressed like a piston, halving in two seconds. A perfect gas compressed with no heat exchange follows p Vγ = constant, exactly, and γ is not a free parameter — it is read out of the Cp and molecular weight the application itself wrote.
| Physics | Compressible two-phase volume-of-fluid, laminar, with an energy equation |
|---|---|
| Tank | 1 × 0.8 × 0.4 m, sealed at the top, water to 0.4 m under 0.16 m³ of air |
| Drive | The floor is an inlet at 0.1 m/s — 0.04 m³/s over a 0.4 m² floor |
| Start | 101 325 Pa and 293.15 K, water 998.2 kg/m³ (rhoConst) |
| Gas | Cp 1007 J/kg·K, W 28.9, so R = 287.6977 and γ = 1.39996766 |
| Mesh | 40 × 32 × 16 (20 480 cells), with 20 × 16 × 8 and 60 × 48 × 24 alongside |
| Time | To 2.0 s at a fixed maximum step of 0.002 s |
| Reference | The adiabatic law for a perfect gas, p V^γ = constant, equivalently p^(1−γ)T^γ = constant, with γ = 1.39996766 from the Cp of 1007 J/kg·K and molecular weight of 28.9 the application itself wrote |
| Agreement | 378.18 K at the top of the tank against an isentropic 378.27 K — p(1−γ)Tγ out by 0.0361 % |
The exact statement
For a perfect gas compressed adiabatically and reversibly, entropy is constant and the state is tied together by
p / rho^gamma = constant equivalently p^(1-gamma) T^gamma = constant
with gamma = Cp / (Cp - R), R = RR / WBoth forms are used here. The temperature form is what the headline is measured on, because it needs only the pressure and temperature in a cell and no volume integral. The volume form is measured over the whole gas space and is discussed separately below, because for the whole space the law is not exact and this page does not pretend it is.
γ comes to 1.3999676573 from the product’s own Cp = 1007 J/kg·K and W = 28.9, which gives R = 287.6976684 J/kg·K. Nothing here is fetched from a table and nothing is fitted. The gas volume is likewise measured from the phase fraction at every write rather than inferred from the inflow rate, so the comparison does not depend on the tank actually filling at the speed it was asked to.
Where the law is exact, and where it is not
Compression heats the gas, and the liquid underneath it is at 293 K and takes that heat out through the interface. Wherever the water can reach, the compression is not adiabatic and the law is not the right reference. So the headline is measured on the top row of cells only — the gas in the tank that never comes within a thermal penetration depth of the liquid.
That choice has to be defended rather than assumed, because it stops being true if the cooled layer ever reaches the roof. At the end of the accepted run the cooled layer is five cells deep — row 25 of 32 sits at 339 K while rows 30 and 31 are both at 378.18 K. The guard is the temperature difference between the top two rows, and in the accepted run it is 0.00146 %. It is not decorative: it is what rejects the coarse mesh and the turbulence model the application stages, both below.
Result
| Mesh | Cells | Ullage squeezed | Top of tank at t = 2 s | Isentropic | p^(1−γ)T^γ | Gas mass |
|---|---|---|---|---|---|---|
| 40 × 32 × 16 | 20 480 | 49.893 % | 247 313 Pa, 378.18 K | 378.27 K | 0.0361 % | 0.117 % |
| 60 × 48 × 24 | 69 120 | 49.892 % | 251 572 Pa, 380.02 K | 380.12 K | 0.0375 % | 0.119 % |
The adiabat figure is flat between the two meshes — 0.0361 % against 0.0375 % for a three-and-a-half-fold increase in cell count. A discretisation error would fall; something that does not move under refinement is a residual elsewhere in the run, and this page reports it as flat rather than claiming to know which.
The gas mass is the check that cannot be talked round. The tank is sealed, so all of the gas is still in it or the run is not the run it claims to be. It moves by 0.117 %, 0.119 % and 0.122 % across the three meshes — the same number at every cell size, which is what says it is a property of the time integration and not of the mesh.
A third run is the same sealed tank with the inflow switched off, which is hydrostatic equilibrium and is judged on entirely different numbers: the water moves at 0.0239 % of √(g h), the surface sits 0.0012 % from where it was put, the pressure in the water is within 0.0616 % of ρgH of pullage + ρgh, and 0.0006 % of the gas moved. That last one matters — a compressible volume-of-fluid solver assembles pressure from p, p_rgh and two densities, and getting the reconstruction wrong is quiet.
The headline alone would verify a tank with no gas in it
The strongest thing on this page is not the 0.0361 %. It is what happens when the tank the application actually stages is put through the same measurement.
The staged top patch is an open atmosphere — a total-pressure condition on p_rgh, a pressure-inlet-outlet velocity, an inlet-outlet phase fraction. Water still enters and the gas space still halves, and the gas simply leaves through the roof.
Its top-row adiabat is better than the accepted run’s: 0.0343 % against 0.0361 %. Of course it is. Nothing at the top of that tank ever changes — the pressure stays at 101 325 Pa and the temperature at 293.15 K — so p(1−γ)Tγ sits on its initial value for the same reason a stopped clock is right twice a day. Every other local number looks healthy too: the ullage “compressed” 49.95 %, the top-row guard is clean, the phase fraction is bounded, the water is as still as the real run’s.
What it cannot hide is the integral. Half the gas is gone — 49.95 % of it — and p Vγ over the whole ullage is 62.05 % out. A benchmark resting on the headline alone would have reported this family verified against a tank with no ullage in it.
| Run | Cells | Top two rows | Adiabat, top row | Gas mass | Whole-ullage p V^γ |
|---|---|---|---|---|---|
| Accepted | 20 480 | 0.0015 % | 0.0361 % | 0.117 % | 7.23 % |
| Finer mesh | 69 120 | 0.0022 % | 0.0375 % | 0.119 % | 5.63 % |
| Coarse mesh | 2560 | 0.8837 % | 0.1183 % | 0.122 % | 11.05 % |
| Staged maxDeltaT | 20 480 | 0.0178 % | 0.1490 % | 0.431 % | 7.25 % |
| Staged kOmegaSST | 20 480 | 0.3764 % | 0.1960 % | 0.124 % | 11.84 % |
| Staged open top | 20 480 | 0.0129 % | 0.0343 % | 49.947 % | 62.05 % |
Two of those rows were not expected. The coarse mesh is the top-row guard finding its own case: on 20 × 16 × 8 the cooled gas reaches the top row of cells, the two top rows come out 0.88 % apart in temperature, and the run stops being evidence about the adiabatic law at all — it becomes evidence about where the cooled layer got to. And the staged turbulence model, kOmegaSST in a tank where nothing is turbulent, carries compression heat from the interface to the roof through its eddy thermal diffusivity: the top two rows separate by 0.38 % and the top-row adiabat goes from 0.036 % to 0.196 %, with the gas mass untouched at 0.124 % — so a benchmark watching only conservation would not have seen that one either.
What this page does not establish
- The whole ullage is not verified — only the gas the water cannot reach. p Vγ over the entire gas space is 7.23 % out on the product’s own mesh. The evidence that this is the interface cells absorbing heat, and not the equation of state, is that it falls under refinement at an observed order of 0.61. It is evidence, not proof, and the case does not judge that number tightly.
- The 0.0361 % is flat under refinement and has not been attributed. It does not move between 20 480 and 69 120 cells, which rules out cell size as its cause and identifies nothing else. This page reports it rather than explaining it.
- One compression, at one rate, over one factor of two. The gas space is halved in two seconds at a single inflow velocity. There is no sweep over compression ratio or rate, and nothing here says where the adiabatic idealisation starts to fail as the squeeze gets slower and the heat has time to leave.
- Nothing is established about the liquid side, the interface, or heat transfer. The water is constant-density by construction, the case is laminar, and the interface is exactly the region the reference deliberately avoids. The temperature the bulk gas reaches — 370.34 K against the top row’s 378.18 K — is reported by the harness and is not judged against anything.
Repeat this yourself
Every case here is set up from the worked examples in the product, with no hand-editing of solver files — so you can run it, and get the same numbers. The free tier runs real cases up to 250,000 cells of fluids, or 100,000 nodes of solid, with no account needed to download and no time limit.
Other cases
- A tank of water that should not moveA closed tank of water under gravity, which should stay exactly still — the standard test of whether pressure and gravity are discretised consistently.
- Sod shock tubeThe exact Riemann solution, compared point by point. It found a defect nobody had noticed: the solver was using the wrong ratio of specific heats.
- Natural convection in a heated cavityThe only case here where the flow is caused by the temperature field rather than imposed on it — and the one that showed “converged” is a claim about residuals.
All validation cases · Written by the team building SHD Sim.