PHOTON USE
  p;;;;;
 
  msg potential contours and velocity vectors
  con pot x 1 fi;0.05;  con pot y 1 fi;0.05
  set ref vec 40.0; vec x 1; vec y 1 ;pause
  msg pressure contours
  con p1 x 1 fi;0.05;  con p1 y 1 fi;0.05
  msg Press e to END
  ENDUSE
 
 
    GROUP 1. Run title and other preliminaries
TEXT(Potential Flow Around A Moving Van
TITLE
#cls
  DISPLAY
  This is a more economical version of the calculation performed
  by the "darcy-flow" technique in case 275. Only the potential-
  flow equation is solved. The imposed potential difference is
  chosen so that the velocities are approximately the same as before
  The Q1 contains PHOTON USE commands. Put use q1 in the u file in
  order to activate them.
  ENDDIS
#pause
   GROUP 3. X-direction grid specification
NX=8;XFRAC(1)=0.5;XFRAC(2)=1.0;XFRAC(3)=1.5;XFRAC(4)=2.1
XFRAC(5)=2.8;XFRAC(6)=3.5;XFRAC(7)=4.2;XFRAC(8)=5.
 
    GROUP 4. Y-direction grid specification
NY=12;YFRAC(1)=-6.0;YFRAC(2)=0.5;YFRAC(3)=5.0
YFRAC(4)=1.0;YFRAC(5)=1.0;YFRAC(6)=2.0
 
    GROUP 5. Z-direction grid specification
GRDPWR(Z,20,20.0,1.0)
 
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
SOLVE(POT);STORE(P1,U1,V1,W1)
  ** Select whole-field solution procedure for potential,
SOLUTN(POT,Y,Y,Y,N,N,Y)
    GROUP 8. Terms (in differential equations) & devices
TERMS(POT,N,N,Y,P,P,P)
    GROUP 9. Properties of the medium (or media)
    GROUP 10. Inter-phase-transfer processes and properties
    GROUP 11. Initialization of variable or porosity fields
   ** Vehicle body
CONPOR(0.0,VOLUME,1,3,2,3,6,10)
CONPOR(0.0,VOLUME,1,3,4,6,7,10)
   ** Front wheel
CONPOR(0.0,VOLUME,3,3,1,1,6,6)
   ** Rear wheel
CONPOR(0.0,VOLUME,3,3,1,1,10,10)
   ** Potential field
PATCH(INITIAL,LINVLZ,1,NX,1,NY,1,NZ,1,1)
INIT(INITIAL,POT,-14.0,280.0)
    GROUP 13. Boundary conditions and special sources
   ** Upstream boundary
PATCH(UPSTRM,LOW,1,NX,1,NY,1,1,1,1)
COVAL(UPSTRM,POT,FIXVAL,280.0)
   ** Downstream boundary
PATCH(DWNSTRM,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(DWNSTRM,POT,FIXVAL,0.0)
    GROUP 14. Downstream pressure for PARAB=.TRUE.
    GROUP 15. Termination of sweeps
LSWEEP=3
    GROUP 16. Termination of iterations
LITER(POT)=-100
    GROUP 17. Under-relaxation devices
    GROUP 18. Limits on variables or increments to them
    GROUP 19. Data communicated by satellite to GROUND
POTVEL=T
    GROUP 20. Preliminary print-out
    GROUP 21. Print-out of variables
YZPR=T
    GROUP 22. Spot-value print-out
IXMON=5;IYMON=5;IZMON=5;UWATCH=T
    GROUP 22. Spot-value print-out
OUTPUT(VPOR,N,N,N,N,N,N)
OUTPUT(POT,Y,N,N,N,N,N);OUTPUT(U1,Y,N,N,N,N,N)
OUTPUT(V1,Y,N,N,N,N,N);OUTPUT(W1,Y,N,N,N,N,N)
    GROUP 23. Field print-out and plot control
NXPRIN=NX/2;IZPRF=4;IZPRL=13
 PATCH(PROFILE,PROFIL,NX-1,NX-1,NY/2,NY/2,1,NZ,1,1)
PLOT(PROFILE,W1,0.0,0.0);PLOT(PROFILE,POT,0.0,0.0)
PLOT(PROFILE,U1,0.0,0.0);PLOT(PROFILE,V1,0.0,0.0)
 PATCH(XEQ1,CONTUR,1,1,1,NY,1,NZ,1,1);PLOT(XEQ1,POT,0.0,20.0)
PLOT(XEQ1,U1,0.0,20.0);PLOT(XEQ1,V1,0.0,20.0)
PLOT(XEQ1,W1,0.0,20.0)
 PATCH(XEQ5,CONTUR,1,1,1,NY,1,NZ,1,1);PLOT(XEQ5,POT,0.0,20.0)
PLOT(XEQ5,W1,0.0,20.0)
 PATCH(WAKE,CONTUR,1,NX,1,NY,NZ-5,NZ-5,1,1)
PLOT(WAKE,W1,0.0,20.0)
    GROUP 24. Dumps for restarts