Plot the Sud demo's plant M/C over the run

Adds a third figure tracking plant.M/plant.C alongside the existing
temperature/state plots, making the per-step mass changes (malt going
in, water boiling off) visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgR9tPaSzFkAwRAUyeaaCD
This commit is contained in:
2026-06-20 07:56:28 +02:00
co-authored by Claude Sonnet 4.6
parent 241a796ffa
commit ac0f13897c
2 changed files with 16 additions and 1 deletions
+14
View File
@@ -102,6 +102,8 @@ if __name__ == '__main__':
_stirrer_speed = []
_heater_power_set = []
_heater_power_eff = []
_plant_M = []
_plant_C = []
wait_user_elapsed = 0.0
t = 0.0
@@ -142,6 +144,8 @@ if __name__ == '__main__':
_stirrer_speed.append(stirrer.speed * stirrer.isOn)
_heater_power_set.append(heater.power_set)
_heater_power_eff.append(heater.power_eff)
_plant_M.append(plant.M)
_plant_C.append(plant.C)
t += dt
steps += 1
@@ -181,6 +185,16 @@ if __name__ == '__main__':
legend(["stirrer speed (effective)"])
grid(True)
figure(3)
subplot(2, 1, 1)
plot(_t_arr, _plant_M, '-b', linewidth=1)
legend(["plant M (kg)"])
grid(True)
subplot(2, 1, 2)
plot(_t_arr, _plant_C, '-b', linewidth=1)
legend(["plant C (J/(kg*K))"])
grid(True)
show()
print("End of program")