PHOTON USE
  p
  phi
 
 
 
 
 
  use patgeo
  msg Geometry
  msg Return to continue
  pause
  msg Velocity Vectors
  msg Return to continue
  VECTOR X 1 Z 1 12 Y 1 5 SH DASH 0
  VECTOR X 5 Z 1 12 Y 1 5 SH DASH 0
  VECTOR Y 1 X 1 5 Z 1 12 SH DASH 0
  VECTOR Y 5 X 1 5 Z 1 12 SH DASH 0
  VECTOR Z 1 X 1 5 Y 1 5 SH DASH 0
  VECTOR Z 12 X 1 5 Y 1 5 SH DASH 0
  pause
  msg Pressure(P1) Contours
  msg Return to continue
  CONTOUR P1 X 1 Z 1 12 Y 1 5 FILL; 2.00E-03
  CONTOUR P1 X 5 Z 1 12 Y 1 5 FILL; 2.00E-03
  CONTOUR P1 Y 1 X 1 5 Z 1 12 FILL; 2.00E-03
  CONTOUR P1 Y 5 X 1 5 Z 1 12 FILL; 2.00E-03
  CONTOUR P1 Z 1 X 1 5 Y 1 5 FILL; 2.00E-03
  CONTOUR P1 Z 12 X 1 5 Y 1 5 FILL; 2.00E-03
  msg  Press e to END
  ENDUSE
           GROUP 1. Run title
TEXT(MIZUKI radial flow impeller:        B524
TITLE
  DISPLAY
    The geometry is that of the B-type impeller tested by Mizuki
  et al. (1974), and the calculation is as described in CHAM TR122
  (1985) and is for design flow. The solution domain represents the
  passage between two blades and a 'vaneless space' beyond the outer
  radius of the impeller, which is represented by applying cyclic
  boundary conditions on the East and West surfaces at IZ=11 and 12.
  The grid given in file GRID1 was generated by linear
  interpolation from boundary values using a conical coordinate
  system, and is non-orthogonal.
    A call to GXBFC from GREX is used to set the inlet boundary
  conditions by calculating the relative velocity at inlet and
  finding its resolutes on the grid directions. It also sets the
  source terms throughout the domain needed to represent the
  centrifugal and Coriolis accelerations, calculated in GREX by a
  call to subroutine GXROTA.
  ENDDIS
REAL(RTIP,FLCO,VRM,RPM,UTIP,WTIP,WIN,PI,RHUB,RSHRO,HDY)
PI=3.14159
    GROUP 3. X-direction grid specification
NX=5
    GROUP 4. Y-direction grid specification
NY=5
    GROUP 5. Z-direction grid specification
NZ=12
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T;NONORT=T; READCO(GRID1)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
ISOLX=1;ISOLY=1;ISOLZ=1
    GROUP 9. Properties of the medium (or media)
RHO1=1.24;ENUL=1.8E-5/1.24;ENUT=.0128*.1/1.24
    Pass incoming density to GXBFC through BFCA
BFCA=RHO1
    GROUP 11. Initialization of variable or porosity fields
   ** Flow Coefficient: ratio of radial velocity at rotor exit
    to tip speed.
FLCO=.4
   ** Ratio of inlet area to outlet area
VRM=1.
   ** Rotational speed RPM....
RPM= 6000.; RTIP=.135;ANGVEL=RPM*PI/30.;UTIP=ANGVEL*RTIP
WTIP=UTIP*FLCO;WIN= WTIP/VRM
FIINIT(W1)=WIN
   ** Radii of hub and shroud at inlet...
RHUB=0.0405; RSHRO=0.0785;HDY=(RSHRO-RHUB)/(2*NY)
    GROUP 13. Boundary conditions and special sources
   ** The inlet flow is dealt with by means of NY concentric
      rings in each of which the azimuthal velocity relative to
      the rotating coordinate frame is ANGVEL times the radius of
      the centre of the ring...
 
DO II=1,NY
+ PATCH(BFC:II:,LOW,1,NX,NY-II+1,NY-II+1,1,1,1,1)
+ COVAL(BFC:II:,P1,FIXFLU,RHO1*WIN)
+ COVAL(BFC:II:,U1,ONLYMS,GRND1)
+ COVAL(BFC:II:,V1,ONLYMS,GRND1)
+ COVAL(BFC:II:,W1,ONLYMS,GRND1)
+ COVAL(BFC:II:,UCRT,0.0,0.0)
+ COVAL(BFC:II:,VCRT,0.0,-ANGVEL*(RHUB+(II*2-1)*HDY))
+ COVAL(BFC:II:,WCRT,0.0,WIN)
ENDDO
 
   ** Uniform pressure boundary at outer circumference of domain
PATCH(OUTLET,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUTLET,P1,1.E2,0.);COVAL(OUTLET,U1,ONLYMS,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0)
 
   ** Whole-domain patch for Rotational sources. Patch name ROTA
      is the signal for GREX3 to call subroutine GXROTA. The
      following 6 parameters specify the cartesian coordinates
      of two points on the axis of rotation...
ROTAXA=0.0; ROTAYA=0.0; ROTAZA=0.0
ROTAXB=0.0; ROTAYB=0.0; ROTAZB=-1.0
IROTAA=0
PATCH(ROTA,PHASEM,1,NX,1,NY,1,NZ,1,1)
COVAL(ROTA,V1,FIXFLU,GRND1)
COVAL(ROTA,U1,FIXFLU,GRND1)
COVAL(ROTA,W1,FIXFLU,GRND1)
WALL (WFUN1,SOUTH,1,NX,1,1,1,NZ,1,1)
COVAL(WFUN1,U1,LOGLAW,-.8*UTIP)
COVAL(WFUN1,W1,LOGLAW,0.)
WALL (WFUN2,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(WFUN2,U1,LOGLAW,0.)
COVAL(WFUN2,W1,LOGLAW,0.)
WALL (WFUN3,WEST,1,1,1,NY,1,NZ-2,1,1)
COVAL(WFUN3,V1,LOGLAW,0.)
COVAL(WFUN3,W1,LOGLAW,0.)
WALL (WFUN4,EAST,NX,NX,1,NY,1,NZ-2,1,1)
COVAL(WFUN4,V1,LOGLAW,0.)
COVAL(WFUN4,W1,LOGLAW,0.)
 
   ** Cyclic boundary beyond impeller tip
XCYIZ(NZ-1,NZ,T)
    GROUP 15. Termination of sweeps
LSWEEP=200;SELREF=T; RESFAC=0.1
LITER(P1)=10;LITER(U1)=1;LITER(V1)=1;LITER(W1)=1
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,.4)
RELAX(U1,FALSDT,.5E-3);RELAX(V1,FALSDT,.5E-3);RELAX(W1,FALSDT,.5E-3)
    GROUP 21. Print-out of variables
OUTPUT(P1,Y,Y,Y,Y,Y,Y)
    GROUP 22. Spot-value print-out
IXMON=NX/2;IYMON=NY/2;IZMON=NZ/2;TSTSWP=-1
    GROUP 23. Field print-out and plot control
NPRINT=LSWEEP;NPLT=1;NXPRIN=2;NYPRIN=2;NZPRIN=2
PATCH(SUCTION,CONTUR,NX,NX,1,NY,1,NZ,1,1)
PLOT(SUCTION,P1,0.0,20.0)
PATCH(PRESSURE,CONTUR,1,1,1,NY,1,NZ,1,1)
PLOT(PRESSURE,P1,0.0,20.0)
PATCH(MIDWAY,CONTUR,1,NX,NY/2,NY/2,1,NZ,1,1)
PLOT(MIDWAY,P1,0.0,20.0)