-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject2Code.py
More file actions
55 lines (38 loc) · 869 Bytes
/
Project2Code.py
File metadata and controls
55 lines (38 loc) · 869 Bytes
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
import math
import matplotlib.pyplot as plt
# Hard Coded
eOut = 120
g = 9.81
densityWater = 1000
# inputs
pumpEfficiency = 0.9
pumpFlowVolume = 65
pipeDiameter = 2
pipeLength = 75
pipeFriction = 0.05
reservoirDepth = 10
reservoirElevation = 50
bendCoefficient1 = 0.15
bendCoefficient2 = 0.2
turbineEfficiency = 0.92
turbineFlowVolume = 30
# intermediate variables
pipeArea = (pipeDiameter / 2) ** 2 * math.pi
velocityUp = pumpFlowVolume / pipeArea
velocityDown = turbineFlowVolume / pipeArea
effectiveElevation = reservoirElevation + reservoirDepth / 2
eOutJoules = eOut * (3.6 * math.pow(10, 9))
mass = densityWater * pipeArea * velocityUp * 7.5 #WRONG
print(str(mass))
def reservoirArea():
return 1
def energyIn():
return 1
def efficiency():
return 1
def timeToFill():
return 1
def timeToEmpty():
return 1
def cost():
return 1