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:
@@ -102,6 +102,8 @@ if __name__ == '__main__':
|
|||||||
_stirrer_speed = []
|
_stirrer_speed = []
|
||||||
_heater_power_set = []
|
_heater_power_set = []
|
||||||
_heater_power_eff = []
|
_heater_power_eff = []
|
||||||
|
_plant_M = []
|
||||||
|
_plant_C = []
|
||||||
|
|
||||||
wait_user_elapsed = 0.0
|
wait_user_elapsed = 0.0
|
||||||
t = 0.0
|
t = 0.0
|
||||||
@@ -142,6 +144,8 @@ if __name__ == '__main__':
|
|||||||
_stirrer_speed.append(stirrer.speed * stirrer.isOn)
|
_stirrer_speed.append(stirrer.speed * stirrer.isOn)
|
||||||
_heater_power_set.append(heater.power_set)
|
_heater_power_set.append(heater.power_set)
|
||||||
_heater_power_eff.append(heater.power_eff)
|
_heater_power_eff.append(heater.power_eff)
|
||||||
|
_plant_M.append(plant.M)
|
||||||
|
_plant_C.append(plant.C)
|
||||||
|
|
||||||
t += dt
|
t += dt
|
||||||
steps += 1
|
steps += 1
|
||||||
@@ -181,6 +185,16 @@ if __name__ == '__main__':
|
|||||||
legend(["stirrer speed (effective)"])
|
legend(["stirrer speed (effective)"])
|
||||||
grid(True)
|
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()
|
show()
|
||||||
|
|
||||||
print("End of program")
|
print("End of program")
|
||||||
|
|||||||
+2
-1
@@ -95,6 +95,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"water_mass" : 20,
|
||||||
"descr": "Heizen Abmaischen",
|
"descr": "Heizen Abmaischen",
|
||||||
"ramp": {
|
"ramp": {
|
||||||
"rate": 1.0,
|
"rate": 1.0,
|
||||||
@@ -102,7 +103,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"water_mass" : 21,
|
"water_mass" : 20,
|
||||||
"descr": "Halten Abmaischen",
|
"descr": "Halten Abmaischen",
|
||||||
"user_message": "Quittieren zum Abmaischen",
|
"user_message": "Quittieren zum Abmaischen",
|
||||||
"user_wait_for_continue": true,
|
"user_wait_for_continue": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user