TEXT(ASM 1D SETTLING OF PARTICLES  P112
TITLE
  DISPLAY
  The case considered is that of solid particles falling through
  stagnant liquid under gravity. A 1d unsteady simulation is
  performed with the algebraic slip model (asm), in which particles
  are released and allowed to fall under gravity. The particles
  eventually attain a uniform terminal settling velocity, under
  which the drag force balances the gravitational force. In the
  present case, the task is to calculate this velocity for which
  the theroretical value is 0.012m/s.
 
  The calculation may be performed in the x-, y- or z-direction with
  or without the liquid hydrostatic pressure included the solved-for
  pressure P1.
  ENDDIS
  PHOTON USE
   autoplot
   file
   phi 5
 
   da 1 pt1; col3 1; level x .1469
   key
 
    0.62162E+03 0.17847E+04  a
    0.17751E+04 0.17847E+04  l
    0.17751E+04 0.17847E+04  x
   text
   1
 
   particles fall 0.147m in 13.26s
    0.14610E+04 0.14330E+04 CR
   text
   1
 
   giving a settling velocity of 0.011m/s.
    0.14610E+04 0.12962E+04 CR
  key
 
   0.11599E+04 0.17456E+04  a
   0.15637E+04 0.14069E+04  l
   0.15637E+04 0.14069E+04  x
  text
  1
 
  PT1
   0.29092E+03 0.25533E+04  C
  DIST(m)
   0.31337E+04 0.15633E+03  c
  Theoretical terminal velocity = 0.012m/s
   0.14610E+04 0.10878E+04 CR
  redr
   msg press  to continue
   msg press e to END
  ENDUSE
 
BOOLEAN(BUOYANT)
MESG(Extract hydrostatic pressure from P1? (default N))
READVDU(ANS,CHAR,N)
IF(:ANS:.EQ.Y) THEN
+ MESG(Extract hydrostatic pressure from P1
+ MESG(Gravity represented as a buoyancy force)
+ BUOYANT=T
ELSE
+ MESG(Include hydrostatic pressure in P1
+ MESG(Gravity represented directly
+ BUOYANT=F
ENDIF
CHAR(CH1,CH2)
MESG( Enter the required 1d direction:
MESG(  X (default)
MESG(  Y
MESG(  Z
MESG(
READVDU(CH1,CHAR,X)
CASE :CH1: OF
WHEN X,1
+ MESG(1DX simulation
+ CH2=U1
WHEN Y,1
+ MESG(1DY simulation
+ CH2=V1
WHEN Z,1
+ MESG(1DZ simulation
+ CH2=W1
ENDCASE
 
REAL(XLEN,UGAS,UINP,UIN1,UIN2,R1IN,R2IN,REYP,DIAMP,DENRAT)
REAL(USET,CD,RINP,VOLFP,FLOW1,FLOW2,RHOL,RHOS,ACON,RHOM)
REYP=1.0; UGAS=1.E-3; UINP=1.E-3; ENULA=1.E-6
RINP=1.E-3; VOLFP=RINP*UINP; RHOL=1.027E3; RHOS=3.3E3
DENRAT=RHOS/RHOL
RHOM=RHOL*(1.-RINP)+RHOS*RINP
  ** calculate expected particle settling velocity
DIAMP=1.E-4
USET=DIAMP*DIAMP*(DENRAT-1.)*9.81/(18.*ENULA)
REYP=USET*DIAMP/ENULA
reyp
XLEN=0.4
REAL(TIME); TIME=0.4*XLEN/USET
CD=24./REYP
cd
uset
diamp
    GROUP 1. Run title and other preliminaries
    GROUP 2. Transience; time-step specification
STEADY=F
GRDPWR(T,10,TIME,1.0)
    GROUP 3. X-direction grid specification
GRDPWR(:CH1:,40,XLEN,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,:CH2:)
SOLUTN(P1,Y,Y,Y,P,P,P)
NAME(C1)=PT0; NAME(C2)=PT1
SOLVE(PT0,PT1); SOLVE(VFOL); STORE(DEN1,VISL,UTERM)
    GROUP 8. Terms (in differential equations) & devices
GALA=T; TERMS(VFOL,N,N,N,N,P,P)
    GROUP 9. Properties of the medium (or media)
RHO1=GRND; RHO2=RHOL; ENUL=GRND
PHINT(PT1)=RHOS; CINT(PT1)=DIAMP
PRNDTL(PT0)=ENULA; PRNDTL(PT1)=1.35E-6
    GROUP 11. Initialization of variable or porosity fields
FIINIT(PT0) = 1.000E+00 ; FIINIT(PT1 ) =  0.000E+00
 
PATCH(PT_INIT,INIVAL,1,1,1,1,1,1,1,1)
INIT(PT_INIT ,PT0,ONLYMS,9.000E-01)
INIT(PT_INIT ,PT1,ONLYMS,1.000E-01)
    GROUP 13. Boundary conditions and special sources
PATCH(ASM_OUT,CELL,%1,%1,%1,%1,%1,%1,1,LSTEP)
COVAL(ASM_OUT,P1,1.E3,0.0)
 
PATCH(BUOYANCY,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
IF(BUOYANT) THEN
+ COVAL(BUOYANCY,:CH2:,FIXFLU,GRND2)
+ BUOYD=RHOL
ELSE
+ COVAL(BUOYANCY,:CH2:,FIXFLU,GRND1)
ENDIF
IF(:CH1:.EQ.X) THEN
+ BUOYA=9.81
ENDIF
IF(:CH1:.EQ.Y) THEN
BUOYB=9.81
ENDIF
IF(:CH1:.EQ.Z) THEN
BUOYC=9.81
ENDIF
    GROUP 15. Termination of sweeps
RESFAC=1.E-8
    GROUP 16. Termination of iterations
LITER(PT0)=2; LITER(PT1)=5
ENDIT(PT0)=1.E-8; ENDIT(PT1)=1.E-5
    GROUP 17. Under-relaxation devices
REAL(DTF); DTF=3.*XLEN/USET/N:CH1:
+ RELAX(PT0,LINRLX,0.3); RELAX(PT1,LINRLX,0.3)
IF(:CH1:.EQ.Z) THEN
+ LSWEEP=120
+ RELAX(:CH2:,FALSDT,DTF/50.)
ELSE
+ LSWEEP=100
+ RELAX(:CH2:,FALSDT,DTF)
ENDIF
RELAX(DEN1,FALSDT,0.5)
    GROUP 19. Data communicated by satellite to GROUND
ASLP=T
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 21. Print-out of variables
NXPRIN=1; NYPRIN=1; NZPRIN=1
    GROUP 22. Spot-value print-out
IF(:CH1:.EQ.X) THEN
+ IXMON=NX/2; IZMON=1; IYMON=1
ELSE
+ IZMON=NZ/2; IXMON=1; IYMON=1
ENDIF
IF(:CH1:.EQ.Y) THEN
+ IYMON=NY/2; IXMON=1; IZMON=1
ENDIF
TSTSWP=-1
    GROUP 24. Dumps for restarts
DISTIL=T
IF(BUOYANT) THEN
+ EX(P1  )=8.112E+00
ELSE
+ EX(P1  )=1.973E+03
ENDIF
EX(PT0 )=9.978E-01; EX(DEN1)=1.032E+03
EX(U1  )=3.487E-12; EX(PT1 )=2.500E-03
EX(UTER)=1.000E-10; EX(VISL)=1.001E-06
EX(VFOL)=1.000E-10