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 />

RES(3) = P(1) − P(3)<br />

RES(4) = MDOT(1)*PAR(1) + MDOT(2)<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 (MDOT(3).GT.1D−10) 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 = ’Flow splitter. The distribution of the inlet massflow<br />

$ between the outlets is set by the parameter.’<br />

K_PAR(1) = ’Fraction: $\\frac{−\\dot{m_2}}{\\dot{m_1}}$’<br />

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

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

K_LIG(3) = ’Equal pressures: $p_1 = p_3$’<br />

K_BET =<br />

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

$\\lt 0 $’<br />

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

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

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

k_inp= ’struc split splitter3 1 2 3 0.4\\\\<br />

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

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

$START M split 2 −4 t split 2 50’<br />

C<br />

GOTO 9999<br />

C<br />

9999 CONTINUE<br />

RETURN<br />

END<br />

C<br />

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

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

SUBROUTINE MIXER_03(KOMTY,ANTLK,ANTKN,ANTM1, MEDIE,ANTME,VARME<br />

$ ,ANTEL, VAREL,MDOT,P,RES,X_J,komdsc,k_lig,k_bet,kmedds,k_inp<br />

$ ,MMVAR)<br />

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

C<br />

C MIXER_01 mixes two gasses. Same pressure in all nodes.<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 X_J − INPUT − Fluid composition.<br />

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

CA ANTPK − OUTPUT − Number of parameters for the component.<br />

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

CA ANTEX − OUTPUT − Number of independent equations in the component.<br />

CA ANTED − OUTPUT − Number of differential independent 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 />

CA ANTM2 − OUTPUT − Number of massflows in the second.<br />

CA DYCOM − OUTPUT − Type of conservation equations (static or dynamic<br />

CA mass and internal energy on side 1 and 2 respectively;<br />

CA and dynamic solid internal energy).<br />

CA MEDIE − IN/OUT − Media (fluid) of the connected nodes.<br />

CA The values mean :<br />

47/67<br />

19−03−2007

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

Saved successfully!

Ooh no, something went wrong!