Skip to content

chore: bootstrap Heat Transfer from SceneryStackTemplate - #1

Merged
veillette merged 4 commits into
mainfrom
claude/heat-transfer-webgpu-v9otvx
Aug 8, 2026
Merged

chore: bootstrap Heat Transfer from SceneryStackTemplate#1
veillette merged 4 commits into
mainfrom
claude/heat-transfer-webgpu-v9otvx

Conversation

@veillette

Copy link
Copy Markdown
Contributor

Rename to heat-transfer and scaffold the five screens (Temperature,
Conduction, Convection, Heat Transfer, Materials).

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01HQF7S9jskbVF7Vrs4MTgRz

claude added 4 commits August 8, 2026 17:50
Rename to heat-transfer and scaffold the five screens (Temperature,
Conduction, Convection, Heat Transfer, Materials).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQF7S9jskbVF7Vrs4MTgRz
Fields are the primary objects: a SimulationDomain owns the discretization,
a FieldEngine interface owns the data, and two backends implement it.

- WebGPU backend: ping-pong r32float temperature textures, rg32float
  velocity, rgba32float material, WGSL compute passes for advection,
  diffusion, the heat brush and tracer particles, and render passes for
  the colour map, isotherms, flux arrows and particles
- CPU backend: the same semantics over Float32Arrays, drawn with the 2-D
  canvas API, serving as fallback and as the reference the tests pin down
- shared: boundary-aware sampling, harmonic-mean face conductivities,
  semi-Lagrangian advection, stability-limited time step, analytic flow
  presets, and one colour ramp generated into both TS and WGSL

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQF7S9jskbVF7Vrs4MTgRz
Temperature, Conduction, Convection, Heat Transfer, and Materials, all
composing one FieldSimulationModel and one FieldScreenView layout.

- shared view layer: FieldNode (the whole Scenery/WebGPU boundary),
  temperature legend, probe, cross-section tool and graph, layer/brush/
  material/flow/transport panels, field-engine status line
- full i18n in en/es/fr including an a11y group, live screen summaries,
  keyboard painting, and a sim-specific keyboard-help section
- resolution and backend are preferences and query parameters, so the
  substrate can be compared on one machine

Found by running it in a browser: the GPU device can be perfectly usable
for compute while its canvas cannot be composited into a 2-D context, so
GpuContext now probes presentation as well as shader compilation and
falls back to the CPU backend rather than showing a blank field.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQF7S9jskbVF7Vrs4MTgRz
- kernels.test.ts pins the invariants the WGSL shaders are written against:
  energy conservation under each boundary condition, no overshoot at the
  stability limit, Fourier's law's direction, harmonic-mean barriers,
  anisotropic flux, and advective translation at exactly the flow speed
- CpuFieldEngine.test.ts exercises the FieldEngine interface end to end,
  written so it would pass unchanged against the WebGPU backend
- domain, colour-ramp, flow-preset, model, and memory-leak suites
- doc/model.md and doc/implementation-notes.md written in full; README
  rewritten to the six-section outline; CLAUDE.md documents the carve-outs

Drops the template's TimeModel, which does not fit: simulated time is set
by the stability-limited step rather than by accumulating dt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQF7S9jskbVF7Vrs4MTgRz
@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@veillette
veillette merged commit 2d4a1bb into main Aug 8, 2026
6 of 7 checks passed
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread scripts/rename-sim.ts
if (stat.isDirectory()) {
processContents(full);
} else if (TEXT_EXTS.has(fileExtension(entry))) {
const original = readFileSync(full, "utf8");
Comment thread scripts/rename-sim.ts
const original = readFileSync(full, "utf8");
const transformed = applyReplacements(original);
if (transformed !== original) {
writeFileSync(full, transformed, "utf8");
text = replaceAll(text, from, to);
}
if (text !== original) {
writeFileSync(path, text, "utf8");
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.

3 participants