aquakin.ComponentBalance#
- class aquakin.ComponentBalance(component, inflow, outflow, gas, accumulation, imbalance)[source]#
Bases:
objectThe closure of one conserved component over the simulation window.
All terms are in canonical grams of the component (g COD, g N, g P) summed over the window
[t0, t1]. A closed balance hasimbalance = inflow − outflow − gas − accumulation ≈ 0.- Variables:
component (str) –
"COD","N"or"P".outflow (inflow,) – Component carried in by the influents / out by the terminal material streams (g).
gas (float) – Component that left as gas / via an untracked electron acceptor (g).
accumulation (float) – Change in the component’s plant inventory,
inventory(t1) − inventory(t0)(g).imbalance (float) –
inflow − outflow − gas − accumulation(g); zero when closed.
- Parameters:
component (str)
inflow (float)
outflow (float)
gas (float)
accumulation (float)
imbalance (float)
- __init__(component, inflow, outflow, gas, accumulation, imbalance)#
- Parameters:
component (str)
inflow (float)
outflow (float)
gas (float)
accumulation (float)
imbalance (float)
- Return type:
None
Methods
__init__(component, inflow, outflow, gas, ...)Attributes
imbalanceas a fraction of the throughput (max of in / out / gas).componentinflowoutflowgasaccumulationimbalance- property relative_imbalance: float#
imbalanceas a fraction of the throughput (max of in / out / gas).A scale-free closure error: ~1e-3 or below is a well-closed balance.