TEXT(Pot. Flow; Inclined Plate    
TITLE
  DISPLAY
  
  A plate is held centrally in a square box through the wall of 
  which flows an inviscid fluid.
  
  The velocity potential at the walls accords with the formula:
  
      POT = aa * x   +   bb * y
  where aa = -1 and bb = -1    
     (which can of course be changed by editing the Q1 file)
   
  The task is to compute the flow field within the box.
   
  In-Form is used in order to specify the boundary condition.  
   
  The plate is represented by setting area porosity to zero. 
  
  The Q1 uses SOURCE In-Form statement.

   The Q1 contains PHOTON USE commands
  ENDDIS
  PHOTON USE
  p
  phi
 

  msg         Potential flow past an inclined plate
  msg
  set ref vec 5
  msg   Velocity vectors:
  gr ou z 1;vec z 1 sh
  msg
  msg Press  to continue
  pause
  vec off;red
  msg        west to east velocity contours:
  con u1 z 1 fi;.01
  msg
  msg Press  to continue
  pause
  msg        south to north velocity contours:
  con v1 z 1 fi;.01
  msg
  msg Press  to continue
  pause
  con off;red
  msg        Streamlines and contours of velocity potential:
  con pot z 1 sh; int 20
  stre 2d z 1 sh; int 20
  msg Press e to END
  enduse
    GROUP 1. Run title and other preliminaries
TEXT(Pot. Flow; Inclined Plate    
TITLE
   GROUPs 3, 4 and 5: grid specification
nx=40; ny=40; nz=1
xulast=1.0; yvlast=1.0; zwlast=1.0
#unigrid    
 
    GROUP 7. Variables stored, solved & named
STORE(POT,EPOR,U1,V1); SOLUTN(POT,Y,Y,Y,N,N,N)
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(EPOR)=1.0
   **Plate
PATCH(PLATE,INIVAL,NX/2,NX/2,NY/4+1,3*NY/4,1,1,1,1)
INIT(PLATE,EPOR,FIXVAL,0.0)
 
    GROUP 13. Boundary conditions and special sources
PATCH(NORTH,NORTH,2, NX-1,NY,NY,1,1,1,1)
PATCH(SOUTH,SOUTH,2, NX-1,1 ,1 ,1,1,1,1)
PATCH(EAST ,EAST ,NX,NX,  1 ,NY,1,1,1,1)
PATCH(WEST ,WEST ,1 , 1,  1 ,NY,1,1,1,1)
  INFORM13BEGIN
REAL(AA,BB)
AA=-1; BB=-1
(source of POT at north is aa*xg + bb*yg with fixval)
(source of POT at south is aa*xg + bb*yg with fixval)
(source of POT at east  is aa*xg + bb*yg with fixval)
(source of POT at west  is aa*xg + bb*yg with fixval)
  INFORM13END

    GROUP 15. Termination of sweeps
LSWEEP = 2
    GROUP 16. Termination of iterations
LITER(POT)=-1000
    GROUP 19. Data communicated by satellite to GROUND
POTVEL=T
    GROUP 21. Print-out of variables
OUTPUT(EPOR,N,N,N,N,N,N)
    GROUP 22. Spot-value print-out
UWATCH=T
    GROUP 23. Field print-out and plot control
PATCH(CONT,CONTUR,1,NX,1,NY,1,1,1,1);PLOT(CONT,POT,0.0,20.0)
DISTIL=T
EX(U1)=8.072E-01; EX(V1)=1.005E+00; EX(POT)=1.000E+00; EX(EPOR)=9.875E-01