GROUP 1. Run title
TEXT(PROBLEM 4.1 - 2D SEDIMENTATION :    W917
TITLE
  DISPLAY
  This problem is related to the one-dimensional sedimentation
  problem 2.4 (lib. case 891). It combines interphase penetration
  with a large-scale overturning motion. The initial state may
  be thought of as a tank with the heavy phase 1 at the top and
  the light phase 2 at the bottom, resting on a plane inclined
  at an angle of 10 deg. to the vertical (to create an overturning
  motion).
  ENDDIS
    GROUP 2. Transience; time-step specification
STEADY=F
  GRDPWR(T,40,4000,1.0)
GRDPWR(T,20,4,1.0)
    GROUP 3. X-direction grid specification
  GRDPWR(X,10,2.0,1.0)
GRDPWR(X,15,2.0,1.0)
    GROUP 4. Y-direction grid specification
  GRDPWR(Y,10,2.0,1.0)
GRDPWR(Y,20,2.0,1.0)
    GROUP 5. Z-direction grid specification
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
ONEPHS=F
SOLVE(P1,U1,U2,V1,V2,R1,R2)
NAME(U1)=AU1;NAME(U2)=BU2;NAME(V1)=CV1;NAME(V2)=DV2
    GROUP 8. Terms (in differential equations) & devices
TERMS(AU1,Y,Y,N,Y,P,P);TERMS(BU2,Y,Y,N,Y,P,P)
TERMS(CV1,Y,Y,N,Y,P,P);TERMS(DV2,Y,Y,N,Y,P,P)
    GROUP 9. Properties of the medium (or media)
ENUL=0.0;RHO1=1.0;RHO2=0.999
    GROUP 10. Inter-phase-transfer processes and properties
  ** Set a constant inter-phase friction coefficient
CFIPS=1.E3
    GROUP 11. Initialization of variable or porosity fields
  FIINIT(R1)=1.0;FIINIT(R2)=1.E-5
FIINIT(R1)=1.0;FIINIT(R2)=0.
 
INIADD=T
PATCH(INIR,INIVAL,1,NX,NY/2+1,NY,1,1,1,1)
INIT(INIR,R1,0.0,-1.0);INIT(INIR,R2,0.0,1.0)
    GROUP 13. Boundary conditions and special sources
  ** Pressure relief
PATCH(RELIEFP,CELL,1,1,1,1,1,1,1,LSTEP)
 COVAL(RELIEFP,P1,FIXVAL,0.0);COVAL(RELIEFP,P2,FIXVAL,0.0)
COVAL(RELIEFP,P1,fixp,0.0);COVAL(RELIEFP,P2,fixp,0.0)
  ** Gravity
PATCH(GRAVITY,PHASEM,1,NX,1,NY,1,1,1,LSTEP)
COVAL(GRAVITY,CV1,FIXFLU,0.9995);COVAL(GRAVITY,AU1,FIXFLU,0.0995)
    GROUP 15. Termination of sweeps
LSWEEP=20
RESREF(P1)=1.E-8;RESREF(CV1)=1.E-8;RESREF(DV2)=1.E-8
RESREF(AU1)=1.E-8;RESREF(BU2)=1.E-8
RESREF(R1)=1.E-8;RESREF(R2)=1.E-8
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
RELAX(R1,LINRLX,0.8);RELAX(R2,LINRLX,.8)
RELAX(AU1,FALSDT,1.);RELAX(CV1,FALSDT,1.)
RELAX(BU2,FALSDT,1.);RELAX(DV2,FALSDT,1.)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 18. Limits on variables or increments to them
VARMIN(R1)=1.E-5;VARMIN(R2)=1.E-5
    GROUP 21. Print-out of variables
OUTPUT(P1,Y,Y,Y,Y,Y,Y);OUTPUT(AU1,Y,Y,Y,Y,Y,Y)
OUTPUT(BU2,Y,Y,Y,Y,Y,Y);OUTPUT(DV2,Y,Y,Y,Y,Y,Y)
OUTPUT(CV1,Y,Y,Y,Y,Y,Y);OUTPUT(R2,Y,Y,Y,Y,Y,Y)
    GROUP 22. Spot-value print-out
TSTSWP=-1;IXMON=NX/2;IYMON=NY/2
    GROUP 23. Field print-out and plot control
IPLTL=LSWEEP;NTPRIN=LSTEP/8;NXPRIN=NX/20;NYPRIN=NY/20
PATCH(4,PROFIL,NX/2,NX/2,1,NY,1,1,1,LSTEP)
PLOT(4,R1,0.0,0.)
PATCH(5,PROFIL,NX/2,NX/2,NY/2,NY/2,1,1,1,LSTEP)
PLOT(5,CV1,0.,0.);PLOT(5,DV2,0.,0.)
PATCH(6,CONTUR,1,NX,1,NY,1,1,1,LSTEP)
PLOT(6,P1,0.0,0.);PLOT(6,R2,0.0,0.)
    GROUP 24. Dumps for restarts