DISPLAY
      In the early years of PHOENICS, the energy equation was solved
      with enthalpy as the dependent variable; temperature was
      treated as an auxiliary variable, the values of which were to 
      be deduced from those of enthalpy by way of the specific heat
      capacity of the fluid. 
      
      However, this was troublesome when so-called 'conjugate heat 
      transfer' problems had to be solved with heat-conducting 
      solid materials immersed in fluids; for each material could 
      have a different specific heat.
      
      
      This library case was introduced at the time at which solving
      for temperature directly was introduced, this being achieved
      by use of the material-marker variable PRPS, wht value of 
      which at each point indicated what material, and therefore
      what specific heat, was to be used there.
 
      The steady flow in a cavity with one moving wall is modelled.
      The stationary walls are at one temperature, and the wall
      moving with a constant velocity is adiabatic
 
      Within the cavity is a heated block of steel. The fluid is
      water.
 
  ENDDIS
#pause
  PHOTON USE
  p;;;
 
  gr ou z 1
  msg contours of PRPS
  set prop off
  con prps z 1 fi;0.001
  pause;con off;red
  
  msg Vector field
  vec z 1 sh
  msg Press RETURN to continue
  pause;vec off;red
  con tem1 z 1 fi;0.001
  con tem1 z 1; int 50
  msg Temperature contours
  ENDUSE
    GROUP 1. Run title and other preliminaries
TEXT(Square Cavity; Steel Block; Water 
TITLE
 
REAL(WALLVEL,WALLTEMP,HEATFLUX)
WALLVEL=0.1
WALLTEMP=20.0
HEATFLUX=1.E4

nx=24; ny=24; nz=1; xulast=0.1; yvlast=0.1; zwlast=0.1
#unigrid
 
    GROUP 7. Variables stored, solved & named
#solvel
#soltem
 
    GROUP 9. Properties of the medium (or media)
#use_props
    GROUP 11. Initialization of variable or porosity fields
INIADD=F; FIINIT(TEM1)=WALLTEMP
:fluid:=water20
 
PATCH(SOLID,INIVAL,NX/4+1,3*NX/4,NY/4+1,3*NY/4,1,1,1,1)
INIT(SOLID,PRPS,0.0,steel)
INIT(SOLID,TEM1,0.0,WALLTEMP+5.0)
 
    GROUP 13. Boundary conditions and special sources
WALL (MOVING,SOUTH,1,NX,1,1,1,1,1,1)
COVAL(MOVING,U1,1.0,-WALLVEL)
 
WALL (NORTHW,NORTH,1,NX,NY,NY,1,1,1,1)
COVAL(NORTHW,U1,1.0,0.0); COVAL(NORTHW,TEM1,1.0,WALLTEMP)
 
WALL (WESTW,WEST,1,1,1,NY,1,1,1,1)
COVAL(WESTW,V1,1.0,0.0); COVAL(WESTW,TEM1,1.0,WALLTEMP)
 
WALL (EASTW,EAST,NX,NX,1,NY,1,1,1,1)
COVAL(EASTW,V1,1.0,0.0); COVAL(EASTW,TEM1,1.0,WALLTEMP)
 
PATCH(RELIEF,CELL,1,1,1,1,1,1,1,1)
COVAL(RELIEF,P1,FIXP,0.0)
 
PATCH(HEATEDBL,VOLUME,NX/4+1,3*NX/4,NY/4+1,3*NY/4,1,1,1,1)
COVAL(HEATEDBL,TEM1,FIXFLU,HEATFLUX)
 
    GROUP 15. Termination of sweeps
LSWEEP=1000; RESFAC=0.0001
    GROUP 17. Under-relaxation devices
CONWIZ=T  ! to promote convergence
    GROUP 22. Spot-value print-out
IXMON=NX/2+1; IYMON=2; TSTSWP=10
    GROUP 23. Field print-out and plot control
PATCH(MIDDLE,PROFIL,NX/2+1,NX/2+1,1,NY,1,1,1,1)
PLOT(MIDDLE,U1,-WALLVEL,WALLVEL); PLOT(MIDDLE,TEM1,0.0,0.0)
 
PATCH(MAP,CONTUR,1,NX,1,NY,1,1,1,1)
PLOT(MAP,U1,0.0,10);  PLOT(MAP,V1,0.0,10)
PLOT(MAP,TEM1,0.0,10)
TSTSWP=-1 ! to activate the graphical monitor, plot maximim and
          ! minimum values, and to pause at the end of the run
#maxmin
#endpause
 LIBREF=921