PHOTON USE
  p ;;;;
 
  view -2 1 1
 
  g ou i 1
  g ou i m
  g ou j 1
  g ou j m
 
  con tem1  x  4  fill
  0.001
 
  vec  x  4  shade
 
  ENDUSE
 
    GROUP 1. Run title and other preliminaries
TEXT(PHOENICS-Letter Masking,     LOGO 
TITLE
    GROUP 3/4/5/. X/Y/Z-direction grid specification
RSET(M,1,1,1,   1.100E-01)
RSET(D,CHAM,2.00000E+00,2.00000E+00,2.00000E+00)
   *------------ Set out domain grid dimensions
NX=7
NY=40
NZ=40
RSET(M,NX,NY,NZ)
  *------------ Define number of F-array cells needed for letters
INTEGER(MBX,MBY,NUMLET)
MBX=20; MBY=20; NUMLET=3
NFUSER=MBX*MBY*NUMLET
    GROUP 7. Variables stored, solved & named
  *------------ Set up solution controls
SOLVE(P1,TEM1,W1,V1,U1); SOLUTN(P1,Y,Y,Y,P,P,P)
SOLUTN(TEM1,Y,Y,Y,N,N,Y)
STORE(VPOR,EPOR,NPOR,HPOR,DEN1,PRPS)
  *------------ Switch on the L-VEL turbulence model
TURMOD(LVEL)
    GROUP 9. Properties of the medium (or media)
#use_props
TEMP0=273.0; PRESS0=1.00E+05
    GROUP 11. Initialization of variable or porosity fields
:fluid:=airideal ; FIINIT(TEM1)= 20.00
FIINIT(DEN1)=1.0
INIADD=F
  *------------ Set up initial values and boundary patches:
                Property value = 103 Copper
                Fixed temperatures = 20 & 200 deg C
                %&2 = C letter orientated in ZY plane
CONPOR(Z%&20001,-1,CELL, 3,5, 11,30, 11,30)
INIT(Z%&20001,PRPS,0, 103)
    GROUP 13. Boundary conditions and special sources
  *------------ Buoyancy source
PATCH(BUOYANCY,PHASEM,1,NX,1,NY,1,NZ,1,1)
COVAL(BUOYANCY,V1,FIXFLU,DENSDIFF)
BUOYA=0.0; BUOYB=-9.81; BUOYC=0.0
  *------------ Reference density calculated from atmospheric p & T
REAL(GASCON); GASCON=287.0
BUOYD=PRESS0/(TEMP0+FIINIT(TEM1))/GASCON
  *------------ Set up boundary patches:
PATCH(%&30001 ,VOLUME, 3,5, 11, 30, 11,30, 1,1)
COVAL(%&30001 ,TEM1, 0.5*FIXVAL, -20.0)
 
PATCH(%&40002 ,VOLUME, 3,5, 11,30, 11,30, 1,1)
COVAL(%&40002 ,TEM1, 0.5*FIXVAL,   100.0)
 
  *------------ Set up outlet
PATCH(VENT,HIGH,4,4,19,22,NZ,NZ,1,1)
COVAL(VENT,P1,FIXP,0)
COVAL(VENT,TEM1,ONLYMS, 20.0)
 
  *------------ Set source terms for wall friction
                           ** 1. HIGH Y (NORTH) WALLS
PATCH(WALL_N,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(WALL_N,U1,LOGLAW,0.0)
COVAL(WALL_N,W1,LOGLAW,0.0)
                           ** 2. LOW Y (SOUTH) WALLS
PATCH(WALL_S,SWALL,1,NX,1,1,1,NZ,1,LSTEP)
COVAL(WALL_S,U1,LOGLAW,0.0)
COVAL(WALL_S,W1,LOGLAW,0.0)
                           ** 3. HIGH X (EAST) WALLS
PATCH(WALL_E,EWALL,NX,NX,1,NY,1,NZ,1,LSTEP)
COVAL(WALL_E,V1,LOGLAW,0.0)
COVAL(WALL_E,W1,LOGLAW,0.0)
                           ** 4. LOW X (WEST) WALLS
PATCH(WALL_W,WWALL,1,1,1,NY,1,NZ,1,LSTEP)
COVAL(WALL_W,V1,LOGLAW,0.0)
COVAL(WALL_W,W1,LOGLAW,0.0)
EGWF=T
    GROUP 15. Termination of sweeps
LSWEEP=100;  SELREF=T; RESFAC=1.E-6
    GROUP 16. Termination of iterations
LITER(LTLS)=20
    GROUP 17. Under-relaxation devices
  *------------ Set values for relaxation
RELAX(P1,LINRLX,0.1); RELAX(U1,FALSDT,4.40E-01)
RELAX(V1,FALSDT,4.40E-01); RELAX(W1,FALSDT,4.40E-01)
RELAX(TEM1,FALSDT,4.40E-01)
    GROUP 22. Monitor print-out
  *------------ Monitor position offset from centre of the domain
IXMON=4; IYMON=7; IZMON=21
TSTSWP=-1