-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSTD_TYPES.py
42 lines (30 loc) · 1 KB
/
STD_TYPES.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class Temperature:
def __init__(self, temperature: float):
# self.temp = temperature # °C
self.data = temperature # °C
class Pressure:
def __init__(self, pressure: float):
# self.pressure = pressure # MPa
self.data = pressure # MPa
class Enthalpy:
def __init__(self, enthalpy: float):
# self.enthalpy = enthalpy # kJ/kg
self.data = enthalpy # kJ/kg
class Entropy:
def __init__(self, entropy: float):
# self.entropy = entropy # kJ/kg·K
self.data = entropy # kJ/kg·K
class Specific_Volume:
def __init__(self, s_volume: float):
# self.s_volume = s_volume # m³/kg
self.data = s_volume # m³/kg
class InternalEnergy:
def __init__(self, internal_energy: float):
# self.internal_energy = internal_energy # kJ/kg
self.data = internal_energy # kJ/kg
class X:
def __init__(self, x: float):
if 1.0 >= x >= 0.0:
self.data = x
else:
self.data = -1