MixedSystem

MixedSystem(
    reactions=list(),
    discharge,
    inflow_concentration,
    volume,
    parameters=None,
)

Represents a mixed (batch) reactor system without spatial transport.

This class models a well-mixed reactor where species concentrations are uniform throughout the volume. It supports kinetic reactions, inflow/outflow, and user-defined parameters.

Parameters

Name Type Description Default
reactions list[KineticReaction] List of kinetic reactions. Default is empty list. list()
discharge Callable[[jax.Array], jax.Array] or jax.Array Function that computes discharge (volumetric flow rate) given time, or a constant discharge value. required
inflow_concentration AbstractSpecies Concentration of species in the inflow. required
volume jax.Array Volume of the mixed reactor. required
parameters Any Additional system parameters. Default is None. None

Methods

Name Description
build Build a configured mixed reactor system.
compute_inflow_outflow Compute the inflow/outflow contribution to the rate of change of concentrations.

build

MixedSystem.build(
    reactions=None,
    discharge,
    inflow_concentration,
    volume,
    parameters=None,
)

Build a configured mixed reactor system.

This convenience constructor validates input shapes and normalizes scalar inputs before creating a MixedSystem instance.

Parameters

Name Type Description Default
reactions list[KineticReaction] or None List of kinetic reactions. Default is None. None
discharge Callable[[jax.Array], jax.Array] or jax.Array Discharge function or scalar discharge value. required
inflow_concentration AbstractSpecies Concentration of species in the inflow. required
volume jax.Array Volume of the mixed reactor. required
parameters Any or None Additional system parameters. Default is None. None

Returns

Name Type Description
MixedSystem Configured mixed reactor system.

compute_inflow_outflow

MixedSystem.compute_inflow_outflow(time, state)

Compute the inflow/outflow contribution to the rate of change of concentrations.

Parameters

Name Type Description Default
time jax.Array Current simulation time. required
state AbstractSpecies Current species concentrations. required

Returns

Name Type Description
AbstractSpecies Rate of change due to inflow/outflow (dc/dt).
Back to top