Build a star
What you are looking atLoading the star table.
- n at L obs
- …
- L model at slider n
- … L☉
Loading.
- M
- 1.00 M☉
- R
- 1.00 R☉
- L
- 1.000 L☉
- Teff
- 5772 K
Solving.
A polytrope assumes one relation between pressure and density, P = Kρ^(1 + 1/n).
What you are looking at
Writing ρ = ρ_c θ^n and measuring the radius in units of α² = (n + 1)K ρ_c^(1/n − 1)/(4πG) turns hydrostatic equilibrium and mass conservation into the Lane-Emden equation,
(1/ξ²) d/dξ (ξ² dθ/dξ) + θ^n = 0, with θ(0) = 1 and θ′(0) = 0.
The solver integrates it by fourth-order Runge-Kutta from a series start, in steps of 0.01 that grow with ξ, and halves the last step until the first zero, ξ₁, is bracketed within 10⁻⁹. At n = 0 and n = 1 the equation has closed forms, θ = 1 − ξ²/6 and θ = sin ξ/ξ; at n = 5 the solution (1 + ξ²/3)^(−1/2) never reaches zero.
The caption under the solution reports the comparison, and the tabulated values of Chandrasekhar (1939) for n = 1.5, 3 and 4 are reproduced to the printed digits (ξ₁ = 3.65375, 6.89685 and 14.97155).
With M and R the constants follow: ρ_c = ρ̄ ξ₁/(3|θ′(ξ₁)|) with ρ̄ = 3M/(4πR³), P_c = GM²/(4πR⁴(n + 1)θ′(ξ₁)²), and the ideal gas with the mean molecular weight of a fully ionised mixture, μ = 4/(3 + 5X − Z), gives T_c = μ m_u P_c/(k ρ_c). Inside, ρ = ρ_c θ^n, P = P_c θ^(n+1) and T = T_c θ at r = R ξ/ξ₁. Radiation pressure, degeneracy and any change of composition with depth are left out: a polytrope has one μ throughout.
The energy generation is the pp chain plus the CNO cycle in the approximations of Kippenhahn, Weigert and Weiss (2012), eqs. (18.63) and (18.65), which fit the NACRE rates of Angulo et al. (1999): ε_pp = 2.57 × 10⁴ ψ f₁₁ g₁₁ ρ X² T₉^(−2/3) exp(−3.381 T₉^(−1/3)) with g₁₁ = 1 + 3.82 T₉ + 1.51 T₉² + 0.144 T₉³ − 0.0114 T₉⁴, and ε_CNO = 8.24 × 10²⁵ g₁₄ X_CNO X ρ T₉^(−2/3) exp(−15.231 T₉^(−1/3) − (T₉/0.8)²) with g₁₄ = 1 − 2.00 T₉ + 3.41 T₉² − 2.43 T₉³, both in erg g⁻¹ s⁻¹ with ρ in g cm⁻³ and T₉ = T/10⁹ K. The page takes ψ = 1 (the pp I branch alone), f₁₁ = 1 (no screening) and X_CNO = 0.66 Z, the share of C, N and O among the metals in the solar mixture of Asplund et al. (2009).
The luminosity is L = ∫ 4πr² ρ ε dr over the model, by Simpson's rule on 400 intervals.
The model luminosity rises steeply with n because the central temperature does, so one index matches the observed luminosity: the dot on the curve and the first readout.
Draw repeats that match with M, R and L sampled from the published uncertainties (a normal distribution; a split normal where the error bars are asymmetric; in log L where the paper quotes it that way) and collects the indices in the histogram with their median and 16th to 84th percentiles, until 2,000 draws or Pause; the small triangle under its axis marks the index at the central values. The nominal Sun and the MESA model carry no uncertainties, so there is nothing to draw for them.
For the Sun and the MESA preset the dots are the interior of a 1 M☉, [Fe/H] = 0 MESA model at 2.76 Gyr, the stored profile nearest the Sun's age (see the data notes), and the shaded band is its convective envelope, which begins at 0.74 R. The polytrope has a single index everywhere; the model's envelope follows a nearly adiabatic run of pressure with density that a core-fitted index cannot share, and its composition is not uniform: the hydrogen fraction, the dotted curve in the energy panel, falls from 0.70 at the surface to 0.50 at the centre, where the pp chain has been at work.
The two small panels show the solution θ(ξ) against the three exact cases, and the energy generation split into its two chains with the fraction of the luminosity produced inside each radius. Hover over the figures for values; a click on the luminosity curve sets n.
Where it came from
This page descends from the first project of my Computational Astronomy course at the University of Porto (2018/19): a Python notebook that solved the Lane-Emden equation with scipy, matched the model luminosity of the Sun, 61 Vir and GJ 504 to the observed one and ran a Monte Carlo over the quoted errors of M, R and L. This version runs the same chain in the browser and re-solves on every slider move; it uses the IAU 2015 nominal Sun, takes the rate formulae and the constants from the sources named below, states the uncertainty conventions of each paper, checks the solver against the three exact solutions, and adds the comparison with a full stellar model.
Data and credits
Constants: the solar radius, luminosity and mass parameter are the nominal conversion constants of IAU 2015 Resolution B3 (Prša et al. 2016, AJ 152, 41): R☉ = 6.957 × 10⁸ m, L☉ = 3.828 × 10²⁶ W and GM☉ = 1.3271244 × 10²⁰ m³ s⁻², with the CODATA 2022 values of G and the atomic mass constant. The solar composition, X = 0.7381 and Z = 0.0134, and the share of C, N and O in Z come from Asplund et al. (2009, ARA&A 47, 481).
Rates and polytropes: the energy generation follows Kippenhahn, Weigert and Weiss, Stellar Structure and Evolution (2nd ed., Springer, 2012), Sect. 18.5, eqs. (18.63) and (18.65), which are their fits to the NACRE rates of Angulo et al. (1999, Nucl. Phys. A 656, 3). The polytropic relations and the tabulated constants are those of Chandrasekhar (1939, An Introduction to the Study of Stellar Structure), as reproduced in Chap. 19 and Table 19.1 of the same textbook.
61 Vir: radius 0.9867 ± 0.0048 R☉, luminosity 0.8222 ± 0.0033 L☉ and [Fe/H] = +0.01 from von Braun et al. (2014, MNRAS 438, 2413), Table 4, where the radius comes from a CHARA angular diameter; the mass 0.95 (+0.04, −0.03) M☉ from Vogt et al. (2010, ApJ 708, 1366), Table 1, who adopt the isochrone mass of Valenti and Fischer (2005).
GJ 504: mass 1.16 ± 0.05 M☉, radius 1.36 ± 0.04 R☉ and [Fe/H] = +0.13 from Fuhrmann and Chini (2015, ApJ 806, 163), Table 1, whose note states that the errors are 2σ, so half of each is used as σ; log (L/L☉) = 0.332 ± 0.032 from Kuzuhara et al. (2013, ApJ 774, 11), Table 1, who adopt the Valenti and Fischer (2005) value. The two stars are planet hosts, and the two papers on GJ 504 disagree about its age; nothing here depends on that.
The stellar model is one interior profile from the data file of my Stellar Explorer (stellar-explorer-data on GitHub): a 1 M☉, [Fe/H] = 0 track computed with MESA r24.08.1 (Paxton et al. 2011, ApJS 192, 3) and post-processed with GYRE, stored as the 94 models whose interior the run saved, with 256-zone profiles.
On the main sequence the run saved an interior every fifty models, so the one nearest the Sun's age (4.6 Gyr) is the model at 2.76 Gyr, and that is the age stated here; the mass, radius and luminosity of the MESA preset are those of that model, and its profile arrays are exported unchanged.
Download the star table, which records every value with its table and convention, and the model profile with its provenance. Everything runs in your browser, and nothing you do here is sent anywhere.