PHOTON USE
  p
 
 
 
 
  use patgeo
  msg Geometry
  vec x 1 sh
  MSG Velocity vectors
  msg
  msg Press return to plot pressure contours
  pause
  cont p1 x 1 fil;.001
  msg
  msg Press return to plot streamlines
  pause
  clear
  stream sh
  x 1
 
  y
  posit
  3
   0.51268E+02 0.20453E+04 CR
   0.38451E+02 0.19150E+04 CR
   0.44859E+02 0.17847E+04 CR
   0.76901E+02 0.16740E+04 CR
   0.57676E+02 0.15502E+04 CR
   0.57676E+02 0.14200E+04 CR
   0.51268E+02 0.13548E+04 CR
   0.11792E+04 0.12571E+04  t
  exit
  use patgeo
  msg
  msg Type e to End
  ENDUSE
 
    GROUP 1. Run title
TEXT(FLOW THROUGH A BALL VALVE :        B534
TITLE
  DISPLAY
    The incompressible, single-phase flow of water through a
  fully-open axi-symmetric ball valve is solved. The pipe-work
  considered is 2 m in length; the radius at inlet is 0.15 m; it
  diminishes to a minimum of 0.09 m in front of the ball; and the
  maximum radius is 0.16 m.
    A plug profile of axial velocity is prescribed at the inlet,
  and a fixed-pressure condition is employed at outlet. Wall
  friction is activated along the boundary of the ball, and along
  the pipe wall. A fixed turbulent kinematic viscosity is set to
  100 times the laminar value (the Reynolds number is of order
  1.0E5).
  ENDDIS
 
    GROUP 4. Y-direction grid specification
NY=12
    GROUP 5. Z-direction grid specification
NZ=30
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T;NONORT=T; READCO(GRID4)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
    GROUP 8. Terms (in differential equations) & devices
   ** Activate the pure upwind formulation of the finite-domain
      equations
DIFCUT=0.0
    GROUP 9. Properties of the medium (or media)
RHO1=1.0E3;ENUL=1.0E-6;ENUT=100.0*ENUL
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=2.0
   **The cell row which passes through the ball is blocked out.
CONPOR(0.0,CELL,1,1,1,1,11,27)
    GROUP 13. Boundary conditions and special sources
   ** Inlet
INLET(INLET,LOW,1,1,1,NY,1,1,1,1)
VALUE(INLET,P1,2.0*RHO1);VALUE(INLET,W1,2.0)
   ** Outlet
PATCH(OUTLET,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(OUTLET,P1,1000.,0);COVAL(OUTLET,W1,ONLYMS,2.0)
   ** North wall
WALL (WFUN,NORTH,1,NX,NY,NY,1,NZ,1,1)
   ** Valve Wall
WALL (VALVEWLL,NORTH,1,1,1,1,11,27,1,1)
    GROUP 15. Termination of sweeps
LSWEEP=200
    GROUP 17. Under-relaxation devices
REAL(DTF);DTF=(ZWLAST/NZ)/10.0
RELAX(V1,FALSDT,DTF)
RELAX(W1,FALSDT,DTF)
RELAX(P1,LINRLX,0.2)
    GROUP 22. Spot-value print-out
IYMON=2;IZMON=20
    GROUP 23. Field print-out and plot control
NYPRIN=2;NZPRIN=NZ/6;NPLT=2;TSTSWP=-1
PATCH(DOMAIN,CONTUR,1,1,1,NY,1,NZ,1,1);PLOT(DOMAIN,P1,0.,15.0)
PATCH(INNER,PROFIL,1,1,2,2,1,NZ,1,1);PLOT(INNER,W1,0.0,0.0)
PATCH(OUTER,PROFIL,1,1,NY,NY,1,NZ,1,1);PLOT(OUTER,W1,0.0,0.0)
PATCH(FRONT,PROFIL,1,1,2,NY,10,10,1,1);PLOT(FRONT,W1,0.0,0.0)
PLOT(FRONT,V1,0.0,0.0);PLOT(FRONT,P1,0.0,0.0)
PATCH(BACK,PROFIL,1,1,2,NY,28,28,1,1);PLOT(BACK,W1,0.0,0.0)
PLOT(BACK,V1,0.0,0.0);PLOT(BACK,P1,0.0,0.0)