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
VEnzin.for c:/dna/source/ GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Solution check C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 500 CONTINUE IF (MDOT(1).LT.−1D−10) GOTO 550 IF (MDOT(2).GT.1D−10) GOTO 550 IF (MDOT(3).GT.1D−10) GOTO 550 IF (Q.GT.1D−10) GOTO 550 IF (E.LT.−1D−10) GOTO 550 GOTO 9999 550 FBETI = .FALSE. GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Write component information C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 600 CONTINUE KOMDSC = ’Water elektrolysis with efficiency.’ KMEDDS(1) = ’Water in’ KMEDDS(2) = ’H2 out’ KMEDDS(3) = ’O2 out’ KMEDDS(4) = ’Power in’ KMEDDS(5) = ’Heat loss’ K_PAR(1) = ’Temperature: Temp [C]’ K_PAR(2) = ’Efficiency of elektrolysis: $\\eta$ [−−]’ K_LIG(1) = ’Only H2 in node 2: $y_j(H2,medie(2)) = 1$’ K_LIG(2) = ’Only O2 in node 3: $y_j(O2,medie(3)) = 1$’ K_LIG(3) = ’Mol balance: $$−\\dot{m}_2 = \\dot{m}_1 M_{mol}(H2)/M_{mol}(H2O)$’ K_LIG(4) = ’Equal pressures: $p_1 = p_2$’ K_LIG(5) = ’Equal pressures: $p_1 = p_3$’ K_LIG(6) = ’Temperature of outlet gas: $Temp = T_2$’ K_LIG(7) = ’Equal temperature of outlet gases: $T_3 = T_2$’ K_LIG(8) = ’Efficiency of elektrolysis: $$\\dot{E} \\eta=−\\dot{m}_2 LHV_{H2}$’ K_BET = ’$\\dot{m}_1\\gt 0 \\\\ \\dot{m}_2 \\lt 0 \\\\ $\\dot{m}_3 \\lt 0 \\\\ \\dot{Q} \\lt 0 \\\\ \\dot{E} \\gt 0$’ k_inp=’struc Elyse ELECTROLYSER 1 2 3 201 301 90 0.8\\\\ $media 2 H2 3 O2\\\\ $addco p 1 1 m Elyse 1 1 t Elyse 1 15\\\\ $start m Elyse 2 −1 m Elyse 3 −1\\\\ $start t Elyse 2 90 t Elyse 3 90\\\\ $start e Elyse 201 100\\\\ $start y_j H2 H2 1 y_j O2 O2 1\\\\ $start p 2 1 p 3 1 q Elyse 301 −10’ GOTO 9999 C 9999 CONTINUE RETURN END C======================================================================= C*********************************************************************** SUBROUTINE DRYER_04(KOMTY,ANTLK,ANTEX,ANTKN,ANTPK,ANTM1,MEDIE, & ANTME,VARME,ANTEL,VAREL,MDOT,P,H,Q,PAR,RES,X_J,CP,HV,HF,ZA, $ ZANAM,KOMDSC,K_PAR,K_lig,K_bet,KMEDDS,K_inp) C*********************************************************************** C C DRYER_02 is a model of a steam fuel dryer. C The model does not include equations concerning the heat exchange. C 1−2 is the heat emitting fluid. C C*********************************************************************** C CA FKOMP − INPUT − Flag with the value: CA 1: Initialize the component. CA 2: Initialize with actual system. CA 3: Fluid composition calculation (constant). CA 4: Find residuals. CA 5: Find residuals and check variables. CA 6: Output information about component. CA MDOT − INPUT − Massflows from nodes. CA P − INPUT − Pressure in nodes. CA H − INPUT − Enthalpy of massflows. CA PAR − INPUT − Parameters of the component. CA KOMTY − OUTPUT − Component name. CA ANTPK − OUTPUT − Number of parameters. CA ANTLK − OUTPUT − Number of equations. CA ANTEX − OUTPUT − Number of algebraic independent equations. 3/67 19−03−2007
VEnzin.for c:/dna/source/ CA ANTED − OUTPUT − Number of differential independent equations. CA ANTKN − OUTPUT − Number of nodes connected to the component. CA ANTM1 − OUTPUT − Number of massflows in the first conservation of CA mass equation. CA ANTM2 − OUTPUT − Number of massflows in the second. CA DYCOM − OUTPUT − Type of conservation equations (static or dynamic CA mass and internal energy on side 1 and 2 respectively; CA and dynamic solid internal energy). CA MEDIE − IN/OUT − Media (fluid) of the connected nodes. CA The values mean: CA 99 : Water. CA ANTME − OUTPUT − Number of fluids with variable composition. CA RES − OUTPUT − Residuals for the component. C CL T1,T2 Temperature in first and second node. CL T3,T4 Temperature in third and fourth node. CL S Entropy. CL V Specific volume. CL X Quality. CL U Internal energy. CL DPA,DPB Pressure loss in heat exchanger. CL K_PAR Parameter description. CL K_LIG Equation description. CL K_BET Condition description. CL K_MED Media description. C C Subroutines : COMINF C STATES C CP Programmer : Brian Elmegaard 2000 CP Dept. of Energy Eng., DTU, Denmark. C*********************************************************************** C C Include the common "environment" C INCLUDE ’ENVIRO.INI’ C C Parameter variables C INTEGER ANTLK, ANTEX,ANTKN, MEDIE(5), ANTPK, & ANTM1, ANTME, VARME(4), ANTEL(4), & VAREL(ANTST,4) DOUBLE PRECISION RES(77), MDOT(4), P(4), H(4), Q, PAR(2),ZA(1), & X_J(MAXME,ANTST),CP(MAXME),HV(MAXME),HF(MAXME) CHARACTER*80 KOMTY,ZANAM(1) C C Local variables C INTEGER K_MED(5),I DOUBLE PRECISION V, S, U, DP, MOIIN, MOIOUT, T1, $ T2, T3, T4, X, H4 CHARACTER*100 K_PAR(2),K_STAT(1) CHARACTER*500 K_LIG(77), K_BET CHARACTER*1000 KOMDSC,K_INP CHARACTER*100 KMEDDS(5) EXTERNAL COMINF,STATES C======================================================================= GOTO (100,200,1,400,400,200,350) FKOMP 1 RETURN C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component name C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 100 CONTINUE KOMTY = ’DRYER_04’ GOTO 9999 C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− C Component characteristics C−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 200 CONTINUE KOMTY = ’DRYER_04’ ANTKN = 5 ANTPK = 2 ANTLK = 40 ANTEX = 1 ANTM1 = 4 MEDIE(1) = −5 MEDIE(2) = 97 MEDIE(3) = −5 4/67 19−03−2007
- Page 223 and 224: 9. - 10. - 11. - 12. - 13. - 14. -
- Page 225 and 226: 17.123 GASIFI_3_VENZIN Gasifier wit
- Page 227 and 228: 13. - 14. - 15. - 16. - 17. - 18. -
- Page 229 and 230: 17.124 GASCLE_2 Syngas cleaning. Th
- Page 231 and 232: 38. Compound number 39. Compound nu
- Page 233 and 234: 43. - 44. - 45. - 46. - 47. - 48. -
- Page 235 and 236: 17.124.5 Example struc Cleaner GASC
- Page 237 and 238: 10. - 11. - 12. - 13. - 17.125.4 Co
- Page 239 and 240: 7. - 8. - 9. - 10. - 11. - 12. - 13
- Page 241 and 242: 17.126.4 Conditions ˙m1 > 0 ˙m2 <
- Page 243 and 244: 11. - 12. - 13. - 14. - 15. - 16. -
- Page 245 and 246: 17.128 SET_M Utility component for
- Page 247 and 248: 4. - 5. - 6. - 7. - 8. - 9. - 10. -
- Page 249 and 250: 17.129.4 Conditions ˙m1 > 0 ˙m2 <
- Page 251 and 252: 17.130.4 Conditions ˙m1 > 0 ˙m2 <
- Page 253 and 254: 17.131.2 Equations Number of equati
- Page 255 and 256: 17.132 EL-MOTOR Motor with efficien
- Page 257 and 258: 8. - 9. - 17.133.3 Conditions ˙m1
- Page 259 and 260: 17.135 MIXER_03 Mixer for ideal gas
- Page 261 and 262: 33. - 34. - 35. - 36. - 37. - 38. -
- Page 263 and 264: 17.137 SET_X Utility component for
- Page 265 and 266: 17.138.4 Conditions ˙m1 > 0 ˙m2 <
- Page 267 and 268: 17.140 SET_FLOW Utillity component
- Page 269 and 270: 17.142 SET_TEMP2 Utillity component
- Page 271 and 272: 34. Tilføjede komponenter til DNA
- Page 273: VEnzin.for c:/dna/source/ C C Param
- Page 277 and 278: VEnzin.for c:/dna/source/ IF (MDOT(
- Page 279 and 280: VEnzin.for c:/dna/source/ MMVAR(1)
- Page 281 and 282: VEnzin.for c:/dna/source/ ENDDO DO
- Page 283 and 284: VEnzin.for c:/dna/source/ $fluid O2
- Page 285 and 286: VEnzin.for c:/dna/source/ C−−
- Page 287 and 288: VEnzin.for c:/dna/source/ CA FKOMP
- Page 289 and 290: VEnzin.for c:/dna/source/ ENDDO NIN
- Page 291 and 292: VEnzin.for c:/dna/source/ C Subrout
- Page 293 and 294: VEnzin.for c:/dna/source/ CALL STAT
- Page 295 and 296: VEnzin.for c:/dna/source/ CA 3: Flu
- Page 297 and 298: VEnzin.for c:/dna/source/ C C C M_B
- Page 299 and 300: VEnzin.for c:/dna/source/ C C SETFL
- Page 301 and 302: VEnzin.for c:/dna/source/ C C GASCO
- Page 303 and 304: VEnzin.for c:/dna/source/ RES(5) =
- Page 305 and 306: VEnzin.for c:/dna/source/ c c c E2=
- Page 307 and 308: VEnzin.for c:/dna/source/ C C HEATE
- Page 309 and 310: VEnzin.for c:/dna/source/ $ ’$\\d
- Page 311 and 312: VEnzin.for c:/dna/source/ c 1 = Wat
- Page 313 and 314: VEnzin.for c:/dna/source/ CA 4: Fin
- Page 315 and 316: VEnzin.for c:/dna/source/ CL K_MED
- Page 317 and 318: VEnzin.for c:/dna/source/ CA MEDIE
- Page 319 and 320: VEnzin.for c:/dna/source/ CA −4 :
- Page 321 and 322: VEnzin.for c:/dna/source/ C ENDDO E
- Page 323 and 324: VEnzin.for c:/dna/source/ MEDIE(2)
<strong>VEnzin</strong>.for<br />
c:/dna/source/<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 />
IF (Q.GT.1D−10) GOTO 550<br />
IF (E.LT.−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 = ’Water elektrolysis with efficiency.’<br />
KMEDDS(1) = ’Water in’<br />
KMEDDS(2) = ’H2 out’<br />
KMEDDS(3) = ’O2 out’<br />
KMEDDS(4) = ’Power in’<br />
KMEDDS(5) = ’Heat loss’<br />
K_PAR(1) = ’Temperature: Temp [C]’<br />
K_PAR(2) = ’Efficiency of elektrolysis: $\\eta$ [−−]’<br />
K_LIG(1) = ’Only H2 in node 2: $y_j(H2,medie(2)) = 1$’<br />
K_LIG(2) = ’Only O2 in node 3: $y_j(O2,medie(3)) = 1$’<br />
K_LIG(3) = ’Mol balance:<br />
$$−\\dot{m}_2 = \\dot{m}_1 M_{mol}(H2)/M_{mol}(H2O)$’<br />
K_LIG(4) = ’Equal pressures: $p_1 = p_2$’<br />
K_LIG(5) = ’Equal pressures: $p_1 = p_3$’<br />
K_LIG(6) = ’Temperature of outlet gas: $Temp = T_2$’<br />
K_LIG(7) = ’Equal temperature of outlet gases: $T_3 = T_2$’<br />
K_LIG(8) = ’Efficiency of elektrolysis:<br />
$$\\dot{E} \\eta=−\\dot{m}_2 LHV_{H2}$’<br />
K_BET = ’$\\dot{m}_1\\gt 0 \\\\ \\dot{m}_2 \\lt 0 \\\\<br />
$\\dot{m}_3 \\lt 0 \\\\ \\dot{Q} \\lt 0 \\\\ \\dot{E} \\gt 0$’<br />
k_inp=’struc Elyse ELECTROLYSER 1 2 3 201 301 90 0.8\\\\<br />
$media 2 H2 3 O2\\\\<br />
$addco p 1 1 m Elyse 1 1 t Elyse 1 15\\\\<br />
$start m Elyse 2 −1 m Elyse 3 −1\\\\<br />
$start t Elyse 2 90 t Elyse 3 90\\\\<br />
$start e Elyse 201 100\\\\<br />
$start y_j H2 H2 1 y_j O2 O2 1\\\\<br />
$start p 2 1 p 3 1 q Elyse 301 −10’<br />
GOTO 9999<br />
C<br />
9999 CONTINUE<br />
RETURN<br />
END<br />
C=======================================================================<br />
C***********************************************************************<br />
SUBROUTINE DRYER_04(KOMTY,ANTLK,ANTEX,ANTKN,ANTPK,ANTM1,MEDIE,<br />
& ANTME,VARME,ANTEL,VAREL,MDOT,P,H,Q,PAR,RES,X_J,CP,HV,HF,ZA,<br />
$ ZANAM,KOMDSC,K_PAR,K_lig,K_bet,KMEDDS,K_inp)<br />
C***********************************************************************<br />
C<br />
C DRYER_02 is a model of a steam fuel dryer.<br />
C The model does not include equations concerning the heat exchange.<br />
C 1−2 is the heat emitting fluid.<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 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 />
3/67<br />
19−03−2007