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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

c:/dna/source/<br />

C<br />

DO I=2,ANTKN<br />

if (I.ne.M_nr) then<br />

RES(RES_nr) = H(1) − H(I)<br />

RES_nr=RES_nr+1<br />

endif<br />

ENDDO<br />

IF (FKOMP.EQ.5) GOTO 500<br />

GOTO 9999<br />

C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

C Solution check<br />

C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

500 CONTINUE<br />

C<br />

IF (MDOT(1).LT.−1D−10) GOTO 550<br />

DO I=1,ANTKN−1<br />

IF (MDOT(I+1).GT.1D−10) GOTO 550<br />

ENDDO<br />

IF (abs(H(M_nr)−H(1)).GT.1D−1) GOTO 550<br />

C<br />

GOTO 9999<br />

550 FBETI = .FALSE.<br />

GOTO 9999<br />

C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

C Write component information<br />

C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

600 CONTINUE<br />

KOMDSC = ’Flow splitter − variable number of outlets<br />

$ for splitting up and later re−uniting the massflow − this<br />

$ means that only the pressure in node 2 is set.This<br />

$ documentation is for 3 outlets.’<br />

K_LIG(1) = ’Equal pressures: $p_1 = p_2$’<br />

K_LIG(2) = ’Equal enthalpy of outlets: $h_1 = h_2$’<br />

K_LIG(3) = ’Equal enthalpy of outlets: $h_1 = h_3$’<br />

K_BET = ’$\\dot{m}_1\\gt 0 \\\\ \\dot{m}_2\\lt 0<br />

$\\\\ \\dot{m}_3\\lt 0 \\\\ \\dot{m}_4\\lt 0$’<br />

KMEDDS(1) = ’Fluid in’<br />

KMEDDS(2) = ’Fluid out’<br />

KMEDDS(3) = ’Fluid out’<br />

KMEDDS(4) = ’Fluid out’<br />

k_inp= ’struc split splitter2 4 1 2 3 4\\\\<br />

$media 1 SIMPLE_AIR\\\\<br />

$addco m split 1 10 t split 1 50 p 1 1\\\\<br />

$addco m split 2 −3 m split 3 −3\\\\<br />

$addco p 3 1 p 4 1\\\\<br />

$start t split 2 50 t split 3 50’<br />

GOTO 9999<br />

C<br />

9999 CONTINUE<br />

RETURN<br />

END<br />

C=======================================================================<br />

C***********************************************************************<br />

SUBROUTINE SPLITTER3(KOMTY,ANTLK,ANTKN,ANTPK,ANTM1,MEDIE,ANTME<br />

$ ,VARME,PAR,MDOT,P,H,RES,komdsc,k_par,kmedds,k_lig,k_bet,k_inp<br />

$ )<br />

C***********************************************************************<br />

C<br />

C SPLITTER is splitting one mass flow in two. The two outlets have the<br />

C same enthalpy.<br />

C<br />

C***********************************************************************<br />

C<br />

CA FKOMP − INPUT − Flag with the value:<br />

CA 1: Initialize the component.<br />

CA 2: Initialize with actual system.<br />

CA 3: Fluid composition calculation (constant).<br />

CA 4: Find residuals.<br />

CA 5: Find residuals and check variables.<br />

CA 6: Output information about component.<br />

CA MDOT − INPUT − Massflows from nodes.<br />

CA P − INPUT − Pressure in nodes.<br />

CA H − INPUT − Enthalpy of massflows.<br />

CA KOMTY − OUTPUT − Component name.<br />

CA ANTLK − OUTPUT − Number of equations.<br />

CA ANTKN − OUTPUT − Number of nodes connected to the component.<br />

CA ANTM1 − OUTPUT − Number of massflows in the first conservation of<br />

CA mass equation.<br />

45/67<br />

19−03−2007

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

Saved successfully!

Ooh no, something went wrong!