antasena: A Python Library for Nitrox Diving Calculations
Abstract
We present antasena, an open-source Python library for calculations that underlie diving with nitrox, oxygen-nitrogen mixtures richer in oxygen than air. It computes depth limits, equivalent depths, inert-gas uptake, no-decompression limits, staged decompression schedules, central-nervous-system and pulmonary oxygen exposure, real-gas cylinder contents, and partial-pressure blending, and its command-line and desktop interfaces display the derivation of every result with the user’s inputs substituted. Each working equation is derived from the three-dimensional momentum balance of a fluid at rest, the advection-diffusion equation for a dissolved gas in perfused tissue, and the Helmholtz free energy of a gas mixture, with every reducing assumption stated. Because a dive plan is a sequence of segments of fixed gas and linearly varying depth, tissue tensions, oxygen doses, and gas consumption admit closed forms without time stepping. An independent re-implementation reproduces the closed-form tensions to within relative differences of 5 × 10^{−13} against fourth-order Runge-Kutta integration and 9 × 10^{−16} against 60-digit arithmetic, whereas the textbook form loses digits to cancellation on short segments. The analysis indicates that the classical equivalent air depth is shallower than its alveolar-consistent counterpart by 6 to 15 cm, that the textbook blending formula yields fills about 0.3 percentage points richer than intended for a 32% mixture at 200 bar, and that ideal-gas planning overstates the usable gas of an air cylinder filled to 232 bar by about 5%. All 79 independent checks pass. The library serves teaching and planning and does not predict individual physiological risk.
Related
- EL‐PASO: An Open‐Source Python Library for Processing and Standardizing Particle Measurements Taken in Space
- LQL-Equiv-web: a Python library and browser application for linear-quadratic-linear dose equivalence in radiotherapy
- Processing of acceleration and dive data on-board satellite relay tags to investigate diving and foraging behaviour in free-ranging marine predators
- KrigeKit v0.3.2: a parallel Python–Fortran engine for variogram analysis, kriging, and geostatistical simulation
- Brief communication: Landsifier 2 – Python-based Software for Automated Landslide Type Classification
BibTeX
@misc{herho2026antasena,
title = {{antasena: A Python Library for Nitrox Diving Calculations}},
author = {Sandy Hardian Susanto Herho and Faruq Khadami and Faizal Ade Rahmahuddin Abdullah and Iwan Pramesti Anwar and Karina Aprilia Sujatmiko and Alfita Puspa Handayani and Dasapta Erwin Irawan},
howpublished = {EarthArXiv},
year = {2026},
month = oct,
doi = {10.31223/x5822b},
url = {https://eartharxiv.org/repository/view/15743/},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - antasena: A Python Library for Nitrox Diving Calculations
AU - Sandy Hardian Susanto Herho
AU - Faruq Khadami
AU - Faizal Ade Rahmahuddin Abdullah
AU - Iwan Pramesti Anwar
AU - Karina Aprilia Sujatmiko
AU - Alfita Puspa Handayani
AU - Dasapta Erwin Irawan
PY - 2026
DA - 2026/10/24
PB - EarthArXiv
DO - 10.31223/x5822b
UR - https://eartharxiv.org/repository/view/15743/
AB - We present antasena, an open-source Python library for calculations that underlie diving with nitrox, oxygen-nitrogen mixtures richer in oxygen than air. It computes depth limits, equivalent depths, inert-gas uptake, no-decompression limits, staged decompression schedules, central-nervous-system and pulmonary oxygen exposure, real-gas cylinder contents, and partial-pressure blending, and its command-line and desktop interfaces display the derivation of every result with the user’s inputs substituted. Each working equation is derived from the three-dimensional momentum balance of a fluid at rest, the advection-diffusion equation for a dissolved gas in perfused tissue, and the Helmholtz free energy of a gas mixture, with every reducing assumption stated. Because a dive plan is a sequence of segments of fixed gas and linearly varying depth, tissue tensions, oxygen doses, and gas consumption admit closed forms without time stepping. An independent re-implementation reproduces the closed-form tensions to within relative differences of 5 × 10^{−13} against fourth-order Runge-Kutta integration and 9 × 10^{−16} against 60-digit arithmetic, whereas the textbook form loses digits to cancellation on short segments. The analysis indicates that the classical equivalent air depth is shallower than its alveolar-consistent counterpart by 6 to 15 cm, that the textbook blending formula yields fills about 0.3 percentage points richer than intended for a 32% mixture at 200 bar, and that ideal-gas planning overstates the usable gas of an air cylinder filled to 232 bar by about 5%. All 79 independent checks pass. The library serves teaching and planning and does not predict individual physiological risk.
ER -