DISPLAY
 
  COUNTER-FLOW HEAT EXCHANGER
 
  2-dimensional (y-z), polar, steady, elliptic simulation
 
 
  This case simulates a flow in a cylinder with a heated wall and a
  central tube containing a different, colder fluid flowing in the
  opposite direction. The geometry of the problem is sketched below.
 
          +----------------------------------+
          |      _    ____shroud________     |
   outlet2|     | |  |__________________|    |             y ^
        <----   | |\plate                  <---- inlet2      |
           __________________________________                +---->
  inlet1  |__________________________________|tube               z
      ---->                                -----> outlet1
          +----------------------------------+
 
  enddis
 
  PHOTON USE
  P
 
 
 
 
 
 
  gr ou x 1
  gr ou x 1 y 4 4
  gr ou x 1 z 4 4 y 5 8
  gr ou x 1 y 10 10 z 7 17
  msg The geometry
  msg Press  to continue
  pause
  vec x 1 sh
  msg The flow field
  msg Press  to continue
  pause
  con tem1 x 1 sh; Int 30
  msg Temperature contours
  msg Press  to continue
  pause
  con cl; Vec cl; Red
  set con sca pl
  con tem1 x 1 y 1 3 sh; Int 20
  msg Temperature in the inner tube
  msg Press  to continue
  pause
  con cl; Red
  con tem1 x 1 y 5 m sh; Int 20
  msg Temperature in the outer region
  msg Press  to continue
  pause
  con cl
  mir y
  up z
  con tem1 x 1 y 5 m fi;.01
  con tem1 x 1 y 1 3 fi;.01
  gr ou x 1
  gr ou x 1 y 4 4
  gr ou x 1 z 4 4 y 5 8
  gr ou x 1 y 10 10 z 7 17
  msg The full geometry
  msg Press  to continue
  pause
  vec x 1
  msg Press e to END
  enduse
 
TEXT(Counter Flow Demo                 
TITLE
mesg(PC486/50 time last reported as 1.5 min
   *
   *  Elliptic Simulation
PARAB=F
   *
   ************************************************************
   *
   *  GROUP 2.  Time-dependence and related parameters.
   *
   *  Steady-state simulation
STEADY=T
   *
   ************************************************************
   *
   *  GROUP 3.  x-direction grid specification.
   *
   *  Polar grid selected
CARTES=F
   *  Write objects
RSET(D,DOM,1.0E-02,1,3,1,0)
RSET(B,TUBE,0,2.0E-01,0,1.0E-02,2.0E-02,3,5,0)
RSET(B,IN1,0,0,0,1.0E-02,2.0E-01,0,7,0)
RSET(B,OUT1,0,0,3,1.0E-02,2.0E-01,0,9,0)
RSET(B,IN2,0,2.20E-01,3,1.0E-02,2.0E-01,0,6,0)
RSET(B,OUT2,0,2.20E-01,0,1.0E-02,3.0E-01,0,8,0)
RSET(B,SHROU,0,5.0E-01,8.0E-01,1.0E-02,2.0E-02,1.80E+$
00,5,0)
RSET(B,PLATE,0,2.20E-01,4.0E-01,1.0E-02,2.50E-01,5.0E-$
02,12,0)
RSET(B,WALL,0,1,0,1.0E-02,0,3,13,0)
   *
   *  Total number of REGIONS in X direction 1
   *  Total number of cells in X direction 1
   *  Total length in X direction   1.0E-02 RAD
   *
XULAST=1.0E-02
   *
   ************************************************************
   *
   *  GROUP 4.  y-direction grid specification.
   *
   *
   *  Total number of REGIONS in Y direction 7
   *  Total number of cells in Y direction 15
   *  Total length in Y direction   1 m
   *
NREGY=7; REGEXT(Y,1)
IREGY=1; GRDPWR(Y,3,2.0E-01,1)
IREGY=2; GRDPWR(Y,1,2.0E-02,1)
IREGY=3; GRDPWR(Y,3,2.0E-01,1)
IREGY=4; GRDPWR(Y,1,5.0E-02,1)
IREGY=5; GRDPWR(Y,1,3.0E-02,1)
IREGY=6; GRDPWR(Y,1,2.0E-02,1)
IREGY=7; GRDPWR(Y,5,4.80E-01,1)
   *
   ************************************************************
   *
   *  GROUP 5.  z-direction grid specification.
   *
   *
   *  Total number of REGIONS in Z direction 5
   *  Total number of cells in Z direction 20
   *  Total length in Z direction   3 m
   *
NREGZ=5; REGEXT(Z,1)
IREGZ=1; GRDPWR(Z,3,4.0E-01,1)
IREGZ=2; GRDPWR(Z,1,5.0E-02,1)
IREGZ=3; GRDPWR(Z,2,3.50E-01,1)
IREGZ=4; GRDPWR(Z,11,1.80E+00,1)
IREGZ=5; GRDPWR(Z,3,4.0E-01,1)
   *
   ************************************************************
   *
   *  GROUP 6.  Body-fitting and other grid distortions.
   *
   *
   ************************************************************
   *
   *  GROUP 7.  Variables (including porosities) named,
   *            stored & solved.
   *
#solvel
#soltem
   *  Store DEN1 (the DENSITY)
STORE(DEN1)
STORE(PRPS,BLOK,ENUL)
   * Activate block-correction
IVARBK=-1; ISOLBK=1
   *
   ************************************************************
   *
   *  GROUP 8.  Terms (in differential equations) and devices.
   *
ISOLX=0; ISOLY=0; ISOLZ=0
   *
   ************************************************************
   *
   *  GROUP 9.  Properties of the medium (or media).
   *
   *  Fluid/medium is Air-constant
   *  Reference pressure (N/m^2)
PRESS0=1.0E+05
   *  Take values from the property library
#use_props
   *  Reference density and temperature
REAL(RREF1); RREF1=1.1890E+00; TMP1A=273
   *  Reference kinematic viscosity
REAL(ENLREF);ENLREF=1.5890E-05
   *  Turbulence treatment CONSTANT_EFFECTIVE
   *  Turbulent kinematic viscosity (m^2/s)
REAL(VISCR); VISCR=200
ENUT=ENLREF*VISCR
   *
   ************************************************************
   *
   *  GROUP 11. Initialization of fields of variables,
   *            porosities, etc.
   *
INIADD=F
   * Initialize Properties Field and block-correction
   * (Meaning of integers used to represent different
   *  properties(PRPS) can be found in the Manual)
:fluid:=air20; FIINIT(BLOK)=1.0
   * BLOCKAGE boundary condition, name SHROU
CONPOR(SHROU,-1,CELL,-#1,-#1,-#6,-#6,-#4,-#4)
COVAL(SHROU,PRPS,0.0,111)
COVAL(SHROU,BLOK,0.0,2)
   * BLOCKAGE boundary condition, name PLATE
CONPOR(plte,-1,CELL,-#1,-#1,-#3,-#4,-#2,-#2)
COVAL(plte,PRPS,0.0,111)
COVAL(plte,BLOK,0.0,3)
   * BLOCKAGE boundary condition, name TUBE
CONPOR(TUBE,-1,CELL,-#1,-#1,-#2,-#2,-#1,-#5)
COVAL(TUBE,PRPS,0.0,111)
COVAL(TUBE,BLOK,0.0,4)
   * BLOCKAGE boundary condition, name FLUID
PATCH(FLUID,INIVAL,#1,#1,#1,#1,#1,#5,1,LSTEP)
INIT(FLUID,PRPS,0.0,4)
   *  Initialize field values of TEM1 to 20
FIINIT(TEM1)=20
   *
   ************************************************************
   *
   *  GROUP 13. Boundary conditions and special sources
   *
   * INLET boundary condition, name IN1
INLET(IN1,LOW,#1,#1,#1,#1,#1,#1,#1,#NREGT)
VALUE(IN1,V1,0)
VALUE(IN1,W1,1)
VALUE(IN1,TEM1,20)
VALUE(IN1,P1,6.90E-01)
   * INLET boundary condition, name IN2
INLET(IN2,HIGH,#1,#1,#3,#3,#5,#5,#1,#NREGT)
VALUE(IN2,V1,0)
VALUE(IN2,W1,-10)
VALUE(IN2,TEM1,100)
VALUE(IN2,P1,10*RREF1)
   * OUTLET boundary condition, name OUT1
OUTLET(OUT1,HIGH,#1,#1,#1,#1,#5,#5,#1,#NREGT)
VALUE(OUT1,V1,0.0)
VALUE(OUT1,W1,0.0)
VALUE(OUT1,P1,0)
VALUE(OUT1,TEM1,0)
   * OUTLET boundary condition, name OUT2
OUTLET(OUT2,LOW,#1,#1,#3,#6,#1,#1,#1,#NREGT)
VALUE(OUT2,V1,0.0)
VALUE(OUT2,W1,0.0)
VALUE(OUT2,P1,0)
VALUE(OUT2,TEM1,0)
   * WALL boundary condition, name WALL
PATCH(WALL,NWALL,#1,#1,#7,#7,#1,#5,#1,#NREGT)
COVAL(WALL,W1,LOGLAW,0.0)
COVAL(WALL,TEM1,LOGLAW,50)
   *
   ************************************************************
   *
   *  GROUP 14. Downstream pressure (for free parabolic flow).
   *
   *
   ************************************************************
   *
   *  GROUP 15. Termination criteria for sweeps and
   *            outer iterations.
   *
   *  Number of sweeps
LSWEEP=50
   *
   ************************************************************
   *
   *  GROUP 16. Termination criteria for inner iterations.
   *
SELREF=T; RESFAC=1.0E-03
   *
   ************************************************************
   *
   *  GROUP 17. Under-relaxation and related devices.
   *
RELAX(V1,FALSDT,0.1)
RELAX(W1,FALSDT,0.1)
   ************************************************************
   *
   *  GROUP 22. Location of spot-value & frequency of
   *            residual printout.
   *
   *  Assign cell-indices of spot-point monitoring location
IYMON=7
IZMON=15
   *  Set frequency of spot-values/residuals print-outs
TSTSWP=-1
   *
   ************************************************************
   *
   *  GROUP 23. Variable-by-variable field printout and plot
   *            and/or tabulation of spot-values and residuals.
   *
   *  Control tabulation & plotting of spot-values/residuals
   *  Tables and plots
ITABL=3
   *  Set the frequency of tabulation and plotting
NPLT=1
   *