aquakin.HeatBalanceTemperature#

class aquakin.HeatBalanceTemperature[source]#

Bases: TemperatureModel

Per-unit dynamic temperature via a completely-mixed first-order heat balance.

Every finite-volume liquid unit (one exposing a positive volume) that is not temperature-fixed (the heated digester sets temperature_fixed = True) carries its temperature as a state with V dT/dt = Q_in (T_in - T). The unit’s reactor kinetics then run at this lagged tank temperature rather than the instantaneous inlet temperature, and its outlet stream leaves at it.

__init__()#

Methods

__init__()

initial_state(plant)

Initial temperatures (K) for the tracked units, shape (state_size,).

state_rhs(plant, temp_state, inlet_by_unit)

dT/dt for the temperature block, shape (state_size,).

state_size(plant)

Length of the appended temperature-state block.

tracked_units(plant)

Names of units that carry a dynamic temperature state, in unit order.

tracked_units(plant)[source]#

Names of units that carry a dynamic temperature state, in unit order.

Return type:

list[str]

initial_state(plant)[source]#

Initial temperatures (K) for the tracked units, shape (state_size,).

Return type:

Array

state_rhs(plant, temp_state, inlet_by_unit)[source]#

dT/dt for the temperature block, shape (state_size,).

Parameters:
  • temp_state (jnp.ndarray) – Current temperatures of the tracked units (in tracked_units order).

  • inlet_by_unit (dict) – {unit_name: (Q_in, T_in)} – the resolved total inlet flow and flow-weighted inlet temperature of each tracked unit. T_in is None for a temperature-agnostic inlet (the model then holds that state fixed).

Return type:

Array