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/ ** 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 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 NSTIN = X_J(MEDIE(1),7)*NIN N = NIN−NSTIN 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 Same temperature out C X0 = 0.D0 CALL STATES(P(2),H(2),T2,V,S,X,U,1,2,MEDIE(2)) X0 = 0.D0 CALL STATES(PSTOUT,HD,T2,V,S,X0,U,3,6,MEDIE(3)) CALL STATES(P(3),H2,T2,V,S,X,U,1,3,MEDIE(3)) RES(1) = H2 − H(3) C C Molar flow and ratio of steam out C XSTOUT = PSTOUT/P(2) IF (XSTOUT.GT.X_J(MEDIE(1),7)) XSTOUT = X_J(MEDIE(1),7) NSTOUT = XSTOUT*(NIN−NSTIN)/(1−XSTOUT) C C Molar flow of condensate C NCOND = NSTIN − NSTOUT c if (NCOND.lt.2D−7) NCOND=1D−7 RES(2) = MDOT(3) + NCOND*M_MOL(7) C C Pressure out C RES(3) = P(1) − P(2) − PAR(1) RES(4) = P(2) − P(3) RES(5) = P(4) − P(5) − PAR(2) C C Outlet composition of gas C DO I = 1,6 RES(I+5) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN ENDDO RES(7+5) = X_J(MEDIE(2),7) − XSTOUT DO I = 8,ANTST RES(I+5) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN ENDDO C −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Pinch point analysis C −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C C Check if pinch point is where the water condenses C DTP = PAR(3) EVAP=.false. if (MDOT(3).lt.−1d−5) then EVAP=.true. X0 = 0.0D0 CALL STATES(P(1)*X_J(MEDIE(1),7),HD,TPH,V,S,X0,U,1,6, $ MEDIE(3)) CALL STATES(P(1),HSAT0,TPH,V,S,X,U,1,3,MEDIE(1)) HPH = H(5) − MDOT(1)*(H(1)−HSAT0)/MDOT(4) 21/67 19−03−2007
VEnzin.for c:/dna/source/ CALL STATES(P(4),HPH,TPL,V,S,X,U,1,2,MEDIE(4)) RES(50) = TPH − TPL − ZA(3) HPHST=HPH RES(51)=ZA(4)−TPH else RES(50) = ZA(3) RES(51)=ZA(4) TPH=99999 TPL=0 endif C C Check if pinch point is where the water starts evaporating C (if the cold medium is water) C IF (MEDIE(4).GE.80) THEN CALL STATES(P(4),H(4),T4,V,S,X0,U,1,2,MEDIE(4)) CALL STATES(P(5),H(5),T5,V,S,X1,U,1,2,MEDIE(5)) IF ((X1.GT.(1.D−12)).AND.(X0.LT.1.D−12)) THEN X0 = 0.0D0 CALL STATES(P(4),HSAT0,TPL1,V,S,X0,U,1,6,MEDIE(4)) CALL STATES(P(1),HPH,TPL1+ZA(1),V,S,X,U,1,3,MEDIE(1)) E1=MDOT(4)*(H(5)−HSAT0) if ((EVAP).and.(HPHST.gt.HSAT0)) then X0 = 0.D0 CALL STATES(PST,HD,TPL1+ZA(1),V,S,X0,U,3,6,MEDIE(3)) XST = PST/P(2) Ntotal=N/(1−XST) NCONDST=NSTIN−Ntotal*XST CALL ENTHALPY(7,TPL1+ZA(1),H_water) HPH=(HPH*MDOT(1)−H_water*NCONDST*M_MOL(7))/(MDOT(1) $ −NCONDST*M_MOL(7)) CALL STATES(P(3),HST,TPL1+ZA(1),V,S,X0,U,1,3,MEDIE(3)) E2=H(1)*MDOT(1)−(HPH*(MDOT(1)−NCONDST*M_MOL(7)) $ +HST*NCONDST*M_MOL(7)) else E2=H(1)*MDOT(1)−HPH*MDOT(1) endif RES(48)=E2−E1 RES(49)=ZA(2)−(TPL1+ZA(1)) EVAP=.true. if (ZA(1).lt.(TPH−TPL)) then TPH=TPL1+ZA(1) TPL=TPL1 endif ELSE RES(48) = ZA(1) RES(49)=ZA(2) ENDIF ELSE RES(48) = ZA(1) RES(49)=ZA(2) ENDIF C C Check if pinch point is at the beginning or the end of the component C CALL STATES(P(1),H(1),T1,V,S,X,U,1,2,MEDIE(1)) CALL STATES(P(2),H(2),T2,V,S,X,U,1,2,MEDIE(2)) CALL STATES(P(4),H(4),T4,V,S,X,U,1,2,MEDIE(4)) CALL STATES(P(5),H(5),T5,V,S,X,U,1,2,MEDIE(5)) if ((.not.EVAP).or.(EVAP.and. $ (((T2−T4).lt.(TPH−TPL)).or.((T1−T5).lt.(TPH−TPL))))) then IF ((T1−T5).LT.(T2−T4)) THEN TPH = T1 TPL = T5 ELSE TPH = T2 TPL = T4 ENDIF ENDIF C C At the pinch point DTP is used C RES(47) = TPH − TPL − DTP C RES(52) = ZA(5) − MDOT(4)*(H(5)−H(4)) C IF (FKOMP.EQ.5) GOTO 500 GOTO 9999 22/67 19−03−2007
- Page 241 and 242: 17.126.4 Conditions ˙m1 > 0 ˙m2 <
- Page 243 and 244: 11. - 12. - 13. - 14. - 15. - 16. -
- Page 245 and 246: 17.128 SET_M Utility component for
- Page 247 and 248: 4. - 5. - 6. - 7. - 8. - 9. - 10. -
- 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: VEnzin.for c:/dna/source/ C Subrout
- 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 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
<strong>VEnzin</strong>.for<br />
c:/dna/source/<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 />
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 />
NSTIN = X_J(MEDIE(1),7)*NIN<br />
N = NIN−NSTIN<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 Same temperature out<br />
C<br />
X0 = 0.D0<br />
CALL STATES(P(2),H(2),T2,V,S,X,U,1,2,MEDIE(2))<br />
X0 = 0.D0<br />
CALL STATES(PSTOUT,HD,T2,V,S,X0,U,3,6,MEDIE(3))<br />
CALL STATES(P(3),H2,T2,V,S,X,U,1,3,MEDIE(3))<br />
RES(1) = H2 − H(3)<br />
C<br />
C Molar flow and ratio of steam out<br />
C<br />
XSTOUT = PSTOUT/P(2)<br />
IF (XSTOUT.GT.X_J(MEDIE(1),7)) XSTOUT = X_J(MEDIE(1),7)<br />
NSTOUT = XSTOUT*(NIN−NSTIN)/(1−XSTOUT)<br />
C<br />
C Molar flow of condensate<br />
C<br />
NCOND = NSTIN − NSTOUT<br />
c if (NCOND.lt.2D−7) NCOND=1D−7<br />
RES(2) = MDOT(3) + NCOND*M_MOL(7)<br />
C<br />
C Pressure out<br />
C<br />
RES(3) = P(1) − P(2) − PAR(1)<br />
RES(4) = P(2) − P(3)<br />
RES(5) = P(4) − P(5) − PAR(2)<br />
C<br />
C Outlet composition of gas<br />
C<br />
DO I = 1,6<br />
RES(I+5) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN<br />
ENDDO<br />
RES(7+5) = X_J(MEDIE(2),7) − XSTOUT<br />
DO I = 8,ANTST<br />
RES(I+5) = X_J(MEDIE(2),I)*NOUT − X_J(MEDIE(1),I)*NIN<br />
ENDDO<br />
C −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C Pinch point analysis<br />
C −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C<br />
C Check if pinch point is where the water condenses<br />
C<br />
DTP = PAR(3)<br />
EVAP=.false.<br />
if (MDOT(3).lt.−1d−5) then<br />
EVAP=.true.<br />
X0 = 0.0D0<br />
CALL STATES(P(1)*X_J(MEDIE(1),7),HD,TPH,V,S,X0,U,1,6,<br />
$ MEDIE(3))<br />
CALL STATES(P(1),HSAT0,TPH,V,S,X,U,1,3,MEDIE(1))<br />
HPH = H(5) − MDOT(1)*(H(1)−HSAT0)/MDOT(4)<br />
21/67<br />
19−03−2007