TALK=F;RUN( 1, 1)
 CPVNAM=VDI;SPPNAM=Core
 
  Group 1. Run Title
 TEXT(2D Flow in LID-DRIVEN cavity)
   
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
INTEGER(LEVEL)
LEVEL = 3
mesg(Level of coarsening 0 is minimum 3 is maximum
mesg(Current level of coarsening is :LEVEL:
mesg(Do you want to change it? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
 mesg(Enter level of coarsening
 readvdu(LEVEL,int,LEVEL)
 mesg(New level of coarsening is :LEVEL:
endif
if(LEVEL.eq.0)then
 NX=10; NY=10
endif
if(LEVEL.eq.1)then
 NX=20; NY=20
endif
if(LEVEL.eq.2)then
 NX=40; NY=40
endif
if(LEVEL.eq.3)then
 NX=80; NY=80
endif

 RSET(D,DOM,0.1,0.1,1.)
 
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 
 SOLVE(P1,U1,V1)
    * Additional solver options
 SOLUTN(P1,Y,Y,Y,N,N,Y)
 SOLUTN(U1,Y,Y,Y,N,N,Y)
 SOLUTN(V1,Y,Y,Y,N,N,Y) 

    GROUP 8. Terms (in differential equations) & devices
USP    = T
UAUTO  = F
USPDBG = F
UTCPLT = T
USPVTK = T
USPIMB = F
MXLEV  = LEVEL 
MYLEV  = LEVEL
MZLEV  = LEVEL
DOMAT  = -1
MINPRP = -1
MAXPRP = 100
CELLST = 10
FACEST = 10

PARSOL=F
 
  Group 9. Properties
 RHO1    = 1.000000E+00
 ENUL    = 1.000000E-05
 
 REAL(RE,UWALL)
 UWALL = 0.1
 RE = UWALL*XULAST/ENUL
 mesg(Default value of Reynolds number is :RE:
 mesg(Do you want to change it? (y/n)
 readvdu(ans,char,n)
 if(:ans:.eq.y)then
 mesg(Enter new value of Reynolds number
 readvdu(RE,real,RE)
 mesg(New value of Reynolds number is :RE:
 UWALL=RE*ENUL/XULAST
 mesg(New value of velocity of wall is :UWALL: m/s
 endif
 
  Group 11.Initialise Var/Porosity Fields
 FIINIT(P1) =  1.E-10
 FIINIT(U1) =  1.E-10
 FIINIT(V1) =  1.E-10
 
  Group 13. Boundary & Special Sources
 
 PATCH (WEST    ,WWALL  ,1,1,1,NY,1,1,1,1)
 COVAL (WEST    ,V1, 1., 0.)

 PATCH (EAST    ,EWALL  ,NX,NX,1,NY,1,1,1,1)
 COVAL (EAST    ,V1, 1., 0.)
 
 PATCH(SOUTH    ,SWALL ,   1,  NX,   1,   1,   1,   1,   1,   1)
 COVAL(SOUTH    ,U1  , 1., 0.) 

 PATCH(MOVE     ,NWALL ,   1,  NX,   NY,   NY,   1,   1,   1,   1)
 COVAL(MOVE     ,U1  , 10., UWALL) 
 
 PATCH (PRES    ,CELL  ,1,1,1,1,1,1,1,1)
 COVAL (PRES    ,P1  , 1., 0.000000E+00)
 
 
  Group 15. Terminate Sweeps
 LSWEEP  =         1000
 RESFAC  = 1.000000E-07
 
  Group 17. Relaxation
 RELAX(P1  ,LINRLX, 7.000000E-01)
 RELAX(U1  ,FALSDT, 1.000000E-00)
 RELAX(V1  ,FALSDT, 1.000000E-00)

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.3)
 RELAX(U1  ,FALSDT, 1.E-01)
 RELAX(V1  ,FALSDT, 1.E-01)
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

 
   Group 20. Preliminary Printout
 ECHO    =    T
 
  Group 21. Print-out of Variables
 OUTPUT(P1,Y,N,Y,Y,Y,Y)
 OUTPUT(U1,Y,N,Y,Y,Y,Y)
 OUTPUT(V1,Y,N,Y,Y,Y,Y)
  
  Group 22. Monitor Print-Out
 IXMON   =         6 ;IYMON  =         6 ;IZMON  =         1
 NPRMON  =    100000
 NPRMNT  =         1
 TSTSWP  =        -1
 
  Group 23.Field Print-Out & Plot Control
 NPRINT  =    100000
 ISWPRF  =         1 ;ISWPRL =    100000
> DOM,    SIZE,        1.000000E-01, 1.000000E-01, 1.000000E+00
> DOM,    MONIT,       5.000000E-02, 5.000000E-02, 0.500000E+00
> DOM,    SCALE,       1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    SNAPSIZE,    1.000000E-02

if(LEVEL.gt.0)then
> OBJ,    NAME,        B1
> OBJ,    POSITION,    0.000000E+00, 5.000000E-02, 0.000000E+00
> OBJ,    SIZE,        4.000000E-02, 5.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

> OBJ,    NAME,        B2
> OBJ,    POSITION,    6.000000E-02, 5.000000E-02, 0.000000E+00
> OBJ,    SIZE,        4.000000E-02, 5.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,        B3
> OBJ,    POSITION,    0.000000E+00, 6.000000E-02, 0.000000E+00
> OBJ,    SIZE,        3.500000E-02, 4.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

> OBJ,    NAME,        B4
> OBJ,    POSITION,    6.500000E-02, 6.000000E-02, 0.000000E+00
> OBJ,    SIZE,        3.500000E-02, 4.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,        B5
> OBJ,    POSITION,    0.000000E+00, 7.000000E-02, 0.000000E+00
> OBJ,    SIZE,        3.000000E-02, 3.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

> OBJ,    NAME,        B6
> OBJ,    POSITION,    7.000000E-02, 7.000000E-02, 0.000000E+00
> OBJ,    SIZE,        3.000000E-02, 3.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

STOP