The SimRankine is the demo steady-state simulator of Rankine cycle in Python, C++ , Rust and Modelica.
- JSON Configuration: Describes system structure and parameters through JSON files
- Equipment Factory Pattern: Automatically creates and manages equipment objects
- Port Data Sharing: Achieves automatic data synchronization between equipment through pointer sharing
- Polling Device-Readiness: Finds calculation order by repeatedly traversing and computing ready equipment
- Modular Design: Easy to extend with new equipment types
python -m pip install seuif97type python rankineapp.py in the terminal of ./python
python rankineapp.py- building the dynamic library: https://github.com/thermalogic/RustSEUIF97
- put the dynamic library in
./cpp/bin
In the terminal of ./cpp
- make
make- cmake
cmake -B ./build/
cmake --build ./build/ --config Releasecargo install seuif97
In the terminal of ./rust
cargo runPrerequisites: Dymola
Michael J. Moran, Howard N. Shapiro, Daisie D. Boettner, Margaret B. Bailey. Fundamentals of Engineering Thermodynamics(7th Edition). John Wiley & Sons, Inc. 2011
Chapter 8: Vapor Power Systems
The Jupyter Notebook of Example Rankine Cycles
- Example 8.1: Analyzing an Ideal Rankine Cycle, P438
- Example 8.2: Analyzing a Rankine Cycle with Irreversibilities, P444
- Example 8.3: Evaluating Performance of an Ideal Reheat Cycle, P449
- Example 8.4: Evaluating Performance of a Reheat Cycle with Turbine Irreversibility, P451
- Example 8.5: The Regenerative Cycle with Open Feedwater Heater, P456
- Boiler
- TurbineEx0 # Simple expansion turbine
- TurbineEx1 # Single extraction turbine
- Pump
- Condenser
- OpenedHeaterDw0 # Open feedwater heater
↑ oPort main steam
┌───┼───┐
│ │ │
│ │ │
│ │ │
└───┼───┘
↑ iPort main feedwater
json object example:
{
"name": "Boiler",
"devtype": "BOILER",
"iPort": {"p": 8.0, "t": None, "x": None, "fdot": None},
"oPort": {"p": 8.0, "t": None, "x": 1.0, "fdot": 1.0}
}
iNode inlet steam
┌────────┐
↓ ╱ │
┤ │
╲ │
└────────┤
↓ oNode exhausted steam
extracted steam 0
json object example
{
"name": "Turbine1",
"type": "TURBINE-EX0",
"ef": 1.00,
"iPort":,
"oPort":
}
iPort inlet steam
┌────────┐
↓ ╱ │
┤ │
╲ │
└──┬─────┤
ePort ↓ ↓ oPort exhausted steam
extracted steam 1
json object example
{
"name": "Turbine1",
"type": "TURBINEEX1",
"ef": 0.85,
"iPort":,
"oPort": j,
"ePort": k
}
┌───────┐
│ │
oPort ← ┼───────┼← iPort
│ │
└───────┘
json object example:
{
"name": "Feedwater Pump1",
"devtype": "PUMP",
"ef": 1.00,
"iPort": {"p": 8.0, "t": None, "x": None, "fdot": None},
"oPort": {"p": 8.0, "t": None, "x": 1.0, "fdot": 1.0}
}
↓ iPort exhausted steam
┌───┴───┐
│ │
│ │
│ │
└───┬───┘
↓ oPort condensate water
json object example:
{
"name": "Condenser1",
"devtype": "CONDENSER",
"iPort[0]": i,
"oPort[0]": j
}
↓ inPort extracted steam
┌───┴───┐
feedwater │ │
outPort_fw ← ┤ │← inPort_fw feedwater
│ │
└───────┘
json object example:
{
"name": "OpenedFeedwaterHeater1",
"devtype": "FWH-OPEN-DW0",
"iPort":i,
"iPort_fw":j,
"oPort_fw":k
}
- Cheng Maohua. (2021). SimRankine: the demo steady-state simulator of Rankine cycle in Python, C++ and Modelica (2.0.0). Zenodo. https://doi.org/10.5281/zenodo.4585581
