** MBFGE Test: 3D laminar flow around rotating disk.
  **************************************************************
  DISPLAY
  ----------------------------------------------------------
  The case  concerns unsteady  3D laminar flow generated  by
  rotating disk. Reynolds number is set by REYNU  at the top
  of Q1.
 
  The main purpose of the case is to demonstrate the way  to
  set problem using  sliding LINK option  of MBFGE. User  is
  advised to pay attention on the use of the following  PIL-
  commands:
    READCO(MBGR+Y)
    MPATCH(1,MBS1.2,NORTH,...); MPATCH(2,MBS2.1,SOUTH,...)
 
  NOTE!, that the stacking along Y-axis, achieved by the use
  +Y in READCO, provides for XCYCLE=T treatment.
  ----------------------------------------------------------
  ENDDIS
L(PAUSE
  **************************************************************
  PHOTON USE
   p ; ; ; ; ;
 
   use patgeo
   pause
   cl
   vi z
   vec k 20 sh
   pause
   cl
   vi x
   set vec com - vc1 wc1
   vec i 1 sh
  ENDUSE
  **************************************************************
    GROUP 1. Run title and other preliminaries
INTEGER(NX1,NY11,NY12,NY1,NZ11,NZ12,NZ1,NX2,NY2,NZ21,NZ22,NZ2)
REAL(PI,RDISK,RLNK,REXT,HBOT,HWHO)
REAL(VTIP,OMEGA,DENS,VISC,REYNU)
REYNU= 1.
TEXT(MBFGE: Flow around rotating disk (Re=1).
TITLE
PI = 3.14159
  ** Problem definition:
RDISK= 0.2;    RLNK = 0.25;  REXT= 0.5;  HBOT= 0.5
VTIP = 1.0;    OMEGA= VTIP/RDISK;        HWHO= 2.*HBOT
DENS = 1.189;  VISC = VTIP*RDISK/REYNU
  ** Grid specification:
NX1 = 4;     NY11= 8;     NY12= 3;  NY1 = NY11+NY12
NZ11= 18;    NZ12= 18;    NZ1 = NZ11+NZ12
NX2 = NX1;   NY2 = 10
NZ21= NZ11;  NZ22= NZ12;  NZ2 = NZ21+NZ22
    GROUP 2. Transience; time-step specification
STEADY= F; GRDPWR(T,10,10.0,1.0)
    GROUP 6. Body-fitted coordinates or grid distortion
    ** Create Grid For The 1st Domain:
BFC= T; GSET(D,NX1,NY1,NZ1,0.1,RLNK,HBOT)
GSET(P,P1,0.0, 0.0, 0.0);  GSET(P,P2,0.0,RDISK, 0.0)
GSET(P,P3,0.0,RLNK, 0.0);  GSET(P,P4,0.0, RLNK,HBOT)
GSET(P,P5,0.0,RLNK,HWHO);  GSET(P,P6,0.0,RDISK,HWHO)
GSET(P,P7,0.0, 0.0,HWHO);  GSET(P,P8,0.0,  0.0,HBOT)
GSET(L,L1,P1,P2,NY11,-1.4); GSET(L,L2,P2,P3,NY12, 1.0)
GSET(L,L3,P3,P4,NZ11,-1.7); GSET(L,L4,P4,P5,NZ12, 1.7)
GSET(L,L5,P5,P6,NY12, 1.0); GSET(L,L6,P6,P7,NY11, 1.4)
GSET(L,L7,P7,P8,NZ12,-1.7); GSET(L,L8,P8,P1,NZ11, 1.7)
GSET(F,F1,P1,P2,P3,P4,P5,P6,P7,P8)
GSET(M,F1,+J+K,1,1,1)
GSET(C,I:NX1+1:,F,I1,1,NY1,1,NZ1,RZ,-PI/4.,0.0,0.0,INC,1.0)
 DUMPC(MBGR1)
    ** Create Grid For The 2nd Domain:
BFC= T; GSET(D,NX2,NY2,NZ2,0.1,REXT,HBOT)
GSET(P,P1,0.0,RLNK, 0.0);  GSET(P,P2,0.0,REXT, 0.0)
GSET(P,P3,0.0,REXT,HBOT);  GSET(P,P4,0.0,REXT,HWHO)
GSET(P,P5,0.0,RLNK,HWHO);  GSET(P,P6,0.0,RLNK,HBOT)
GSET(L,L1,P1,P2, NY2, 1.5); GSET(L,L2,P2,P3,NZ21,-1.7)
GSET(L,L3,P3,P4,NZ22, 1.7); GSET(L,L4,P4,P5, NY2,-1.5)
GSET(L,L5,P5,P6,NZ22,-1.7); GSET(L,L6,P6,P1,NZ21, 1.7)
GSET(F,F1,P1,-,P2,P3,P4,-,P5,P6); GSET(M,F1,+J+K,1,1,1)
GSET(C,I:NX2+1:,F,I1,1,NY2,1,NZ2,RZ,-PI/4.,0.0,0.0,INC,1.0)
 DUMPC(MBGR2)
  ** Assemble blocks:
NUMBLK = 2; READCO(MBGR+Y); GVIEW(X); VIEW
  ** Next is instead of MBLINK(1,SOUTH,2,NORTH)
     to set sliding LINK:
MPATCH(1,MBS1.2,NORTH,1,NX1,NY1,NY1,1,NZ1,1,LSTEP)
MPATCH(2,MBS2.1,SOUTH,1,NX2,  1,  1,1,NZ2,1,LSTEP)
    GROUP 7. Variables stored, solved & named
STORE(VPOR,HPOR); SOLVE(P1,U1,V1,W1)
L($F150)
    GROUP 9. Properties of the medium (or media)
DIFCUT= 0.0;  ENUL= VISC;  RHO1= DENS
    GROUP 11. Initialization of variable or porosity fields
INIADD= F
    *** Disk:
MPATCH(1,DISK,INIVAL,1,NX1,1,NY11,NZ11,NZ11,1,1)
 COVAL(DISK,HPOR,0.0,0.0)
    GROUP 13. Boundary conditions and special sources
XCYCLE= T
    ** Coriolis and cenrifugal forces:
ANGVEL= OMEGA
ROTAXA= 0.0;  ROTAYA= 0.0;  ROTAZA= 0.0
ROTAXB= 0.0;  ROTAYB= 0.0;  ROTAZB= 1.0
MPATCH(1,SLIDRT1,CELL,1,NX1,1,NY1,1,NZ1,1,LSTEP)
    ** Walls:
MPATCH(1,WH1,HWALL,1,NX1,1,NY11,NZ11,NZ11,1,LSTEP)
 COVAL(WH1,UC1,1.0,0.0); COVAL(WH1,VC1,1.0,0.0)
 COVAL(WH1,WC1,1.0,0.0)
MPATCH(1,WL1,LWALL,1,NX1,1,NY11,NZ11+1,NZ11+1,1,LSTEP)
 COVAL(WL1,UC1,1.0,0.0); COVAL(WL1,VC1,1.0,0.0)
 COVAL(WL1,WC1,1.0,0.0)
    ** Pressure:
MPATCH(1,POL1,  LOW,1,NX1,  1,NY1,  1,  1,1,LSTEP)
 COVAL(POL1, P1,.01*FIXP, 0.0); COVAL(POL1,UC1,ONLYMS,SAME)
 COVAL(POL1,VC1,ONLYMS,SAME); COVAL(POL1,WC1,ONLYMS,SAME)
MPATCH(1,POH1, HIGH,1,NX1,  1,NY1,NZ1,NZ1,1,LSTEP)
 COVAL(POH1, P1,.01*FIXP, 0.0); COVAL(POH1,UC1,ONLYMS,SAME)
 COVAL(POH1,VC1,ONLYMS,SAME); COVAL(POH1,WC1,ONLYMS,SAME)
MPATCH(2,POL2,  LOW,1,NX2,  1,NY2,  1,  1,1,LSTEP)
 COVAL(POL2, P1,.01*FIXP, 0.0); COVAL(POL2,UC1,ONLYMS,SAME)
 COVAL(POL2,VC1,ONLYMS,SAME); COVAL(POL2,WC1,ONLYMS,SAME)
MPATCH(2,POH2, HIGH,1,NX2,  1,NY2,NZ2,NZ2,1,LSTEP)
 COVAL(POH2, P1,.01*FIXP, 0.0); COVAL(POH2,UC1,ONLYMS,SAME)
 COVAL(POH2,VC1,ONLYMS,SAME); COVAL(POH2,WC1,ONLYMS,SAME)
MPATCH(2,PON2,NORTH,1,NX2,NY2,NY2,  1,NZ2,1,LSTEP)
 COVAL(PON2, P1,  FIXP, 0.0); COVAL(PON2,UC1,ONLYMS,SAME)
 COVAL(PON2,VC1,ONLYMS,SAME); COVAL(PON2,WC1,ONLYMS,SAME)
    GROUP 15. Termination of sweeps
LSWEEP = 30; TSTSWP = -1
    GROUP 16. Termination of iterations
SELREF = T; RESFAC = 1.E-3
    GROUP 17. Under-relaxation devices
RELAX( P1,LINRLX,0.5);  VARMIN(VC1)= 0.0
    GROUP 19. Data communicated by satellite to GROUND
    * LSG3 = T, activates curvilinearity treatment;
LSG3= T
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 22. Spot-value print-out
IXMON = NX1/2+1; IYMON = NY1/2+1; IZMON = NZ1/2+1
    GROUP 24. Dumps for restarts
    * User can get PHI-files for each step by uncommenting next:
    IDISPA= 1; CSG1  = A