Skip to content

Add interactive Ideal Gas Law (PV=nRT) simulation - #2

Draft
Marxist-Leninist wants to merge 2 commits into
mainfrom
claude/github-agillmwebgames-simulation-0p05qw
Draft

Add interactive Ideal Gas Law (PV=nRT) simulation#2
Marxist-Leninist wants to merge 2 commits into
mainfrom
claude/github-agillmwebgames-simulation-0p05qw

Conversation

@Marxist-Leninist

Copy link
Copy Markdown
Owner

Adds IdealGasLaw.html — a self-contained, client-side interactive simulation inspired by the PV=nRT reel.

What it does

  • A piston cylinder filled with bouncing colored gas particles.
  • Particle speed tracks temperature; particle count tracks the amount of gas n.
  • Two modes:
    • Free piston — set external pressure; the gas finds its volume via V = nRT/P.
    • Locked piston — set the volume; pressure builds via P = nRT/V.
  • Sliders for T, n, and P/V, plus a draggable piston you can pull up/down directly.
  • Live readouts for V, T, P, n and a running PV ≈ nRT check, with a process indicator (Volume ↑, Temp ↓, Pressure ↓, …) like the original clip.

Integration — no edits to index.html needed; it auto-discovers files via the GitHub file-listing fetch, so the new app shows up in the collection automatically.

🤖 Generated with Claude Code

Self-contained HTML/canvas app: a piston cylinder of bouncing gas
particles where particle speed tracks temperature and count tracks
the amount of gas. Two modes — free piston (set pressure, V=nRT/P)
and locked piston (set volume, P=nRT/V) — with sliders for T, n and
P/V, a draggable piston, and live PV=nRT readouts. Auto-listed by
index.html via the GitHub file-listing fetch.
Temperature now reads three ways instead of speed alone: particles are
tinted on a cold-blue to white-hot scale with a heat-scaled glow, and a
thermometer gauge with tick labels sits beside the cylinder showing the
live K reading. Canvas widened to fit the gauge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant