PHOTON USE
  p
 
  5 5 1
 
  msg Channel with obstacle
  msg x and y directions magnified by factor of 5
  gr ou x 1;gr ou x m;gr ou y 1;gr ou y m
  gr ou z 6 y 1 1 x 3 3 col 12
  gr ou z 7 y 1 1 x 3 3 col 12
  gr ou y 2 z 6 6 x 3 3 col 12
  set vec ref 1.0
  vec x 3 sh
  msg Press  to continue
  pause
  vec off
  vi x
  msg The grid in constant x plane
  gr x 1
  msg Press  to continue
  pause
  cl
  msg Velocity vector field in plane ix=1
  set vec ref 1.0
  gr ou x 1
  vec x 1 sh
  msg Press  to continue
  pause
  cl
  msg Velocity vector field in plane ix=3
  set vec ref 1.0
  gr ou x 1
  vec x 3 sh
  msg Press  to continue
  pause
  cl
  msg Concentration contour of particle 1 in plane ix=1
  gr ou x 1
  con pt1 x 1 fi;0.01
  msg Press  to continue
  pause
  cl
  msg Concentration contour of particle 1 in plane ix=5
  gr ou x 1
  con pt1 x 5 fi;0.01
  msg Press  to continue
  pause
  cl
  msg Concentration contour of particle 1 in plane ix=3
  msg (with blockage)
  gr ou x 1
  con pt1 x 3 fi;0.01
  msg Press  to continue
  pause
  cl
  msg Concentration contour of particle 2 in plane ix=3
  msg (with blockage)
  gr ou x 1
  con pt2 x 3 fi;0.01
  msg Press  to continue
  pause
  cl
  vi z
  msg Concentration contour of particle 1 in plane iz=6
  msg (across blockage)
  gr ou z 1
  con pt1 z 6 fi;0.01
  msg Press e to END
  enduse
 
    GROUP 1. Run title and other preliminaries
 
TEXT(3D flow in a channel with an obstacle:P109
TITLE
  DISPLAY
  3-dimensional, Cartesian, steady, elliptic simulation
    This case calculates the accumulation of two groups of
    particles, of different diameters, along the bottom of
    a three-dimensional channel through which liquid flows
    from low z to high z. The particle slip velocities are
    normal to the primary flow direction.
    A blockage has been introduced in the middle of
    the flow region to complicate the flow situation.
    Plane ix=3 is the symmetry plane.
 
          --------------------              ---------------------
                                                    +---+
         -->in   ____        -->out                 |   | blockage
    y^          |    |blockage         x^           +---+
     |    ------+----+--------          | ---------------------
     +---->z                            +---->z
  enddis
 
MESG(
MESG(Change height of the blockage (y/N) ?
READVDU(ANS,CHAR,N)
INT(IBLK)
REAL(DTF)
DTF=10.0
IF(:ANS:.EQ.N) THEN
+ IBLK=1
ELSE
+ MESG(Enter height of the bloackage 1 - 4
+ READVDU(IBLK,INT,1)
+ DTF=DTF/(IBLK*1.)
ENDIF
 
nx=5; xulast=0.25; ny=5; yvlast=0.25; nz=11; zwlast=5.5
#unigrid
#aslp0
npt=2
  GROUP 7. Variables stored, solved & named
#aslp1
store(imb1,prps)
  .... slab-wise solution for veloity is faster in this case
solutn(u1,y,y,n,p,p,p);solutn(v1,y,y,n,p,p,p);solutn(w1,y,y,n,p,p,p)
 
    GROUP 9. Properties of the medium (or media)
 
    data input 2
dens0=1.e3 ; diam0=1.0  ;  visc0=1.e-5
dens1=2.e3 ; diam1=1.e-4;  visc1=2.5E-6; VFRAC1=0.1
dens2=2.e3 ; diam2=2.E-5;  visc2=2.5E-6; VFRAC2=0.1
    end data input 2
#aslp2
 
    GROUP 11. Initialisation of variable or porosity fields
    ** Porosity simulating a bump in the course of the flow
CONPOR(STEP,0.0,CELL,3,3,1,IBLK,6,6)
REAL(UIN); UIN=1.0
FIINIT(P1)=1.E4; FIINIT(U1)=0.0; FIINIT(V1)=0.0; FIINIT(W1)=UIN
FIINIT(PT0)=VFRAC0; FIINIT(PT1)=VFRAC1; FIINIT(PT2)=VFRAC2
    GROUP 13. Boundary conditions and special sources
    ** Inlet
PATCH(ASMIN,LOW,1,NX,1,NY,1,1,1,LSTEP)
COVAL(ASMIN, P1 ,FIXFLU, UIN*RHOM); COVAL(ASMIN,PT0 ,ONLYMS, VFRAC0)
COVAL(ASMIN,PT1 ,ONLYMS, VFRAC1);   COVAL(ASMIN,PT2 ,ONLYMS, VFRAC2)
COVAL(ASMIN, W1 ,ONLYMS, UIN);    COVAL(ASMIN,VFOL,ONLYMS, 1.0/RHOM)
    ** Outlets
PATCH(ASMOU1,HIGH,1,NX,1,1,NZ,NZ,1,LSTEP)
COVAL(ASMOU1,P1,1.E1,2500.0)
COVAL(ASMOU1,VFOL,ONLYMS,1.0/RHOM)
 
PATCH(ASMOU2,HIGH,1,NX,NY,NY,NZ,NZ,1,LSTEP)
COVAL(ASMOU2,P1,1.E1,0.0)
#gravity
gravdir=2
#density
 
    GROUP 15. Termination of sweeps
LITER(PT0)=2; LITER(PT1)=5; ENDIT(PT0)=1.E-8; ENDIT(PT1)=1.E-5
LSWEEP=100
RESREF(P1)=1.E-8;RESREF(U1)=1.e-8; RESREF(V1)=1.e-8
RESREF(W1)=1.e-8; RESREF(PT0)=1.E-8; RESREF(PT1)=1.e-8
RESREF(PT2)=1.e-8
    GROUP 17. Under-relaxation devices
RELAX( P1,LINRLX,1.0);RELAX( U1,FALSDT,DTF)
RELAX( V1,FALSDT,DTF);RELAX( W1,FALSDT,DTF)
RELAX(PT0,LINRLX,0.5);RELAX(PT1,LINRLX,0.5)
    GROUP 22. Spot-value print-out
TSTSWP=-1;IXMON=NX/2; IYMON=2; IZMON=NZ/2
    GROUP 23. Field print-out and plot control
IPLTF=2;IPLTL=LSWEEP;YZPR=T;IPROF=1
NXPRIN=1; NYPRIN=1
RESFAC=1.E-3
distil=t
EX(P1  )=1.553E+03; EX(U1  )=1.272E-03; EX(V1  )=1.111E-02
EX(W1  )=1.000E+00; EX(PT0 )=7.971E-01; EX(PT1 )=9.967E-02
EX(PT2 )=9.963E-02; EX(PRPS)=9.964E-01; EX(VPOR)=9.964E-01
EX(IMB1)=1.847E-08; EX(VISL)=8.469E-06; EX(DEN1)=1.196E+03
    GROUP 24. Dumps for restarts