Example 07: Thermal Plants#
Description#
This example demonstrates multiple thermal power plant configurations and their integrated operation within a Hercules framework. The example showcases various thermal components including open-cycle gas turbines (OCGTs) and steam turbines, and their state machine behaviors including startup sequences, power ramping, minimum stable load constraints, and shutdown sequences. The default example simulates an OCGT, but the user can simulate the steam turbine example by changing the input file used in hercules_runscript.py from hercules_input_ocgt.yaml to hearcules_input_hcst.yaml.
For details on thermal component parameters and configuration, see Open Cycle Gas Turbine, Steam Turbine, Combined Cycle Gas Turbine, and Thermal Plant. For details on the underlying state machine and ramp behavior, see Thermal Component Base.
Scenario#
The simulation runs for 6 hours with 1-minute time steps. A controller commands the turbine through several operating phases. The table below shows both control commands (setpoint changes) and state transitions (responses to commands based on constraints).
Key Behaviors Demonstrated#
Minimum down time: The turbine cannot start until
min_down_time(60 min) is satisfied, even though the command is issued at 40 minHot startup sequence: After
min_down_time, the turbine enters HOT STARTING, waits throughhot_readying_time, then ramps to P_min usingrun_up_rateRamp rate constraints: All power changes in ON state are limited by
ramp_rate(10 MW/min)Minimum stable load: When commanded to 10 MW (below P_min = 20 MW), power is clamped to P_min
Minimum up time: Shutdown is allowed immediately at 240 min because
min_up_time(60 min) was satisfied long agoStopping sequence: The turbine ramps down to zero at
ramp_ratebefore transitioning to OFF
Setup#
No manual setup is required. The example uses only the OCGT component which requires no external data files.
Running#
To run the example, execute the following command in the terminal:
python examples/07_thermal_plants/hercules_runscript.py
# OR
cd examples/07_thermal_plants
python hercules_runscript.py
Outputs#
The output files hercules_output.h5 and hercules_dict.echo are written to the folder examples/07_thermal_plants/outputs_07/ and log files are written to the folder examples/07_thermal_plants/logger_outputs_07/
To plot the outputs, run:
python examples/07_thermal_plants/plot_outputs.py
The plot shows:
Power output over time (demonstrating ramp constraints and minimum stable load)
Operating state transitions
Fuel consumption tracking
Heat rate variation with load