aquakin.AlgebraicTemperature#

class aquakin.AlgebraicTemperature[source]#

Bases: TemperatureModel

Instantaneous flow-weighted temperature (the default, historic behaviour).

Carries no state and overrides nothing – units self-compute their outlet temperature from their inlets exactly as before, so a plant using this model is byte-for-byte identical to the pre-TemperatureModel plant.

__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