TALK=T;RUN(1,1) gen722

  PHOTON USE
  p
 
 
 
  con den1 z 1 fil;0.1
  use patgeo
  use genuse
  rot ang 30
  pause
  ENDUSE
 
TEXT(Oblique impingement of box on water: G722
TITLE
REAL(INIVEL)
INIVEL=8.
   * Air density passed to GROUND for density calculation
  ************************************************************
  Group 2. Transience
STEADY=F
TFRAC(1)=-1000
TFRAC(2)=0.025
LSTEP=100
 ************************************************************
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
 RSET(M,45,35,1)
    * Set overall domain extent:
    *        xulast  yvlast  zwlast    name
 XSI= 2.000E+02;YSI= 1.400E+02;ZSI= 1.000E+00;RSET(D,CHAM    )
    * Set objects: x0     y0     z0
    *              dx     dy     dz    name
 XPO= 8.500E+01;YPO= 4.880E+01;ZPO= 0.000E+00
 XSI= 0.000E+00;YSI= 4.000E+00;ZSI= 1.000E+00;RSET(B,B4      )
 XPO= 4.000E+01;YPO= 4.000E+01;ZPO= 0.000E+00
 XSI= 4.500E+01;YSI= 1.590E+01;ZSI= 1.000E+00;RSET(B,B5      )
 XPO= 4.000E+01;YPO= 4.560E+01;ZPO= 0.000E+00
 XSI= 0.000E+00;YSI= 5.600E+00;ZSI= 1.000E+00;RSET(B,B6      )
 XPO= 4.000E+01;YPO= 5.350E+01;ZPO= 0.000E+00
 XSI= 0.000E+00;YSI= 2.400E+00;ZSI= 1.000E+00;RSET(B,B7      )
    * Modify default grid
 RSET(X,1,-10,1.500E+00)
 RSET(X,2,-20,1.100E+00)
 RSET(X,3,15,1.500E+00)
 RSET(Y,1,10,-1.400E+00)
 RSET(Y,2,3,1.000E+00)
 RSET(Y,3,2,1.000E+00)
 RSET(Y,4,2,1.000E+00)
 RSET(Y,5,1,1.000E+00)
 RSET(Y,7,2,1.000E+00)
 RSET(Y,8,14,1.500E+00)
 ************************************************************
  Group 6. Body-Fitted coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
SOLVE(P1  ,U1  ,V1)
    * Stored variables list
STORE(DEN1,C1)
    * Additional solver options
SOLUTN(P1  ,Y,Y,Y,N,N,N)
SOLUTN(U1  ,Y,Y,N,N,N,N)
SOLUTN(V1  ,Y,Y,N,N,N,N)
  ************************************************************
  Group 8. Terms & Devices
GALA    =    T
  ************************************************************
  Group 9. Properties
  
  !! The following settings in the q1 and in gentra.htm have been 
     replaced by the the in-form (property....) statement below
     in the q1....
    * RHO2 water density passed to GROUND for density calculation
      RHO1    = GRND
      RG(1)   = 1.189
      RHO2=998.2
     in gentra.htm...
          IF(LG(30).AND.ISTEP.GT.1) CALL FN2(DEN1,C1,RG(1),RHO2-RG(1))
            ! lg(30) relates only to library case g722
            ! it sets the density = rg(1)     i.e. density of air
            ! + c1*(rho2 - rg(1)) i.e. vol fraction of liquid * 
            !                                  density difference
            ! In-Form can now handle this more directly
  inform9begin
(property rho1 is 1.189 + c1*(998.2 - 1.189))  
  inform9end
  
ENUL    = 1.E-5


 ************************************************************
  Group 11.Initialise Var/Porosity Fields
FIINIT(P1)=0.0;FIINIT(U1)=8.;FIINIT(V1)=0.
FIINIT(DEN1)=1.189
fiinit(c1)=0.0
  
  !! The following settings in the q1 and in gentra.htm have been 
     replaced by the the in-form (initial....) statement below
     Further simplifications could be effected by re-coding 
     trkden.htm; for, strictly speaking, there is no need to make
     use of variable c1 as a marker at all.
  * in q1....
  patch(start,inival,1,nx,1,ny,1,nz,1,1)
  coval(start,DEN1,0.0,grnd)
  *  in gentra.htm ...
       IF((XG + 1.63177*YG).LT.XULAST*RG(6)) F(L0VAL+I)= RHO2

  inform11begin
(initial of den1 is 998.2 with if((XG+1.63177*YG).LT.:XULAST:*$
0.58))
(initial of c1 is 1.0 with if((XG+1.63177*YG).LT.:XULAST:*$
0.58))
  inform11end
  
INIADD=F
  ************************************************************
  Group 13. Boundary & Special Sources
    *** Lower side of the module
    * Friction
wall(acclow,north,#2,#2,#1,#1,1,nz,1,lstep)
 
   *** Right side of the module
wall(sidr1,east,#1,#1,#3,#4,1,nz,1,lstep)
 
wall(sidr2,east,#1,#1,#7,#7,1,nz,1,lstep)
 
   *** Left side of the module
 
wall(sidl1,east,#2,#2,#2,#2,1,nz,1,lstep)
 
wall(sidl2,east,#2,#2,#4,#5,1,nz,1,lstep)
 
   *** Top side of the module
wall(acctop,north ,#2,#2,#7,#7,1,nz,1,lstep)
 
   ** Inflow at the bottom
PATCH(gxinlt,west,1,1,1,ny,1,nz,1,LSTEP)
COVAL(gxinlt,P1,FIxval,0.0)
coval(gxinlt,u1,fixval,8.)
coval(gxinlt,v1,fixval,0.0)
 
patch(exit,east,nx-1,nx,1,ny,1,nz,1,lstep)
  coval(exit,p1,fixval,0.0)
coval(exit,u1,fixval,8.)
    ** Exit - left
    ### Try to match external pressure to rho.g.h
        Pext = 1.189 * 9.81 * y * cos(angle)
  do jj = 1,ny
  PATCH (EXIT1:jj:,east ,nx,nx,jj,jj,1,nz,1,lstep)
  coval (exit1:jj:, p1, 1, 8.36*1.189*yvlast*(1-yfrac(jj)))
  enddo
  
  inform13begin
(source of p1 at exit is coval(1,8.36*1.189*yg))  
  inform13end
   ### as the domain is sliding into the water exactly along the
       y axis, assume no flow through N & S faces
 
  *Gravity
PATCH(buoy,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(buoy,v1,FIXFLU,grnd1)
COVAL(buoy,u1,FIXFLU,grnd1)
 
   *** x-comp (buoya) = 9.81*sin(impact angle)
   *** y-comp (buoyb) = 9.81*cos(impact angle)
BUOYA=-5.1257
BUOYB=-8.3644
EGWF =  T
  ***********************************************************
  Group 15. Terminate Sweeps
LSWEEP  =  5
SELREF  =    T
RESFAC  = 1.000E-03
  ************************************************************
  Group 16. Terminate Iterations
+  liter(u1)=2
+  liter(v1)=2
 
  ************************************************************
  Group 17. Relaxation
relax(u1,falsdt,0.1);  relax(v1,falsdt,0.1)
  ************************************************************
  Group 19. EARTH Calls To GROUND Station
LG(30)=T
IG(30)=1
RG(6)=0.58
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
  ************************************************************
  Group 20. Preliminary Printout
ECHO    =    T
  ************************************************************
  Group 21. Print-out of Variables
  ************************************************************
  Group 22. Monitor Print-Out
IXMON   =   25 ;IYMON  =  20 ;IZMON  =  1
TSTSWP=-1
  ************************************************************
  Group 23.Field Print-Out & Plot Control
NTPRIN  =    20 ;ISTPRF =       1 ;ISTPRL =   10000
ITABL   =       1
OUTPUT(NPOR,N,N,N,N,N,N)
OUTPUT(EPOR,N,N,N,N,N,N)
OUTPUT(DEN1,Y,Y,Y,Y,Y,Y)
IXMON=20;IYMON=20
idispa=1; csg1=a
  **********************************************************
#GENTRA
GTSTRT=0.0; GTEND=0.0;GFLENG=0.5
  *-------------------------------------------------------
  * GENTRA GROUP 1: Particle physics
  *-------------------------------------------------------
  * Particle type - 10
GPTYPE=10
  * Gravity components/buoyancy
GGRAX=0;GGRAY=0;GGRAZ=0;GBUOYA=F
  * Stochastic model of turbulence
GSTOCH=F
  *-------------------------------------------------------
  * GENTRA GROUP 2: Boundary conditions for particles
  *-------------------------------------------------------
  * Inlet-data file-name
GINFIL=Q1
   -----------------------------------
   * X         Y         Z
     1.000E-04 7.053E+01 5.000E-01
     1.100E+02 1.000E-04 5.000E-01
   ------------------------------------
  * Wall treatment, and rest coefficient if appropriate
GWALLC=2;GWREST=1.0
  * Porosity threshold
GPOROS=0
IF (.NOT.STEADY) THEN
+ GTSTRT=0.0; GTEND=1.1*TFRAC(2)
ENDIF
  *-------------------------------------------------------
  * GENTRA GROUP 3: Numerical controls
  *-------------------------------------------------------
  * 1st GENTRA sweep; frequency of calls
GSWEP1=lsweep;GSWEPF=1
  * Maximum Lagrangian time-step
GDTMAX=0.01
  * Min # of t-steps per cell; max # of t-steps; timeout
GLAGTS=10;GSTEMX=500;GTIMMX=5
  *-------------------------------------------------------
  * GENTRA GROUP 4: Output controls
  *-------------------------------------------------------
  * Trajectory-file identifier, history-file identifier
    and frequency for output
GSWOUT=10;NGWSTR=1;NGWEND=20;NGWINT=1
  *-------------------------------------------------------
  * PIL provisions for the GENTRA-Earth run
  *-------------------------------------------------------
  * Storage of Cartesian components in BFC cases
    STORE(UCRT,VCRT,WCRT)
NCRT=1
  * Storage for interphase sources of momentum
  * Storage for cell residence-time
   STORE(REST)
  * Interphase sources of heat and momentum
  * Relaxation of interphase sources
  * Activation of GENTRA GROUND-station
L(GENSET
RG(68)=GFLENG;RG(69)=GTSTRT; RG(70)= GTEND
LG(20)=GBUOYA;LG(19)=GSTOCH
CG(10)=:GT1STC:;CG(9)=:GH1STC:
CG(8)=:GINFIL:;CG(7)=:GRSFIL:
CG(6)=:GHFILE:
NOCOPY=T
  * ----------------------------------------------------------
  * GENTRA GROUP 7: GENTRA test
  * ----------------------------------------------------------
   * GENTRA auto test  RG(51)--RG(58) are reserved
    restrt(all)