photon use
   p;parphi
   5 1 1
 
   view y
   gr ou y 1
   con r1 y 1 sh;0 1 50
   msg lighter-phase concentrations
   msg horizontal coordinate is time, increasing to the right
   pause;con off;red;con 1u y 1 sh;int 50
   msg lighter-phase velocities
   msg horizontal coordinate is time, increasing to the right
   pause;con off;red;con p1 y 1 sh;int 50
   msg pressure in both phases
   msg horizontal coordinate is time, increasing to the right
 
   enduse
    GROUP 1. Run title and other preliminaries
TEXT(1-D TRANSIENT SEDIMENTATION        :W771
TITLE
  DISPLAY
  A denser phase if uniformly distributed within a lighter phase.
  Initially both are at rest.
 
  Then gravity cause the heavier fluid to sink to the bottom and
  the lighter to rise.
 
  The setting IDISPA=1 ensures that a parphi (or parada) file is
  created enabling the development in time to be viewed by way of
  PHOTON, with the z-axis being used for time.
 
  A PHOTON USE file is supplied.
  ENDDIS
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,10,10.0,1.0)
    GROUP 3. X-direction grid specification
nx=10
mesg(NX = :NX: OK? If not, enter new value...
readvdu(nx,int,nx)
GRDPWR(X,nx,1.0,1.0)
    GROUP 7. Variables stored, solved & named
ONEPHS=F
SOLVE(P1,U1,U2,R1,R2);NAME(U1)=1U;NAME(U2)=2U
    GROUP 9. Properties of the medium (or media)
RHO2=1000.0
mesg(RHO2 = :rho2:  OK? If not, enter new value...
readvdu(rho2,real,rho2)
    GROUP 10. Inter-phase-transfer processes and properties
CFIPS=1.E4
    GROUP 11. Initialization of variable or porosity fields
real(solfrac)
solfrac=0.5
mesg(heavy-material volume fraction = :solfrac:
mesg(OK? If not, enter new value...
readvdu(solfrac,real,solfrac)
fiinit(r1)=1.0-solfrac;fiinit(r2)=solfrac
 
    GROUP 13. Boundary conditions and special sources
real(gravacc)
gravacc=9.81
mesg(gravitational acceleration = :gravacc: m/s ** 2
mesg(OK? If not, enter new value...
readvdu(gravacc,real,gravacc)
 
PATCH(GRAVITY,PHASEM,1,NX,1,1,1,1,1,LSTEP)
COVAL(GRAVITY,1U,FIXFLU,-gravacc)
COVAL(GRAVITY,2U,FIXFLU,-gravacc)
PATCH(TOP,CELL,NX,NX,1,1,1,1,1,LSTEP)
COVAL(TOP,P1,1.0,0.0);COVAL(TOP,P2,RHO2,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=30
RESREF(P1)=1.E-6;RESREF(R1)=1.E-6;RESREF(R2)=1.E-6
RESREF(1U)=1.E-6;RESREF(2U)=1.E-6
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
RELAX(R2,LINRLX,0.5)
RELAX(1U,FALSDT,0.1);RELAX(2U,FALSDT,0.1)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 18. Limits on variables or increments to them
    GROUP 19. Data communicated by satellite to GROUND
    GROUP 20. Preliminary print-out
    GROUP 21. Print-out of variables
OUTPUT(R1,N,N,N,N,N,N)
OUTPUT(P1,Y,Y,Y,Y,Y,Y);OUTPUT(R2,Y,Y,Y,Y,Y,Y)
OUTPUT(1U,Y,Y,Y,Y,Y,Y);OUTPUT(2U,Y,Y,Y,Y,Y,Y)
    GROUP 22. Spot-value print-out
NTPRIN=5;TSTSWP=-1;IXMON=2
    GROUP 23. Field print-out and plot control
IPLTF=2;IPLTL=LSWEEP;XZPR=T;IPROF=3;ITABL=3
PATCH(PROFILE,PROFIL,1,NX,1,1,1,1,1,LSTEP)
PLOT(PROFILE,P1,0.0,0.0);PLOT(PROFILE,R1,0.0,0.0)
PLOT(PROFILE,1U,-1.0,-1.0);PLOT(PROFILE,2U,-1.0,-1.0)
PATCH(TIMEPLOT,PROFIL,NX,NX,1,1,1,1,1,LSTEP)
PLOT(TIMEPLOT,R1,0.0,0.0)
    GROUP 24. Dumps for restarts
IDISPA=1