aquakin.HeatBalanceTemperature#
- class aquakin.HeatBalanceTemperature[source]#
Bases:
TemperatureModelPer-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 setstemperature_fixed = True) carries its temperature as a state withV 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/dtfor 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/dtfor the temperature block, shape(state_size,).- Parameters:
temp_state (jnp.ndarray) – Current temperatures of the tracked units (in
tracked_unitsorder).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_inisNonefor a temperature-agnostic inlet (the model then holds that state fixed).
- Return type:
Array