TALK=F;RUN( 1, 1)

  PHOTON USE
  p
  
  
  
  CON P1 X 1 FILL;0.01
  PAUSE
  VEC X 1
  PAUSE
  CL
  CON W1 X 1 FILL;0.01 
  ENDUSE

INTEGER(GRD)
MESG(
MESG(
MESG(
MESG(          2D FLOW PAST A PLATE, Re=10
MESG(
MESG(
MESG( This case illustrates the large speed-up that MIGAL  
MESG( produces for low-Reynolds numbers and the way it 
MESG( increases with the number of cells. From library  
MESG( case 250.
MESG(
MESG(
MESG(
MESG( Enter required grid ID :  1 - 20x70 (default)
MESG(                           2 - 40x140 
MESG(                           3 - 52x190 
MESG(
READVDU(GRD,INT,1)
INTEGER(NPLA)
CASE GRD
WHEN 1
+ NY=20 
+ NZ=70 
+ NPLA=20 
WHEN 2
+ NY=40 
+ NZ=140 
+ NPLA=40 
WHEN 3
+ NY=52 
+ NZ=190 
+ NPLA=52 
ENDCASE

INTEGER(SLV)
MESG( Enter required solver ID :  1 - MIGAL (default)
MESG(                             2 - SIMPLEST 
MESG(
READVDU(SLV,INT,1)
 
    GROUP 1. Run title and other preliminaries
IF(SLV.EQ.1) THEN
 + TEXT(2D Low-Re Flow Past A Plate - MIGAL
ENDIF
IF(SLV.EQ.2) THEN
 + TEXT(2D Low-Re Flow Past A Plate - SIMPLEST
ENDIF
  TITLE
REAL(REYNO,W1IN); REYNO=10.0; W1IN=1.0
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,NY,4.0,1.0)
 
    GROUP 5. Z-direction grid specification
GRDPWR(Z,NZ,14.,1.)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1); SOLUTN(P1,Y,Y,Y,N,N,N)
 
    GROUP 9. Properties of the medium (or media)
ENUL=W1IN*YVLAST*0.5/REYNO
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=W1IN
   **Plate
CONPOR(PLAT,0.0,HIGH,1,1,1,NY/4,-NPLA,-NPLA)
 
    GROUP 13. Boundary conditions and special sources
   **Upstream boundary
INLET(UPSTRM,LOW,1,1,1,NY,1,1,1,1)
VALUE(UPSTRM,P1,RHO1*W1IN)
VALUE(UPSTRM,W1,W1IN)
   **Downstream boundary
PATCH(DWNSTRM,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(DWNSTRM,P1,1.E5,0.0); COVAL(DWNSTRM,W1,ONLYMS,W1IN)
   **High-y boundary
PATCH(TOP,NORTH,1,1,NY,NY,1,NZ,1,1)
COVAL(TOP,P1,1.E5,0.); COVAL(TOP,W1,ONLYMS,W1IN)
   **Plate (the necessary patch has been generated by the CONPOR
   **in group 11 above).
COVAL(PLAT,W1,FIXVAL,0.0)
 
    GROUP 15. Termination of sweeps
CASE GRD
WHEN 1
+ LSWEEP=1500
WHEN 2
+ LSWEEP=6000
WHEN 3
+ LSWEEP=10000
ENDCASE
 
    GROUP 16. Termination of iterations
LITER(P1)=-50
 
    GROUP 17. Under-relaxation devices
RELAX(V1,FALSDT,1.0); RELAX(W1,FALSDT,1.0)
  
    GROUP 22. Spot-value print-out
CASE GRD
WHEN 1
+ IYMON=10
+ IZMON=25
WHEN 2
+ IYMON=20
+ IZMON=50
WHEN 3
+ IYMON=26
+ IZMON=65
ENDCASE
 
    GROUP 23. Field print-out and plot control
TSTSWP=-1
ITABL=3

selref=F;
resref(P1)=1.E-5;
resref(V1)=1.E-5;
resref(W1)=1.E-5;

    MIGAL parameters
    ----------------


IF(SLV.EQ.1) THEN
+ RELAX(V1,FALSDT,1.E+10) 
+ RELAX(W1,FALSDT,1.E+10) 
+ spedat(MIGAL,SOLVED1, c, HYDRO)
+ spedat(MIGAL,LINRLX1, r, 1.)
+ spedat(MIGAL,RELAX1,  r, .8)
ENDIF

IF(SLV.EQ.1.AND.GRD.EQ.1) THEN
+ LSWEEP=11
ENDIF
IF(SLV.EQ.1.AND.GRD.EQ.2) THEN
+ LSWEEP=13
ENDIF
IF(SLV.EQ.1.AND.GRD.EQ.3) THEN
+ LSWEEP=18
ENDIF