#cls
text(In-Form equivalent of PLANT case Z122
title
libref=722
DISPLAY
This In-Form case does what Z122 does, but without fortran coding
or re-compilation and use of neighbour technique.
It uses the In-Form functions:
SOURCE, HIGH, LOW and WEST.
The Q1 contains PHOTON USE commands
ENDDIS
PHOTON USE
p
up 1 0 0;vi 0.5 1 0.75
gr ou x 1;gr ou y 1;gr ou z 1
gr ou x m;gr ou y m;gr ou z m
gr ou x 1 y 1 2 z 2 2 col 2
gr ou x 6 y 1 2 z 7 7 col 2
gr ou z 4 x 1 4 y 1 3 col 6
gr ou z 6 x 2 5 y 1 3 col 6
ve y 2 sh
msg 3D SHELL-AND-TUBE HEAT EXCHANGER
msg --------------------------------
msg Velocity 1 phase:
msg Press Enter to continue
pause;vi 0 1 0
msg 3D SHELL-AND-TUBE HEAT EXCHANGER
msg --------------------------------
msg Temperature distribution 1 phase:
con 1sth y 2 sh;in 50
msg Press Enter to continue
pause
con off;red
msg 3D SHELL-AND-TUBE HEAT EXCHANGER
msg --------------------------------
msg Temperature distribution 2 phase:
con 2ndh y 2 sh;in 50
msg Press e to END
ENDUSE
load(z122)
text(In-Form equivalent of PLANT case Z122
libref=722
INFORM13BEGIN
** The next line de-activates PLANT **
namsat=none
RESIST=SKIP
** The next lines de-activate neighbour technique **
NEH1=SKIP
NEW1=SKIP
NEL1=SKIP
NEW2=SKIP
NEH2=SKIP
NEW3=SKIP
NEL2=SKIP
NEW4=SKIP
NEH3=SKIP
NEPLUS=SKIP
NEMINUS=SKIP
LSWEEP=200
** The following In-Form formulae replace actions
of the neighbour technique **
REAL(COEF); COEF=FLO2/3.0
** Flow of tube fluid in first pass **
PATCH(INEH1,CELL,1,1,1,NY,1,NZ-1,1,1000)
(SOURCE 2NDH at INEH1 is COEF*(2NDH[,,+1]-2NDH) with LINE)
The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEH1 is COEF*(HIGH(2NDH)-2NDH) with LINE)
** Flow of tube fluid in first bend **
PATCH(INEW1,CELL,2,2,1,NY,1,1,1,1000)
(SOURCE 2NDH at INEW1 is COEF*(2NDH[-1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEW1 is COEF*(WEST(2NDH)-2NDH) with LINE)
** Flow of tube fluid in second pass **
PATCH(INEL1,CELL,2,2,1,NY,2,NZ,1,1000)
(SOURCE 2NDH at INEL1 is COEF*(2NDH[,,-1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEL1 is COEF*(LOW(2NDH)-2NDH) with LINE)
** Flow of tube fluid in second bend **
PATCH(INEW2,CELL,3,3,1,NY,NZ,NZ,1,1000)
(SOURCE 2NDH at INEW2 is COEF*(2NDH[-1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEW2 is COEF*(WEST(2NDH)-2NDH) with LINE)
** Flow of tube fluid in third pass **
PATCH(INEH2,CELL,3,3,1,NY,1,NZ-1,1,1000)
(SOURCE 2NDH at INEH2 is COEF*(2NDH[,,+1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEH2 is COEF*(HIGH(2NDH)-2NDH) with LINE)
** Flow of tube fluid in third bend **
PATCH(INEW3,CELL,4,4,1,NY,1,1,1,1000)
(SOURCE 2NDH at INEW3 is COEF*(2NDH[-1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEW3 is COEF*(WEST(2NDH)-2NDH) with LINE)
** Flow of tube fluid in fourth pass **
PATCH(INEL2,CELL,4,4,1,NY,2,NZ,1,1000)
(SOURCE 2NDH at INEL2 is COEF*(2NDH[,,-1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEL2 is COEF*(LOW(2NDH)-2NDH) with LINE)
** Flow of tube fluid in fourth bend **
PATCH(INEW4,CELL,NX,NX,1,NY,NZ,NZ,1,1000)
(SOURCE 2NDH at INEW4 is COEF*(2NDH[-1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEW4 is COEF*(WEST(2NDH)-2NDH) with LINE)
** Flow of tube fluid in fifth pass **
PATCH(INEH3,CELL,NX,NX,1,NY,1,NZ-1,1,1000)
(SOURCE 2NDH at INEH3 is COEF*(2NDH[,,+1]-2NDH) with LINE)
** The equivalent of it is the following In-Form statement
(SOURCE 2NDH at INEH3 is COEF*(HIGH(2NDH)-2NDH) with LINE)
** Heat-exchange with tube fluid, throughout the exchanger.
PATCH(INEPLUS,VOLUME,1,NX,1,NY,1,NZ,1,1000)
(SOURCE 1STH at INEPLUS is COEF12*(2NDH-1STH) with LINE)
** Heat-exchange with shell fluid, throughout the exchanger.
PATCH(INEMINUS,VOLUME,1,NX,1,NY,1,NZ,1,1000)
(SOURCE 2NDH at INEMINUS is COEF12*(1STH-2NDH) with LINE)
** In-Form formulae which are equivalent to the
PLANT formulae of z122 **
PATCH(iRESIST,PHASEM,1,NX,1,NY,1,NZ,1,1000)
(SOURCE of U1 at iRESIST is RESCO*(0-U1) with LINE)
(SOURCE of V1 at iRESIST is RESCO*(0-V1) with LINE)
(SOURCE of W1 at iRESIST is 0.5*RESCO*(0-W1) with LINE)
INFORM13END
** The following settings have been chosen as being
preferable to those of z122, in respect of convergence.
RELAX(2NDH,FALSDT,1.)
DISTIL=T
EX(P1)=1.191E+02; EX(U1)=3.000E-01
EX(V1)=2.262E-02; EX(W1)=3.339E-01
EX(1STH)=6.411E-01; EX(2NDH)=3.270E-01; EX(HPOR)=5.000E-01
EX(NPOR)=5.000E-01; EX(EPOR)=5.000E-01
STOP