# Flow and Doppler validation attempt — 8 September 2026

**Result: partial visual resemblance; quantitative flow fidelity fails internal checks.**
The direction convention and aliasing equation work, but the current velocity
fields, valve timing and circulation balance cannot be treated as healthy
haemodynamics. These findings supersede any broader interpretation of the earlier
software checks in `physiology-comparison.md`.

The audited simulation is version 6, commit
`9ee593ef458cd19764467aacf0df0f4a5ed7d02e`. This review changes documentation and adds
diagnostics; it does not silently retune the audited physiology. Source assets are
identified by SHA-256 in `validation/flow-audit.json`.

## Evidence collected

- 8,192 equally spaced cycle samples from the shipped `Physiology` implementation,
  at 64.286 bpm and a 0.933333 s period.
- An independent integration of reference-grid velocity across every shared
  mitral, tricuspid, aortic and pulmonary label face. Confirmed by the actual WGSL
  sampler under native Dawn / SwiftShader, evaluating both sides of each face.
- Native sampling of 7,680 central-plane locations at all 28 authored phases in
  each of the A4C and A5C views. Samples are restricted to the colour ROI, sector,
  depth and blood labels LV/LA/Ao; moving tissue above 0.18 is excluded. Visibility
  here means the maximum RGB channel over black exceeds 0.03. This diagnostic uses
  the moving-tissue mask, not the final acoustic slab average.
- Eight full 640 × 640 images from the shipped acoustic WebGPU pipeline: early
  filling, late filling, main ejection and the extra diastolic pulse; plus 3 MHz
  scale comparisons. ROI outlines, scale and phase text are composited afterward.
  They are offline renders, not browser screenshots or performance measurements.
- The two previously recorded cycles, real normal mitral/five-chamber colour clips
  in Aquilina et al., BSE colour acquisition guidance and healthy 4D-flow MRI vortex
  observations in Elbaz et al. Their roles and limits are described below.

## 1. Valve transfer — fails

The flow basis is generated separately inside each closed labelled domain, with
distributed sources/sinks near an estimated port and through the chamber interior.
The solve does not enforce continuous, equal transfer across an open shared valve.
Linear texture sampling also blends the neighbouring fields before multiplying
them by the flux pair belonging to the nearest blood label.

For a diagnostic unit transfer of 1 mL/s, set only the upstream outlet and downstream
inlet to 1, set vortex amplitudes to zero and integrate reference velocity at all
shared voxel faces. Sample ±0.0001 mm from each face so its two label-dependent
limits are evaluated separately. Face normals point upstream → downstream; area
per face is 1.375² mm²; divide mm³/s by 1000 for mL/s.

| Shared valve boundary | From upstream label (mL/s) | From downstream label (mL/s) | Prescribed transfer |
|---|---:|---:|---:|
| Mitral | 0.03308 | 0.02252 | 1.000 |
| Tricuspid | 0.01436 | 0.03283 | 1.000 |
| Aortic | 0.05661 | 0.04479 | 1.000 |
| Pulmonary | 0.03036 | 0.05573 | 1.000 |

CPU face limits and native WGSL differ by less than 0.00001 mL/s. The mismatch is
therefore in the field construction, not just the independent audit calculation.
These are **reference-grid continuity diagnostics**, not measured anatomical valve
areas or percentages of clinical accuracy. They omit deformation and moving-wall
transport; those approximations do not establish the missing reference continuity.
A small Poisson residual only proves that the chosen source problem was solved.

## 2. Valve timing and circulation balance — fails

The model sends every positive ventricular volume derivative to inflow and every
negative derivative to outflow. It has no independent valve-state gate or finite
isovolumic interval. The inferred LV curve contains a second decrease between the
early and late filling peaks, which is consequently routed through the aortic
outlet. This decrease is visible in the inferred source-frame volumes as well as
the Fourier fit; smoothing alone cannot be assumed to fix its cause.

| Quantity | LV | RV |
|---|---:|---:|
| Maximum fitted volume | 107.34 mL | 111.18 mL |
| Minimum fitted volume | 48.11 mL | 61.37 mL |
| Main volume excursion | 59.23 mL | 49.80 mL |
| Total prescribed outflow per cycle | 72.88 mL | 55.43 mL |
| Outflow outside maximum-to-minimum volume interval | 13.64 mL | 5.63 mL |

The LV secondary pulse peaks at cycle phase 0.85327 with 110.13 mL/s. It accounts
for 18.7% of prescribed LV outflow and produces a visible A5C colour signal between
filling peaks. The source animation/segmentation needs investigation; this is not
evidence of actual regurgitation in the supplied heart.

The left prescribed cycle output is 31.47% higher than the right (denominator:
right output). Independent reservoirs make the software run but cannot represent a
closed, periodic healthy circulation. The four chambers balance their fitted
derivatives algebraically; aorta and pulmonary artery instead use equal inlet and
outlet. Their storage-change residuals reach 100.86 and 25.96 mL/s, respectively.
The earlier numerical test intentionally checked only the four chambers; its
passing result did not establish whole-circulation conservation.

## 3. Direction and colour scale — limited passes

The shipped sign convention, beam projection and modulo wrapping are consistent:
red represents motion toward the probe and blue away, before a Nyquist wrap changes
the displayed sign. In the central-plane diagnostic at phase 0.57143, 96.9% of
visible A4C ROI samples point toward the probe. At phase 0.17857, 87.0% of visible
A5C ROI samples point away. These fractions describe this synthetic field, not
agreement with measured patient vectors.

The default 4.5 MHz / 4 kHz PRF yields ±34.22 cm/s. At 150 mm depth, the implemented
round-trip limit caps PRF at 5.133 kHz and the scale at ±43.92 cm/s. BSE recommends
an initial colour Nyquist of 50–60 cm/s for routine regurgitation assessment; lower
settings can be intentional for other tasks. [BSE minimum dataset (2020)](https://pmc.ncbi.nlm.nih.gov/articles/PMC7923056/)

At the phases above, 31.2% of visible A4C diagnostic samples and 45.0% of A5C samples
exceed the default Nyquist before wrapping. These are sampled-field alias fractions,
not clinical image pixel percentages. They explain some mixed colours without
implying real reverse flow. A 3 MHz / 4 kHz comparison gives ±51.33 cm/s. It does
not correct the velocity field, and the shared frequency also changes B-mode image
formation. A separate colour-transmit frequency is the preferable future control.

Absolute velocity calibration remains unvalidated. Sampled ROI speed magnitude
reaches 1.49 m/s in A4C and 1.85 m/s in A5C over the cycle, but these are coarse-grid
maxima across LV/LA/Ao samples, not measured mitral/aortic spectral envelopes.
The early/late volume-flow peak ratio is not a clinical E/A velocity ratio.

## 4. Visual appearance and particle flow — partial / unvalidated

The normal mitral and five-chamber reference clips show focused colour regions,
predominantly red inflow, away-flow components and spatially varying signal. Our
field reproduces these broad cues. The new renders show conspicuous contour-like
alias bands near valve regions, abrupt colour-region edges, a very clean tissue
mask and broad chamber fills. The reference clips have softer, mottled jets.
This is a qualitative comparison; acquisition settings, patient anatomy, pose and
cardiac phase are not matched. [Aquilina et al., Figures 11 and 14](https://pmc.ncbi.nlm.nih.gov/articles/PMC3232574/)

The shader's time-varying hash is a display texture, without pulse-ensemble
coherence, colour autocorrelation, a calibrated receive response or clutter
filtering. Visual grain does not validate a Doppler estimator. Hard rectangular
cutoffs correspond to the selected ROI; they should not be interpreted as tissue.

More apical tracer motion does not establish realistic apical blood flow. The
current recirculation field has one assumed fixed shape per ventricle with a
time-varying amplitude. Healthy 4D-flow observations show early-filling vortex
development, deformation and movement toward the apex, and usually a newly formed
late-filling ring closer to the mitral valve. A fixed basis with amplitude decay
does not reproduce that evolution. [Elbaz et al. (2014)](https://pmc.ncbi.nlm.nih.gov/articles/PMC4177574/)

Particle reseeding, wall sliding and approximate deformation transport further
prevent residence-time or washout measurements. Doppler reports the field velocity;
accepted particle displacement may differ when a wall step is rejected or slid.
No claim is made that all near-apical blood should maintain a minimum speed.

## Recommended correction sequence

1. Verify moving cavity labels, actual annuli and leaflet opening/closing phases.
   Reconcile volume estimates and left/right stroke volumes with the baked motion.
   If unequal cavity excursions remain real features of the animation, a physically
   closed periodic solve will require corrected motion or explicitly retained
   independent reservoirs. Do not fix this by merely multiplying colour speeds.
2. Solve a connected moving blood domain with explicit valve flux constraints and
   wall motion. Validate integrated transfer on both sides of each valve and the
   whole-cycle balance before using the field for tracers or Doppler. A conservative
   reduced solver is a possible first step; full CFD is not required just to pass
   these continuity tests.
3. Add valve opening gates and finite isovolumic intervals, then evolving filling
   jets/vortices. Fit to a documented healthy reference case and retain a separate
   measured case for assessment. Check transported volume, valve timing and
   velocity profiles before describing the result as a healthy flow model.
4. Add separate Doppler frequency, explicit acquisition/ensemble timing, beam-space
   smoothing and coherent power/clutter behaviour. Start from an appropriate
   50–60 cm/s colour scale for the standard regurgitation comparison, with adjustable
   lower scales for slow flow. Compare synchronized clips under matched settings.

## Reproduction

Set `FLOW_AUDIT_WORK` to a scratch directory, then run:

```sh
python scripts/audit_flow.py
node scripts/audit_flow_gpu.mjs
python scripts/plot_flow_audit.py
```

The native step also needs `DAWN_MODULE`, `VK_ICD_FILENAMES` and `ATLAS_RGBA` pointing
to the installed Dawn module, Vulkan ICD and decoded original 2048² RGBA atlas.
The outputs are `validation/flow-audit.json`, `validation/flow-gpu-audit.json` and
the charts/images under `dist/review`. All native captures completed without GPU
validation errors. No browser end-to-end test, real-hardware performance benchmark,
clinical review or patient-matched velocity validation was performed.
