PulseCore

Chapter 5 · Section 1

The Stars in the Matter Step

Stars live on the bodies of matter (Chapter 4). A body is a clump: its mass m (cells) is its gas gas plus the stars it holds; pop is its list of star lots, each { m, n, mb, pb, born, life, cls, alive, metalFree, Z }; pend is gas set aside toward its next stars, in Suns; zm is its metals in cells (stars.js:134–139).

The order of the theory is the order of the code. BPT Part 2.9's road runs gas, collapse, star, life, death, remnant, and BPT Part 3.14 closes the loop with feedback: stars heat and disperse the gas that would make more of them. Each matter sub-step (a quarter flip), after Matter.step(), stepMatterPost() app.js:658 walks that road once:

  1. If the level holds no stable matter, decay the bodies (Part 5.2).
  2. Set matter.flipNow, then call stepStars(matter, now, tauSun, dt, physLife) stars.js:140, unless the level holds no stable matter or no stars; now is Tempos since the Data Nova, (pulseCounter + subDone − birthFrame)/2 (app.js:665).
  3. applyFeedback(sev) app.js:758: supernovae and feeding wells push the gas (Part 5.12).
  4. Flashes for supernovae and planetary nebulae (app.js:667–668); first-event banners (starToasts() app.js:731).
  5. Stellar Null Wells registered from the stars that collapsed (Part 5.13).

stepStars() itself, for every body: mix metals through its cloud; form stars if the cloud is dense and cool enough (Parts 5.7 and 5.8); mark giants; end the stars whose lives are over (Part 5.9), returning their ejecta and metals (Part 5.10) and blowing winds (Part 5.11); then add the wind bodies and recount the tallies. Its events go back as sev: stars born, first stars, supernovae, wells, white dwarfs, neutron stars, pair-instability supernovae and nebulae.

After each step scene.setMatter() (app.js:674) redraws the bodies: each body's points become its stars, colored and sized by type, and its gas, a dim haze in the data's color (scene3d.js:697). So every Part below ends on the same screen: the torus's surface, its gas haze and its starlight.

This overview Part computes nothing of its own; the numbers are in the Parts that follow.