Derive Pot's M/C from pot/grain/water mass instead of hardcoding them

Add Sud.derive_plant_params(), which combines pot_mass/pot_material/
grain_mass/water_mass into a single lumped (mass, specific heat) pair
using approximate specific-heat constants for water, grain, and (by a
small material lookup table) the pot itself. demo_sud.py now builds
its plant_params from this instead of hardcoded C/M values, keeping
L/Td as the only manually-tuned plant parameters.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 19:34:15 +02:00
co-authored by Claude Sonnet 4.6
parent 18d9af960f
commit b6551c6433
3 changed files with 34 additions and 6 deletions
+3 -3
View File
@@ -33,14 +33,14 @@ if __name__ == '__main__':
}
}
sud = Sud("sude/sud_0010.json")
plant_params = {
"C" : 4190,
"M" : 20,
**sud.derive_plant_params(),
"L" : 0.2,
"Td" : 30
}
sud = Sud("sude/sud_0010.json")
ctrl = TempController(dt, ctrl_params, plant_params, theta_amb)
plant = Pot(dt, plant_params, theta_amb)
stirrer = StirrerSim(dt)