TALK=F;RUN( 1, 1)
  PHOTON USE
  p
 
 
 
 
  use patgeo
  PAUSE;RED
  VEC X 1
  PAUSE
  VEC DEL;RED
  CON P1 X 1 FILL;0.01

  ENDUSE


   ******  BOUNDARY SPECIFICATIONS

INTEGER(NZ1,NZ2) 
REAL(PL,PT,RAD);  PL=20.E-3;  PT=15.9E-3;  RAD=6.35E-3

INTEGER(GRD)
MESG(
MESG(
MESG(
MESG(  FLOW IN SYMMETRY UNIT OF STAGGERED TUBE BANK
MESG(      2D-YZ, BFC, steady, elliptic
MESG(
MESG(
MESG(  This file illustrates the speed-up that MIGAL   
MESG(  produces with BFC and how this speed-up  
MESG(  increases with the number of cells.
MESG(
MESG(
MESG(
MESG( Enter required grid ID :  1 - 10x21 (default)
MESG(                           2 - 50x105 
MESG(                           3 - 100x210 
MESG(
READVDU(GRD,INT,1)
CASE GRD
WHEN 1
+ NY=10 
+ NZ=21; NZ1=NY; NZ2=NZ-NZ1
+ BFC=T;  NONORT=T
+ READCO(grid6) 
WHEN 2
+ NY=50 
+ NZ=105; NZ1=NY; NZ2=NZ-NZ1
+ BFC=T;  NONORT=T
+ READCO(grid7) 
WHEN 3
+ NY=100 
+ NZ=210; NZ1=NY; NZ2=NZ-NZ1
+ BFC=T;  NONORT=T
+ READCO(grid8) 
ENDCASE

INTEGER(SOLV)
MESG( Enter required solver ID :  1 - MIGAL (default)
MESG(                             2 - SIMPLEST
MESG( 
READVDU(SOLV,INT,1)
IF(SOLV.EQ.1) THEN
+ TEXT(STAGGERED TUBE BANK : MIGAL
ENDIF
IF(SOLV.EQ.2) THEN
+ TEXT(STAGGERED TUBE BANK : SIMPLEST
ENDIF


    GROUP 7.  Variables named, stored & solved.

SOLVE(P1,W1,V1)
SOLUTN(P1,Y,Y,Y,N,N,N)

    GROUP 9. Properties of the medium (or media).

RHO1=1.
ENUL=15.E-6

    GROUP 11.Initialization of fields of variables

REAL(WIN,RE); RE=140; WIN=0.5*RE*ENUL/RAD
FIINIT(P1)=5.E-5
PATCH(IBFC,INIVAL,1,1,1,NY,1,NZ,1,1)
INIT(IBFC,V1,0.0,0);INIT(IBFC,W1,0.0,WIN)

    GROUP 13. Boundary conditions and special sources

   INLET condition
INLET(BFCINL,LOW,1,1,1,NY,1,1,1,1)
VALUE(BFCINL,P1,RHO1*WIN)
VALUE(BFCINL,V1,GRND1);    VALUE(BFCINL,VCRT,0.)
VALUE(BFCINL,W1,GRND1);    VALUE(BFCINL,WCRT,WIN)

   OUTLET condition
OUTLET(OUT,HIGH,1,1,1,NY,NZ,NZ,1,1)

   WALL condition
PATCH(WUP,NWALL,1,1,NY,NY,NZ1+1,NZ,1,1)
COVAL(WUP,W1,1.0,0.0)
PATCH(WDOWN,SWALL,1,1,1,1,1,NZ1,1,1)
COVAL(WDOWN,W1,1.0,0.0)

    GROUP 16. Termination criteria for inner iterations.

REAL(EPS,FIN); EPS=0.01; FIN=PT/2.-RAD
RESREF(P1)=RHO1*WIN*FIN*EPS
RESREF(W1)=RHO1*WIN**2*FIN*EPS
RESREF(V1)=RESREF(W1)

    GROUP 19. Data communicated by SATELLITE to GROUND
BFCA=RHO1

    GROUP 21. Frequency and extent of field printout.
IXMON=1;  IYMON=NY/2;  IZMON=NZ1+3;  TSTSWP=-1
NPLT=1; ITABL=3

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

CASE SOLV

    Parameters for MIGAL
    --------------------
WHEN 1
+ relax(v1,falsdt,1.E+10) 
+ relax(w1,falsdt,1.E+10) 
+ spedat(MIGAL,SOLVED1, c, HYDRO)
+ spedat(MIGAL,RELAX1,  r, .99)
+ CASE GRD
+ WHEN 1
+ spedat(MIGAL,LINRLX1, r, 1.)
+ lsweep=20
+ WHEN 2
+ spedat(MIGAL,LINRLX1, r, 1.)
+ lsweep=30
+ WHEN 3
+ lsweep=90
    We under-relax because of the crude inlet profil (pb in IZ=IY=1)
+ spedat(MIGAL,LINRLX1,  r,.5)
+ spedat(MIGAL,LITER1,   i, 1)
+ spedat(MIGAL,NBRELAX1, i, 5)
+ ENDCASE

    Parameters for SIMPLEST
    -----------------------
WHEN 2
+ RELAX(P1,LINRLX,.8)
+ CASE GRD
+ WHEN 1
+ lsweep=120
+ relax(v1,falsdt,0.1) 
+ relax(w1,falsdt,0.1) 
+ WHEN 2
+ lsweep=1300
+ relax(v1,falsdt,0.001) 
+ relax(w1,falsdt,0.001) 
+ WHEN 3
+ lsweep=3400
+ relax(v1,falsdt,0.001) 
+ relax(w1,falsdt,0.001) 
ENDCASE

ENDCASE