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/ KOMTY = ’SET_M’ GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component characteristics C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 200 CONTINUE KOMTY = ’SET_M’ ANTKN = 3 ANTPK = 0 ANTLK = 2 ANTM1 = 2 MEDIE(1) = ANYGAS$ MEDIE(2) = ANYGAS$ MEDIE(3) = 999 ANTME = 2 VARME(1) = NODE1$ VARME(2) = NODE1$ 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) RES(2) = ZC(1)−(X_J(MEDIE(1),H2$)−X_J(MEDIE(1),CO2$))/ $ (X_J(MEDIE(1),CO2$)+X_J(MEDIE(1),CO$)) C IF (FKOMP.EQ.5) GOTO 500 GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Solution check C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 500 CONTINUE IF (MDOT(1).LT.−1D−10) GOTO 550 IF (MDOT(2).GT.1D−10) GOTO 550 IF (X_J(MEDIE(1),CO$)+X_J(MEDIE(1),CO2$).LT.1D−3) GOTO 550 GOTO 9999 550 FBETI = .FALSE. GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Write component information C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 600 CONTINUE KOMDSC = ’Utility component for setting the M−factor for a syngas $ used for production of a liquid fuel. The M−factor is defined $ in the equations below. If the M−factor is 2 for methanol $ production it means that all the syngas in theory can be $ converted to methanol. The M−factor is defined as a control $ variable (ZC).’ K_LIG(1) = ’Equal pressures: $p_1 = p_2$’ K_LIG(2) = $ ’M−factor: $ZC(1)=\\frac{y_{H_2}−y_{CO_2}}{y_{CO_2}+y_{CO}}$’ K_BET = ’$\\dot{m_1} \\gt 0 \\\\ \\dot{m_2} \\lt 0 \\\\ $y_{CO}+y_{CO_2} \\gt 0$’ KMEDDS(1) = ’Gas in’ KMEDDS(2) = ’Gas out’ KMEDDS(3) = ’M−factor’ K_INP=’struc set−M SET_M 611 612 900\\\\ $MEDIA 611 gas\\\\ $fluid gas N2 0.1 H2 0.6 CO 0.1 CO2 0.2\\\\ $addco m set−M 611 1 t set−M 611 50 p 611 1’ C GOTO 9999 C 9999 CONTINUE RETURN END C C======================================================================= C*********************************************************************** SUBROUTINE GASCOOL4(KOMTY,ANTLK,ANTKN,ANTPK,ANTM1,ANTM2,MEDIE, $ ANTME,VARME,ANTEL,VAREL,MDOT,P,H,Q,PAR,RES,X_J,ZA,ZANAM,ZC, $ ANTEX,KOMDSC,K_PAR,K_lig,K_bet,KMEDDS,K_inp) C*********************************************************************** 29/67 19−03−2007
VEnzin.for c:/dna/source/ C C GASCOOL1 is a model of a gas cooler with steam condensation. C The model does not include equations concerning the heat exchange. C 1−2 is the heat emitting fluid. C C*********************************************************************** C CA FKOMP − INPUT − Flag with the value: CA 1: Initialize the component. CA 2: Initialize with actual system. CA 3: Fluid composition calculation (constant). CA 4: Find residuals. CA 5: Find residuals and check variables. CA 6: Output information about component. CA MDOT − INPUT − Massflows from nodes. CA P − INPUT − Pressure in nodes. CA H − INPUT − Enthalpy of massflows. CA PAR − INPUT − Parameters of the component. CA KOMTY − OUTPUT − Component name. CA ANTPK − OUTPUT − Number of parameters. CA ANTLK − OUTPUT − Number of equations. CA ANTEX − OUTPUT − Number of algebraic independent equations. CA ANTED − OUTPUT − Number of differential independent equations. CA ANTKN − OUTPUT − Number of nodes connected to the component. CA ANTM1 − OUTPUT − Number of massflows in the first conservation of CA mass equation. CA ANTM2 − OUTPUT − Number of massflows in the second. CA DYCOM − OUTPUT − Type of conservation equations (static or dynamic CA mass and internal energy on side 1 and 2 respectively; CA and dynamic solid internal energy). CA MEDIE − IN/OUT − Media (fluid) of the connected nodes. CA The values mean: CA 99 : Water. CA ANTME − OUTPUT − Number of fluids with variable composition. CA RES − OUTPUT − Residuals for the component. C CL T1,T2 Temperature in first and second node. CL T3,T4 Temperature in third and fourth node. CL S Entropy. CL V Specific volume. CL X Quality. CL U Internal energy. CL DPA,DPB Pressure loss in heat exchanger. CL K_PAR Parameter description. CL K_LIG Equation description. CL K_BET Condition description. CL K_MED Media description. C C Subroutines : STATES C CP Programmer : Brian Elmegaard 2000 CP Dept. of Energy Eng., DTU, Denmark. C*********************************************************************** C C Include the common "environment" C INCLUDE ’ENVIRO.INI’ INCLUDE ’THERPROP.DEC’ C C Parameter variables C INTEGER ANTLK, ANTKN, MEDIE(8), ANTPK, ANTEX, & ANTM1, ANTM2, ANTME, VARME(4), ANTEL(4), & VAREL(ANTST,4) DOUBLE PRECISION RES(60), MDOT(6), P(6), H(6), Q, PAR(3), & X_J(MAXME,ANTST),ZA(12),ZC(1) CHARACTER*80 KOMTY,ZANAM(12) C C Local variables C INTEGER K_MED(6),I DOUBLE PRECISION V, S, U,M_BL1,M_BL2, T1, T2, T3, T4, T5,T6, X, : NIN,NOUT,NINST,NSTOUT,NCOND,PSTOUT,X0,HD,XSTOUT,H3,H4 $ ,X1,HPH,TPH,HSAT0,TPL,TPL1,TPH1,DTP,PMEOUT,XMEOUT,NCOND_MEOH $ ,NINME,NMEOUT,HPH_min,NCONDST,NCONDME,XST,XME,N,E1,E2,Ntotal $ ,HPHME,HPHST,PST,PME,HST,HME,HPH2,MPH,HSTV,HMEV,HPLST,HPLME $ ,TPHST,TPHME,TPLST,TPLME,TPHME2,TPHST2,b_2_1,b_1_2,alpha,R_u $ ,T_K,tau_2_1,tau_1_2,gamma_2,gamma_1,y_ME,y_ST,x_ME,x_ST,P_ME 30/67 19−03−2007
- Page 249 and 250: 17.129.4 Conditions ˙m1 > 0 ˙m2 <
- 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: VEnzin.for c:/dna/source/ C C SETFL
- 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 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
<strong>VEnzin</strong>.for<br />
c:/dna/source/<br />
KOMTY = ’SET_M’<br />
GOTO 9999<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C Component characteristics<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
200 CONTINUE<br />
KOMTY = ’SET_M’<br />
ANTKN = 3<br />
ANTPK = 0<br />
ANTLK = 2<br />
ANTM1 = 2<br />
MEDIE(1) = ANYGAS$<br />
MEDIE(2) = ANYGAS$<br />
MEDIE(3) = 999<br />
ANTME = 2<br />
VARME(1) = NODE1$<br />
VARME(2) = NODE1$<br />
IF (FKOMP.EQ.6) GOTO 600<br />
** FKOMP = 3<br />
GOTO 9999<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C Component equations. All in residual form.<br />
C Do not include the conservation laws. These are treated automatically<br />
C by DNA.<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
400 CONTINUE<br />
C<br />
RES(1) = P(1) − P(2)<br />
RES(2) = ZC(1)−(X_J(MEDIE(1),H2$)−X_J(MEDIE(1),CO2$))/<br />
$ (X_J(MEDIE(1),CO2$)+X_J(MEDIE(1),CO$))<br />
C<br />
IF (FKOMP.EQ.5) GOTO 500<br />
GOTO 9999<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C Solution check<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
500 CONTINUE<br />
IF (MDOT(1).LT.−1D−10) GOTO 550<br />
IF (MDOT(2).GT.1D−10) GOTO 550<br />
IF (X_J(MEDIE(1),CO$)+X_J(MEDIE(1),CO2$).LT.1D−3) GOTO 550<br />
GOTO 9999<br />
550 FBETI = .FALSE.<br />
GOTO 9999<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C Write component information<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
600 CONTINUE<br />
KOMDSC = ’U<strong>til</strong>ity component for setting the M−factor for a syngas<br />
$ used for production of a liquid fuel. The M−factor is defined<br />
$ in the equations below. If the M−factor is 2 for methanol<br />
$ production it means that all the syngas in theory can be<br />
$ converted to methanol. The M−factor is defined as a control<br />
$ variable (ZC).’<br />
K_LIG(1) = ’Equal pressures: $p_1 = p_2$’<br />
K_LIG(2) =<br />
$ ’M−factor: $ZC(1)=\\frac{y_{H_2}−y_{CO_2}}{y_{CO_2}+y_{CO}}$’<br />
K_BET = ’$\\dot{m_1} \\gt 0 \\\\ \\dot{m_2} \\lt 0 \\\\<br />
$y_{CO}+y_{CO_2} \\gt 0$’<br />
KMEDDS(1) = ’Gas in’<br />
KMEDDS(2) = ’Gas out’<br />
KMEDDS(3) = ’M−factor’<br />
K_INP=’struc set−M SET_M 611 612 900\\\\<br />
$MEDIA 611 gas\\\\<br />
$fluid gas N2 0.1 H2 0.6 CO 0.1 CO2 0.2\\\\<br />
$addco m set−M 611 1 t set−M 611 50 p 611 1’<br />
C<br />
GOTO 9999<br />
C<br />
9999 CONTINUE<br />
RETURN<br />
END<br />
C<br />
C=======================================================================<br />
C***********************************************************************<br />
SUBROUTINE GASCOOL4(KOMTY,ANTLK,ANTKN,ANTPK,ANTM1,ANTM2,MEDIE,<br />
$ ANTME,VARME,ANTEL,VAREL,MDOT,P,H,Q,PAR,RES,X_J,ZA,ZANAM,ZC,<br />
$ ANTEX,KOMDSC,K_PAR,K_lig,K_bet,KMEDDS,K_inp)<br />
C***********************************************************************<br />
29/67<br />
19−03−2007