aquakin.InfluentSeries#

class aquakin.InfluentSeries(t, Q, C, model, T=None)[source]#

Bases: object

A time-series of influent data.

Variables:
  • t (jnp.ndarray) – Sample times, shape (n_t,), strictly ascending.

  • Q (jnp.ndarray) – Volumetric flow rate at each sample, shape (n_t,).

  • C (jnp.ndarray) – Concentration at each sample, shape (n_t, n_species) where columns follow model.species ordering.

  • model (CompiledModel)

  • T (jnp.ndarray, optional) – Influent temperature at each sample (Kelvin), shape (n_t,). When given, at(t) returns a stream carrying the interpolated temperature, which the plant propagates to temperature-dependent kinetics. None (default) leaves the influent temperature-agnostic.

Parameters:
  • t (jnp.ndarray)

  • Q (jnp.ndarray)

  • C (jnp.ndarray)

  • model (CompiledModel)

  • T (jnp.ndarray | None)

__init__(t, Q, C, model, T=None)#
Parameters:
  • t (jnp.ndarray)

  • Q (jnp.ndarray)

  • C (jnp.ndarray)

  • model (CompiledModel)

  • T (jnp.ndarray | None)

Return type:

None

Methods

__init__(t, Q, C, model[, T])

at(t)

Return the influent Stream at time t.

constant(model[, overrides, base, T])

Build a constant-in-time influent from a feed composition.

Attributes

T

t

Q

C

model

classmethod constant(model, overrides=None, /, *, Q, base='zero', T=None, **species)[source]#

Build a constant-in-time influent from a feed composition.

The composition is built with model.concentrations(overrides, base=base, **species)base="zero" by default, so an unspecified species is absent from the feed rather than at its YAML reference value. The series carries two identical samples, so at(t) returns the same constant stream at every time.

Parameters:
  • model (CompiledModel) – Kinetic model whose species ordering C follows.

  • overrides (dict[str, float], optional) – Species name -> feed concentration. Positional-only.

  • Q (float) – Constant volumetric flow rate.

  • base ({"zero", "defaults"}, optional) – Composition base; defaults to "zero".

  • T (float, optional) – Constant feed temperature (Kelvin); None leaves it agnostic.

  • **species (float) – Convenience overrides for identifier-safe species names.

Return type:

InfluentSeries

Examples

>>> InfluentSeries.constant(net, {"SS": 60.0, "SNH": 25.0}, Q=18446.0)
>>> InfluentSeries.constant(net, SS=400.0, Q=2.0)
at(t)[source]#

Return the influent Stream at time t.

Linearly interpolates between samples. Outside the range, clamps to the endpoint values (jnp.interp semantics).

Parameters:

t (Array)

Return type:

Stream