EES CODE of TCRC
EES CODE of TCRC
EES CODE of TCRC
114: eta_t=eta_turb
115: h[3]=enthalpy(F$,T=T[3],P=P[3])
116: T_C[3]=converttemp(K,C,T[3])
117: "State Point 4"
118: P[4]=P[7] "Assuming no pressure loss"
119: Call turbine(T[3],P[3],h[3],eta_t,P[4],F$:T[4],s[4],h[4])
120: T_C[4]=converttemp(K,C,T[4])
121: "State Point 5"
122: "State Point 6"
123: "State Point 7"
124: h[7]=enthalpy(F$,T=T[7],P=P[7])
125: s[7]=entropy(F$,P=P[7],T=T[7])
126: T_C[7]=converttemp(K,C,T[7])
127: "State Point 8"
128: "State Point 9"
129: P[9]=P[8]
130: x[9]=0
131: T_C[9]=converttemp(K,C,T[9])
132: "State Point 10"
133: P[10]=P[3]
134: Call pump(P[9],x[9],P[10],F$,eta_pump1:T[9],s[9],h[9],T[10],s[10],h[10])
135: T_C[10]=converttemp(K,C,T[10])
136: "State Point 11"
137: P[11]=P[9]
138: x[11]=1
139: h[11]=enthalpy(F$,x=x[11],P=P[11])
140: s[11]=entropy(F$,x=x[11],P=P[11])
141: T[11]=temperature(F$,x=x[11],P=P[11])
142: T_C[11]=converttemp(K,C,T[11])
143: "State Point 12"
144: "State Point 13"
145: "State Point 14"
146: P[14]=P[13]
147: x[14]=0
148: T_C[14]=converttemp(K,C,T[14])
149: "State Point 15"
150: P[15]=P[10]
151: Call pump(P[14],x[14],P[15],F$,eta_pump2:T[14],s[14],h[14],T[15],s[15],h[15])
152: T_C[15]=converttemp(K,C,T[15])
153: "State Point 16"
154: P[16]=P[13]
155: x[16]=1
156: h[16]=enthalpy(F$,x=x[16],P=P[16])
157: s[16]=entropy(F$,x=x[16],P=P[16])
158: T[16]=temperature(F$,x=x[16],P=P[16])
159: T_C[16]=converttemp(K,C,T[16])
160: "State Point 17"
161: P[17]=P[13]
162: x[17]=1
163: h[17]=enthalpy(F$,x=x[17],P=P[17])
164: s[17]=entropy(F$,x=x[17],P=P[17])
165: T[17]=temperature(F$,x=x[17],P=P[17])
166: T_C[17]=converttemp(K,C,T[17])
167: "State Point 18"
168: P[18]=P[13]
169: x[18]=1
File:Initial Coding.EES 07/06/2024 9:43:10 pm Page 4
EES Ver. 10.561: #3905: DownLoadLy.iR, https://downloadly.ir?¬???«™?—?™???????””‘—–??™›“??‹???™•
170: h[18]=enthalpy(F$,x=x[18],P=P[18])
171: s[18]=entropy(F$,x=x[18],P=P[18])
172: T[18]=temperature(F$,x=x[18],P=P[18])
173: T_C[18]=converttemp(K,C,T[18])
174: "State Point 19"
175: P[19]=P[13]
176: x[19]=1
177: h[19]=enthalpy(F$,x=x[19],P=P[19])
178: s[19]=entropy(F$,x=x[19],P=P[19])
179: T[19]=temperature(F$,x=x[19],P=P[19])
180: T_C[19]=converttemp(K,C,T[19])
181: "State Point 20"
182: P[20]=P[13]
183: x[20]=1
184: h[20]=enthalpy(F$,x=x[20],P=P[20])
185: s[20]=entropy(F$,x=x[20],P=P[20])
186: T[20]=temperature(F$,x=x[20],P=P[20])
187: T_C[20]=converttemp(K,C,T[20])
188: "State Point 21"
189: P[21]=P[7]
190: Call compressor (T[20],P[20],eta_comp,P[21],F$,h[20]:T[21],s[21],h[21])
191: T_C[21]=converttemp(K,C,T[21])
192:
193: "--------------------------------Finding mass flow fractions---------------------------------------"
194: {"Energy balance on Separator 1"
195: f_8*h[8]=f_9*h[9]+f_11*h[11]
196: "Energy balance on LP Ejector "
197: f_11*h[11]+f_19*h[19]=f_12*h[12]
198: "Energy balance on Separator 2"
199: f_13*h[13]=f_14*h[14]+f_16*h[16]
200: "Energy balance on HP Ejector "
201: f_17*h[17]+f_7*h[7]=f_8*h[8]
202:
203: "Here"
204: f_8=1[kg/s]
205: f_11=1-f_9
206: f_13=(1-f_9)+f_19
207: f_16=((1-f_9)+f_19)-f_14
208: f_17=(((1-f_9)+f_19)-f_14)-f_18
209: {f_18=f_16-f_17}
210: f_19=f_18-f_20
211: {f_20=f_18-f_19}
212: f_5=f_9+f_14
213: f_7=f_20+(f_9+f_14)
214: f_8=f_7+f_17}
SOLUTION
Unit Settings: SI K MPa kJ mass rad
DTdiff,gh = 10 [C] DTpinch,re = 6 [C] hcomp = 0.85
hd1 = 0.8 hd2 = 0.8 hm1 = 0.9
hm2 = 0.9 hn1 = 0.9 hn2 = 0.9
hpump1 = 0.8 hpump2 = 0.8 ht = 0.85
hturb = 0.85 F$ = 'Carbondioxide' mh = 20 [kg/s]
Pamb = 0.1013 [MPa] Pturb,in = 18 [MPa] Tamb = 298.2 [K]
Th = 503.2 [K] Tturb,in = 493.2 [K]
File:Initial Coding.EES 07/06/2024 9:43:10 pm Page 5
EES Ver. 10.561: #3905: DownLoadLy.iR, https://downloadly.ir?¬???«™?—?™???????””‘—–??™›“??‹???™•
2 420.7 147.5
3 18 493.2 220 124
4 8.6 426.7 153.5 76.38 -0.5867
5
6
7 8.6 308.2 35 -200.6 -1.398
8 7
9 7 301.8 28.68 -1.43 -212.9 0
10 18 319 45.87 -212.9 -1.478
11 7 301.8 28.68 -129.9 -1.155 1
12 6.5
13 6
14 6 295.1 21.98 -1.529 -243.9 0
15 18 305.9 32.75 -243.9 -1.578
16 6 295.1 21.98 -103.5 -1.053 1
17 6 295.1 21.98 -103.5 -1.053 1
18 6 295.1 21.98 -103.5 -1.053 1
19 6 295.1 21.98 -103.5 -1.053 1
20 6 295.1 21.98 -103.5 -1.053 1
21 8.6 319.9 46.77 -94.33 -1.058