An energy-limited escape calculation connects planet radius, heating efficiency, and incident XUV flux to the mass-loss rate. Our example samples those inputs on a synthetic grid and uses TDpy's unit-aware calculation.
From the checkout root, source scripts/set_repository_path.sh to set TESTINGPHOTOEVAPORATION_PATH in the current shell. The ignored data/ and visuals/ directories are available for local inputs and generated figures.
Our notebook
calls run_example in the example script, which
evaluates TDpy's unit-aware energy_limited_mass_loss helper. The planet mass stays
at five Earth masses. We vary radius from one to three Earth radii, heating
efficiency from 0.05 to 0.3, and incident XUV flux from 1 to 10,000 W/m^2. The
absorption radius equals the planet radius and the Roche factor is one.
The interactive figure uses the same 720 calculated rates as the CSV. Its two panels show fixed-efficiency and fixed-radius slices of the nine radius-efficiency combinations. These curves represent the specified synthetic inputs.
Install the pinned TDpy revision and the example's dependencies from this checkout. The notebook's interactive figure additionally requires Bokeh 3.10 or later. Select that same Python environment as the notebook kernel.
python -m pip install -r requirements.txt 'bokeh>=3.10' ipykernel
python scripts/energy_limited_escape.py --bokeh
python scripts/energy_limited_escape.py --typefileplot pdf --typeplotback darkThe CLI writes timestamped outputs under visuals/. The notebook writes directly
under examples/visuals/. Each call returns the table and output paths. Existing
outputs are never replaced. PNG is the default at 300 dpi. PDF and white/dark
themes are supported, and --bokeh adds a self-contained HTML version. The
calculation evaluates 720 static input combinations without time integration.
The rate is absorbed power divided by binding energy per unit mass,
10.1051/0004-6361:20066929.
Mass, radius, flux, absorption altitude, and heating efficiency are fixed inputs. The curves compare mass loss across the assumed flux, efficiency, and radius scalings. Atmospheric lifetimes and population outcomes require radiative cooling, hydrodynamics, atmospheric supply, and evolving stellar and planetary structure.
Run python -m pytest -q to check the shared-helper calls, numerical table,
static themes and formats, Bokeh data parity, and protection of previous outputs.
