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(1) = P(1) − P(2)<br />

C<br />

CALL STATES(P(1),H(1),T,V,S,X,U,1,2,MEDIE(1))<br />

C<br />

RES(2) = ZC(1) − T<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 />

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>lity component for setting or measuring the<br />

$ temperature by use of a control signal (ZC).’<br />

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

K_LIG(2) = ’Temperature: T = ZC(1)’<br />

K_BET = ’$\\dot{m_1} \\gt 0 \\\\ \\dot{m_2} \\lt 0 $’<br />

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

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

KMEDDS(3) = ’Temperature’<br />

K_INP=’struc set_temp SET_TEMP 1 2 900\\\\<br />

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

$addco p 1 1 m set_temp 1 60 t set_temp 1 60’<br />

C<br />

GOTO 9999<br />

C<br />

9999 CONTINUE<br />

RETURN<br />

END<br />

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

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

$ ,VARME,MDOT,P,H,ZC,PAR,RES,KOMDSC,K_PAR,K_lig,K_bet,KMEDDS<br />

$ ,K_inp)<br />

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

C<br />

C SETFLOW1 is a model of a control valve. The valve controls massflow<br />

C using an error input from a controller.<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 ZC − INPUT − Control variables.<br />

CA PAR − INPUT − Parameters of the component.<br />

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

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

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

CA ANTEX − OUTPUT − Number of algebraic 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 MEDIE − IN/OUT − Media of the connected nodes.<br />

CA The values mean:<br />

CA 99 : Water.<br />

CA 999 : Control.<br />

CA ANTME − OUTPUT − Number of fluids with variable composition.<br />

CA RES − OUTPUT − Residuals for the component.<br />

C<br />

CL CV Valve friction coefficient.<br />

CL V1 Specific volume for water entering the valve.<br />

CL T Temperature.<br />

62/67<br />

19−03−2007

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

Saved successfully!

Ooh no, something went wrong!