Keep reading
You are hereSolve and check a critical atmospheric wind
Planetary atmospheres from thermal tails to winds · Reading path
Find the critical radius numerically, integrate the accelerating solution from both sides of it, and test its conserved quantities. Then compare the power requirement and collision condition before interpreting a computed rate.
Download the scripts, input, provenance, instructions and frozen outputs listed below into one ordinary folder. The input defines five synthetic single-component atmospheres: default wind, a strongly bound tail, a sparse atmosphere, an XUV power shortfall and a critical point below the reservoir. No observed planet profile or MESA evolution output enters this experiment.
The JSON fixes SI constants, boundary radius, density, prescribed temperature, XUV irradiance and usable power fraction. The script hashes the exact input bytes into the output. Keep the downloaded input unchanged for the first run; use a separately named copy for experiments. The provenance file lists the byte counts and SHA-256 values and distinguishes authored teaching inputs from the papers that motivate the equations.
python3 -W error replay-wind.py --input escape-input.json --out wind-replay-rerun.json
# Optional analytic reference, in a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements-reference.txt
python3 reference-lambert.py --out lambert-reference-rerun.json
Reading: Cranmer 2004, New views of the solar wind with the Lambert W function, v1 · Volkov et al. 2011, Thermally driven atmospheric escape, arXiv v1
The critical radius is found by bisection on between and . At every step retain the half-interval with a sign change. A missing sign change raises an error. All five fixed examples are bracketed; arbitrary new inputs must be checked.
Compare the result with . For the default it is . This root only locates the zero of the numerator. The velocity still has to pass through on the accelerating branch. Directly dividing numerator by denominator at that point produces zero divided by zero.
Reading: Cranmer 2004, New views of the solar wind with the Lambert W function, v1
Integrate instead of velocity. This keeps the state finite even for extremely small subsonic speeds. Start at with the local expansion below, then integrate inward or outward using fourth-order Runge–Kutta. Targets closer than to the sonic point use the expansion directly.
The maximum radial step is . Each requested radius is integrated independently from the regular sonic neighborhood. The output also halves this maximum step at seven radii from to , and saves the change in log Mach number. This checks numerical sensitivity of the ODE path; its agreement with a separate analytic solution tests a different implementation.
Reading: Cranmer 2004, New views of the solar wind with the Lambert W function, v1
Set . The implicit Parker relation can be inverted using the Lambert-W function, defined by . In the interval of interest it has two real branches. The branch names in SciPy are zero and minus one.
The optional script evaluates the principal branch below the sonic radius and the other real branch above it. At exactly it assigns the regular limit explicitly. It compares eleven radii with the independently integrated ODE. At twice the sonic radius, choosing the principal branch gives a subsonic root instead of the intended accelerating wind. Both can satisfy an implicit equation, which is why a small algebraic residual alone cannot identify the physical branch.
Reading: Cranmer 2004, New views of the solar wind with the Lambert W function, v1
Recover density from the base boundary and calculate at all saved radii. Also compute , the isothermal momentum integral. The first check tests the density normalization; the second responds to errors in the independently integrated velocity shape.
The frozen default has relative mass-flux spread of order ten to the minus fifteen and a momentum-integral spread below ten to the minus ten in sound-speed-squared units. Those are numerical residuals. They do not include an uncertainty in temperature, the collision cross section or the omission of cooling.
The table and curve below use the public replay output. The strongly bound case gives an illustrative Jeans rate near ten milligrams per second, but its formal Parker sonic Knudsen number is enormous. The shortfall case has a well-behaved numerical wind and a power requirement about 752 times the available XUV power. The buried-critical case is already supersonic at the reservoir. The output retains each failed interpretation beside its numerical results.
| Case | Sonic radius / base | Formal Parker rate · kg/s | Sonic Knudsen | Required / available power |
|---|---|---|---|---|
| Default wind | ||||
| Rare tail | ||||
| Sparse gas | ||||
| Heat shortfall | ||||
| Buried critical point |
Reading: Volkov et al. 2011, Thermally driven atmospheric escape, arXiv v1 · Murray-Clay, Chiang & Murray2009, Atmospheric escape from hot Jupiters, v2
Copy the input and double only the base number density in the default case. Predict the wind rate, the sonic Knudsen number and the required-to-available power ratio before running. The respective changes should be factors of two, one half and two. The velocity shape stays fixed because its equation contains gravity and sound speed, not the density normalization.
For a second experiment, change only the declared outer radius from twelve to twenty-four base radii. Re-run the mechanical-energy comparison. More work and acceleration must be supplied as gas travels farther. Keep track of this outer boundary whenever you quote an isothermal heat requirement.
The public files may be reused as the scientific teaching material described in their README. They contain standalone numerical analysis, not a copy of the protected interactive Lab. To study a particular planet, replace the prescribed temperature model with an energy/chemistry calculation and establish appropriate lower and outer boundaries.
Reading: Murray-Clay, Chiang & Murray2009, Atmospheric escape from hot Jupiters, v2 · Cranmer 2004, New views of the solar wind with the Lambert W function, v1
Your implicit equation residual is tiny, but the speed falls below the sound speed beyond the critical radius. Which test catches the mistake?
Check the branch and the sign of acceleration. At x>1 the accelerating transonic solution must use the supersonic Lambert-W branch. The principal branch can satisfy the same implicit relation, so equation residual alone is insufficient.
The output input hash differs from the frozen reference. Can you compare all last digits directly?
First identify the input change. A different boundary, density or temperature is a different calculation. Restore the fixed input for a numerical reproduction, then use a separate modified run for a physical experiment.
Save these files together. The numerical replay uses the Python3.10+ standard library. Only the optional Lambert-W comparison needs the pinned NumPy/SciPy dependencies.
7June2004; AJP 72,1397–1403. Full text, SectionsIII–IV, equations12–16: isothermal momentum equation, critical point and the two real Lambert-W branches. The solar ionized-hydrogen sound-speed convention is replaced by our explicitly fixed single-particle mass.
26September2010 preprint, published ApJL729,L24(2011). Full text, Section 2 and Figures1–5: hard-sphere mean free path, radius-based versus local scale-height Knudsen numbers, kinetic escape and conditional Jeans corrections. Their heating below the lower boundary differs from a globally maintained isothermal wind. The adopted Lab collision cross section is a teaching input, not their molecular-nitrogen value.
18November2008 revision, ApJ 693,23(2009). Full text, Section 3.2, equations19/22 and Figure 7: absorbing area, energy-limited scaling and the cooling/recombination limitations of a fixed efficiency. This source develops hot-Jupiter radiation hydrodynamics; the small-planet illustration uses only the explicitly stated global power comparison.
You are hereSolve and check a critical atmospheric wind
Planetary atmospheres from thermal tails to winds · Reading path