DISPLAY
 
  This case illustrates the use of In-Form for creating
  flow resistances and guide vanes in the lower part of the box.
 
  A air 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 In-Form source formulae.
 
  Their disposition was chosen directly in a zone where the flow
  changes direction.
 
  There are two resistances with different factors. First is
  located directly before the input. It is intended for prevention
  the distribution of a inlet flow inside of the box
  in a horizontal direction.

  Second in the small area above the input. It is intended
  for zeroizing of a horizontal velocity component.
 
  The guide vanes are located also in the area before the input
  and is intended for smooth turn of a inlet flow.
 
  Interesting changes include: changes to the inlet velocity
  and use resistances and vanes in different combinations.
 
  The Q1 contains PHOTON USE commands.
 
  ENDDIS
  PHOTON USE
   p;;;;
 
   up z;vi y;gr ou y 1;use patgeo
   msg                     Velocity vectors
   vec y 1 sh
   pause
   con p1 y 1 fi;.00001
   red
   msg                     pressure contours
  ENDUSE
 ************************************************************
  Group 1. Run Title
 TEXT(Flow straightened by vanes & resistances
 ************************************************************
    GROUP 3. X-direction grid specification
GRDPWR(X,20,4.,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,50,10.,1.0)
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
SOLVE(P1, U1, W1)
STORE(VABS)
 ************************************************************
  Group 9. Properties
ENUT=1.E-2
 ************************************************************
  Group 13. Boundary & Special Sources

REAL(UIN); UIN=10  ! Inlet velocity
mesg(Inlet velocity is :UIN: OK? If not, insert other value
readvdu(uin,real,uin)
 
INLET(INLET, WEST, 1, 1, 1, NY, 1, 10, 1, 1)
VALUE(INLET, P1, RHO1*UIN)
VALUE(INLET, U1, UIN)

PATCH(OUTLET, WEST, 1, 1, 1, NY, 45, NZ, 1, 1)
COVAL(OUTLET, P1, 1.000E+00, 0.000E+00)

  INFORM13BEGIN

REAL(RES1, RES2)
RES1=0.25; RES2=1000
 
mesg(Do you want to use the resistance before the input? (y/n)
readvdu(ans,char,y)
if(:ans:.eq.y) then
 PATCH(RESIST1,VOLUME,1,NX,1,NY,1,10,1,1)
 (SOURCE of U1 at RESIST1 is -RES1*VABS*U1 with LINE)
endif
 
mesg(Do you want to use the resistance above the input? (y/n)
readvdu(ans,char,y)
if(:ans:.eq.y) then
 PATCH(RESIST2,VOLUME,1,NX,1,NY,11,11,1,1)
 (SOURCE of U1 at RESIST2 is -RES2*VABS*U1 with LINE) 
endif

REAL(ANGLE, LIFTCO)
ANGLE=0.25; LIFTCO=1.0

mesg(Do you want to use the vanes before the input? (y/n)
readvdu(ans,char,y)
if(:ans:.eq.y) then
 PATCH(VANES,VOLUME,1,NX,1,NY,1,10,1,1)
 (SOURCE of U1 at VANES is LIFTCO*VABS*(-ANGLE*W1-U1) with LINE)
 (SOURCE of W1 at VANES is LIFTCO*VABS*(ANGLE*U1-W1) with LINE)
endif

  INFORM13END

 ************************************************************
  Group 15. Terminate Sweeps
LSWEEP = 200
 ************************************************************
  Group 17. Relaxation
lsg57=t
 ************************************************************
  Group 20. Preliminary Printout
DISTIL=T
EX(P1)=1.792E+02; EX(U1)=1.712E+00
EX(W1)=4.326E+00; EX(VABS)=5.250E+00
 ************************************************************
  Group 22. Monitor Print-Out
TSTSWP = -1; IXMON=NX/2; IZMON=NZ-1
 LIBREF=753
STOP