Skip to content

Repository files navigation

Fluid Pressure and Flow

An interactive physics simulation about pressure in fluids at rest and in motion: how pressure grows with depth, why a fluid speeds up through a constriction, and how fast water leaves a hole in a tank.

A SceneryStack recreation of the PhET Interactive Simulations simulation of the same name.

Features

  • Under Pressure — hydrostatics in four vessels: a plain pool, a pair of trapezoidal chambers that prove pressure does not care about shape, a Pascal's-principle press, and a mystery pool where the fluid density or the planet's gravity has to be worked out from a barometer reading.
  • Flow — an incompressible fluid through a pipe you reshape by dragging its wall. Marker dots and an injectable grid make the velocity field visible; barometers, speedometers and a flux meter make continuity and Bernoulli's equation measurable.
  • Water Tower — Torricelli's law and the parabola that follows from it. Open the hole, raise the tank, attach a hose and aim it, and measure the jet.
  • Three unit systems — metric, atmospheres and imperial — across every readout, optionally matched across all three screens.
  • Full keyboard navigation and screen-reader support, in English, Spanish and French.
  • Installable and playable offline as a Progressive Web App.

Quick Start

npm install
npm start

Then open the URL Vite prints (by default http://localhost:5173).

Scripts

Command Description
npm start / npm run dev Vite dev server
npm run build Type-check and build for production
npm run build:single Build to a single self-contained HTML file
npm run preview Serve the production build
npm run check TypeScript across app, scripts and tests
npm run lint / npm run fix Biome check / auto-fix
npm test Vitest unit tests
npm run test:fuzz Playwright fuzz smoke test
npm run icons Regenerate PWA icons and screenshots

Tech Stack

  • SceneryStack — scenery, kite, dot, axon, sun, scenery-phet and joist
  • TypeScript, Vite, Vitest, Playwright, Biome
  • vite-plugin-pwa for offline support

License

MIT. See the organization defaults.

Contributing

See the organization contributing guide. Physics and architecture are documented in doc/model.md and doc/implementation-notes.md; attribution for the original simulation is in CREDITS.md.

About

SceneryStack recreation of PhET's Fluid Pressure and Flow simulation (Under Pressure, Flow, Water Tower).

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages