GROUP 1. Run title and other preliminaries
TEXT(PARALLEL PHOENICS-Letter Masking Feature 
TITLE
  DISPLAY
  There are three examples of the Phoenics Letter Masking Feature
  in this Q1;
 
        1)      PARALLEL PHOENICS
        2)      MUCH FASTER
        3)      NO PROBLEMS
 
  ENDDIS
INTEGER(ICSE)
MESG(Which text do you wish to model 1/2/3 ?
READVDU(ICSE,INT,1)
    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,6.00000E+00)
NX=25
NY=45
NZ=135
RSET(M,NX,NY,NZ)
INTEGER(MBX,MBY,NUMLET)
MBX=9; MBY=9; NUMLET=11
NFUSER=MBX*MBY*NUMLET
    GROUP 7. Variables stored, solved & named
SOLVE(P1,SMOK,TEM1,W1,V1,U1) ; SOLUTN(P1,Y,Y,Y,P,P,P)
SOLUTN(TEM1,Y,Y,Y,N,N,Y)     ; SOLUTN(SMOK,Y,Y,Y,N,N,Y)
STORE(VPOR,EPOR,NPOR,HPOR,DEN1,PRPS)
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)= 2.00E+01
INIADD=F
    GROUP 13. Boundary conditions and special sources
EGWF=T
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 CALULATED FROM ATMOSPHERIC p & T
REAL(GASCON); GASCON=287.0
BUOYD=PRESS0/(TEMP0+FIINIT(TEM1))/GASCON
  ** Include sources and boundary conditions for Letter Masking
IF(ICSE.EQ.1)THEN
MESG(Currently modelling;- PARALLEL PHOENICS
CONPOR(C%&P0001,-1,CELL, 11,15, 27,36, 5,14)
INIT(C%&P0001,PRPS,0, 103)
PATCH(%&P0001 ,VOLUME, 11,15, 27,36, 5,14, 1,1)
COVAL(%&P0001 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&A0002,-1,CELL, 11,15, 27,36, 22,31)
INIT(C%&A0002,PRPS,0, 103)
PATCH(%&A0002 ,VOLUME, 11,15, 27,36, 22,31, 1,1)
COVAL(%&A0002 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&R0003,-1,CELL, 11,15, 27,36, 39,48)
INIT(C%&R0003,PRPS,0, 103)
PATCH(%&R0003 ,VOLUME, 11,15, 27,36, 39,48, 1,1)
COVAL(%&R0003 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&A0004,-1,CELL, 11,15, 27,36, 56,65)
INIT(C%&A0004,PRPS,0, 103)
PATCH(%&A0004 ,VOLUME, 11,15, 27,36, 56,65, 1,1)
COVAL(%&A0004 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&L0005,-1,CELL, 11,15, 27,36, 73,82)
INIT(C%&L0005,PRPS,0, 103)
PATCH(%&L0005 ,VOLUME, 11,15, 27,36, 73,82, 1,1)
COVAL(%&L0005 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&L0006,-1,CELL, 11,15, 27,36, 90,99)
INIT(C%&L0006,PRPS,0, 103)
PATCH(%&L0006 ,VOLUME, 11,15, 27,36, 90,99, 1,1)
COVAL(%&L0006 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&E0007,-1,CELL, 11,15, 27,36, 107,116)
INIT(C%&E0007,PRPS,0, 103)
PATCH(%&E0007 ,VOLUME, 11,15, 27,36, 107,116, 1,1)
COVAL(%&E0007 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&L0008,-1,CELL, 11,15, 27,36, 124,133)
INIT(C%&L0008,PRPS,0, 103)
PATCH(%&L0008 ,VOLUME, 11,15, 27,36, 124,133, 1,1)
COVAL(%&L0008 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&P0009,-1,CELL, 11,15, 9,18, 5,14)
INIT(C%&P0009,PRPS,0, 103)
PATCH(%&P0009 ,VOLUME, 11,15, 9,18, 5,14, 1,1)
COVAL(%&P0009 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&H0010,-1,CELL, 11,15, 9,18, 22,31)
INIT(C%&H0010,PRPS,0, 103)
PATCH(%&H0010 ,VOLUME, 11,15, 9,18, 22,31, 1,1)
COVAL(%&H0010 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&O0011,-1,CELL, 11,15, 9,18, 39,48)
INIT(C%&O0011,PRPS,0, 103)
PATCH(%&O0011 ,VOLUME, 11,15, 9,18, 39,48, 1,1)
COVAL(%&O0011 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&E0012,-1,CELL, 11,15, 9,18, 56,65)
INIT(C%&E0012,PRPS,0, 103)
PATCH(%&E0012 ,VOLUME, 11,15, 9,18, 56,65, 1,1)
COVAL(%&E0012 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&N0013,-1,CELL, 11,15, 9,18, 73,82)
INIT(C%&N0013,PRPS,0, 103)
PATCH(%&N0013 ,VOLUME, 11,15, 9,18, 73,82, 1,1)
COVAL(%&N0013 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&I0014,-1,CELL, 11,15, 9,18, 90,99)
INIT(C%&I0014,PRPS,0, 103)
PATCH(%&I0014 ,VOLUME, 11,15, 9,18, 90,99, 1,1)
COVAL(%&I0014 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&C0015,-1,CELL, 11,15, 9,18, 107,116)
INIT(C%&C0015,PRPS,0, 103)
PATCH(%&C0015 ,VOLUME, 11,15, 9,18, 107,116,1,1)
COVAL(%&C0015 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&S0016,-1,CELL, 11,15, 9,18, 124,133)
INIT(C%&S0016,PRPS,0, 103)
PATCH(%&S0016 ,VOLUME, 11,15, 9,18, 124,133, 1,1)
COVAL(%&S0016 ,TEM1, 0.5*FIXVAL,   4.000E+02)
ELSE
IF(ICSE.EQ.2)THEN
MESG(Currently modelling;- MUCH FASTER
CONPOR(C%&M0001,-1,CELL, 11,15, 27,36, 39,48)
INIT(C%&M0001,PRPS,0, 103)
PATCH(%&M0001 ,VOLUME, 11,15, 27,36, 39,48, 1,1)
COVAL(%&M0001 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&U0002,-1,CELL, 11,15, 27,36, 56,65)
INIT(C%&U0002,PRPS,0, 103)
PATCH(%&U0002 ,VOLUME, 11,15, 27,36, 56,65, 1,1)
COVAL(%&U0002 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&C0003,-1,CELL, 11,15, 27,36, 73,82)
INIT(C%&C0003,PRPS,0, 103)
PATCH(%&C0003 ,VOLUME, 11,15, 27,36, 73,82, 1,1)
COVAL(%&C0003 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&H0004,-1,CELL, 11,15, 27,36, 90,99)
INIT(C%&H0004,PRPS,0, 103)
PATCH(%&H0004 ,VOLUME, 11,15, 27,36, 90,99, 1,1)
COVAL(%&H0004 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&F0005,-1,CELL, 11,15, 9,18, 22,31)
INIT(C%&F0005,PRPS,0, 103)
PATCH(%&F0005 ,VOLUME, 11,15, 9,18, 22,31,1,1)
COVAL(%&F0005 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&A0006,-1,CELL, 11,15, 9,18, 39,48)
INIT(C%&A0006,PRPS,0, 103)
PATCH(%&A0006 ,VOLUME, 11,15, 9,18, 39,48, 1,1)
COVAL(%&A0006 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&S0007,-1,CELL, 11,15, 9,18, 56,65)
INIT(C%&S0007,PRPS,0, 103)
PATCH(%&S0007 ,VOLUME, 11,15, 9,18, 56,65, 1,1)
COVAL(%&S0007 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&T0008,-1,CELL, 11,15, 9,18, 73,82)
INIT(C%&T0008,PRPS,0, 103)
PATCH(%&T0008 ,VOLUME, 11,15, 9,18, 73,82, 1,1)
COVAL(%&T0008 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&E0009,-1,CELL, 11,15, 9,18, 90,99)
INIT(C%&E0009,PRPS,0, 103)
PATCH(%&E0009 ,VOLUME, 11,15, 9,18, 90,99, 1,1)
COVAL(%&E0009 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&R0010,-1,CELL, 11,15, 9,18, 107,116)
INIT(C%&R0010,PRPS,0, 103)
PATCH(%&R0010 ,VOLUME, 11,15, 9,18, 107,116,1,1)
COVAL(%&R0010 ,TEM1, 0.5*FIXVAL,   4.000E+02)
ELSE
MESG(Currently modelling;- NO PROBLEMS
CONPOR(C%&N0001,-1,CELL, 11,15, 27,36, 56,65)
INIT(C%&N0001,PRPS,0, 103)
PATCH(%&N0001 ,VOLUME, 11,15, 27,36, 56,65, 1,1)
COVAL(%&N0001 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&O0002,-1,CELL, 11,15, 27,36, 73,82)
INIT(C%&O0002,PRPS,0, 103)
PATCH(%&O0002 ,VOLUME, 11,15, 27,36, 73,82, 1,1)
COVAL(%&O0002 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&P0003,-1,CELL, 11,15, 9,18, 5,14)
INIT(C%&P0003,PRPS,0, 103)
PATCH(%&P0003 ,VOLUME, 11,15, 9,18, 5,14, 1,1)
COVAL(%&P0003 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&R0004,-1,CELL, 11,15, 9,18, 22,31)
INIT(C%&R0004,PRPS,0, 103)
PATCH(%&R0004 ,VOLUME, 11,15, 9,18, 22,31, 1,1)
COVAL(%&R0004 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&O0005,-1,CELL, 11,15, 9,18, 39,48)
INIT(C%&O0005,PRPS,0, 103)
PATCH(%&O0005 ,VOLUME, 11,15, 9,18, 39,48, 1,1)
COVAL(%&O0005 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&B0006,-1,CELL, 11,15, 9,18, 56,65)
INIT(C%&B0006,PRPS,0, 103)
PATCH(%&B0006 ,VOLUME, 11,15, 9,18, 56,65, 1,1)
COVAL(%&B0006 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&L0007,-1,CELL, 11,15, 9,18, 73,82)
INIT(C%&L0007,PRPS,0, 103)
PATCH(%&L0007 ,VOLUME, 11,15, 9,18, 73,82, 1,1)
COVAL(%&L0007 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&E0008,-1,CELL, 11,15, 9,18, 90,99)
INIT(C%&E0008,PRPS,0, 103)
PATCH(%&E0008 ,VOLUME, 11,15, 9,18, 90,99, 1,1)
COVAL(%&E0008 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&M0009,-1,CELL, 11,15, 9,18, 107,116)
INIT(C%&M0009,PRPS,0, 103)
PATCH(%&M0009 ,VOLUME, 11,15, 9,18, 107,116,1,1)
COVAL(%&M0009 ,TEM1, 0.5*FIXVAL,   4.000E+02)
CONPOR(C%&S0010,-1,CELL, 11,15, 9,18, 124,133)
INIT(C%&S0010,PRPS,0, 103)
PATCH(%&S0010 ,VOLUME, 11,15, 9,18, 124,133, 1,1)
COVAL(%&S0010 ,TEM1, 0.5*FIXVAL,   4.000E+02)
ENDIF
ENDIF
 
INLET(0005,LOW,1,25,1,45,1,1,1,1)
COVAL(0005,P1,FIXFLU,   2.973E-01)
COVAL(0005,W1,ONLYMS,   2.500E-01)
COVAL(0005,TEM1,ONLYMS, 2.00E+01)
PATCH(0006,HIGH,1,25,1,45,135,135,1,1)
COVAL(0006,P1,FIXP,0)
COVAL(0006,TEM1,ONLYMS, 2.00E+01)
  ** 1. HIGH Z WALLS
PATCH(WALL_H,HWALL,1,NX,1,NY,NZ,NZ,1,LSTEP)
COVAL(WALL_H,U1,LOGLAW,0.0)
COVAL(WALL_H,V1,LOGLAW,0.0)
  ** 2. LOW Z WALLS
PATCH(WALL_L,LWALL,1,NX,1,NY,1,1,1,LSTEP)
COVAL(WALL_L,U1,LOGLAW,0.0)
COVAL(WALL_L,V1,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)
    GROUP 15. Termination of sweeps
LSWEEP=   50; TSTSWP=-1
selref=f
    GROUP 16. Termination of iterations
LITER(LTLS)=20
    GROUP 17. Under-relaxation devices
CONWIZ=T
    GROUP 22. Monitor print-out
IXMON=NX/2; IYMON=NY/2; IZMON=NZ-1
 
    split into sub-domains
ARRAY(ADZ,INT,512)
INTEGER(NZSD,NZREM,ZSUM)
INTEGER(ZA,ZB)
NZSD=8
MESG(
MESG(Eight (8) sub-domains have been defined in z-direction
MESG(You can make new settings now or press RETURN to continue
MESG(Number of sub-domains ?
READVDU(NZSD,INT,8)
 
ADZ(1)=NZ/NZSD
 
IF(ADZ(1).LT.3)THEN
MESG(WARNING!! WARNING!! WARNING!! WARNING!!
MESG(
MESG(Not enough cells in the z-direction to perform decomposition
MESG(Either decrease the number of sub-domains OR
MESG(increase the number of z-wise cells.
MESG(
MESG(You should have at least 3 slabs per domain!
MESG(
MESG(This run should be abandoned
MESG(CHECK YOUR DATA
MESG(
ENDIF
 
DO II=1,NZSD
 ADZ(II)=ADZ(1)
ENDDO
 
NZREM=NZ-(NZ/NZSD)*NZSD
 
IF(NZREM.GT.1)THEN
 ADZ(NZSD)=ADZ(NZSD)+1
 DO II=1,NZREM-1
 ADZ(II)=ADZ(II)+1
 ENDDO
ELSE
 DO II=1,NZREM
 ADZ(II)=ADZ(II)+1
 ENDDO
ENDIF
 
ZSUM=0
DO II=1,nzsd
ZA=ZSUM+1
ZB=ZA+ADZ(II)-1
IF(II.LT.10)THEN
+ patch(s-01010:II:,volume,1,nx,1,NY,ZA,ZB,#1,#nregt)
ELSE
+ patch(s-0101:II:,volume,1,nx,1,NY,ZA,ZB,#1,#nregt)
ENDIF
ZSUM=ZB
II
ZA
ZB
ENDDO
uwatch=t