PHOTON USE
  p
 
 
 
  msg         Staggered velocities vectors
  set vec ref 0.3
  gr ou z 1;vec z 1 sh
  msg Press  to continue
  pause
  vec off;red
  set vec comp UC1 VC1 -
  msg        Co-located velocities vectors
  vec z 1 sh
  msg Press e to END
  ENDUSE
    GROUP 1. Run title and other preliminaries
TEXT( CO-LOCATED VELOCITY CALCULATION:145
 
  DISPLAY
  This run analyses  the flow in a cavity,  the top  wall of  which
  moves  with a constant velocity.  The grid is  uniform  and  flow
  Reynolds  number  equals 100.  The UC1 and  VC1 scalar  variables
  have  zero-slip boundary  conditions  and PLANT  is  used  to set
  pressure gradient sources. So, these variables have the  meanings
  of  co-located cartesian velocities  which are transported in the
  convection  field  formed by  staggered  components.  CCV  option
  of PHOENICS  can be  directly  used  for  further  details  and
  comparisons.  The  example  can also  be treated as the technique
  for physically based interpolation of staggered velocities in the
  grid nodes.
  ENDDIS
 
    GROUP 3. X-direction grid specification
GRDPWR(X,10,0.1,1.0)
    GROUP 4. Y-direction grid specification
  ** Set a symmetrical grid as in GROUP 3.
GRDPWR(Y,10,0.1,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,UC1,VC1)
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-3;PRNDTL(UC1)=1.; PRNDTL(VC1)=1.
    GROUP 13. Boundary conditions and special sources
  ** South wall, at rest
PATCH(SOUTH,SWALL,1,NX,1,1,1,1,1,1)
COVAL(SOUTH,U1,1.0,0.0);COVAL(SOUTH,UC1,1.0,0.0)
  ** North wall, moving
PATCH(MOVING,NWALL,1,NX,NY,NY,1,1,1,1)
COVAL(MOVING,U1,1.0,1.0);COVAL(MOVING,UC1,1.0,1.0)
  ** West wall, at rest
PATCH(WEST,WWALL,1,1,1,NY,1,1,1,1)
COVAL(WEST,V1,1.0,0.0);COVAL(WEST,VC1,1.0,0.0)
  ** East wall, at rest
PATCH(EAST,EWALL,NX,NX,1,NY,1,1,1,1)
COVAL(EAST,V1,1.0,0.0);COVAL(EAST,VC1,1.0,0.0)
  ** Pressure relief
PATCH(RELIEF,CELL,NX/2,NX/2,NY/2,NY/2,1,1,1,1)
COVAL(RELIEF,P1,FIXP,0.0)

  PLANTBEGIN
  ** Pressure gradient sources
PATCH(DPDX1,CELL,2,NX-1,1,NY,1,1,1,1)
   VAL=AEAST*(WEST(P1)-EAST(P1))/2.
COVAL(DPDX1,UC1,FIXFLU,GRND)
PATCH(DPDX2,CELL,NX,NX,1,NY,1,1,1,1)
   VAL=AEAST*(WEST(P1)-P1)
COVAL(DPDX2,UC1,FIXFLU,GRND)
PATCH(DPDX3,CELL,1,1,1,NY,1,1,1,1)
   VAL=AEAST*(P1-EAST(P1))
COVAL(DPDX3,UC1,FIXFLU,GRND)
 
PATCH(DPDY1,CELL,1,NX,2,NY-1,1,1,1,1)
   VAL=ANORTH*(SOUTH(P1)-NORTH(P1))/2.
COVAL(DPDY1,VC1,FIXFLU,GRND)
PATCH(DPDY2,CELL,1,NX,NY,NY,1,1,1,1)
   VAL=ANORTH*(SOUTH(P1)-P1)
COVAL(DPDY2,VC1,FIXFLU,GRND)
PATCH(DPDY3,CELL,1,NX,1,1,1,1,1,1)
   VAL=ANORTH*(P1-NORTH(P1))
COVAL(DPDY3,VC1,FIXFLU,GRND)
  PLANTEND

    GROUP 14. Downstream pressure for PARAB=.TRUE.
    GROUP 15. Termination of sweeps
LSWEEP=50
RESREF(P1)=1.E-8;RESREF(U1)=1.E-6;RESREF(V1)=1.E-6
RESREF(VC1)=1.E-6;RESREF(UC1)=1.E-6
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,1.);RELAX(V1,FALSDT,1.)
RELAX(UC1,FALSDT,1.);RELAX(VC1,FALSDT,1.)
    GROUP 18. Limits on variables or increments to them
    GROUP 19. Data communicated by satellite to GROUND
NAMSAT=MOSG
    GROUP 20. Preliminary print-out
    GROUP 21. Print-out of variables
    GROUP 22. Spot-value print-out
IXMON=NX/2;IYMON=NY-1
    GROUP 23. Field print-out and plot control

tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=2.713E-02; EX(U1)=1.279E-01; EX(V1)=1.062E-01
EX(VC1)=9.647E-02; EX(UC1)=1.176E-01
 LIBREF=145
STOP