#cls
text(In-Form Equivalent Of PLANT Case Z604
title
libref=780
  
  DISPLAY
  
  This In-Form case does what Z604 does, but without fortran coding
  or re-compilation.
  
  ENDDIS  
load(z604) 
dvo1dt=excoli
text(In-Form equivalent of PLANT case Z604
libref=780
store(epsz)
    ** The next line de-activates PLANT **
namsat=none
SS002U=SKIP
SS003H=SKIP
SS002T=SKIP
SS003S=SKIP
SS005T=SKIP
SS100T=SKIP
SS004T=SKIP

     ** The following settings have been chosen as being
        preferable to those of z604, in respect of convergence  **

RELAX(TEMP,FALSDT,3.)
RELAX(TEM1,FALSDT,1.E4)
  
    ** In-Form property formulae which are equivalent to the
       PLANT formulae of z604                               **

   INFORM13BEGIN
        header-flow domain
PATCH(HEADFLOW,PHASEM,1,10,2.*NNN+1,NY,1,NZ,1,1)
        tube-side-flow domain
PATCH(TBSDFLOW,PHASEM,1,10,NNN+1,24,1,NZ,1,1)
        shell-side-flow domain
PATCH(SHSDFLOW,PHASEM,1,10,1,NNN,1,NZ,1,1)
        header thermal domain
PATCH(HEADTHRM,CELL,14,23,22,29,1,NZ,1,1)
        shell-side-thermal domain
PATCH(SHSDTHRM,CELL,14,23,7,18,1,NZ,1,1)
        tube-wall-thermal domain
PATCH(TBWLTHRM,CELL,16,21,9,18,1,NZ,1,1)

    ** Set the fluid densities:
               Header    : water
               Tube side : water
               Shell side: air
(PROPERTY DEN1 at HEADFLOW is 1000.)
(PROPERTY DEN1 at TBSDFLOW is 1000.)
(PROPERTY DEN1 at SHSDFLOW is 1.2)

    ** Set fluid viscosities
        Header    : effective viscosity proportional to
                    local velocity magnitude and distance to
                    nearest wall.
        Tube side : Constant=0.01
        Shell side: as for header
(PROPERTY VISL at HEADFLOW is 1.*SQRT(U1^2+V1^2)*WDIS)
(PROPERTY VISL at TBSDFLOW is 0.01)
(PROPERTY VISL at SHSDFLOW is 1.*SQRT(U1^2+V1^2)*WDIS)

    ** Non-linear resistance to tube-fluid flow exerted
       by tubes, throughout the U-tube array.
(SOURCE var U1 at TBSDFLOW is -0.2*(U1^2+V1^2)^0.15*U1)
(SOURCE var V1 at TBSDFLOW is -0.2*(U1^2+V1^2)^0.15*V1)

    ** Non-linear resistance to shell-fluid flow exerted
       by tubes, throughout the shell-side.
(SOURCE var U1 at SHSDFLOW is -U1*2.2*(U1^2+V1^2)^0.25)
(SOURCE var V1 at SHSDFLOW is -V1*2.2*(U1^2+V1^2)^0.25)

    ** Tube fluid heat transfer coefficient
(STORED var ALF2 at TBSDFLOW is 1.+1.*SQRT(U1^2+V1^2+TINY))

    ** Shell fluid heat transfer coefficient
(STORED var ALF3 at SHSDFLOW is 1.+3.*SQRT(U1^2+V1^2+TINY))

    ** Overall heat transfer coefficient
(STORED var HTC at TBSDFLOW is 1./(1/ALF2+1/ALF3[,-:NNN:,]))
(STORED var HTC at SHSDFLOW is 1./(1/ALF3+1/ALF2[,+:NNN:,]))

    ** Heat-exchange with shell-fluid, throughout the shell.
(SOURCE var TEMP at TBSDFLOW is HTC*(TEMP[,-:NNN:,]-TEMP) with LINE)

    **  Heat-exchange with tube-fluid, throughout the shell.
(SOURCE var TEMP at SHSDFLOW is HTC*(TEMP[,+:NNN:,]-TEMP) with LINE)

    ** Transfer shell fluid temperatures
(SOURCE var TEM1 at SHSDTHRM is TEMP[-13,-6] with FIXVAL)

    ** Tube-wall temperature
char(val1,val2)
val1=(ALF2[-13,+6]*TEMP[-13,+6]+ALF3[-13,-6]*TEMP[-13,-6])
val2=(ALF2[-13,+6]+ALF3[-13,-6]+TINY)
(SOURCE var TEM1 at TBWLTHRM is :val1:/:val2: with FIXVAL!IMAT=100)

    ** Transfer the header temperatures
(SOURCE var TEM1 at HEADTHRM is TEMP[-13,+3] with FIXVAL)

    ** Tube fluid velocities transfer
(STORED var UU1 at HEADTHRM is U1[-13,+3,])
(STORED var VV1 at HEADTHRM is V1[-13,+3,])
(STORED var UU1 at SHSDTHRM is U1[-13,+6,])
(STORED var UU1 at TBWLTHRM is U1[-13,+6,] with IMAT=100)
(STORED var VV1 at SHSDTHRM is V1[-13,+6,])
(STORED var VV1 at TBWLTHRM is V1[-13,+6,] with IMAT=100)

    ** Shell fluid velocities transfer
(STORED var U2 at SHSDTHRM is U1[-13,-6,])
(STORED var U2 at TBWLTHRM is U1[-13,-6,] with IMAT=100)
(STORED var V2 at SHSDTHRM is V1[-13,-6,])
(STORED var V2 at TBWLTHRM is V1[-13,-6,] with IMAT=100)
   INFORM13END
  PHOTON USE
     p



     set prop off
     gr ou z 1 x 12 25 y 19 21
     gr ou z 1 x 12 25 y 4 18
     gr ou z 1 x 14 23 y 7 18
     gr ou z 1 x 12 25 y 22 31
     gr ou z 1 x 14 23 y 22 29
     *gr ou z 1 x 11 11 y 25 28
     *gr ou z 1 x 26 26 y 25 28
     gr z 1 x 11 11 y 20 21
     gr z 1 x 26 26 y 20 21
     *gr ou z 1 x 26 26 y 7 10
     *gr ou z 1 x 11 11 y 15 18
     gr ou z 1 x 14 16 y 1 3
     gr ou z 1 x 21 23 y 1 3
     gr ou z 1 x 11 11 y 16 17
     gr ou x 11 11 y 15 18
     gr ou z 1 x 26 26 y 8 9
     gr ou x 27 y 7 10
     gr ou z 1 x 11 11 y 26 27
     gr ou x 11 11 y 25 28
     gr ou z 1 x 26 26 y 26 27
     gr ou x 27 y 25 28
     gr ou x 15 15 y 19 21
     gr ou x 16 16 y 19 21
     gr ou x 17 17 y 19 21
     gr ou x 18 18 y 19 21
     gr ou x 19 19 y 19 21
     gr ou x 20 20 y 19 21
     gr ou x 21 21 y 19 21
     gr ou x 22 22 y 19 21
     gr ou x 23 23 y 19 21
     gr ou z 1 x 15 22 y 8 18
     gr ou z 1 x 16 21 y 9 18
     gr ou z 1 x 17 20 y 10 18
     gr ou z 1 x 18 19 y 11 18
     gr ou y 11 11 x 17 23
     gr ou y 15 15 x 14 20
     gr ou x 19 19 y 12 29
     set vec comp uu1 vv1 -
     vec z 1 sh
     set vec comp u2 v2 -
     vec z 1
     msg( Shell and tube fluid velocity vectors
     pause
     vec cl
     red
     set vec comp u1 v1 -
     vec z 1 x 11 m sh
     msg( Thermal displacement vectors in shell and tube bundle
  ENDUSE
DISTIL=T
EX(P1)=7.325E+02; EX(U1)=9.472E-02; EX(U2)=5.730E-02
EX(V1)=1.366E-01; EX(V2)=2.435E-02; EX(TEMP)=1.982E-01
EX(VV1)=1.086E-01; EX(UU1)=3.593E-02; EX(HTC)=2.839E-01
EX(ALF3)=3.517E-01; EX(ALF2)=2.440E-01; EX(EPST)=1.679E-06
EX(STRX)=1.086E+05; EX(EPSX)=2.141E-06; EX(STRY)=2.916E+05
EX(EPSY)=3.287E-06; EX(LTLS)=1.575E-02; EX(WDIS)=5.966E-02
EX(TEM1)=2.956E-01; EX(MARK)=8.774E+00; EX(VISL)=1.852E-02
EX(DEN1)=2.463E+03; EX(PRPS)=3.482E+01
EX(NPOR)=9.014E-01; EX(EPOR)=8.425E-01
STOP