** MB-FGE Test: T-junction of pipes.
  **************************************************************
  DISPLAY
   Laminar flow in a 3D Tee-junction, Re=10
 
   The Reynolds number is based upon the inlet conditions of
   the large pipe.
 
   2 Blocks are used,  one for each pipe.   Note the use  of
   Laplacian interpolation of the nodes within the  circular
   cross-sections, together with the use of a symmetric power
   law, to reduce grid non-orthogonality.
 
   This Q1 file includes Photon Use information.
   ---------------------------------------------------------
  ENDDIS
L(PAUSE
  **************************************************************
  PHOTON USE
  p ; ; ; ; ;
 
  mag
  1.6
    .15652E+04  .16084E+04 CR
  cl
  g Z 21 x 1 10 y 1 10 col 5
  g X 11 Z 1 20 y 1 10 col 5
  g Y 11 Z 1 20 col 5
  text
  1
 
  Mesh for Main Pipe
    .35407E+03  .27612E+04
  pause
  cl
  g y m x 1 6 z 22 m
  g z 28 x 1 6 y 1 12
  g x 7 y 1 6 z 22 m
  g x 7 y 6 7 z 23 m
  g x 7 y 7 8 z 24 m
  g x 7 y 8 9 z 25 m
  g x 1 y 11 12 z 23 m
  g x 1 y 10 10 z 24 m
  g x 1 y 9 9 z 23 m
  g x 1 y 8 8 z 26 m
  text
  1
 
  Mesh for 2nd Pipe
    .68401E+02  .29023E+04
  pause
  cl
  g Z 21 x 1 10 y 1 10 col 5
  g X 11 Z 1 20 y 1 10 col 5
  g Y 11 Z 1 20 col 5
  g y m x 1 6 z 22 m
  g z 28 x 1 6 y 1 12
  g x 7 y 1 6 z 22 m
  g x 7 y 6 7 z 23 m
  g x 7 y 7 8 z 24 m
  g x 7 y 8 9 z 25 m
  g x 1 y 11 12 z 23 m
  g x 1 y 10 10 z 24 m
  g x 1 y 9 9 z 23 m
  g x 1 y 8 8 z 26 m
  text
  1
 
  Combined Mesh
    .68401E+02  .29023E+04
 
  pause
  cl
   * MBD1
   GR OU X    11 Y     1    10 Z     1    20 COL     5
   GR OU X     1 Y     1    10 Z     1    20 COL     5
   GR OU Y    11 X     1    10 Z     1    20 COL     5
   GR OU Y     1 X     1    10 Z     1    20 COL     5
   * MBD2
   GR OU X     7 Y     1    12 Z    22    27 COL     5
   GR OU X     1 Y     1    12 Z    22    27 COL     5
   GR OU Y    13 X     1     6 Z    22    27 COL     5
   GR OU Y     1 X     1     6 Z    22    27 COL     5
  vec i 5 k 1 20 sh
  vec i 3 k 22 m  sh
  text
  1
 
  Velocity Vectors near the mid-plane
    .10461E+03  .29023E+04
  pause
  cl
   * MBD1
   GR OU X    11 Y     1    10 Z     1    20 COL     5
   GR OU X     1 Y     1    10 Z     1    20 COL     5
   GR OU Y    11 X     1    10 Z     1    20 COL     5
   GR OU Y     1 X     1    10 Z     1    20 COL     5
   * MBD2
   GR OU X     7 Y     1    12 Z    22    27 COL     5
   GR OU X     1 Y     1    12 Z    22    27 COL     5
   GR OU Y    13 X     1     6 Z    22    27 COL     5
   GR OU Y     1 X     1     6 Z    22    27 COL     5
  con p1 i 5 k 1 20 fi;0.001
  con p1 i 3 k 22 m fi;0.001
  text
  1
 
  Pressure Contours near the mid-plane
    .10461E+03  .29023E+04
  ENDUSE
    GROUP 1. Run title and other preliminaries
TEXT(Multi-block BFC grid for T-junction
TITLE
INTEGER(NX1,NY1,NZ1,NX2,NY2,NZ2,IC,POINT)
INTEGER(NXIN1,NYIN1,IXIN1,IYIN1,IZIN1,NZIN1)
INTEGER(IXIN2,NXIN2,IYIN2,NYIN2,IZIN2,NZIN2)
REAL(REYNO,WIN,DIAM,PI,ANGLE,XX,YY,RADIUS,XP,YP,ZP)
REYNO = 10; WIN = 1.0; DIAM = 0.5; PI = 3.1415
   ** First domain:
NX1  = 10;        NY1  = 10;      NZ1  = 20
   ** Second domain:
NX2  = 6;         NY2  = 12;      NZ2  = 6
    GROUP 6. Body-fitted coordinates or grid distortion
BFC= T;
    ** Pipes inter-section:
RADIUS=0.15
DO II=1,8
+ ANGLE=(II-1)*PI*0.25
+ XX= RADIUS*COS(ANGLE); YY= RADIUS*SIN(ANGLE)
+ XP= XX; YP= 0.25; ZP= 1+YY
   ** Comment out this line for different join structure
+ YP= (0.25*0.25-(XP*XP))**0.5; POINT= II
+ GSET(P,P:POINT:,XP,YP,ZP)
ENDDO
  ** Mid Section of small pipe
DO II=1,8
+ ANGLE=(II-1)*PI*0.25
+ XX=RADIUS*COS(ANGLE); YY=RADIUS*SIN(ANGLE)
+ XP= XX; YP= 0.5; ZP= 1+YY; POINT= II+8
+ GSET(P,P:POINT:,XP,YP,ZP)
ENDDO
  ** Start of big pipe
RADIUS=0.25
DO II=1,8
+ ANGLE=(II-1)*PI*0.25
+ XX= RADIUS*COS(ANGLE); YY= RADIUS*SIN(ANGLE)
+ XP= XX; YP= YY; ZP= 0.0; POINT= II+16
+ GSET(P,P:POINT:,XP,YP,ZP)
ENDDO
  ** End of big pipe
DO II=1,8
+ ANGLE=(II-1)*PI*0.25
+ XX=RADIUS*COS(ANGLE); YY=RADIUS*SIN(ANGLE)
+ XP=XX; YP=YY; ZP=2.0; POINT=II+24
+ GSET(P,P:POINT:,XP,YP,ZP)
ENDDO
ZP=0.825; ANGLE=PI*0.25
XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PA,XP,YP,ZP)
ANGLE=3*PI*0.25; XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PB,XP,YP,ZP)
ANGLE=5*PI*0.25; XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PC,XP,YP,ZP)
ANGLE=7*PI*0.25; XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PD,XP,YP,ZP)
ZP=1.175; ANGLE=PI*0.25
XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PE,XP,YP,ZP)
ANGLE=3*PI*0.25; XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PF,XP,YP,ZP)
ANGLE=5*PI*0.25; XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PG,XP,YP,ZP)
ANGLE=7*PI*0.25; XP=RADIUS*COS(ANGLE); YP=RADIUS*SIN(ANGLE)
GSET(P,PH,XP,YP,ZP)
GSET(D,10,10,20,0.1,0.1,0.1)
GSET(L,L1,P18,PA,6,1.0); GSET(L,L2,P20,PB,6,1.0)
GSET(L,L3,P22,PC,6,1.0); GSET(L,L4,P24,PD,6,1.0)
GSET(L,L1a,PA,PE,8,1.0); GSET(L,L2a,PB,PF,8,1.0)
GSET(L,L3a,PC,PG,8,1.0); GSET(L,L4a,PD,PH,8,1.0)
GSET(L,L1b,PE,P26,6,1.0);GSET(L,L2b,PF,P28,6,1.0)
GSET(L,L3b,PG,P30,6,1.0);GSET(L,L4b,PH,P32,6,1.0)
GSET(L,L5,P18,P20,10,S1.5,ARC,P19)
GSET(L,L6,P20,P22,10,S1.5,ARC,P21)
GSET(L,L7,P22,P24,10,S1.5,ARC,P23)
GSET(L,L8,P24,P18,10,S1.5,ARC,P17)
GSET(L,L9, P26,P28,10,S1.5,ARC,P27)
GSET(L,L10,P28,P30,10,S1.5,ARC,P29)
GSET(L,L11,P30,P32,10,S1.5,ARC,P31)
GSET(L,L12,P32,P26,10,S1.5,ARC,P25)
GSET(L,B1,P2,P4,6,S1.3,ARC,P3);GSET(L,B2,P4,P6,6,S1.3,ARC,P5)
GSET(L,B3,P6,P8,6,S1.3,ARC,P7);GSET(L,B4,P8,P2,6,S1.3,ARC,P1)
GSET(L,B5,P10,P12,6,S1.3,ARC,P11)
GSET(L,B6,P12,P14,6,S1.3,ARC,P13)
GSET(L,B7,P14,P16,6,S1.3,ARC,P15)
GSET(L,B8,P16,P10,6,S1.3,ARC,P9)
GSET(F,FA,P8,-,P2,-,P4,-,P6,-); GSET(M,FA,+K-I,9,11,8,LAP10)
GSET(F,F1,P22,-,P24,-,P18,-,P20,-); GSET(M,F1,+I+J,1,1,1,LAP10)
GSET(F,F2,P30,-,P32,-,P26,-,P28,-); GSET(M,F2,+I+J,1,1,21,LAP10)
GSET(F,F3,P20,PB.PF,P28,-,P26,PE.PA,P18,-)
GSET(M,F3,+K+I,1,11,1,TRANS)
GSET(F,F4,P24,PD.PH,P32,-,P26,PE.PA,P18,-)
GSET(M,F4,+K+J,11,1,1,TRANS)
GSET(F,F5,P22,PC.PG,P30,-,P32,PH.PD,P24,-)
GSET(M,F5,+K+I,1,1,1,TRANS)
GSET(F,F6,P22,PC.PG,P30,-,P28,PF.PB,P20,-)
GSET(M,F6,+K+J,1,1,1,TRANS)
GSET(B,1,10,1,10,1,20,TRANS)
DUMPC(PGR1)
GSET(D,NX2,NY2,NZ2)
GSET(M,FA,+K-I,7,1,1,LAP10)
GSET(F,FB,P16,-,P10,-,P12,-,P14,-);GSET(M,FB,+K-I,7,5,1,LAP10)
GSET(T,J5,F,J1,1,6,1,6,1)
GSET(C,J13,F,J5,1,6,1,6,RZ,-PI/2.,0.6,0.5,INC,1.1)
DUMPC(PGR2)
NUMBLK=2; READCO(PGR+L); VIEW
    ** To set up LINKS you can use MBLINK or MPATCH commands
       instead of READCO(...+L).
     MBLINK(1,NORTH,2,SOUTH)
     PATCH(MBL1.2, NORTH,  3,8,  10,10,  8,13, 1,LSTEP)
     PATCH(MBL2.1, SOUTH,  1,6,   1,1,  22,27, 1,LSTEP)
    GROUP 7. Variables stored, solved & named
STORE(VPOR); SOLVE(P1,U1,V1,W1)
L($F150)
    GROUP 9. Properties of the medium (or media)
ENUL = DIAM*WIN/REYNO; RHO1=1.0
    GROUP 13. Boundary conditions and special sources
    ** Inlet.
MPATCH(1,INL,LOW,1,NX1,1,NY1,1,1,1,1); COVAL(INL,P1, FIXFLU,WIN)
COVAL(INL,UC1,ONLYMS,0.0); COVAL(INL,VC1,ONLYMS,0.0)
COVAL(INL,WC1,ONLYMS,WIN)
MPATCH(2,IN2,NORTH,1,NX2,NY2,NY2,1,NZ2,1,1)
COVAL(IN2,P1, FIXFLU,WIN); COVAL(IN2,UC1,ONLYMS,0.0)
COVAL(IN2,VC1,ONLYMS,-WIN); COVAL(IN2,WC1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C1,1.0,0.0);COVAL(WL2,VC1,1.0,0.0)
COVAL(WL2,WC1,1.0,0.0)
MPATCH(2,WH2,HWALL,1,NX2,1,NY2,NZ2,NZ2,1,1)
COVAL(WH2,UC1,1.0,0.0);COVAL(WH2,VC1,1.0,0.0)
COVAL(WH2,WC1,1.0,0.0)
    ** Outlet.
MPATCH(1,OUT1,HIGH,1,NX1,1,NY1,NZ1,NZ1,1,1)
COVAL(OUT1,P1, FIXP,  0.0); COVAL(OUT1,UC1,ONLYMS,0.0)
COVAL(OUT1,VC1,ONLYMS,0.0); COVAL(OUT1,WC1,ONLYMS,0.0)
    GROUP 15. Termination of sweeps
LSWEEP = 200; TSTSWP = -1
    GROUP 16. Termination of iterations
SELREF = T; RESFAC = 0.01
    GROUP 17. Under-relaxation devices
RELAX(P1, LINRLX,0.3)
REAL(FDT); FDT=0.5*(2.0/40)/WIN;
mesg(FDT= :FDT:
RELAX(UC1, FALSDT, FDT); RELAX(VC1, FALSDT, FDT)
RELAX(WC1, FALSDT, FDT)
    GROUP 19. Data communicated by satellite to GROUND
    * LSG3 = T, activates curvilinearity treatment;
    * LSG4 = T, activates nonorthogonality treatment.
LSG3= T; LSG4= T
    GROUP 22. Spot-value print-out
IXMON = NX1/2+1; IYMON = NY1/2+1; IZMON = NZ1/2+1