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/ C Include the common "environment" C INCLUDE ’ENVIRO.INI’ INCLUDE ’REALPROP.DEC’ C C Parameter variables C INTEGER ANTLK, ANTEX, ANTKN, MEDIE(13), ANTPK, & ANTM1, ANTM2, ANTME, VARME(8) DOUBLE PRECISION RES(25), MDOT(8), P(8), H(8), PAR(2), Q,ZA(3) $ ,ZC(4) CHARACTER*80 KOMTY,PARNAM(2),ZANAM(3),ZCNAM(4) C C Local variables C INTEGER K_MED(5),I,I_liq,I_vap DOUBLE PRECISION T, V, X, S, U,P_sat(8),H_sat(8),x_1,x_2,X0,X1 $ ,M_MOL1,M_MOL2,y_1,y_2,P_system,R_u,alpha,tau_1_2,tau_2_1 $ ,b_1_2,b_2_1,gamma_1,gamma_2,y_1_new,y_2_new,T_K,P_sat_1 $ ,P_sat_2,a_2_1,K_1,K_2 CHARACTER*100 K_PAR(2),K_STAT(1) CHARACTER*1000 KOMDSC,K_INP CHARACTER*500 K_LIG(3), K_BET CHARACTER*100 KMEDDS(13) EXTERNAL STATES INCLUDE ’REALPROP.INI’ C======================================================================= GOTO (100,200,1,400,400,200) FKOMP 1 RETURN C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component name C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 100 CONTINUE KOMTY = ’DISTILLATION_STAGE’ GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component characteristics C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 200 CONTINUE KOMTY = ’DISTILLATION_STAGE’ ANTKN = 13 ANTPK = 0 ANTLK = 12 ANTEX = 3 ANTM1 = 4 ANTM2 = 4 MEDIE(1) = WATHF$ MEDIE(2) = WATHF$ MEDIE(3) = WATHF$ MEDIE(4) = WATHF$ MEDIE(5) = MEOH$ MEDIE(6) = MEOH$ MEDIE(7) = MEOH$ MEDIE(8) = MEOH$ MEDIE(9) = HEAT$ MEDIE(10) = 999 MEDIE(11) = 999 MEDIE(12) = 999 MEDIE(13) = 999 ANTME = 0 ZANAM(1) = ’x_Methanol’ ZANAM(2) = ’y_Methanol’ ZANAM(3) = ’alpha’ ZCNAM(1) = ’Pressure’ ZCNAM(2) = ’Temperature’ ZCNAM(3) = ’x_Methanol’ ZCNAM(4) = ’y_Methanol’ 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 39/67 19−03−2007
VEnzin.for c:/dna/source/ c 1 = Water c 2 = Methanol c c Constants c M_MOL1=RM_MOL(MEDIE(1)) M_MOL2=RM_MOL(MEDIE(5)) b_2_1=−1062.945621D0 b_1_2=3538.709318D0 c J/mol alpha=0.2994D0 R_u=8.314D0 c J/(mol*K) P_system=ZC(1) c c Boling temperature of stage mixture c T=ZC(2) c CALL STATES(P(4),H(4),T,V,S,X,U,1,2,MEDIE(4)) X0=0.D0 X1=1.D0 CALL STATES(P_sat(2),H_sat(2),T,V,S,X0,U,3,6,MEDIE(2)) CALL STATES(P_sat(4),H_sat(4),T,V,S,X1,U,3,6,MEDIE(4)) X0=0.D0 X1=1.D0 CALL STATES(P_sat(6),H_sat(6),T,V,S,X0,U,3,6,MEDIE(6)) CALL STATES(P_sat(8),H_sat(8),T,V,S,X1,U,3,6,MEDIE(8)) c RES(1)=P(2)−P_sat(2) RES(2)=P(4)−P_sat(4) RES(3)=P(6)−P_sat(6) RES(4)=P(8)−P_sat(8) RES(5)=H(2)−H_sat(2) RES(6)=H(4)−H_sat(4) RES(7)=H(6)−H_sat(6) RES(8)=H(8)−H_sat(8) c c x_1,x_2,y_1 and y_2 is molar fractions in respectively liquid and c gas phase. c x_2=(MDOT(6)/M_MOL2)/(MDOT(2)/M_MOL1+MDOT(6)/M_MOL2) x_1=1−x_2 y_2=(MDOT(8)/M_MOL2)/(MDOT(4)/M_MOL1+MDOT(8)/M_MOL2) y_1=1−y_2 c K_1=y_1/x_1 K_2=y_2/x_2 a_2_1=K_2/K_1 c c Calculation of y_1_new and y_2_new c T_K=T+273.15D0 tau_2_1=b_2_1/(R_u*T_K) tau_1_2=b_1_2/(R_u*T_K) gamma_2=exp((x_1**2*(tau_1_2*((exp(−(alpha $ *tau_1_2))/(x_2+x_1*exp(−(alpha*tau_1_2)))) $ )**2+(tau_2_1*(exp(−(alpha*tau_2_1))/(x_1+x_2 $ *exp(−(alpha*tau_2_1)))**2))))) gamma_1=exp((x_2**2*(tau_2_1*((exp(−(alpha $ *tau_2_1))/(x_1+x_2*exp(−(alpha*tau_2_1)))) $ )**2+(tau_1_2*(exp(−(alpha*tau_1_2))/(x_2+x_1 $ *exp(−(alpha*tau_1_2)))**2))))) c P_sat_1=P_sat(4) P_sat_2=P_sat(8) c y_2_new=gamma_2*P_sat_2*x_2/P_system y_1_new=gamma_1*P_sat_1*x_1/P_system C RES(9)=y_2−y_2_new RES(10)=y_1−y_1_new c RES(11)=x_2−ZA(1) RES(12)=y_2−ZA(2) RES(13)=a_2_1−ZA(3) RES(14)=x_2−ZC(3) RES(15)=y_2−ZC(4) c 40/67 19−03−2007
- 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 and 302: VEnzin.for c:/dna/source/ C C GASCO
- Page 303 and 304: VEnzin.for c:/dna/source/ RES(5) =
- 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: VEnzin.for c:/dna/source/ $ ’$\\d
- 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
- Page 353 and 354: methanol.for d:/DTU/Eksamensprojekt
- Page 355 and 356: methanol.for d:/DTU/Eksamensprojekt
- Page 357 and 358: methanol.for d:/DTU/Eksamensprojekt
<strong>VEnzin</strong>.for<br />
c:/dna/source/<br />
c 1 = Water<br />
c 2 = Methanol<br />
c<br />
c Constants<br />
c<br />
M_MOL1=RM_MOL(MEDIE(1))<br />
M_MOL2=RM_MOL(MEDIE(5))<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 />
P_system=ZC(1)<br />
c<br />
c Boling temperature of stage mixture<br />
c<br />
T=ZC(2)<br />
c CALL STATES(P(4),H(4),T,V,S,X,U,1,2,MEDIE(4))<br />
X0=0.D0<br />
X1=1.D0<br />
CALL STATES(P_sat(2),H_sat(2),T,V,S,X0,U,3,6,MEDIE(2))<br />
CALL STATES(P_sat(4),H_sat(4),T,V,S,X1,U,3,6,MEDIE(4))<br />
X0=0.D0<br />
X1=1.D0<br />
CALL STATES(P_sat(6),H_sat(6),T,V,S,X0,U,3,6,MEDIE(6))<br />
CALL STATES(P_sat(8),H_sat(8),T,V,S,X1,U,3,6,MEDIE(8))<br />
c<br />
RES(1)=P(2)−P_sat(2)<br />
RES(2)=P(4)−P_sat(4)<br />
RES(3)=P(6)−P_sat(6)<br />
RES(4)=P(8)−P_sat(8)<br />
RES(5)=H(2)−H_sat(2)<br />
RES(6)=H(4)−H_sat(4)<br />
RES(7)=H(6)−H_sat(6)<br />
RES(8)=H(8)−H_sat(8)<br />
c<br />
c x_1,x_2,y_1 and y_2 is molar fractions in respectively liquid and<br />
c gas phase.<br />
c<br />
x_2=(MDOT(6)/M_MOL2)/(MDOT(2)/M_MOL1+MDOT(6)/M_MOL2)<br />
x_1=1−x_2<br />
y_2=(MDOT(8)/M_MOL2)/(MDOT(4)/M_MOL1+MDOT(8)/M_MOL2)<br />
y_1=1−y_2<br />
c<br />
K_1=y_1/x_1<br />
K_2=y_2/x_2<br />
a_2_1=K_2/K_1<br />
c<br />
c Calculation of y_1_new and y_2_new<br />
c<br />
T_K=T+273.15D0<br />
tau_2_1=b_2_1/(R_u*T_K)<br />
tau_1_2=b_1_2/(R_u*T_K)<br />
gamma_2=exp((x_1**2*(tau_1_2*((exp(−(alpha<br />
$ *tau_1_2))/(x_2+x_1*exp(−(alpha*tau_1_2))))<br />
$ )**2+(tau_2_1*(exp(−(alpha*tau_2_1))/(x_1+x_2<br />
$ *exp(−(alpha*tau_2_1)))**2)))))<br />
gamma_1=exp((x_2**2*(tau_2_1*((exp(−(alpha<br />
$ *tau_2_1))/(x_1+x_2*exp(−(alpha*tau_2_1))))<br />
$ )**2+(tau_1_2*(exp(−(alpha*tau_1_2))/(x_2+x_1<br />
$ *exp(−(alpha*tau_1_2)))**2)))))<br />
c<br />
P_sat_1=P_sat(4)<br />
P_sat_2=P_sat(8)<br />
c<br />
y_2_new=gamma_2*P_sat_2*x_2/P_system<br />
y_1_new=gamma_1*P_sat_1*x_1/P_system<br />
C<br />
RES(9)=y_2−y_2_new<br />
RES(10)=y_1−y_1_new<br />
c<br />
RES(11)=x_2−ZA(1)<br />
RES(12)=y_2−ZA(2)<br />
RES(13)=a_2_1−ZA(3)<br />
RES(14)=x_2−ZC(3)<br />
RES(15)=y_2−ZC(4)<br />
c<br />
40/67<br />
19−03−2007