You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

11h 40m 11s logged

Dev log: Phase 18 to now

Phase 18, line shapes. Real spectral lines are not infinitely thin spikes. Atoms move around (Doppler) and get jostled by neighbours (pressure), so each line spreads into a bell shape called a Voigt profile. We added that, plus a zoom so you can actually look at one line up close. The useful trick here was a flux-closure check: whatever area the line has before broadening, it must still have after. That check caught two grid bugs that were completely invisible on screen.

Phase 19, optical depth. Up to here, every line was treated as if the light escaped freely. In a thick gas the strong lines saturate, so doubling the number of atoms stops doubling the brightness. That relationship is the curve of growth. Big lesson: classify which regime a line sits in by the physics, not by eyeballing the slope of the curve. Also, the wavelength window has to widen as the column gets thicker, otherwise you clip the wings you are trying to measure.

Phase 20, absorption. The mirror image of emission: shine a continuum through the gas and look at what is missing. The trap here was that 14 hydrogen lines land on only 6 distinct wavelengths, so matching a computed profile to its source line by wavelength alone silently pairs up the wrong ones. We key on the transition instead.

Phase 21, Hartree-Fock. The biggest chunk. Instead of a fitted screening formula, each electron now feels a potential built from all the others, solved over and over until it stops changing. This gets us sulfur and chlorine, which the old fitted model could not touch at all, and ions with no preset. Two things worth remembering: the solver’s own error bar was lying to us and needed re-deriving, and the thing that finally made convergence fast was not a clever algorithm but the right mixing constant.

Phase 22 and cleanup. Made features honest about what they apply to. The classical ghost and the force-law lab only make sense for one-electron atoms, so they now explain themselves instead of erroring on a screened atom. Fixed He+ breaking every API call, because the “+” was never URL-encoded. Unknown systems say so instead of spinning. Currently fixing hint text that escaped its panel on narrow screens.

0
0
3
Open comments for this post

20h 57m 4s logged

Atom_Sim: Physics Simulator Dev Log

An atom simulator built on one rule: Every number has a label (exact, numerical, approximation, counterfactual, or visual_liberty). Unlabeled numbers are treated as bugs.

Stack: Python physics engine -> React + Three.js frontend.

Phase Logs

Phases 1–3: The Hydrogen Foundation

  • Hydrogen Core: Uses exact math for energies and wavefunctions. Validates its electron clouds using statistical KS tests.
  • Numerical Solver: Solves the Schrödinger equation for custom shapes. It calculates its own accuracy by halving the grid spacing.
  • Constants Lab: Allows changing fundamental constants (hbar, e, c). It proves that changing individual units changes nothing if the ratio between them stays the same.
  • Classical Ghost: Shows old Bohr orbits collapsing, proving why classical physics cannot explain atoms.

Phases 4–6: Altered Potential & Real Atoms

  • Fake Physics: Simulates universes with non-standard forces (like Yukawa or power laws) under a clear warning banner.
  • Screened Atoms: Models elements from Helium to Argon using historic 1974 data. If an element (like Sulfur or Chlorine) lacks clean data, it is left out entirely rather than guessed.

Phases 7–12: Fields, Relativity & Nuance

  • Dirac Math: Tracks exact relativistic shifts and highlights what the math misses (the Lamb shift).
  • External Fields: Simulates atoms splitting under magnetic fields (Zeeman effect) and electric fields (Stark effect).
  • Hyperfine: Models the 21 cm hydrogen line using the precise electron-to-proton mass ratio.

Phases 13–17: Light, Speed & Thermodynamics

  • Fast Math: Uses a custom integration trick to calculate atomic lifetimes exactly and 13x faster.
  • Doublet Ratios: Proves via quantum math (Wigner 6j) why certain spectral lines are twice as bright as others.
  • Heat Sliders: Combines Saha and Boltzmann equations to turn raw rates into actual visible light. Dragging the temperature slider smoothly hands Lyman lines over to Balmer lines.

Phase 18: Line Profiles (Current Work)

Replaces infinitely sharp lines with realistic Voigt profiles using three combined factors:

  1. Natural Width: A Lorentzian shape caused by how fast an excited state decays.
  2. Doppler Width: A Gaussian shape caused by thermal motion. Works perfectly for normal hydrogen, positronium, and muonic hydrogen.
  3. Instrumental Width: A Gaussian blur based on the user’s chosen telescope or sensor resolution.

Note on Missing Physics: Collision/pressure broadening is not simulated. Instead of a text disclaimer, the app calculates how large that missing effect would be and prints the raw margin of error right next to the chart.

Core Development Rules

  • No Smoke Tests: Every physics feature must pass an automated math test.
  • No Live Fetches: All reference data is saved locally with a hard citation.
  • No Silent Approximations: If the code cannot calculate something honestly, it stops and prints exactly what data is missing.
0
1
76

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…