Astrophyzix Flagship Series STAR-01
LIVE NEW FLOAT64

Stellar Evolution and HR Diagram Console

Live Hertzsprung-Russell diagram with broken-power-law mass-luminosity relations, parametric evolutionary track propagation from zero-age main sequence through subgiant, red giant branch, asymptotic giant branch, and white dwarf cooling or supernova endpoint. Polytropic interior structure via Lane-Emden ODE integrated by RK4. Salpeter and Kroupa initial mass function sampled cluster populations with synthetic isochrones. Catalog of sixteen well-known stars across the diagram.

SALPETER / KROUPA
PARSEC-LIKE
FLOAT64
1.0

Overview

The Hertzsprung-Russell diagram is the single most important plot in stellar astrophysics. It places every star on a two-dimensional grid of luminosity versus surface temperature and reveals at a glance their internal structure, age, mass, and evolutionary state. Stars are not scattered randomly. They cluster into bands, branches, and clumps that map directly onto the physics of nuclear burning, gravitational contraction, and degenerate matter.

STAR-01 implements the standard pedagogical pipeline: place real catalog stars on the HR diagram, draw the zero-age main sequence and white dwarf cooling tracks as references, propagate evolutionary tracks for selected masses through every burning phase, integrate polytropic interior structure via Lane-Emden, and sample synthetic clusters from a Salpeter or Kroupa initial mass function to recover isochrones at any age.

All numerical work runs in Float64. Mass-luminosity relations follow broken-power-law fits calibrated to PARSEC tracks. Polytropic structure uses the Lane-Emden equation integrated by classical RK4. Cluster sampling draws from analytic IMFs via inverse transform.

Quick Start

1Open HR DIAGRAM. The 16 catalog stars are plotted with the cyan ZAMS line and dim white-dwarf cooling sequence. Click any star to select.
2Open TRACKS. Pick an initial mass with the slider. The full evolutionary path renders from ZAMS through the endpoint (white dwarf for low mass, neutron star for high mass).
3Slide the age control. Watch the highlighted current position move along the track and the stage label update through MS, subgiant, RGB, HB, AGB, and post-AGB.
4Open STRUCTURE. The Lane-Emden ODE is integrated with RK4. Toggle the polytropic index between n=1.5 (fully convective M dwarf) and n=3 (radiative solar-type) and watch the density, temperature, and pressure profiles deform.
5Open CLUSTER. Set total mass and age. The console samples N stars from the IMF and places each at its current evolutionary state. The result is the famous isochrone shape.
The HR diagram is best read diagonally. Stars of equal mass on the main sequence form a band running from upper-left (massive, hot, luminous) to lower-right (low-mass, cool, faint). Departures from the band reveal evolution.

Guided Workflows

Workflow A :: The Sun's Future

Track the Sun from birth to white dwarf endpoint. The complete lifecycle takes about 13 billion years.

1TRACKS. Set mass to 1.0 Msun.
2Set age to 4.6 Gyr. Stage reads MS. The Sun is currently here.
3Slide age to 10 Gyr. Stage reads TAMS (terminal age main sequence). Luminosity has risen.
4Continue to 12 Gyr. Stage reads RGB. The Sun has expanded into a red giant; surface temperature has dropped from 5800 K to about 3500 K. Earth is engulfed.
5Set age to 12.7 Gyr. Stage reads WD. The post-AGB ejection has left a hot carbon-oxygen white dwarf cooling slowly.

Workflow B :: Sirius B and the Discovery of White Dwarfs

Sirius B is the prototype white dwarf. Its position on the HR diagram revealed an entirely new class of stellar object.

1HR DIAGRAM. Click Sirius B in the list. It sits far below the main sequence at log L around -1.6 with surprisingly high temperature.
2Note the dashed white-dwarf cooling line passing through Sirius B's position. Following it traces how Sirius B cools at fixed mass.
3For comparison click Sirius A. The two stars are at the same distance and form a binary, but their HR positions are dramatically different - Sirius A is luminous on the upper main sequence, Sirius B is a cooling stellar core.

Workflow C :: Cluster Isochrones

The shape of a star cluster on the HR diagram is its age in disguise.

1CLUSTER. Set total mass to 5e4 Msun. Set age to 0.01 Gyr (10 Myr).
2Press SAMPLE. Note the population covers the full main sequence, from O stars at the top to M dwarfs at the bottom.
3Slide age to 1 Gyr. The high-mass turnoff drops; massive stars have evolved off and left only the lower main sequence plus a giant branch.
4Slide age to 12 Gyr. Only stars below about 0.95 Msun remain on the main sequence. The turnoff is at the location used by globular cluster age dating.

Tab Guide

HR Diagram

Plots all 16 catalog stars with the ZAMS reference line and a dim white-dwarf cooling sequence. Click a star to select it. The y-axis is logarithmic luminosity in solar units; the x-axis is logarithmic effective temperature with hot stars on the LEFT (the standard reversed convention).

Tracks

Plots a single star's full evolutionary path from ZAMS through the endpoint for the selected initial mass. The age slider walks the current position along the track. Stage label and luminosity, temperature, radius, and lifetime values update live.

Structure

Solves the Lane-Emden equation by RK4 for the chosen polytropic index n. Plots dimensionless density, pressure, and temperature profiles versus radius. Reports xi_1 (surface), central density, central temperature, and the gravitational binding energy.

Cluster

Samples N stars from the chosen IMF (Salpeter or Kroupa), evolves each to the cluster age, and plots all on the HR diagram. The shape collapses onto a synthetic isochrone with a clear main-sequence turnoff.

Stack / Method

Stack tab probes runtime capabilities and reports memory. Method tab gives the underlying mathematical formulation.

Controls Reference

ControlTabAction
Star clickHR DiagramSelect catalog star, show details.
Mass sliderTracksInitial stellar mass in Msun. Range 0.3 to 40.
Age sliderTracksCurrent age in Gyr. Auto-clipped to track endpoint.
n sliderStructurePolytropic index. Range 0.5 to 4.5. Use 1.5 for convective, 3 for radiative.
SOLVE LANE-EMDENStructureRe-integrate ODE with RK4 at chosen n.
Total mass sliderClusterCluster total stellar mass.
Cluster age sliderClusterAge applied to all sampled stars.
IMF toggleClusterSalpeter (single power law) or Kroupa (broken power law).
SAMPLEClusterResample stars from IMF and replot.

Reading the Plots

HR Diagram

Hot stars on the LEFT (high log Teff). Luminous stars on TOP. The cyan curve is the ZAMS where stars start their hydrogen burning lifetime. Most catalog stars sit on or near it. Aldebaran and Arcturus deviate upward and rightward into the red giant branch. Sirius B and Procyon B drop off the bottom into the white dwarf region. Betelgeuse and Rigel sit at the top, in the supergiant zone.

Evolutionary Tracks

The track moves from lower-right (cool, faint pre-MS) to the ZAMS, then drifts slightly upward and rightward during MS, jumps rightward during the Hertzsprung gap, climbs the red giant branch, then back to the bluer horizontal branch (for low-mass), then up the AGB, and finally crashes leftward to the hot post-AGB before dropping to the white dwarf cooling sequence.

Lane-Emden Profiles

Density, pressure, and temperature drop monotonically from the centre to the surface. Larger n means steeper drop near the surface and more centrally concentrated mass. n = 0 is constant density. n = 5 has infinite radius. Real stars sit around n = 1.5 (low-mass MS, fully convective) or n = 3 (Sun, mostly radiative).

Cluster Isochrone

Sampled stars form a recognisable isochrone: a main sequence below the turnoff, a subgiant branch crossing the Hertzsprung gap, and a red giant branch climbing upward. The position of the turnoff is the cluster age in disguise.

Troubleshooting

Cluster does not show a clear isochrone
Total mass is too small. With fewer than about 100 sampled stars the isochrone shape is dominated by Poisson noise. Increase total mass and resample.
Track slider does not progress beyond a certain age
The track ends at the stellar lifetime. For a 10 Msun star this is about 26 million years; for the Sun it is about 13 billion years. The slider clips to the endpoint.
Lane-Emden fails to converge
Polytropic index n must be between 0 and 5 strictly for finite radius. The console clips to a safe range; values close to 5 produce extremely extended profiles.
Sirius B looks anomalously hot
Correct. Young white dwarfs have effective temperatures of 25000 K or higher despite their tiny radii. They cool over billions of years toward 3000 K.
Stack shows WebGPU FALLBACK
Browser does not advertise WebGPU yet, or COOP/COEP headers are not set. CPU path is fully functional and produces identical results.

Scientific References

  • Hertzsprung 1911 - Ueber die Verwendung photographischer effektiver Wellenlangen zur Bestimmung von Farbenaequivalenten. Original colour-luminosity diagram.
  • Russell 1914 - Relations Between the Spectra and Other Characteristics of the Stars. Popular Astronomy 22 275. The American independent discovery of the diagram.
  • Chandrasekhar 1939 - An Introduction to the Study of Stellar Structure. University of Chicago Press. Foundational treatment of polytropes and Lane-Emden.
  • Kippenhahn, Weigert, Weiss 2012 - Stellar Structure and Evolution. Springer. Standard graduate textbook.
  • Salpeter 1955 - The Luminosity Function and Stellar Evolution. ApJ 121 161. Original initial mass function.
  • Kroupa 2001 - On the variation of the initial mass function. MNRAS 322 231. Multi-segment IMF.
  • Bressan et al. 2012 - PARSEC: stellar tracks and isochrones with the PAdova and TRieste Stellar Evolution Code. MNRAS 427 127.
  • Choi et al. 2016 - MIST. ApJ 823 102. Modern isochrone library.
  • Lane 1870 / Emden 1907 - Original derivation of the polytropic equation governing self-gravitating gas spheres.

Glossary

HR DiagramPlot of luminosity (or absolute magnitude) versus effective temperature (or colour) for stars.
ZAMSZero-age main sequence. Locus where stars first ignite stable hydrogen burning.
TAMSTerminal age main sequence. End of core hydrogen burning.
RGBRed giant branch. Hydrogen shell burning around an inert helium core.
HBHorizontal branch. Stable core helium burning after the helium flash.
AGBAsymptotic giant branch. Double-shell burning phase before envelope ejection.
WDWhite dwarf. Degenerate stellar remnant of low- and intermediate-mass stars.
PolytropeSelf-gravitating gas with equation of state P = K rho^(1+1/n).
Lane-Emden equationDimensionless ODE governing polytropic stellar structure.
IMFInitial mass function. Distribution of stellar masses at birth.
Salpeter slopePower law dN/dM proportional to M^-2.35 for M above about 0.5 Msun.
IsochroneLocus of stars with the same age and metallicity but different masses.
L_sunSolar luminosity, 3.828e26 W (IAU 2015).
TeffEffective temperature. Temperature of a blackbody with the same total flux as the star.
ZAMS
WD cooling
Selected
log L vs log Teff N=16
log L vs log Teff -- ZAMS to endpoint READY
1.00Msun
4.60Gyr
theta(xi)
theta^n (rho)
theta^(n+1) (P)
PROFILES vs xi/xi_1 SOLVED
1.50
0.005
MS
SGB / RGB
HB / AGB
WD / NS
CLUSTER on HR DIAGRAM READY
5.0e4 Msun
0.10Gyr
KROUPA

All numerical results carry a provenance hash recording the integrator, mass-luminosity relation, IMF, and parameter set used. Persisted to IndexedDB for cross-session reproducibility.

  • Solar reference: L_sun = 3.828e26 W, R_sun = 6.957e8 m, M_sun = 1.989e30 kg, Teff_sun = 5778 K (IAU 2015 nominal)
  • Mass-luminosity: broken power law, calibrated to PARSEC tracks
  • Tracks: parametric splines through ZAMS, TAMS, SGB, RGB, HB, AGB, WD/NS
  • Lane-Emden: classical RK4 with adjustable step
  • IMF: Salpeter (alpha=2.35) or Kroupa (alpha=1.3 below 0.5 Msun, 2.3 above)

Mass-Luminosity Relation

Main sequence luminosity follows a broken power law in mass. The console uses

  • L = 0.23 M^2.3 for M below 0.43 Msun
  • L = M^4 for M between 0.43 and 2.0 Msun
  • L = 1.4 M^3.5 for M between 2.0 and 55 Msun
  • Eddington-limited slope above 55 Msun

Radius follows a separate broken power law calibrated to PARSEC. Effective temperature is then derived from the Stefan-Boltzmann relation L = 4 pi R^2 sigma Teff^4.

Main Sequence Lifetime

Main sequence duration scales approximately as tau_MS = 10 Gyr * (M/Msun)^-2.5. The Sun therefore lives about 10 Gyr; a 10 Msun star lives about 30 million years; an O-type 40 Msun star lives only a few million years.

Evolutionary Tracks

For each initial mass the console interpolates between key (age, log L, log Teff) anchor points spanning ZAMS, mid-MS, TAMS, subgiant branch, RGB base, RGB tip, helium burning (HB or He flash for low mass; blue and red supergiant phases for high mass), AGB, and the endpoint. Endpoints are white dwarf cooling for M below 8 Msun and core-collapse supernova followed by neutron star or black hole for higher mass.

Lane-Emden Equation

The dimensionless equation for polytropic structure is

(1/xi^2) d/dxi (xi^2 dtheta/dxi) + theta^n = 0

with boundary conditions theta(0) = 1 and dtheta/dxi(0) = 0. The console expands this as a coupled first-order system dtheta/dxi = u, du/dxi = -2u/xi - theta^n, integrates with classical RK4 from xi=0 (using a series expansion for the first few steps to avoid the singularity), and stops when theta reaches zero. The first zero gives the dimensionless surface xi_1. From this the console computes the central-to-mean density ratio, the gravitational binding energy coefficient, and the dimensionless mass.

Initial Mass Function

The console samples from two IMFs via inverse transform:

  • Salpeter 1955: dN/dM proportional to M^-2.35 for M between 0.1 and 100 Msun.
  • Kroupa 2001: broken power law with slope 1.3 between 0.08 and 0.5 Msun and slope 2.3 between 0.5 and 100 Msun.

Cluster Synthesis

For total mass M_tot, draw masses from the IMF until the cumulative mass exceeds M_tot. Each star is then evolved to the cluster age using its initial mass and the parametric track. Stars whose total lifetime falls below the cluster age are placed at their endpoint state (white dwarf cooled for the difference, neutron star, or black hole). The HR diagram of the resulting population is the cluster isochrone.

Compute Pipeline

State and intermediate buffers (Lane-Emden integration trajectory, cluster star list, evolutionary track samples) are held in Float64Array views. Where the runtime advertises SharedArrayBuffer the buffers are allocated over shared memory for zero-copy hand-off to potential workers.

ASTROPHYZIX :: STAR-01 FLOAT64 :: PARSEC :: LANE-EMDEN
Copyright (c) 2026 Astrophyzix.org. All rights reserved.
Redistribution, mirroring, scraping, or republication of this module, its source code, embedded datasets, scientific methodology, or any derivative thereof is not allowed without the express written consent of Astrophyzix.org.