| 123 | |
| 124 | |
| 125 | def plot(p, thermo_Ideal, thermo_RK, thermo_CoolProp, name): |
| 126 | line_width = 3 |
| 127 | |
| 128 | fig, ax = plt.subplots() |
| 129 | ax.plot( |
| 130 | p / 1e5, thermo_Ideal, "-", color="b", linewidth=line_width, label="Ideal EoS" |
| 131 | ) |
| 132 | ax.plot(p / 1e5, thermo_RK, "-", color="r", linewidth=line_width, label="R-K EoS") |
| 133 | ax.plot( |
| 134 | p / 1e5, thermo_CoolProp, "-", color="k", linewidth=line_width, label="CoolProp" |
| 135 | ) |
| 136 | ax.set_xlabel("Pressure [bar]") |
| 137 | ax.set_ylabel(name) |
| 138 | ax.legend(prop={"size": 14}, frameon=False) |
| 139 | |
| 140 | #%% |
| 141 | # EoS Comparison based on thermodynamic properties |