#cls
    GROUP 1. Run title and other preliminaries
TEXT(2D Football Trajectory.
TITLE 
LIBREF=766
  DISPLAY
  This input file illustrates the use of the In-Form "sphere" 
  function to simulate the effect on the motion of the air of
  a football following a prescribed parabolic trajectory.
  
  The In-Form statements are:
  
  *** The space within which the ball may move
  PATCH(PATCH1,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
 
  Note: xce,yce and zce are the x,z and z coordinates;
        ob is the object name
        They are character variables which are evaluated in the 
        In-Form statements because  they are enclosed within colons.
                                           
  char(xce,yce,zce,radius,usour,vsour,gravt)
  char(vel,times);
  gravt=9.81
  vel=14.14;times=tim
  xce=0.5+:times:*:vel:/1.414
  yce=0.5+:times:*:vel:/1.414-0.5*:gravt:*:times:^2
  zce=.05; radius=.5

   ** Definition of the In-Form Object

  (INFOB at PATCH1 is SPHERE(:xce:,:yce:,:zce:,:radius:...
  ) with INFOB_1)                                    

  *** momentum sources which make the fluid move with the ball
  usour=:vel:/1.414
  vsour=:vel:/1.414-:gravt:*:times:
  (SOURCE of U1 at PATCH1 is :usour: with INFOB_1!FIXV)
  (SOURCE of V1 at PATCH1 is :vsour: with INFOB_1!FIXV)

  *** declaration of a marker to enable the ball to be seen
  STORE(MARK);FIINIT(MARK)=0
  (STORED of MARK is 0)
  (STORED of MARK at PATCH1 is 1 with INFOB_1)

  The Q1 contains PHOTON USE commands    
  ENDDIS
 
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,20,2.,1.0)
 
    GROUP 3. X-direction grid specification
GRDPWR(X,110,22.,1.0)
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,35,7.,1.0)
 
    GROUP 5. Z-direction grid specification
GRDPWR(Z,1,0.1,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1)

    GROUP 13. Boundary conditions and special sources
  ** Ground
PATCH(WALLS,SWALL,1,NX,1,1,1,NZ,1,LSTEP)
COVAL(WALLS,U1,1.,0.0)

  ** Pressure relief
PATCH(RELIEF,CELL,1,1,1,1,1,1,1,LSTEP)
COVAL(RELIEF,P1,FIXP,0.0)
 
  *** Moving sphere - 1
PATCH(PATCH1,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
 
  Note: xce,yce and zce are the x,z and z coordinates;
        ob is the object name
        They are character variables which are evaluated in 
        the in-form statements because  they are enclosed within colons.
  INFORM13BEGIN                                           
char(xce,yce,zce,radius,usour,vsour,gravt)
char(vel,times);
gravt=9.81
vel=14.14;times=tim
xce=0.5+:times:*:vel:/1.414
yce=0.5+:times:*:vel:/1.414-0.5*:gravt:*:times:^2
zce=.05; radius=.5

(INFOB at PATCH1 is SPHERE(:xce:,:yce:,:zce:,:radius:$
) with INFOB_1)                                    

  *** Setting of U1 values into SPHERE
usour=:vel:/1.414
vsour=:vel:/1.414-:gravt:*:times:
(SOURCE of U1 at PATCH1 is :usour: with INFOB_1!FIXV)
(SOURCE of V1 at PATCH1 is :vsour: with INFOB_1!FIXV)
  INFORM13END
STORE(MARK);FIINIT(MARK)=0
  INFORM7BEGIN
(STORED of MARK is 0)
(STORED of MARK at PATCH1 is 1 with INFOB_1)
  INFORM7END
    GROUP 15. Termination of sweeps
LSWEEP=100
    GROUP 22. Spot-value print-out
NPRMON=LSWEEP;IXMON=NX/4+1;IYMON=NY/4+1;IZMON=NZ/2+1
    GROUP 23. Print-out & plot control
TSTSWP=-1;idispa=1; csg1=p
selref=t; resfac=1.e-2
NXPRIN=1;NYPRIN=1;NTPRIN=1

DISTIL=T
EX(P1)=1.102E+01; EX(U1)=2.136E+00
EX(V1)=1.302E+00; EX(MARK)=5.455E-03
  PHOTON USE
  p
  p1;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel1
  upause 2
  p
  p2;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel2
  upause 2
  p
  p3;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel3
  upause 2
  p
  p4;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel4
  upause 2
  p
  p5;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel5
  upause 2
  p
  p6;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel6
  upause 2
  p
  p7;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel7
  upause 2
  p
  p8;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel8
  upause 2
  p
  p9;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel9
  upause 2
  p
  p10;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel10
  upause 2
  p
  p11;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel11
  upause 2
  p
  p12;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel12
  upause 2
  p
  p13;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel13
  upause 2
  p
  p14;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel14
  upause 2
  p
  p15;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel15
  upause 2
  p
  p16;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel16
  upause 2
  p
  p17;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel17
  upause 2
  p
  p18;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel18
  upause 2
  p
  p19;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel19
  upause 2
  p
  p20;
 
  gr ou z 1
  ve z 1 sh
  surf mark z 0.9
  *dump vel20
  ENDUSE
STOP