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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user