MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / build

Method build

wrappers/Python/CoolProp/GUI/CoolPropGUI.py:297–316  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

295 return None, None
296
297 def build(self):
298 self.SetTitle('Saturation Table: ' + self.Fluid)
299 self.tbl.SetColLabelValue(0, "Temperature\n[K]")
300 self.tbl.SetColLabelValue(1, "Liquid Pressure\n[kPa]")
301 self.tbl.SetColLabelValue(2, "Vapor Pressure\n[kPa]")
302 self.tbl.SetColLabelValue(3, "Liquid Density\n[kg/m3]")
303 self.tbl.SetColLabelValue(4, "Vapor Density\n[kg/m3]")
304
305 for i, T in enumerate(self.Tvals):
306 Fluid = self.Fluid
307 pL = CP.CoolProp.Props('P', 'T', T, 'Q', 0, Fluid)
308 pV = CP.CoolProp.Props('P', 'T', T, 'Q', 1, Fluid)
309 rhoL = CP.CoolProp.Props('D', 'T', T, 'Q', 0, Fluid)
310 rhoV = CP.CoolProp.Props('D', 'T', T, 'Q', 1, Fluid)
311
312 self.tbl.SetCellValue(i, 0, str(T))
313 self.tbl.SetCellValue(i, 1, str(pL))
314 self.tbl.SetCellValue(i, 2, str(pV))
315 self.tbl.SetCellValue(i, 3, str(rhoL))
316 self.tbl.SetCellValue(i, 4, str(rhoV))
317
318 def add_menu(self):
319 # Menu Bar

Callers 1

__init__Method · 0.95

Calls 1

PropsMethod · 0.80

Tested by

no test coverage detected