-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathpressure.py
More file actions
154 lines (146 loc) · 3.38 KB
/
pressure.py
File metadata and controls
154 lines (146 loc) · 3.38 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
"""
"""
from __future__ import absolute_import
from ..unitquantity import UnitQuantity
from .acceleration import gravity
from .mass import g, kg, pound
from .length import m, mm, cm, inch, ft
from .force import N, kip
Hg = mercury = conventional_mercury = UnitQuantity(
'conventional_mercury',
gravity*13.59510*g/cm**3
)
mercury_60F = UnitQuantity('mercury_60F', gravity*13556.8*kg/m**3)
H2O = h2o = water = conventional_water = UnitQuantity('H2O', gravity*1000*kg/m**3)
water_4C = water_39F = UnitQuantity('water_4C', gravity*999.972*kg/m**3)
water_60F = UnitQuantity('water_60F', gravity*999.001*kg/m**3)
Pa = pascal = UnitQuantity(
'pascal',
N/m**2,
symbol='Pa',
aliases=['pascals']
)
kPa = kilopascal = UnitQuantity(
'kilopascal',
1000*Pa,
symbol='kPa',
aliases=['kilopascals']
)
MPa = megapascal = UnitQuantity(
'megapascal',
1000*kPa,
symbol='MPa',
aliases=['megapascals']
)
GPa = gigapascal = UnitQuantity(
'gigapascal',
1000*MPa,
symbol='GPa',
aliases=['gigapascals']
)
bar = UnitQuantity(
'bar',
100000*pascal,
aliases=['bars']
)
kbar = kilobar = UnitQuantity(
'kilobar',
1000*bar,
symbol='kbar',
aliases=['kilobars']
)
Mbar = kilobar = UnitQuantity(
'megabar',
1000*kbar,
symbol='Mbar',
aliases=['megabars']
)
Gbar = gigabar = UnitQuantity(
'gigabar',
1000*Mbar,
symbol='Gbar',
aliases=['gigabars']
)
atm = atmosphere = standard_atmosphere = UnitQuantity(
'standard_atmosphere',
101325*pascal,
symbol='atm',
aliases=['atmosphere', 'atmospheres', 'standard_atmospheres']
)
at = technical_atmosphere = UnitQuantity(
'technical_atmosphere',
kg*gravity/cm**2,
symbol='at',
aliases=['technical_atmospheres']
)
torr = UnitQuantity(
'torr',
atm/760
)
psi = pound_force_per_square_inch = UnitQuantity(
'pound_force_per_square_inch',
pound*gravity/inch**2,
symbol='psi'
)
ksi = kip_per_square_inch = UnitQuantity(
'kip_per_square_inch',
kip/inch**2,
symbol='ksi'
)
barye = barie = barad = barad = barrie = baryd = UnitQuantity(
'barye',
0.1*N/m**2,
symbol='Ba',
aliases=[
'barie', 'baries', 'baryes', 'barad', 'barads', 'barrie', 'baryd',
'baryed'
]
)
mmHg = mm_Hg = millimeter_Hg = millimeter_Hg_0C = UnitQuantity(
'millimeter_Hg',
mm*mercury,
symbol='mmHg',
aliases=['mm_Hg', 'millimeter_Hg_0C'],
doc="""
The pressure exerted at the base of a column of fluid exactly 1 mm high,
when the density of the fluid is exactly 13.5951 g/cm^3, at a place where
the acceleration of gravity is exactly 9.80665 m/s^2.
http://en.wikipedia.org/wiki/Conventional_millimeter_of_mercury
"""
)
cmHg = cm_Hg = centimeter_Hg = UnitQuantity(
'cmHg',
cm*Hg,
aliases=['cm_Hg', 'centimeter_Hg']
)
inHg = in_Hg = inch_Hg = inch_Hg_32F = UnitQuantity(
'inHg',
inch*Hg,
aliases=['in_Hg', 'inch_Hg', 'inch_Hg_32F']
)
inch_Hg_60F = UnitQuantity(
'inch_Hg_60F',
inch*mercury_60F
)
inch_H2O_39F = UnitQuantity(
'inch_H2O_39F',
inch*water_39F
)
inch_H2O_60F = UnitQuantity(
'inch_H2O_60F',
inch*water_60F
)
footH2O = UnitQuantity(
'footH2O',
ft*water
)
cmH2O = UnitQuantity(
'cmH2O',
cm*water
)
foot_H2O = ftH2O = UnitQuantity(
'foot_H2O',
ft*water,
aliases=['ftH2O']
)
del UnitQuantity, gravity, kg, pound, m, mm, cm, inch, ft, N, kip