MCPcopy Create free account
hub / github.com/Cantera/cantera / plot

Function plot

samples/python/thermo/equations_of_state.py:125–138  ·  view source on GitHub ↗
(p, thermo_Ideal, thermo_RK, thermo_CoolProp, name)

Source from the content-addressed store, hash-verified

123
124
125def 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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected