# Thorax integration and circulation correction

The thorax and animated pericardium are integrated. No supplied mesh is unusable for this ultrasound prototype. Original heart textures, UVs and animation remain. This release fixes reference-grid valve transfer, prescribed valve timing and reduced-circuit balance. **Transport through the actual moving valve geometry remains unresolved.**

## Verified circulation corrections

- Both circuits: 54.51733 mL per cycle; 3.505 L/min at 64.3 bpm.
- Earlier outputs: LV 72.877 mL and RV 55.432 mL per cycle. The new common target averages the main fitted ventricular excursions (59.2339 and 49.8008 mL); it is an explicit reduced-model choice, not a measured patient stroke volume.
- Unit transfer in actual WGSL: worst error 0.00264%; both sides of all four shared interfaces agree to sampling tolerance.
- All eight quantized model ports are within 0.003% of their unit target; inactive valve and recirculation port contributions are zero. All tested non-port reference boundary faces have zero normal velocity.
- Filling and ejection do not overlap. Ejection occupies phase 12.5–42.5%; early filling 49–77%; late filling 94.5–8.78% across the seam. Ejection is zero during diastasis.
- Atrial storage obeys return minus filling. Ao and PA are zero-storage conduits. The balanced volume proxies replace inconsistent authored cavity-volume estimates; the visible FBX is unchanged.
- 32,768 cycle samples confirm all prescribed port integrals, equal left/right totals and periodic reduced volumes. Analytic derivatives and chamber balance pass at three playback rates. Healthy-reference ECG intervals remain PR 160 ms, QRS 100 ms and QT 405 ms at the source rate.

## Moving-valve limitation

The inverse motion field and inferred blood labels are approximate. Of the prescribed reference transfer, the fraction landing at points classified as clear by the transported tissue mask is mitral 56.4%, tricuspid 67.4%, aortic 62.6%, pulmonary 65.3% over 112 sampled phases. This diagnostic is not a measurement of true valve flow. It shows that matching reference flux is insufficient to claim conservative flow on the animated anatomy.

A 112-phase aperture-redistribution experiment suppressed obstructed faces and normalized the remaining ones. It produced extreme narrow jets (2.71–10.56 m/s peak face-normal speeds in the tested variant), so it was rejected. The shipped model retains the balanced reference circulation and labels velocity as inferred. Authored annulus/orifice annotations and a moving blood-domain fluid solve are needed for credible quantitative valve transfer, gradients and velocities. This does not make the FBXs unusable for ultrasound rendering.

## Mesh handling

345 static objects, 924,219 triangles. 28 objects have boundary edges. No original FBX was edited. All assets share coordinates with the existing heart. v3 main-heart positions match v2 exactly at frames 1, 15 and 29. Pericardial motion is sampled in all 28 poses; the maximum sampled displacement is 20.74 mm.

Bones (298) and liver (1) are closed. Fourteen vessel meshes are open tubes; body/diaphragm/pleural surfaces also contain openings. Temporary centroid-fan caps plus three orthogonal inside/outside votes classify interiors; cap triangles do not become acoustic vessel plugs. Original surfaces receive partial-coverage acoustic shells. The trachea/bronchi have seven nonmanifold edges after welding; a volume proxy handles them. The pericardium receives paired inner/outer surfaces and consistently wound rim triangles; the resulting material shell is watertight.

Assumed shell thicknesses: vessel 1 mm; skin 2 mm; open muscle 2.5 mm; pleura 0.7 mm; pericardium 0.8 mm. These are controllable modelling assumptions, not recovered wall measurements. Small branches at the 2.25 mm context pitch have limited resolution. The 576 mm context cube covers the cardiac thorax, not the complete body export.

## Appearance and controls

- Surrounding anatomy in US: on by default; switching it off restores the isolated-heart starting position.
- Pericardium: on by default; independently switchable.
- Faint thorax: off by default; optional X-ray-like overlay in the 3D view.
- Original heart materials and atlas remain. Surrounding materials are assigned acoustically; uploaded visual materials are ignored.
- Assigned impedance contrast, scattering and two-way attenuation produce contextual echoes and rib/lung shadows. Doppler is also suppressed behind strongly attenuating paths.
- Skin-contact presets retain their original section plane while a small central fan helps select a gap between ribs. Several apical and oblique paths remain poor or nonstandard windows. Clinical acquisition landmarks remain unverified.
- Default frequency is 3 MHz. A 4 kHz PRF gives ±51.3 cm/s if depth permits; deeper scans reduce PRF. Real acquisition settings remain task-dependent. See the [BSE minimum dataset](https://pmc.ncbi.nlm.nih.gov/articles/PMC7923056/) and the earlier linked reference comparison.

## Verification and limits

Native Dawn / SwiftShader executed the shipped WebGPU pipelines without validation errors. Five context planes, pericardium on/off, context on/off, tissue labels and ghost on/off were rendered. These are offline shader renders, not browser screenshots or a frame-rate benchmark. The accompanying movie advances fixed simulation time. The live browser UI has not been exercised in this environment.

Thorax anatomy is static: no breathing or lung sliding. Generic soft tissue fills unspecified body interior. No full-wave propagation, realistic lung reverberation/B-lines, rib refraction, pulse-ensemble Doppler, moving-domain Navier–Stokes flow or clinical validation is claimed. Conduction/ECG remain the existing approximate model and empirical healthy Lead II fit.

Methods: heterogeneous acoustic property maps are a standard simulation representation, illustrated by [k-Wave's heterogeneous-medium example](https://www.k-wave.org/documentation/example_ivp_heterogeneous_medium.php). Circulation boundary conditions and fluid coupling require explicit modelling, as documented by [SimVascular](https://simvascular.github.io/documentation/genbc.html). This project uses independent simplified code; it does not execute either solver.
