#cls
TEXT(3D football trajectory: 767
TITLE 
LIBREF=767
  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.
  
  It uses the In-Form functions:
      INFOB, STORED, SOURCE and SPHERE.

  The Q1 contains PHOTON USE commands
  ENDDIS
    GROUP 1. Run title and other preliminaries
TEXT(3D football trajectory: 767
 
  GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,20,2.,1.0)
 
    GROUP 3. X-direction grid specification
GRDPWR(X,35,7.,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,5,2.5,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,110,22.,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1)

    GROUP 13. Boundary conditions and special sources
  
PATCH(EAST,EAST,NX,NX,1,NY,1,NZ,1,LSTEP)
COVAL(EAST,P1,FIXP,0.0)

PATCH(HIGH,HIGH,1,NX,1,NY,NZ,NZ,1,LSTEP)
COVAL(HIGH,P1,FIXP,0.0)

PATCH(LOW,LOW,1,NZ,1,NY,1,1,1,LSTEP)
COVAL(LOW,P1,FIXP,0.0)

PATCH(NORTH,NORTH,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(NORTH,P1,FIXP,0.0)

  ** Ground
PATCH(WALLW,WWALL,1,1,1,NY,1,NZ,1,LSTEP)
COVAL(WALLW,W1,1.,0.0)

  INFORM13BEGIN                                           
  *** 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;
        They are character variables which are evaluated in 
        the in-form statements because they are enclosed within colons.
                                           
char(xce,yce,zce,radius,usour,wsour,gravt,vel,times)
gravt=9.81;vel=14.14;times=tim
xce=0.5+:times:*:vel:/1.414-0.5*:gravt:*:times:^2
yce=0.
zce=0.5+:times:*:vel:/1.414
radius=.5

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

  *** Setting of U1, V1 and W1 values into SPHERE
usour=:vel:/1.414-:gravt:*:times:
wsour=:vel:/1.414
(SOURCE of U1 at PATCH1 is :usour: with INFOB_1!FIXV)
(SOURCE of V1 at PATCH1 is 0. with INFOB_1!FIXV)
(SOURCE of W1 at PATCH1 is :wsour: with INFOB_1!FIXV)
  INFORM13END

  INFORM7BEGIN
STORE(MARK);FIINIT(MARK)=0
(STORED of MARK is 0)
(STORED of MARK at PATCH1 is 1 with INFOB_1)
  INFORM7END

    GROUP 15. Termination of sweeps
LSWEEP=30
LITER(P1)=10;LITER(U1)=2;LITER(V1)=2;LITER(W1)=2
    GROUP 22. Spot-value print-out
NPRMON=LSWEEP;IXMON=NX/4+1;IZMON=NZ/4+1
    GROUP 23. Print-out & plot control
TSTSWP=-1;idispa=1;csg1=p
selref=F;resfac=1.e-2
DISTIL=T  
EX(P1)=4.463E-01; EX(U1)=1.829E-01; EX(V1)=1.241E-01
EX(W1)=2.778E-01; EX(MARK)=7.792E-04
  PHOTON USE
  p
  p1;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99; surf mark y 0.99
  dump vel1
  pause
  p
  p2;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel2
  pause
  p
  p3;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel3
  pause
  p
  p4;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel4
  pause
  p
  p5;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel5
  pause
  p
  p6;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel6
  pause
  p
  p7;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel7
  pause
  p
  p8;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel8
  pause
  p
  p9;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel9
  pause
  p
  p10;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel10
  pause
  p
  p11;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel11
  pause
  p
  p12;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel12
  pause
  p
  p13;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel13
  pause
  p
  p14;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel14
  pause
  p
  p15;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel15
  pause
  p
  p16;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel16 
  pause
  p
  p17;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel17
  pause
  p
  p18;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel18
  pause
  p
  p19;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel19
  pause
  p
  p20;
 
  up x;gr ou x 1;gr ou y 1;gr ou z 1
  ve y 1 sh
  surf mark x 0.99;surf mark y 0.99
  dump vel20
  ENDUSE
STOP