This script models how CO2 concentration in an aquarium changes over time depending on:
- The amount of CO2 being added ("dissolution rate"),
- The natural baseline CO2 concentration before dosing,
- The rate at which CO2 dissipates or escapes from the aquarium (off-gassing),
- And the volume of the aquarium (which you can input dynamically).
It calculates the temporal evolution of CO2 concentration (in ppm) and visualizes it in an interactive plot, also showing some summary metrics related to CO2 consumption.
Explanatory notes:
- Aquarium volume (in liters): volume affects dilution and concentration changes.
- Dissolution rate (g/hour): how much CO2 is added (dosed) to the aquarium per hour.
- For example, if you add 30 bubbles per minute with an average bubble diameter of 4mm (and all CO2 dissolves), the dissolution rate is approximately 0.12 grams of CO2 per hour.
- Baseline CO2 (ppm): the original atmospheric or background CO2 level in the water without dosing.
- Dissipation capacity (1/hour): how quickly CO2 leaves the aquarium through ventilation or surface exchange — a higher value means CO2 escapes faster.
- % excess lost/hour
- In a still tank with minimal agitation, the dissipation constant is low (~0.1–0.2 per hour).
- With moderate surface agitation, the constant is usually around 0.2–0.5 per hour.
The exact numbers are not interesting (no one would determine them anyway), but you can play with these parameters to get an idea of how the dosing and the off-gassing rates influence the CO₂ levels and how fast can you achieve the desired levels.