PHOTON USE
   p;;;;
 
   up z;gr ou x 1;gr ou x m;gr ou y 1;gr ou y m;use patgeo
   do kk=1,10
   vec z kk sh
   enddo
   pause
   do kk=1,10
   con w1 z kk fi;0.01
   enddo
   pause;con off;view x;pause;view z
  ENDUSE

  DISPLAY
 
 
 
  A fluid enters a box through an aperture in one side near the
  bottom, and leaves through a similar aperture near the top.
 
  Flow resistances and guide vanes in the lower part of the box,
  which are intended to cause the upward flow in the box to be
  nearly uniform, are introduced via PLANT source formulae.
 
  ENDDIS
 ************************************************************
  Group 1. Run Title
 TEXT(Flow straightened by vanes & resistances
 title
 ************************************************************
  Group 2. Transience
 STEADY  =    T
 ************************************************************
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
 RSET(M,10,10,10)
    * Set overall domain extent:
    *        xulast  yvlast  zwlast    name
 XSI= 4.000E+00;YSI= 2.000E+00;ZSI= 1.000E+01;RSET(D,CHAM    )
    * Set objects: x0     y0     z0
    *              dx     dy     dz    name
 XPO= 0.000E+00;YPO= 0.000E+00;ZPO= 1.000E+00
 XSI= 0.000E+00;YSI= 1.000E+00;ZSI= 1.000E+00;RSET(B,B1      )
 XPO= 0.000E+00;YPO= 0.000E+00;ZPO= 7.500E+00
 XSI= 0.000E+00;YSI= 1.000E+00;ZSI= 2.500E+00;RSET(B,B2      )
 ************************************************************
  Group 6. Body-Fitted coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
    * Solved variables list
 SOLVE(P1  ,U1  ,V1  ,W1  )
    * Additional solver options
 SOLUTN(P1  ,Y,Y,Y,N,N,Y)
 ************************************************************
  Group 8. Terms & Devices
 NEWRH1  =    T
 NEWENL  =    T
 ISOLX   =       0 ;ISOLY  =       0 ;ISOLZ  =       0
 ************************************************************
  Group 9. Properties
ENUT=1.E-2
 ************************************************************
  Group 13. Boundary & Special Sources
 
 INLET (OBJ1    ,WEST  ,1,1,1,3,1,2,1,1)
 VALUE (OBJ1    ,P1  , 1.200E+01)
 VALUE (OBJ1    ,U1  , 1.000E+01)
 
 PATCH (OBJ2    ,WEST  ,1,1,1,3,nz,nz,1,1)
 COVAL (OBJ2    ,P1  , 1.000E+00, 0.000E+00)
 
 EGWF    =    T
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP  =       100; SELREF  =    T; RESFAC  = 0.01
 ************************************************************
  Group 16. Terminate Iterations
liter(p1)=200;liter(u1)=2;liter(v1)=2;liter(w1)=2
 ************************************************************
  Group 17. Relaxation
sarah=0.001
 ************************************************************
  Group 21. Print-out of Variables
 OUTPUT(P1  ,Y,N,Y,Y,Y,N); OUTPUT(U1  ,Y,N,Y,Y,Y,N)
 OUTPUT(V1  ,Y,N,Y,Y,Y,N); OUTPUT(W1  ,Y,N,Y,Y,Y,N)
 ************************************************************
  Group 22. Monitor Print-Out
 TSTSWP  =      -1
 ************************************************************
  Group 23.Field Print-Out & Plot Control
   No PATCHes used for this Group
 ************************************************************
  Group 24. Dumps For Restarts
LSWEEP=100
SARAH=0.01
namsat=mosg

    PLANTBEGIN
  Data and formulae transmitted via PLANT
  ***************************************
 
REAL(RES1,RES2,RES3,RES4,RES5,ANGLE,LIFTCO)
RES1=1000;RES2=0.05;RES3=0.25;RES4=0.25;RES5=0.25
 
ANGLE=0.25;LIFTCO=1.0
 
PATCH(RESIST1,VOLUME,1,NX,1,NY,3,3,1,1)
   CO=:RES1:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST1,U1,GRND,0.0)
   CO=:RES1:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST1,V1,GRND,0.0)
 
PATCH(RESIST2,VOLUME,1,NX/2,1,NY/2,1,2,1,1)
   CO=:RES2:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST2,U1,GRND,0.0)
   CO=:RES2:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST2,V1,GRND,0.0)
 
PATCH(RESIST3,VOLUME,NX/2+1,NX,1,NY/2,1,2,1,1)
   CO=:RES3:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST3,U1,GRND,0.0)
   CO=:RES3:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST3,V1,GRND,0.0)
 
PATCH(RESIST4,VOLUME,1,NX/2,NY/2+1,NY,1,2,1,1)
   CO=:RES4:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST4,U1,GRND,0.0)
   CO=:RES4:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST4,V1,GRND,0.0)
 
PATCH(RESIST5,VOLUME,NX/2+1,NX,NY/2+1,NY,1,2,1,1)
   CO=:RES5:*(U1**2+V1**2)**0.5
COVAL(RESIST5,U1,GRND,0.0)
   CO=:RES5:*(U1**2+V1**2+W1**2)**0.5
COVAL(RESIST5,V1,GRND,0.0)
 
PATCH(VANES,VOLUME,1,NX/2,1,NY/2,1,2,1,1)
   CO=:LIFTCO:*(U1**2+V1**2+W1**2)**0.5
   VAL=:ANGLE:*U1
COVAL(VANES,V1,GRND,GRND)
   CO=:LIFTCO:*(U1**2+V1**2+W1**2)**0.5
   VAL=-:ANGLE:*V1
COVAL(VANES,U1,GRND,GRND)
  PLANTEND

tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=2.372E+02; EX(U1)=9.118E-01
EX(V1)=3.488E-01; EX(W1)=1.697E+00
 LIBREF=250
STOP