Skip to content

Tunables

A tunable is a claim about how real aquariums behave, held apart from the code that reads it. All of them live in src/simulation/config/, addressed as section.key.

Every tunable declares its own metadata alongside its default — a label, a unit, a spinner step and, for everything but eight nitrogen-cycle leaves, a min/max. Two writers consult that range: the CLI refuses a config set outside it, and the tunables drawer holds its field to it. The save path does not — its bounds are hand-written per leaf and mostly assert shape rather than range, so a stored digestionRate of −1 loads without complaint against a declared minimum of 0.01. A module constant elsewhere in the engine — an alert line, an action bound, a device rating — is not a tunable: it declares no range, and the config layer cannot reach it.

SectionPath prefixGoverns
Decompositiondecomposition.How fast food, waste and the bed’s mulm rot, what temperature and oxygen do to it, and how fast food and waste settle into the bed
Nitrogen cyclenitrogenCycle.Ammonia to nitrite to nitrate, and the two nitrifier guilds
Gas exchangegasExchange.O₂ and CO₂ across the surface, and what aeration does to both
Temperaturetemperature.Drift toward the room, scaled by tank size
Evaporationevaporation.Water lost per day, and how warmth accelerates it
Algaealgae.What thriving plants do to any bloom; a bloom’s own kind is its traits, and the rest of it runs on plants.
Opticsoptics.What the water column, the blooms and the leaves above take out of the light on the way down
Water chemistrywaterChemistry.What calcite, driftwood and aqua soil do to KH and GH
Plantsplants.Photosynthesis, the energy budget and stores, harm, income, shedding
Nutrientsnutrients.Fertilizer formula, root tab, the bed’s leak, half-saturations, demand tiers, minerals in food
Livestocklivestock.The food’s carbon and nitrogen, feeding, pace, toxin loads, health and repair, broods, death

The values themselves are not repeated here. They move when the model is recalibrated, and the file that holds each one carries the reference it was read off — which is the part that makes a number checkable.

TunableMeaningUnit
rate.food · .waste · .mulmFirst-order rate each pool rots at, at the reference temperature in oxygenated water — the aerobic path’s Monod maximum/hr
q10Factor every rot rate multiplies by per 10 °C—
referenceTempTemperature the rot rates are quoted at°C
oxygenHalfSaturationDissolved O₂ at which the aerobic path runs at half ratemg/L
anaerobicShareThe anaerobic path’s pace in water with no oxygen, as a share of the aerobicof aerobic
settlingRateFirst-order rate food and standing waste settle into the bed in still water/hr
settlingHalfTurnoverTank turnovers per hour at which flow halves settlingturnovers/hr
TunableMeaningUnit
bacteriaProcessingRateAmmonia one bacteria unit oxidises per tick — the Monod maximum, at saturating ammonia and oxygenmg/unit/tick
seedingRateNitrifiers settling into the tank per litre of water per tick, each guildunits/L/tick
aobGrowthRateAOB per-capita growth at full utilization — ln 2 over the guild’s doubling time/tick
nobGrowthRateNOB per-capita growth at full utilization — ln 2 over the guild’s doubling time/tick
bacteriaPerCm2Biofilm carrying capacity — the colony’s ceiling per cm² of surfaceunits/cm²
bacteriaDeathRateMaintenance loss — ln 2 over a starved colony’s half-life — charged whether or not the colony is working/tick
q10Factor every nitrifier rate multiplies by per 10 °C—
referenceTempTemperature the nitrifier rates are quoted at°C
aobOxygenHalfSaturationDissolved O₂ at which AOB oxidise and grow at half ratemg/L
nobOxygenHalfSaturationDissolved O₂ at which NOB oxidise and grow at half ratemg/L
aobAmmoniaHalfSaturationTotal ammonia, as NH₃, at which AOB oxidise at half rateppm
nobNitriteHalfSaturationNitrite, as NO₂⁻, at which NOB oxidise at half rateppm

The four half-saturation constants are measured concentrations and carry a range. The eight leaves above them were never given bounds, so a writer that asks gets nothing back. A test asserts exactly that split, so the gap is stated rather than discovered.

A bacteria unit is 10⁶ cells, which is what makes bacteriaPerCm2 a biofilm density you can look up rather than a score. Throughput, ceiling density and seeding rate carry an exact gauge symmetry — three numbers, two physical degrees of freedom — so one of them is a units convention, and the ceiling density is the one pinned to a real measurement.

TunableMeaningUnit
atmosphericCo2CO₂ concentration the water equilibrates towardmg/L
o2SaturationBaseO₂ saturation at the reference temperaturemg/L
o2SaturationSlopeChange in O₂ saturation per °C — warmer water holds lessmg/L/°C
o2ReferenceTempTemperature the saturation base is quoted at°C
baseExchangeRateShare of the gap to equilibrium crossed per tick at optimal flow/tick
optimalFlowTurnoverTank turnovers per hour at which exchange is maximal×/hr
minFlowFactorFloor on the flow factor, as a share of the optimal-flow rate — still-surface diffusion, so a filterless tank still breathes×
aerationExchangeMultiplierMultiplier on the exchange rate while aeration runs×
aerationDirectO2O₂ injected directly by bubble dissolution, only below saturationmg/L/hr
aerationCo2OffgasMultiplierExtra CO₂ off-gassing while aerating×
TunableMeaningUnit
coolingCoefficientDrift toward the room per °C of difference, at the reference volume°C/hr/°C
referenceVolumeVolume the cooling coefficient is quoted atL
volumeExponentHow drift scales with volume — the surface-to-volume ratio—
roomDailySwingHow far the room runs above its mean at 17:00 and below it at 05:00°C
lightWarmingPerParWarming a lit fixture adds to the temperature the water drifts toward, per surface PAR°C/PAR
TunableMeaningUnit
baseRatePerDayShare of standing water lost per day at thermal equilibrium, before the lid/day
tempDoublingIntervalWater–room temperature difference, either way, that doubles the rate°C

Both kinds of bloom run on the plants’ constants, and what a kind is — its habitat, its pace, its carbon, nitrogen and phosphorus affinities, its tissue and quotas, its spores — sits in its traits, beside the plant species (Algae). What is left here holds for every kind.

TunableMeaningUnit
allelopathySeverityHow hard thriving plants’ exudates cut a bloom’s assimilation: it runs at 1 / (1 + severity × rate units of thriving plant per litre); at 0 plants leave blooms aloneL/unit
TunableMeaningUnit
waterAttenuationPerCmBeer–Lambert attenuation of the water column, per cm of depth/cm
leafAttenuationPerLaiBeer–Lambert extinction of a canopy, per unit of leaf area index; at 0 leaves shade nothing and a plant reads the water alone/LAI
TunableMeaningUnit
algaeAttenuationPerCmBeer–Lambert extinction a bloom suspended in the column adds at full coverage, per cm of depth; at 0 it shades nothing/cm
algaeCoatOpticalDepthBeer–Lambert optical depth of a full coat of bloom on a lit surface, every leaf included; at 0 it shades nothing–
TunableMeaningUnit
calciteDissolutionRateCaCO₃ one calcite rock dissolves per hour at pH 7, scaled by [H⁺]mg/h
tanninLeachRateShare of a driftwood piece’s remaining tannins leached per hour/h
aquaSoilKhUptakeShare of the tank’s KH a fresh aqua soil bed takes up per hour, scaled by the buffer left — and as much GH with it/h
TunableMeaningUnit
basePhotosynthesisRateRate one rate unit — 500 cm² of leaf at growth rate 1 — fixes carbon at, at full carbon and saturating light/hr
lowCo2HalfSaturation · mediumCo2HalfSaturation · highCo2HalfSaturationCO₂ at which a species of each carbon need photosynthesises at half ratemg/L
saturationIrradianceFactorMultiple of a species’ band low at which its light response saturates — the Ik of the light curve× band low
baseRespirationRateMaintenance per rate unit of leaf at growth rate 1, as a share of the saturated rate, owed around the clock/hr
paceQ10 · paceReferenceTempFactor the pace every rate of a flora’s budget runs at multiplies by per 10 °C, and the temperature it is 1 at— · °C
oxygenHalfSaturationDissolved O₂ half-saturating a flora’s oxygen pace, read against saturated water — its intake and mobilisation, never its upkeepmg/L
co2PerRateUnitCO₂ carried by one rate unit, fixed and released alike; oxygen derives from it at the molar ratiomg
TunableMeaningUnit
somaShareκ: share of a plant’s mobilised reserve that goes to its soma; the rest fills its offshoot buffer—
growthEfficiencyκ_G: share of new structure’s cost that ends up in it; the rest is burned building it—
reserveCapacity[E_m]: reserve a gram of structure holds when fullg/g
healingRate · healingCostFirst-order rate a flora repairs its condition deficit at, at the reference temperature, and the hours of its maintenance a point costs/hr · h
TunableMeaningUnit
storeFillDaysDays an empty store fills 63 % of the way in, from a saturating pooldays
droopEdge · nutrientDeficiencySeverityThe share of the Droop limit its full stores reach that a flora counts as fed at, so the edge sits under full stores at any quotas, and the damage at a Droop limit of 0, falling linearly to nothing at the edge× full · %/hr
quotaMin.nitrate · .phosphate · .potassium · .ironQ_min: each nutrient’s element in a gram of plant structuremg/g
quotaMax.nitrate · .phosphate · .potassium · .ironQ_max: the same, with every store fullmg/g
TunableMeaningUnit
starvationSeverityDamage at the hour’s upkeep wholly unpaid, scaled by the share unpaid%/hr
lightExcessiveSeverityDamage per PAR unit above the species’ tolerable band%/PAR/hr
temperatureStressSeverity · phStressSeverity · ghStressSeverityDamage per °C, pH unit or dGH outside the species’ tolerable band%/unit/hr
nitrateStressSeverity · nitrateEdgeDamage per e-fold of NO₃ past the plant’s own edge, and where a hardiness-0 plant’s edge sits%/e-fold/hr · ppm
co2BenefitPeak · temperatureBenefitPeak · phBenefitPeakRecovery earned per factor at its best — temperature and pH at the band’s centre; all three run on reserve density times the Droop limit’s share of full stores’%/hr
maxSheddingRateShare of itself a plant sheds per hour at condition 0, falling with the square of the deficit/hr

Every severity is pre-hardiness: a species’ hardiness scales each by 1 − hardiness, except nitrate, whose edge it carries out.

TunableMeaningUnit
fertilizerFormula.nitrate · .phosphate · .potassium · .ironThe all-in-one fertilizer’s composition per mlmg/ml
rootTab.nitrate · .phosphate · .potassium · .ironWhat one root tab pushes into the bedmg
bedLeakRateShare of each nutrient the bed holds that leaks into the water per hour/hr
halfSaturation.ammonia · .nitrate · .phosphate · .potassium · .ironThe ppm of each form — total ammonia as NH₃ — at which a full-demand plant’s stores get half what they ask of its nutrientppm
demand.low.* · demand.medium.* · demand.high.*Each tier’s share of the full need, per nutrient; scales the half-saturation of every form the nutrient comes in, ammonia’s by nitrate’s—
foodMineralContent.phosphate · .potassium · .ironMinerals in a gram of food; its nitrogen and carbon are under Livestockmg/g

A fish’s energy budget — growth, reserve, maturity, brood buffer, ageing — comes from its species’ Add-my-Pet entry and is a fixed table, not a tunable. These are what the tank does with it.

TunableMeaningUnit
digestionRateFirst-order rate a gut digests at, at 20 °C; the species’ Arrhenius factor paces it/hr
oxygenHalfSaturationDissolved O₂ at which a fish’s oxygen pace ω — its assimilation ceiling and energy conductance — is half what saturated water givesmg/L
foodNitrogenFractionNitrogen in a gram of foodg N/g food
foodCarbonFractionCarbon in a gram of foodg C/g food
temperatureStressSeverity · phStressSeverity · ghStressSeverityDamage per °C, pH unit or dGH outside the species’ tolerable band%/unit/hr
ammoniaStressSeverity · nitriteStressSeverity · nitrateStressSeverity · oxygenStressSeverityDamage per e-fold past the fish’s own tolerance edge, which hardiness moves out — the toxins on its load, free NH₃ not total ammonia; oxygen counts e-folds under%/e-fold/hr
loadRate.ammonia · .nitrite · .nitrateDominant rate a fish of 1 cm structural length loads and clears each toxin at, at 20 °C; its Arrhenius factor paces it and its length divides it/hr
loadAssimilationSeverityHow hard a fish’s load, in e-folds past its own edges summed, lowers its assimilation ceiling/e-fold
waterLevelStressSeverity · flowStressSeverityDamage per % of capacity under the threshold, and per turnover above the species’ tolerance%/%/hr · %/turnover/hr
waterLevelStressThresholdShare of capacity the water-level stressor switches on under%
starvationSeverityDamage at a maintenance left wholly unpaid, before hardiness; the hour’s shortfall scales it%/hr
hazardSeverityDamage per unit of the fish’s DEB hazard, an hourly rate: what age does to health%/hr per hazard
phBenefitPeak · oxygenBenefitPeak · plantBenefitPeakRecovery earned per factor at its best, on a full reserve%/hr
plantBenefitSaturationPointPlant power at which the planted-tank benefit stops growingpower
healingRateFirst-order rate a fish repairs its health deficit at, at 20 °C, paid from its reserve/hr
healingCostHours of a fish’s somatic upkeep one point of repair costsh
maleBufferTurnoverFirst-order rate a male burns the brood buffer he has not spent fathering, at 20 °C/hr
eggSensitivityHow many times harder the water harms a laid egg than a fish loaded to that water, as a share of the clutch an hour; a carried brood takes its mother’s harm×
eggPredationRateShare of a laid clutch an hour one gram of predator mass per litre — the grams each fish outweighs an egg — eats, before the clutch’s exposureL/g/hr
predationRateDamage an hour, before hardiness, one gram per litre of predator mass — the grams each larger fish outweighs the prey — does a fish at no size%/hr per g/L
preyVulnerabilityExponentHow steeply a growing fish outgrows its predators: exposure is (1 − size / 100) to this power, size its structural length against grown—

Not everything numeric is tunable. These are catalogs rather than calibration: they describe what a thing is, so they ship as plain constants and no writer can move them at runtime.

TableHolds
Fish speciesPer species: its Add-my-Pet energy budget — or a relative’s, rescaled by hobby length, weight, maturity age and lifespan — hardiness, temperature / pH / GH / flow tolerance bands, and a breeding block — mode, clutch exposure, the male’s share of an egg’s cost
Plant speciesPer species: growth rate, growth form, hardiness, CO₂ requirement, nutrient demand tier, and the PAR band it tolerates, whose low end sets its Ik and its rated day
Growth formsPer form: what one full unit is — its height and how height grows with size, its footprint, its leaf area index — the share of its food it draws through its roots, and its plantlet’s size and name
FiltersPer type: biological surface, target turnover, flow ceiling, tank-size ceiling, and whether it is air-driven
SubstratesPer type: colony surface per litre, and the organic and KH reserves and the nutrient charge a fresh bed holds per litre; what a fresh bag’s organics are made of, one composition for every type
Fish compositionWhat a gram of every fish, egg and brood is made of: Add-my-Pet’s reserve for carbon and nitrogen, phosphorus at N:P 15, the default flake’s potassium and iron
HardscapePer type: colony surface, and the tannins a fresh piece carries
LidsPer type: the multiplier applied to evaporation
Fixtures and pumpsThe catalog of ratings a device can be built with — heater wattages, light PAR ratings, powerhead flow rates, CO₂ bubble rates, doser amounts
ChemistryMolecular weights and the mass ratios derived from them, the degree-to-CaCO₃ conversion shared by dKH and dGH, and the CaCO₃ in an equivalent with the protons each nitrogen process moves. Derived, never quoted twice