DISPLAY
    HEAT-EXCHANGER SIMULATIONS BY MEANS OF PHOENICS
    These examples make extensive use of the "neighbour"
    technique, whereby the use of a special patch name
    activates special calls in GROUND which are to be
    included in GREX.
 
    It will be useful to extend the series further, so as
    to illustrate how two-phase flow can be handled on
    tube and shell sides of a boiler, and to show also how
    cooling-tower problems can be handled with the aid of
    this technique.
  ENDDIS
    The cases dealt with so far are:-
    1. Steady counterflow.
    2. Transient counterflow.
    3. Transient counterflow
       with allowance for the heat capacity of the metal.
    4. Steady crossflow.
    5. Transient crossflow.
    6. Transient crossflow.
       with allowance for the heat capacity of the metal.
    7. Steady baffled-shell-and-tube.
    8. Transient baffled-shell-and-tube.
    9. Transient baffled-shell-and-tube
       with allowance for the heat capacity of the metal.
    10. Steady two-phase baffled-shell-and-tube.
    11. Transient two-phase baffled-shell-and-tube.
    12. Transient two-phase baffled-shell-and-tube
       with allowance for the heat capacity of the metal.
 
    GROUP 1. Run title
TEXT(Steady Counterflow Heat Exchanger
TITLE
    User-defined variables
    T1IN = inlet temperature of shell fluid
    T2IN = inlet temperature of tube fluid
    FLO1 = mass-flow rate of shell fluid
    FLO2 = mass-flow rate of tube fluid
    COEF1 = heat-transfer coefficient on shell-fluid side
    COEF2 = heat-transfer coefficient on tube-fluid side
    COEF12 = overall heat-transfer coefficient.
    Note that, for the sake of uniformity of nomenclature,
    the first and second fluids are referred to as "shell"
     and "tube" fluids respectively.
 
 
REAL(T1IN,T2IN,FLO1,FLO2,COEF1,COEF2,COEF12)
T1IN=1.0;T2IN=0.0;FLO1=0.1;FLO2=0.1;COEF1=0.1;COEF2=0.1
COEF12=1.0/(1.0/COEF1+1.0/COEF2)
 
    GROUP 3. X-direction grid specification
 
    The heat exchanger is a rectangular box, 1m high,
    1m wide and 10m long.
 
GRDPWR(X,20,10.0,1.0)
 
    GROUP 7. Variables stored, solved , named
SOLVE(H1,H2)
NAME(H1)=1STH;NAME(H2)=2NDH
 
    The fact that the shell-side fluid does not have access
    to the whole of the shell requires the specification of
    "area porosities".
    These are set to 0.5 in GROUP 11 below.
 
STORE(EPOR)
 
    GROUP 8. Terms (in differential equations) & devices
 
    The built-in source, convection and diffusion terms
    are cut out for all variables.
TERMS(1STH,N,N,N,P,P,P);TERMS(2NDH,N,N,N,P,P,P)
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(1STH)=T1IN;FIINIT(2NDH)=T2IN
FIINIT(EPOR)=0.5
 
    GROUP 13. Boundary conditions and special sources
 
    West boundary; shell fluid inlet ; 1 cell in west wall
PATCH(INLET1,CELL,1,1,1,1,1,1,1,1000)
COVAL(INLET1,1STH,FLO1,T1IN)
 
    East boundary; tube fluid inlet; 1 cell in east wall
PATCH(INLET2,CELL,NX,NX,1,1,1,1,1,1000)
COVAL(INLET2,2NDH,FLO2,T2IN)
 
    Note how the giving of special names to patches,
    beginning NE (for neighbour), coupled with LOCNE in the
    "value" location, produces sources which simulate along-
    the-tube convection fluid-to-metal heat transfer etc,
    by activating special calls to GROUND, the relevant
    extract from which appears in an appendix to this file.
 
    Flow of shell fluid
PATCH(NEW1,CELL,2,NX,1,1,1,1,1,1000)
COVAL(NEW1,1STH,FLO1,LOCNE)
 
    Flow of tube fluid
PATCH(NEE1,CELL,1,NX-1,1,1,1,1,1,1000)
COVAL(NEE1,2NDH,FLO2,LOCNE)
 
    Heat-exchange with tube fluid, throughout the exchanger.
PATCH(NEPLUS,VOLUME,1,NX,1,NY,1,NZ,1,1000)
COVAL(NEPLUS,1STH,COEF12,LOCNE)
 
    Heat-exchange with shell fluid, throughout the exchanger.
PATCH(NEMINUS,VOLUME,1,NX,1,NY,1,NZ,1,1000)
COVAL(NEMINUS,2NDH,COEF12,LOCNE)
 
    GROUP 15. Termination of sweeps
RESREF(1STH)=1.E-6*FLO1;RESREF(2NDH)=RESREF(1STH)
LSWEEP=50
 
    GROUP 21. Print-out of variables
    Print-out of porosities is suppressed.
OUTPUT(EPOR,N,N,N,N,N,N)
OUTPUT(1STH,N,N,Y,Y,Y,Y);OUTPUT(2NDH,N,N,Y,Y,Y,Y)
 
    GROUP 22. Spot-value print-out
IXMON=NX/2;TSTSWP=LSWEEP/10
 
    GROUP 23. Field print-out and plot control
NXPRIN=NX/5;IPLTL=LSWEEP;IPROF=1;ORSIZ=0.4;XZPR=T;NPLT=1
IPROF=3
PATCH(PROFILES,PROFIL,1,NX,1,1,1,1,1,1000)
PLOT(PROFILES,1STH,T2IN,T1IN);PLOT(PROFILES,2NDH,T2IN,T1IN)
 
    GROUP 24. Dumps for restarts