aquakin.composition_table#
- aquakin.composition_table(model, *, electron_acceptor_cod=True, params=None)[source]#
The shipped COD / N / P composition table for a model.
- Parameters:
model (CompiledModel) – A shipped ASM-family model (
asm1/asm1_ammonia_limitation/asm2d/asm2d_tud/asm3/asm3_biop) oradm1.electron_acceptor_cod (bool, optional) – ASM family only. If
True(default) nitrate / N₂ carry their NH₄-referenced electron-equivalent COD – the convention under which the Gujer stoichiometry conserves COD (use this foraquakin.check_conservation()). IfFalsethey carry no COD (lab COD: a reported COD is then the organic oxygen demand an analyst measures), the right choice for reporting a results balance.params (array-like, optional) – A parameter vector whose composition fractions (
i_XB/iN_*/N_bac…) override the YAML defaults, so the table tracks a calibrated / run-specific composition.
- Returns:
{species: {component: content}}in the species’ native measure, for the components the model carries (COD,N, andPwhere modelled). Species with no COD / N / P content (alkalinity, TSS, metal-hydroxide) map to an empty dict.- Return type:
dict
- Raises:
KeyError – If there is no shipped table for
model.name(author one by passing an explicit composition to theaquakin.utils.balance/Plant.mass_balance()functions).