Last active
November 30, 2022 09:55
-
-
Save vashu1/1bbe573f7e22ddf463b11e1fb4d4d088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Output: | |
T Efficiency | |
100 1.6 | |
200 5.4 | |
300 7.8 | |
400 9.6 | |
500 11.0 | |
600 12.2 | |
700 13.1 | |
""" | |
def efficiency(extra_t): | |
T0 = 300 | |
T1 = T0 + extra_t | |
Tend = 273+100 | |
p_air = 1.2 | |
E = p_air * (T1 - T0) * 1000 | |
V = T1 / T0 # m3 | |
P = 1 - T0 / T1 | |
work = 0 | |
for t in range(T1-1, Tend, -1): | |
new_V = t / T0 | |
new_P = 1 - T0 / t | |
work += (V - new_V) * P * 1e5 | |
V = new_V | |
P = new_P | |
return round(work / E*100,1) | |
for i in range(100, 700+1, 100): | |
print(i, efficiency(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment