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
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 />
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 />
CL S Entropy.<br />
CL X Quality.<br />
CL U Internal energy.<br />
CL K_PAR Parameter description.<br />
CL K_LIG Equation description.<br />
CL K_BET Condition description.<br />
CL K_MED Media description.<br />
C<br />
C Subroutines : STATES<br />
C COMINF<br />
C<br />
CP Pr<strong>og</strong>rammer : Bent Lorentzen 1994<br />
CP Lab. for Energetics, DTU, Denmark.<br />
C***********************************************************************<br />
C<br />
C Include the common "environment"<br />
C<br />
INCLUDE ’ENVIRO.INI’<br />
C<br />
C Parameter variables<br />
C<br />
INTEGER ANTLK, ANTEX, ANTKN, MEDIE(3), ANTPK,<br />
& ANTM1, ANTME, VARME(2)<br />
DOUBLE PRECISION MDOT(2), P(2), H(2), RES(3), ZC(1),PAR(2)<br />
$ ,X_J(MAXME,ANTST)<br />
CHARACTER*80 KOMTY<br />
C<br />
C Local variables<br />
C<br />
INTEGER K_MED(3)<br />
DOUBLE PRECISION MAXF,maxp<br />
CHARACTER*100 K_PAR(1),K_STAT(2)<br />
CHARACTER*500 K_LIG(2), K_BET<br />
CHARACTER*1000 KOMDSC,K_INP<br />
CHARACTER*100 KMEDDS(3)<br />
EXTERNAL COMINF,STATES<br />
C=======================================================================<br />
GOTO (100,200,1,400,400,200) FKOMP<br />
1 RETURN<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
C Component name<br />
C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
100 CONTINUE<br />
28/67<br />
19−03−2007