-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGetOptimizedCycleDetails.py
82 lines (50 loc) · 5.09 KB
/
GetOptimizedCycleDetails.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
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
###############################################################################
###############################################################################
#Copyright (c) 2016, Andy Schroder
#See the file README.md for licensing information.
###############################################################################
###############################################################################
from helpers import SmartDictionary,RoundAndPadToString
import cPickle
BaseInputFilePath='outputs/'
CaseName='CO2Cycle-Optimized'
CycleParameters=cPickle.load(open(BaseInputFilePath+'/'+CaseName+'/Results.p', 'rb'))[0]
print "CycleParameters['PreCompressor']['PressureRatio']: "+RoundAndPadToString(CycleParameters['PreCompressor']['PressureRatio'],1)
print "CycleParameters['MainCompressor']['PressureRatio']: "+RoundAndPadToString(CycleParameters['MainCompressor']['PressureRatio'],1)
print "RecompressionFraction: "+RoundAndPadToString(CycleParameters['ReCompressor']['MassFraction']*100,1)+'%'
print "main compressor outlet pressure: "+RoundAndPadToString(CycleParameters['MainCompressor']['CompressedProperties']['Pressure']/1e6,1)+'MPa'
print
print "CycleParameters['ReCompressor']['PressureRatio']: "+RoundAndPadToString(CycleParameters['ReCompressor']['PressureRatio'],1)
print "CycleParameters['VirtualTurbine']['PressureRatio']: "+RoundAndPadToString(CycleParameters['VirtualTurbine']['PressureRatio'],1)
print "CycleParameters['PowerTurbine']['PressureRatio']: "+RoundAndPadToString(CycleParameters['PowerTurbine']['PressureRatio'],1)
#as mentioned in a comment in Cycles.py, the following should be called TotalWorkFraction instead of NetWorkFraction
print "MainCompressorTurbine back work ratio: "+RoundAndPadToString(CycleParameters['MainCompressorTurbine']['NetWorkFraction']*100,1)+'%'
print "PreCompressorTurbine back work ratio: "+RoundAndPadToString(CycleParameters['PreCompressorTurbine']['NetWorkFraction']*100,1)+'%'
print "ReCompressorTurbine back work ratio: "+RoundAndPadToString(CycleParameters['ReCompressorTurbine']['NetWorkFraction']*100,1)+'%'
print "BackWorkRatio: "+RoundAndPadToString(CycleParameters['BackWorkRatio']*100,1)+'%'
print "CycleParameters['MTRecuperator']['Effectiveness']: "+RoundAndPadToString(CycleParameters['MTRecuperator']['Effectiveness']*100,1)+'%'
print "CycleParameters['MTRecuperator']['phi']: "+RoundAndPadToString(CycleParameters['MTRecuperator']['phi']*100,1)+'%'
print "CycleParameters['HTRecuperator']['Effectiveness']: "+RoundAndPadToString(CycleParameters['HTRecuperator']['Effectiveness']*100,1)+'%'
print "CycleParameters['HTRecuperator']['phi']: "+RoundAndPadToString(CycleParameters['HTRecuperator']['phi']*100,1)+'%'
RecuperatedHeat=CycleParameters['HTRecuperator']['SpecificHeatRecuperated_TotalMassFlow']+CycleParameters['MTRecuperator']['SpecificHeatRecuperated_TotalMassFlow']
HeatAdded=CycleParameters['TotalSpecificHeatAdded_TotalMassFlow']
print "MTR heating power: "+RoundAndPadToString(CycleParameters['MTRecuperator']['SpecificHeatRecuperated_TotalMassFlow']/HeatAdded*100,1)+'%'
print "HTR heating power: "+RoundAndPadToString(CycleParameters['HTRecuperator']['SpecificHeatRecuperated_TotalMassFlow']/HeatAdded*100,1)+'%'
print "HTR+MTR heating power: "+RoundAndPadToString(RecuperatedHeat/HeatAdded*100,1)+'%'
print "SpecificNetWork: "+RoundAndPadToString(CycleParameters['SpecificNetWork']/1000,1)+'kJ/kg'
print
print 'not currently checking low temperature recuperators'
print
print 'medium temperature recuperator'
for HeaterOrCooler in [CycleParameters['MTRecuperator']['HighPressure']['StartingProperties']['HeatAdded_TotalMassFlow'],CycleParameters['MTRecuperator']['HighPressure']['RecuperatedProperties']['HeatAdded_TotalMassFlow'],CycleParameters['MTRecuperator']['LowPressure']['StartingProperties']['HeatRejected_TotalMassFlow'],CycleParameters['MTRecuperator']['LowPressure']['RecuperatedProperties']['HeatRejected_TotalMassFlow']]:
if abs(HeaterOrCooler)>5:
print 'heater or cooler exists'
else:
print 'heater or cooler is effectively non-existent'
print
print 'high temperature recuperator'
for HeaterOrCooler in [CycleParameters['HTRecuperator']['HighPressure']['StartingProperties']['HeatAdded_TotalMassFlow'],CycleParameters['HTRecuperator']['HighPressure']['RecuperatedProperties']['HeatAdded_TotalMassFlow'],CycleParameters['HTRecuperator']['LowPressure']['StartingProperties']['HeatRejected_TotalMassFlow'],CycleParameters['HTRecuperator']['LowPressure']['RecuperatedProperties']['HeatRejected_TotalMassFlow']]:
if abs(HeaterOrCooler)>5:
print 'heater or cooler exists'
else:
print 'heater or cooler is effectively non-existent'