Project 1: Science Background
COMP 536 | Short Projects
You do not need to become an astrophysicist for Project 1.
You do need enough context to:
- interpret what the paper’s symbols represent
- recognize when your results are nonsense
Think of this page as a vocabulary + sanity-check cheat sheet.
Key terms (one-liners)
| Term | Meaning |
|---|---|
| Star | A self-gravitating ball of hot gas generating energy via nuclear fusion |
| Mass (\(M\)) | Total matter content; the main control knob for stellar properties |
| Luminosity (\(L\)) | Total power output (energy per unit time). Bigger \(L\) = brighter |
| Radius (\(R\)) | The star’s physical size |
| Effective temperature (\(T_\mathrm{eff}\)) | The blackbody temperature matching the star’s surface brightness |
| Solar units | Using the Sun as a convenient reference (\(M_\odot\), \(L_\odot\), \(R_\odot\), \(T_\odot\)) |
| ZAMS | “Zero-Age Main Sequence” — the moment stable hydrogen burning begins |
| Metallicity (\(Z\)) | Mass fraction of elements heavier than helium (see below) |
Metallicity: What astronomers mean by “metals”
In astronomy, metallicity (\(Z\)) is the mass fraction of elements heavier than helium.
Why this peculiar definition? The primordial universe (after Big Bang nucleosynthesis) contained almost exclusively hydrogen and helium:
| Element | Primordial mass fraction |
|---|---|
| Hydrogen (\(X\)) | \(\approx 0.75\) |
| Helium (\(Y\)) | \(\approx 0.25\) |
| Everything else (\(Z\)) | \(< 10^{-9}\) |
All heavier elements — carbon, oxygen, iron, everything in the periodic table beyond helium — were synthesized later in stellar cores and supernovae. Astronomers call these “metals” (even though oxygen and carbon aren’t metals in the chemistry sense).
Composition constraint: Since \(X + Y + Z = 1\), specifying \(Z\) (plus an assumption about helium enrichment) determines the full composition.
Solar metallicity: The Sun has \(Z_\odot = 0.02\) (about 2% metals by mass). This is the reference point in the Tout et al. fits.
How metallicity affects stars: Higher \(Z\) means:
- More opacity (metals absorb radiation more efficiently than H/He)
- Lower luminosity at fixed mass (radiation escapes less easily)
- Larger radius (star must expand to radiate the same energy)
The Tout et al. (1996) fits cover \(Z = 0.0001\) to \(0.03\) — from nearly primordial to super-solar.
Use \(Z = 0.02\) (solar metallicity) unless otherwise specified. The coefficient polynomials in Tables 1 and 2 reduce to their first column (\(a\) or \(a'\)) when \(Z = Z_\odot\).
What trends should you expect?
You don’t need exact astrophysics — just these sanity expectations:
| If mass increases… | Then… |
|---|---|
| Luminosity | Increases strongly (\(L \propto M^3\) to \(M^4\)) |
| Radius | Increases (\(R \propto M^{0.6}\) to \(M^{0.8}\)) |
| Effective temperature | Increases (hotter for massive stars) |
| Main-sequence lifetime | Decreases (massive stars die young) |
If your outputs violate these trends across the valid mass range, you almost certainly:
- used the wrong log base (\(\log_{10}\) vs \(\ln\))
- mixed units (CGS vs solar)
- used the wrong coefficient table
- forgot a piecewise regime boundary
Why ZAMS \(\neq\) present-day Sun
Stars evolve continuously on the main sequence. The Sun today is about 30% brighter than when it formed 4.6 billion years ago.
Expected ZAMS values for 1 \(M_\odot\):
- \(L_{\odot,\mathrm{ZAMS}} \approx 0.7\, L_\odot\) (not 1.0!)
- \(R_{\odot,\mathrm{ZAMS}} \approx 0.89\, R_\odot\)
- \(T_{\mathrm{eff},\mathrm{ZAMS}} \approx 5600\) K
If you get \(L = 1.0\, L_\odot\) for a 1 \(M_\odot\) star, you have the wrong model (probably using present-day values instead of ZAMS fits).
Two important timescales
Stars have characteristic timescales that span many orders of magnitude. You will compute two of them:
Kelvin-Helmholtz timescale (\(t_\mathrm{KH}\))
The Kelvin-Helmholtz timescale is the time a star could shine at its current luminosity if powered only by gravitational contraction:
\[t_\mathrm{KH} = \frac{GM^2}{RL}\]
This is approximately how long a star takes to form — to contract from a diffuse cloud to a compact, hot object. For the Sun, \(t_\mathrm{KH} \approx 30\) Myr.
Physical meaning: Before nuclear fusion ignites, a protostar releases gravitational potential energy as it shrinks. The KH timescale sets the pace of this pre-main-sequence evolution.
Main-sequence lifetime (\(t_\mathrm{MS}\))
The main-sequence lifetime is how long a star spends burning hydrogen in its core:
\[t_\mathrm{MS} \approx 10\,\mathrm{Gyr} \times \frac{M/M_\odot}{L/L_\odot}\]
For the Sun, \(t_\mathrm{MS} \approx 10\) Gyr. But since \(L \propto M^{3-4}\), massive stars have much shorter lifetimes:
| Mass | \(t_\mathrm{MS}\) |
|---|---|
| 0.5 \(M_\odot\) | \(\sim 50\) Gyr |
| 1 \(M_\odot\) | \(\sim 10\) Gyr |
| 10 \(M_\odot\) | \(\sim 20\) Myr |
Physical meaning: More massive stars have more fuel, but they burn it much faster. A 10 \(M_\odot\) star lives only \(\sim 1/500\) as long as the Sun.
Comparing the timescales
For main-sequence stars: \(t_\mathrm{KH} \ll t_\mathrm{MS}\)
This separation of timescales is why the main sequence exists — stars reach thermal equilibrium (set by \(t_\mathrm{KH}\)) long before they exhaust their fuel (set by \(t_\mathrm{MS}\)).
If your code gives \(t_\mathrm{KH} > t_\mathrm{MS}\), something is wrong — check your units!
What you are NOT responsible for
You are not expected to:
- derive the stellar structure equations
- understand stellar evolution in depth
- know the physics of nuclear fusion
Your job is: extract -> implement -> validate -> test -> reproduce
The Tout et al. (1996) paper
You will extract and implement the fitting formulae from Tout et al. (1996). The paper contains:
- Equations for \(L(M, Z)\) and \(R(M, Z)\) — rational functions of mass
- Coefficient tables — with metallicity dependence encoded as polynomials
- Valid ranges — the fits are only accurate within certain mass and metallicity bounds
Your job is to locate these in the paper, understand the structure, and translate them into code. This is a core computational science skill.
Quick reference: units
This project uses CGS units and solar normalization:
| Quantity | Solar value | CGS units | Description |
|---|---|---|---|
| Mass | \(M_\odot = 1.989 \times 10^{33}\) | g | Total matter content of the Sun |
| Radius | \(R_\odot = 6.957 \times 10^{10}\) | cm | Distance from Sun’s center to photosphere |
| Luminosity | \(L_\odot = 3.828 \times 10^{33}\) | erg/s | Total power output of the Sun |
| Temperature | \(T_\odot \approx 5772\) | K | Effective (blackbody) temperature of the Sun |
The Tout et al. (1996) fits use solar units (\(M/M_\odot\), \(L/L_\odot\), \(R/R_\odot\)), so your functions should too.
Required constants for constants.py
Your constants.py module must define these physical constants in CGS units.
You will add to this module throughout the semester as new projects require additional constants. Start with what’s needed for Project 1, and extend it as you go. By the end of the course, you’ll have a comprehensive, well-documented constants library you can reuse in future work.
Solar reference values
| Name | Value | Units | Description |
|---|---|---|---|
MSUN |
\(1.989 \times 10^{33}\) | g | Solar mass |
RSUN |
\(6.957 \times 10^{10}\) | cm | Solar radius |
LSUN |
\(3.828 \times 10^{33}\) | erg/s | Solar luminosity |
TSUN |
\(5772\) | K | Solar effective temperature |
Fundamental constants
| Name | Value | Units | Description |
|---|---|---|---|
G |
\(6.674 \times 10^{-8}\) | cm\(^3\) g\(^{-1}\) s\(^{-2}\) | Gravitational constant |
SIGMA_SB |
\(5.670 \times 10^{-5}\) | erg cm\(^{-2}\) s\(^{-1}\) K\(^{-4}\) | Stefan-Boltzmann constant |
Time units
| Name | Value | Units | Description |
|---|---|---|---|
YEAR |
\(3.156 \times 10^{7}\) | s | Seconds per year |
MYR |
\(3.156 \times 10^{13}\) | s | Seconds per megayear (\(10^6\) yr) |
GYR |
\(3.156 \times 10^{16}\) | s | Seconds per gigayear (\(10^9\) yr) |
Use authoritative sources (e.g., IAU 2015 nominal values, CODATA 2018) and cite them in your CONSTANTS.md or README.md.