Design og modellering af metanolanlæg til VEnzin-visionen Bilag
Design og modellering af metanolanlæg til VEnzin-visionen Bilag Design og modellering af metanolanlæg til VEnzin-visionen Bilag
VEnzin.for c:/dna/source/ $ ,P_ST,T,P_SAT_ME,P_SAT_ST,x_ME_2,x_ME_3,x_ST_3,P_ME_IN,NOUTME $ ,NOUTST,P_ST_IN,HPL,P_ST_2 CHARACTER*100 K_PAR(3),K_STAT(1) CHARACTER*500 K_LIG(47), K_BET CHARACTER*1000 KOMDSC, K_INP CHARACTER*100 KMEDDS(7) logical EVAP,EVAPST,EVAPME EXTERNAL STATES INCLUDE ’THERPROP.INI’ C======================================================================= GOTO (100,200,1,400,400,200,1) FKOMP 1 RETURN C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component name C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 100 CONTINUE KOMTY = ’GASCOOL4’ GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component characteristics C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 200 CONTINUE KOMTY = ’GASCOOL4’ ANTKN = 7 ANTPK = 3 ANTLK = 44 ANTEX = 9 ANTM1 = 4 ANTM2 = 2 MEDIE(1) = ANYGAS$ MEDIE(2) = ANYGAS$ MEDIE(3) = WATHF$ MEDIE(4) = MEOH$ MEDIE(5) = ANYFLU$ MEDIE(6) = ANYFLU$ MEDIE(7) = CONTROL$ ANTME = 4 VARME(1) = NODE1$ VARME(2) = NODE2$ VARME(3) = NODE5$ VARME(4) = NODE5$ ANTEL(1) = 0 ANTEL(2) = 37 ANTEL(3) = 0 ANTEL(4) = 0 DO I=1,36 VAREL(I,2) = I ENDDO VAREL(37,2) = CH3OH$ ZANAM(1) = ’t−diff boil’ ZANAM(2) = ’t−diff cond’ ZANAM(3) = ’T−boil’ ZANAM(4) = ’T−condense’ ZANAM(5) = ’CH3OH mass−%’ ZANAM(6) = ’CH3OH vol−%’ ZANAM(7) = ’Transferred’ C IF (FKOMP.EQ.6) GOTO 600 ** FKOMP = 3 GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component equations. All in residual form. C Do not include the conservation laws. These are treated automatically C by DNA. C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 400 CONTINUE C RES(1) = P(1) − P(2) − PAR(1) c RES(2) = P(2) − P(3) c RES(3) = P(2) − P(4) RES(4) = P(5) − P(6) − PAR(2) C C Same temperature out C CALL STATES(P(2),H(2),T2,V,S,X,U,1,2,MEDIE(2)) CALL STATES(P(3),H3,T2,V,S,X,U,1,3,MEDIE(3)) CALL STATES(P(4),H4,T2,V,S,X,U,1,3,MEDIE(4)) C 31/67 19−03−2007
VEnzin.for c:/dna/source/ RES(5) = H3 − H(3) RES(6) = H4 − H(4) C C Calculate mole flow in C M_BL1 = 0.D0 DO I=1,ANTST M_BL1=M_BL1+X_J(MEDIE(1),I)*M_MOL(I) ENDDO NIN = MDOT(1)/M_BL1 NINST=NIN*X_J(MEDIE(1),7) NINME=NIN*X_J(MEDIE(1),CH3OH$) N=NIN−NINST−NINME C C Calculate mole flow out C M_BL2 = 0.D0 DO I=1,ANTST M_BL2=M_BL2+X_J(MEDIE(2),I)*M_MOL(I) ENDDO NOUT = (−MDOT(2))/M_BL2 C C Outlet composition of gas C DO I = 1,6 RES(I+6) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN ENDDO DO I = 8,35 RES(I+5) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN ENDDO C RES(41)=1.0D0 DO I = 1,ANTST RES(41) = RES(41)−X_J(MEDIE(2),I) ENDDO C C Check for condensing water or methanol C b_2_1=−1062.945621D0 b_1_2=3538.709318D0 c J/mol alpha=0.2994D0 R_u=8.314D0 c J/(mol*K) c T=ZA(4) X0 = 0.D0 CALL STATES(P_SAT_ST,HD,T,V,S,X0,U,3,6,MEDIE(3)) X0 = 0.D0 CALL STATES(P_SAT_ME,HD,T,V,S,X0,U,3,6,MEDIE(4)) T_K=T+273.15D0 c tau_2_1=b_2_1/(R_u*T_K) tau_1_2=b_1_2/(R_u*T_K) c x_ME_3=ZA(8) x_ST_3=1D0−x_ME_3 gamma_2=exp((x_ST_3**2*(tau_1_2*((exp(−(alpha $ *tau_1_2))/(x_ME_3+x_ST_3*exp(−(alpha*tau_1_2)))) $ )**2+(tau_2_1*(exp(−(alpha*tau_2_1))/(x_ST_3+x_ME_3 $ *exp(−(alpha*tau_2_1)))**2))))) gamma_1=exp((x_ME_3**2*(tau_2_1*((exp(−(alpha $ *tau_2_1))/(x_ST_3+x_ME_3*exp(−(alpha*tau_2_1)))) $ )**2+(tau_1_2*(exp(−(alpha*tau_1_2))/(x_ME_3+x_ST_3 $ *exp(−(alpha*tau_1_2)))**2))))) c P_ST_IN=X_J(MEDIE(1),7)*P(1) P_ME_IN=X_J(MEDIE(1),CH3OH$)*P(1) c P_ME=P_ME_IN*0.999d0 x_ME=P_ME/(gamma_2*P_SAT_ME) x_ST=1D0−x_ME P_ST_2=gamma_1*P_SAT_ST*x_ST P_ST=(P_ME_IN−P_ME+P_ST_IN)−(P_ME_IN−P_ME)/x_ME if (T.gt.239.1) then RES(52)=T−238 else RES(52)=P_ST−P_ST_2 32/67 19−03−2007
- Page 251 and 252: 17.130.4 Conditions ˙m1 > 0 ˙m2 <
- Page 253 and 254: 17.131.2 Equations Number of equati
- Page 255 and 256: 17.132 EL-MOTOR Motor with efficien
- Page 257 and 258: 8. - 9. - 17.133.3 Conditions ˙m1
- Page 259 and 260: 17.135 MIXER_03 Mixer for ideal gas
- Page 261 and 262: 33. - 34. - 35. - 36. - 37. - 38. -
- Page 263 and 264: 17.137 SET_X Utility component for
- Page 265 and 266: 17.138.4 Conditions ˙m1 > 0 ˙m2 <
- Page 267 and 268: 17.140 SET_FLOW Utillity component
- Page 269 and 270: 17.142 SET_TEMP2 Utillity component
- Page 271 and 272: 34. Tilføjede komponenter til DNA
- Page 273 and 274: VEnzin.for c:/dna/source/ C C Param
- Page 275 and 276: VEnzin.for c:/dna/source/ CA ANTED
- Page 277 and 278: VEnzin.for c:/dna/source/ IF (MDOT(
- Page 279 and 280: VEnzin.for c:/dna/source/ MMVAR(1)
- Page 281 and 282: VEnzin.for c:/dna/source/ ENDDO DO
- Page 283 and 284: VEnzin.for c:/dna/source/ $fluid O2
- Page 285 and 286: VEnzin.for c:/dna/source/ C−−
- Page 287 and 288: VEnzin.for c:/dna/source/ CA FKOMP
- Page 289 and 290: VEnzin.for c:/dna/source/ ENDDO NIN
- Page 291 and 292: VEnzin.for c:/dna/source/ C Subrout
- Page 293 and 294: VEnzin.for c:/dna/source/ CALL STAT
- Page 295 and 296: VEnzin.for c:/dna/source/ CA 3: Flu
- Page 297 and 298: VEnzin.for c:/dna/source/ C C C M_B
- Page 299 and 300: VEnzin.for c:/dna/source/ C C SETFL
- Page 301: VEnzin.for c:/dna/source/ C C GASCO
- Page 305 and 306: VEnzin.for c:/dna/source/ c c c E2=
- Page 307 and 308: VEnzin.for c:/dna/source/ C C HEATE
- Page 309 and 310: VEnzin.for c:/dna/source/ $ ’$\\d
- Page 311 and 312: VEnzin.for c:/dna/source/ c 1 = Wat
- Page 313 and 314: VEnzin.for c:/dna/source/ CA 4: Fin
- Page 315 and 316: VEnzin.for c:/dna/source/ CL K_MED
- Page 317 and 318: VEnzin.for c:/dna/source/ CA MEDIE
- Page 319 and 320: VEnzin.for c:/dna/source/ CA −4 :
- Page 321 and 322: VEnzin.for c:/dna/source/ C ENDDO E
- Page 323 and 324: VEnzin.for c:/dna/source/ MEDIE(2)
- Page 325 and 326: VEnzin.for c:/dna/source/ C C 400 C
- Page 327 and 328: VEnzin.for c:/dna/source/ GOTO 9999
- Page 329 and 330: VEnzin.for c:/dna/source/ MEDIE(1)
- Page 331 and 332: VEnzin.for c:/dna/source/ C−−
- Page 333 and 334: VEnzin.for c:/dna/source/ RES(1) =
- Page 335 and 336: VEnzin.for c:/dna/source/ C−−
- Page 337 and 338: VEnzin.for c:/dna/source/ C−−
- Page 339 and 340: 35. Metanol (fluid) til DNA - Fortr
- Page 341 and 342: methanol.for d:/DTU/Eksamensprojekt
- Page 343 and 344: methanol.for d:/DTU/Eksamensprojekt
- Page 345 and 346: methanol.for d:/DTU/Eksamensprojekt
- Page 347 and 348: methanol.for d:/DTU/Eksamensprojekt
- Page 349 and 350: methanol.for d:/DTU/Eksamensprojekt
- Page 351 and 352: methanol.for d:/DTU/Eksamensprojekt
<strong>VEnzin</strong>.for<br />
c:/dna/source/<br />
RES(5) = H3 − H(3)<br />
RES(6) = H4 − H(4)<br />
C<br />
C Calculate mole flow in<br />
C<br />
M_BL1 = 0.D0<br />
DO I=1,ANTST<br />
M_BL1=M_BL1+X_J(MEDIE(1),I)*M_MOL(I)<br />
ENDDO<br />
NIN = MDOT(1)/M_BL1<br />
NINST=NIN*X_J(MEDIE(1),7)<br />
NINME=NIN*X_J(MEDIE(1),CH3OH$)<br />
N=NIN−NINST−NINME<br />
C<br />
C Calculate mole flow out<br />
C<br />
M_BL2 = 0.D0<br />
DO I=1,ANTST<br />
M_BL2=M_BL2+X_J(MEDIE(2),I)*M_MOL(I)<br />
ENDDO<br />
NOUT = (−MDOT(2))/M_BL2<br />
C<br />
C Outlet composition of gas<br />
C<br />
DO I = 1,6<br />
RES(I+6) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN<br />
ENDDO<br />
DO I = 8,35<br />
RES(I+5) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN<br />
ENDDO<br />
C<br />
RES(41)=1.0D0<br />
DO I = 1,ANTST<br />
RES(41) = RES(41)−X_J(MEDIE(2),I)<br />
ENDDO<br />
C<br />
C Check for condensing water or methanol<br />
C<br />
b_2_1=−1062.945621D0<br />
b_1_2=3538.709318D0<br />
c J/mol<br />
alpha=0.2994D0<br />
R_u=8.314D0<br />
c J/(mol*K)<br />
c<br />
T=ZA(4)<br />
X0 = 0.D0<br />
CALL STATES(P_SAT_ST,HD,T,V,S,X0,U,3,6,MEDIE(3))<br />
X0 = 0.D0<br />
CALL STATES(P_SAT_ME,HD,T,V,S,X0,U,3,6,MEDIE(4))<br />
T_K=T+273.15D0<br />
c<br />
tau_2_1=b_2_1/(R_u*T_K)<br />
tau_1_2=b_1_2/(R_u*T_K)<br />
c<br />
x_ME_3=ZA(8)<br />
x_ST_3=1D0−x_ME_3<br />
gamma_2=exp((x_ST_3**2*(tau_1_2*((exp(−(alpha<br />
$ *tau_1_2))/(x_ME_3+x_ST_3*exp(−(alpha*tau_1_2))))<br />
$ )**2+(tau_2_1*(exp(−(alpha*tau_2_1))/(x_ST_3+x_ME_3<br />
$ *exp(−(alpha*tau_2_1)))**2)))))<br />
gamma_1=exp((x_ME_3**2*(tau_2_1*((exp(−(alpha<br />
$ *tau_2_1))/(x_ST_3+x_ME_3*exp(−(alpha*tau_2_1))))<br />
$ )**2+(tau_1_2*(exp(−(alpha*tau_1_2))/(x_ME_3+x_ST_3<br />
$ *exp(−(alpha*tau_1_2)))**2)))))<br />
c<br />
P_ST_IN=X_J(MEDIE(1),7)*P(1)<br />
P_ME_IN=X_J(MEDIE(1),CH3OH$)*P(1)<br />
c<br />
P_ME=P_ME_IN*0.999d0<br />
x_ME=P_ME/(gamma_2*P_SAT_ME)<br />
x_ST=1D0−x_ME<br />
P_ST_2=gamma_1*P_SAT_ST*x_ST<br />
P_ST=(P_ME_IN−P_ME+P_ST_IN)−(P_ME_IN−P_ME)/x_ME<br />
if (T.gt.239.1) then<br />
RES(52)=T−238<br />
else<br />
RES(52)=P_ST−P_ST_2<br />
32/67<br />
19−03−2007