aquakin.evaluate_bsm2#

aquakin.evaluate_bsm2(plant, solution, params=None, *, effluent_port=None, disposal_port='dewatering.underflow', internal_recycle_port='tank5_split.internal_recycle', ras_port='underflow_split.ras', waste_port='underflow_split.waste', do_saturation=8.0, digester_feed_T_C=15.0, aeration_system=None)[source]#

Compute the BSM2 performance indices from a solved plant.

Parameters:
  • plant (Plant) – A BSM2 plant from build_bsm2() (open- or closed-loop).

  • solution (PlantSolution) – A solution from plant.solve over the evaluation window. Use a fine enough t_eval to resolve the influent dynamics; the indices are trapezoidal time-integrals over the saved points.

  • params (jnp.ndarray, optional) – The plant parameters used for the run (defaults to the plant defaults).

  • effluent_port (str, optional) – Final-effluent stream to score. Defaults to "effluent_mix.out" when the plant has an influent bypass (the combined treated + bypassed flow), else "settler.overflow".

  • disposal_port (str, optional) – Stream endpoints to reconstruct; the defaults match build_bsm2.

  • internal_recycle_port (str, optional) – Stream endpoints to reconstruct; the defaults match build_bsm2.

  • ras_port (str, optional) – Stream endpoints to reconstruct; the defaults match build_bsm2.

  • waste_port (str, optional) – Stream endpoints to reconstruct; the defaults match build_bsm2.

  • do_saturation (float, optional) – DO saturation used in the aeration-energy formula (gO2/m^3). This is the nominal saturation by BSM2 convention; it is not temperature-adjusted even when the plant runs with do_temperature_correction (where the reactor’s actual driving-force saturation is scaled by C_s(T)/C_s(ref)). So the reported AE reflects the BSM2 definition, not the temperature- corrected oxygen transfer.

  • digester_feed_T_C (float, optional) – Digester-feed temperature (°C) for the heating term, used only when the plant’s streams carry no temperature (the default constant-influent BSM2 is temperature-agnostic). Default 15.

Returns:

EQI, OCI and all component terms.

Return type:

BSM2Evaluation