27.07.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>VEnzin</strong>.for<br />

c:/dna/source/<br />

ENDDO<br />

DO I=1,ANTST<br />

NIN(I)=MDOT(1)*X_J(MEDIE(1),I)/M_MOL(I) +<br />

+ MDOT(3)*X_J(MEDIE(3),I)/M_BL(3)<br />

ENDDO<br />

NIN(37)=NIN(37)+MDOT(2)/M_MOL(37)<br />

NIN(28)=NIN(28)*CC<br />

C<br />

C Calculate mole flow of each species out<br />

C<br />

M_BL(4) = 0D0<br />

DO I=1,ANTST<br />

M_BL(4)=M_BL(4)+X_J(MEDIE(4),I)*M_MOL(I)<br />

ENDDO<br />

NOUT(ANTST+1) = (−MDOT(4))/M_BL(4)<br />

DO I=1,ANTST<br />

NOUT(I)=NOUT(ANTST+1)*X_J(MEDIE(4),I)<br />

cbe 20041711 molar fractions excluding "non−equilibrium" methane<br />

IF (I.EQ.11) THEN<br />

XEQ(I)=(X_J(MEDIE(4),i)−METH)/(1.D0−METH)<br />

ELSE<br />

XEQ(I)=X_J(MEDIE(4),I)/(1.D0−METH)<br />

ENDIF<br />

ENDDO<br />

C<br />

C Gibbs’ free energy of each compound<br />

C<br />

DO I=1,15<br />

IF (CALCOM(I).GT.0)<br />

$ CALL GIBBS(CALCOM(I),TGAS,PGAS*(1.D0−METH)*XEQ(CALCOM(I))<br />

$ ,G(I))<br />

ENDDO<br />

C<br />

C Partial derivatives of the function to be minimized with respect to<br />

C each species molar fraction<br />

DO I=1,15<br />

IF (CALCOM(I).LT.0) THEN<br />

RES(I+8) = X_J(MEDIE(4),−CALCOM(I))<br />

ELSEIF (X_J(MEDIE(4),CALCOM(I)).GT.1.0D−5) THEN<br />

RES(I+8) = G(I)<br />

c /(R*TGAS) +<br />

c : DLOG(PGAS*NOUT(CALCOM(I))/NOUT(ANTST+1))<br />

cbe 041117 part of the fuel is not reaching equilibrium<br />

c : DLOG(PGAS*XEQ(CALCOM(I)))<br />

DO J=1,6<br />

RES(I+8) = RES(I+8) + ZA(J)*EL(CALCOM(I),J)<br />

ENDDO<br />

ELSE<br />

RES(I+8) = G(I)<br />

c /(R*TGAS) +<br />

c : DLOG(1.d−5)+<br />

c $ 1.d5*(pgas*NOUT(CALCOM(I))/NOUT(ANTST+1)−1.d−5)<br />

c RES(I+8) = X_J(MEDIE(4),CALCOM(I))−1.0D−10<br />

DO J=1,6<br />

RES(I+8) = RES(I+8) + ZA(J)*EL(CALCOM(I),J)<br />

ENDDO<br />

if (fiter) then<br />

write(warnstring,’(a,a,a,a)’) ’Warning: The compound ’,<br />

$ COMPNA(CALCOM(I)),<br />

$ ’should be removed from the ’,<br />

$ ’compound equilibrium calculation.’<br />

call printout(warnstring)<br />

endif<br />

ENDIF<br />

ENDDO<br />

C<br />

C Molar balance for each atom (H,C,N,O,S,Ar)<br />

C<br />

DO J=1,ANTEX−1<br />

RES(ANTLK+J) = 0D0<br />

DO I=1,ANTST<br />

RES(ANTLK+J)=RES(ANTLK+J)−(NIN(I)−NOUT(I))*EL(I,J)<br />

ENDDO<br />

ENDDO<br />

RES(29) = 1.0D0<br />

DO I=1,ANTST<br />

RES(29)= RES(29)−X_J(MEDIE(4),I)<br />

10/67<br />

19−03−2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!