aquakin.ComponentBalance#

class aquakin.ComponentBalance(component, inflow, outflow, gas, accumulation, imbalance)[source]#

Bases: object

The 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 has imbalance = 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

relative_imbalance

imbalance as a fraction of the throughput (max of in / out / gas).

component

inflow

outflow

gas

accumulation

imbalance

property relative_imbalance: float#

imbalance as a fraction of the throughput (max of in / out / gas).

A scale-free closure error: ~1e-3 or below is a well-closed balance.