TALK=F;RUN( 1, 1)
 
 ************************************************************
   Q1 created by VDI menu, Version 2009, Date 17/02/09
 CPVNAM=VDI;SPPNAM=Core
 ************************************************************
  Echo DISPLAY / USE settings
  PHOTON USE
  p;;;;
 
  use patgeo
  gr ou z 1
  msg contours of velocity, and velocity vectors
  con u1 z 1 fi;0.01;vec z 1
  msg press RETURN for length scale
  pause;con off;vec off;red
  msg contours of turbulence length scale
  con len1 z 1 fi;0.01;pause;con off;red
  msg contours of effective viscosity
  con enut z 1 fi;0.01
  enduse
  DISPLAY
  This case involves steady, turbulent flow over a backward-facing
  step, of height h, in a two-dimensional channel of width 3*h.
  The calculations are started at a distance 4h upstream of the step
  and terminated at a distance 16h downstream.
 
    //////////////////////// wall ///////////////////////
    -----------------------------------------------------
                                                           Pressure
  Inlet  ------->                              --------->  fixed at
                                                           zero
   /________________
  | ////////////////|                                  Exit
  |       wall     /| Recirculation
  |                /|  <----                ----->
   \ constant      /|____________________________________
  prescribed mass  //////////////////////////////////////
  inflow rate                        wall
  ENDDIS
 ************************************************************
 IRUNN = 1 ;LIBREF = 290
 ************************************************************
  Group 1. Run Title
 TEXT(Flow over backward step. LVEL model
 ************************************************************
  Group 2. Transience
 STEADY = T

   **** Select caseNO ***** 
integer(caseno)
mesg(caseno=1: USP
mesg(caseno=2: Structured Phoenics
caseno=1
mesgm(caseno = :caseno: Enter another if you want
readvdu(caseno, int, 1)
if(:caseno:.LT.1.or.:caseno:.gt.2) then
caseno=1
endif
caseno


 ************************************************************
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
BOOLEAN(lAUTO)
if(caseno.eq.1)then

mesg(Do you want to use automatic mode (y) or manual (n)?
readvdu(ans,char,n)
if(:ans:.eq.y)then
lAUTO=T
else
lAUTO=F
endif

INTEGER(LEVEL)
LEVEL = 0

if(lAUTO)then
mesg(Current level of refinement is :LEVEL:
mesg(Minimum level of refinement is 0, maximum is 3
mesg(Enter new level of refinement, if you want
else
mesg(Current level of coarsening is :LEVEL:
mesg(Minimum level of coarsening is 0, maximum is 2
mesg(Enter new level of coarsening, if you want
endif
 readvdu(LEVEL,int,LEVEL)

if(lAUTO)then
NX=20; NY=6
else
NX=40; NY=12
if(LEVEL.gt.0)then
 NX=NX*2; NY=NY*2
endif
if(LEVEL.gt.1)then
 NX=NX*2; NY=NY*2
endif
if(LEVEL.gt.2)then
 NX=NX*2; NY=NY*2
endif
endif

 RSET(M,NX,NY,1,7.620000E-05)
else
 RSET(M,40,30,1,7.619999E-05)
 lAUTO=F
endif
 ************************************************************
  Group 6. Body-Fitted coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
    * Non-default variable names
 NAME(145)=PRPS ;NAME(146)=WGAP
 NAME(148)=WDIS ;NAME(149)=LEN1
 NAME(150) =ENUT
    * Solved variables list
 SOLVE(P1,U1,V1)
    * Stored variables list
 STORE(ENUT,LEN1,WDIS,WGAP,PRPS)
    * Additional solver options
 SOLUTN(P1,Y,Y,Y,N,N,N)
 TURMOD(LVEL)
 
 ************************************************************
  Group 8. Terms & Devices

IF(caseno.NE.2) THEN         ! USP
 USP     =    T  ; USPDBG=    F
 UAUTO   =    lAUTO  
 UTCPLT=    T
 USPTER = F
 USPVTK = T
 USPIMB  =    T ; UGTGRD=    T
 MXLEV   =    LEVEL ; MYLEV  = LEVEL ;MZLEV  =         0


 DOMAT   =        -1
 CELLST  =        1 ; FACEST=        1
 MINPRP  =        -1 ; MAXPRP=       250
 UMXLEV  =         LEVEL ; UMXCLS=    100000
UNOLAY = 2
UIOLEV = 1
UWALEV = LEVEL
UMXCRS = 16
PARSOL = F

mesg(Do you want to view results in the centres of cells? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
SPEDAT(SET,USPIO,VERTCENT,L,F)
endif
ENDIF


 ************************************************************
  Group 9. Properties
 RHO1 =1.
 ENUL =1.100667E-05
 CP1 =1.
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initialise Var/Porosity Fields
 FIINIT(P1)=1.3E-04 ;FIINIT(U1)=13.
 FIINIT(PRPS)=-1. ;FIINIT(WGAP)=1.001E-10
 FIINIT(LTLS)=1.001E-10 ;FIINIT(WDIS)=0.01143
 FIINIT(LEN1)=1.001E-10 ;FIINIT(ENUT)=1.001E-10
   No PATCHes used for this Group
 
 
 INIADD = F
 ************************************************************
  Group 12. Convection and diffusion adjustments
   No PATCHes used for this Group
 ************************************************************
  Group 13. Boundary & Special Sources
   No PATCHes used for this Group
 
 EGWF = T
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 1000
IF(caseno.EQ.1)THEN
 RESFAC =1.0E-05
ELSE
 RESFAC =1.0E-02
ENDIF
 ************************************************************
  Group 16. Terminate Iterations

 ************************************************************
  Group 17. Relaxation
IF(caseno.EQ.1)THEN
 RELAX(P1 ,LINRLX,0.5)
 RELAX(U1 ,FALSDT,1.E-2)
 RELAX(V1 ,FALSDT,1.E-2)
mesg(Do you want to use collocated arrangement (y) or staggered one (n)? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
 SPEDAT(SET,USP,METHOD,I,1)
 RELAX(P1  ,LINRLX, 0.15)
 RELAX(U1  ,FALSDT, 1.E-02)
 RELAX(V1  ,FALSDT, 1.E-02)
mesg(Do you want to use SIMPLEST (y) or SIMPLE (n)? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
 SPEDAT(SET,USP,SIMPLEST,L,T)
endif
endif
else
 RELAX(P1 ,LINRLX,1. )
 RELAX(U1 ,FALSDT,0.011723 )
 RELAX(V1 ,FALSDT,0.011723 )
ENDIF
 ************************************************************
  Group 18. Limits
 ************************************************************
  Group 19. EARTH Calls To GROUND Station
 ************************************************************
  Group 20. Preliminary Printout
 ************************************************************
  Group 21. Print-out of Variables
 OUTPUT(WDIS,Y,N,N,N,N,N)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 10 ;IYMON = 8 ;IZMON = 1
 NPRMON = 100
 NPRMNT = 1
 TSTSWP = -1
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT = 100000
 IPLTF = 1 ;IPLTL = 100
 NPLT = 1
 ISWPRF = 1 ;ISWPRL = 100000
 ITABL = 1
  ************************************************************
  Group 24. Dumps For Restarts
 
 GVIEW(P,0.,0.,1.)
 GVIEW(UP,0.,1.,0.)
 
> DOM,    SIZE,        8.000000E-01, 1.200000E-01, 1.000000E+00
> DOM,    MONIT,       1.809750E-01, 2.857500E-02, 5.000000E-01
> DOM,    SCALE,       1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    SNAPSIZE,    1.000000E-02
if (caseno.eq.2)then
  > GRID,   RSET_X_1,      8, 1.000000E+00
  > GRID,   RSET_X_2,      8, 1.000000E+00
  > GRID,   RSET_X_3,     24, 1.000000E+00
  > GRID,   RSET_Y_1,     10, 1.000000E+00
  > GRID,   RSET_Y_2,     20, 1.000000E+00
  > GRID,   RSET_Z_1,      1, 1.000000E+00
endif
> DOM,    T_AMBIENT,   0.000000E+00
if(lAUTO)then
else
 
> OBJ,    NAME,        X2
> OBJ,    POSITION,    3.048000E-01, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.000000E+00, 1.143000E-01, 1.000000E+00
> OBJ,    GEOMETRY,    wirexyz
> OBJ,    TYPE,        NULL
endif 
> OBJ,    NAME,        STEP
> OBJ,    POSITION,    0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        1.600000E-01, 4.000000E-02, 1.000000E+00
> OBJ,    GEOMETRY,    cube14
> OBJ,    TYPE,        BLOCKAGE
> OBJ,    MATERIAL,    198,Solid with smooth-wall friction
 
> OBJ,    NAME,        INLET
> OBJ,    POSITION,    0.000000E+00, 4.000000E-02, 0.000000E+00
> OBJ,    SIZE,        0.000000E+00, 8.000000E-02, 1.000000E+00
> OBJ,    GEOMETRY,    cube3t
> OBJ,    TYPE,        INLET
> OBJ,    PRESSURE,     P_AMBIENT
> OBJ,    VELOCITY,    13. ,0. ,0.
 
> OBJ,    NAME,        OUTLET
> OBJ,    POSITION,    8.000000E-01, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.000000E+00, 1.200000E-01, 1.000000E+00
> OBJ,    GEOMETRY,    cube12t
> OBJ,    TYPE,        OUTLET
> OBJ,    PRESSURE,    0.
> OBJ,    COEFFICIENT, 1.0E+05
 
> OBJ,    NAME,        WFNN
> OBJ,    POSITION,    0.000000E+00, 1.200000E-01, 0.000000E+00
> OBJ,    SIZE,        8.000000E-01, 0.000000E+00, 1.000000E+00
> OBJ,    GEOMETRY,    cube11
> OBJ,    TYPE,        PLATE
 
> OBJ,    NAME,        WFNS
> OBJ,    POSITION,    1.600000E-01, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        6.400000E-01, 0.000000E+00, 1.000000E+00
> OBJ,    GEOMETRY,    cube11
> OBJ,    TYPE,        PLATE
if(caseno.eq.2)then
else
if(lAUTO)then
else
if(LEVEL.gt.0)then
> OBJ,    NAME,        B1
> OBJ,    POSITION,    0.100000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.400000E+00, 8.000000E-02, 1.000000E+00
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    LEVELS,       0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    AXES,        OXY
endif

if(LEVEL.gt.1)then
> OBJ,    NAME,        B2
> OBJ,    POSITION,    0.120000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.340000E+00, 7.000000E-02, 1.000000E+00
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    LEVELS,       1.000000E+00, 1.000000E+00, 0.000000E+00
> OBJ,    AXES,        OXY
endif

if(LEVEL.gt.2)then
> OBJ,    NAME,        B3
> OBJ,    POSITION,    0.140000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.280000E+00, 6.000000E-02, 1.000000E+00
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    LEVELS,       2.000000E+00, 2.000000E+00, 0.000000E+00
> OBJ,    AXES,        OXY
endif
endif
endif

STOP