AUTOPLOT USE
  file
  phi 5
 
  da 1
  v1
  screen
  msg 1st-phase velocity at t=4000s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  v2
  screen
  msg 2nd-phase velocity at t=4000s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  r1
  screen
  msg 1st-phase volume fraction at t=4000s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  r2
  screen
  msg 2nd-phase volume fraction at t=4000s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  p1
  screen
  msg pressure at t=4000s
  pl 1
  msg press e to END
  enduse
 
    NUMERICAL BENCHMARK PROBLEM 2.4: SEDIMENTATION
    GROUP 1. Run title
TEXT(PROBLEM 2.4. SEDIMENTATION :        W891
TITLE
  DISPLAY
    The problem involves the falling of a denser fluid through a
    lighter one, under conditions in which the inertia terms are
    negligible, and the density differences are slight.
    An analytical solution exists for this problem.
  ENDDIS
    GROUP 2. Transience; time-step specification
STEADY=F
GRDPWR(T,40,4000.0,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,2.0,1.0)
    GROUP 7. Variables stored, solved & named
ONEPHS=F
SOLVE(P1,V1,V2,R1,R2)
    GROUP 8. Terms (in differential equations) & devices
TERMS(V1,Y,Y,N,Y,Y,Y);TERMS(V2,Y,Y,N,Y,N,Y)
TERMS(R1,Y,Y,N,Y,Y,Y);TERMS(R2,Y,Y,N,Y,N,Y)
    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
CFIPS=1.E3
    GROUP 11. Initialization of variable or porosity fields
  Initial conditions: Phase 1 fills the first half of the pipe,
  and phase 2 fills the second
FIINIT(R1)=1.0;FIINIT(R2)=0.0
    Initial conditions
INIADD=T
PATCH(START,INIVAL,1,1,NY/2+1,NY,1,1,1,1)
INIT(START,R1,ZERO,-1.0);INIT(START,R2,ZERO,1.0)
    GROUP 13. Boundary conditions and special sources
    Reference pressure
PATCH(BOTTOM,CELL,1,1,1,1,1,1,1,LSTEP)
COVAL(BOTTOM,P1,FIXP,0.0);COVAL(BOTTOM,P2,FIXP,0.0)
COVAL(BOTTOM,V1,ONLYMS,0.0);COVAL(BOTTOM,V2,ONLYMS,0.0)
    Gravity
    The gravitational force is here regarded as acting only on
  phase 1
PATCH(WEIGHT,PHASEM,1,1,1,NY,1,1,1,LSTEP)
COVAL(WEIGHT,V1,FIXFLU,0.9995)
    GROUP 15. Termination of sweeps
LSWEEP=50
    GROUP 16. Termination of iterations
RESREF(P1)=1.E-8;RESREF(V1)=1.E-8;RESREF(V2)=1.E-8
RESREF(R1)=1.E-8;RESREF(R2)=1.E-8
    GROUP 17. Under-relaxation devices
RELAX(R1,LINRLX,0.1);RELAX(R2,LINRLX,0.1)
RELAX(V1,FALSDT,0.1);RELAX(V2,FALSDT,0.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 20. Preliminary print-out
TSTSWP=-1
    GROUP 21. Print-out of variables
OUTPUT(P1,Y,Y,Y,Y,Y,Y);OUTPUT(V1,Y,Y,Y,Y,Y,Y);OUTPUT(V2,Y,Y,Y,Y,Y,Y)
OUTPUT(R2,Y,Y,Y,Y,Y,Y)
    GROUP 22. Spot-value print-out
IYMON=NY/2
    GROUP 23. Field print-out and plot control
IPLTL=LSWEEP;NTPRIN=LSTEP/8;NXPRIN=NX/20
PATCH(LONGPLOT,PROFIL,1,1,1,NY,1,1,1,LSTEP)
COVAL(LONGPLOT,R1,0.0,1.0)
PATCH(TIMEPLOT,PROFIL,1,1,NY/2,NY/2,1,1,1,LSTEP)
PLOT(TIMEPLOT,V1,0.,0.);PLOT(TIMEPLOT,V2,0.,0.)
    GROUP 24. Dumps for restarts