PHOTON USE
  p
 
 
 
  vi 0 0 1
  gr ou z 2
  ve z 2 sh
  msg                    Velocity distribution:
  msg  Press Enter to continue
  pause;vec off;red
  msg                    A- comp. concentration :
  con am z 2 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    B- comp. concentration :
  con bm z 2 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    C- comp. concentration :
  con cm z 2 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    D- comp. concentration :
  con dm z 2 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    E- comp. concentration :
  con em z 2 fil;0.001
  msg  Press Enter to continue
  pause
  cl;vi 1 1 1;vi 1 0 0
  gr ou x 5
  ve x 5 sh
  msg                    Velocity distribution:
  msg  Press Enter to continue
  pause;vec off;red
  msg                    A- comp. concentration :
  con am x 5 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    B- comp. concentration :
  con bm x 5 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    C- comp. concentration :
  con cm x 5 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    D- comp. concentration :
  con dm x 5 fil;0.001
  msg  Press Enter to continue
  pause;con off;red
  msg                    E- comp. concentration :
  con em x 5 fil;0.001
  pause
  msg Press e to END
  ENDUSE
 
    GROUP 1. Run title and other preliminaries
TEXT(COMPLEX CHEMISTRY EXAMPLE:132
 
  DISPLAY
  The purpose: To show HOW to apply PLANT instructions  to
  set the GROUND codings concerned with sources of different
  linearized structures.
  ENDDIS

 
REAL(FRICX,FRICY,FRICZ)
REAL(AMINL,BMINL,CMINL,DMINL,EMINL)
   *  Inlet concentrations
      ma            mb
AMINL=0.45;BMINL=0.55
      mc          md          me
CMINL=0.000;DMINL=0.000;EMINL=0.000
   ** FRICX - x-direction friction coefficient
      FRICY - y-direction - # - # - # - # - #
      FRICZ - z-direction - # - # - # - # - #
FRICX=10.0
FRICY=10.0
FRICZ=5.0
    GROUP 3. X-direction grid specification
GRDPWR(X,15,1.0,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,13,1.0,1.0)
    GROUP 5. Z-direction grid specification
  ** Set a symmetrical grid as in GROUP 3.
GRDPWR(Z,3,1.0,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1,H1)
STORE(EPOR,NPOR,HPOR,VPOR)
  **Select whole-field solution procedure for presure,
SOLUTN(P1,Y,Y,Y,N,N,N)
SOLVE(C1,C3,C5,C9)
STORE(C7)
NAME(C1)=AM;NAME(C3)=BM
NAME(C5)=CM
NAME(C7)=DM
NAME(C9)=EM
    GROUP 8. Terms (in differential equations) & devices
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-5
    GROUP 11. Initialization of variable or porosity fields
  ** first passage walls
 
CONPOR(0.0,WEST,4,4,9,10,1,NZ)
CONPOR(0.0,NORTH,4,6,10,10,1,NZ)
CONPOR(0.0,EAST,6,6,9,10,1,NZ)
  ** second passage walls
 
CONPOR(0.0,WEST,10,10,9,10,1,NZ)
CONPOR(0.0,NORTH,10,12,10,10,1,NZ)
CONPOR(0.0,EAST,12,12,9,10,1,NZ)
 
  ** third passage walls
 
CONPOR(0.0,WEST,4,4,4,5,1,NZ)
CONPOR(0.0,NORTH,4,6,5,5,1,NZ)
CONPOR(0.0,EAST,6,6,4,5,1,NZ)
 
  ** fourth passage walls
 
CONPOR(0.0,WEST,10,10,4,5,1,NZ)
CONPOR(0.0,NORTH,10,12,5,5,1,NZ)
CONPOR(0.0,EAST,12,12,4,5,1,NZ)
 
FIINIT(EPOR)=.4;FIINIT(NPOR)=.4
FIINIT(HPOR)=.4;FIINIT(VPOR)=.4
  ** set  porosity to 1.0 inside of passages
PATCH(PPOR1,INIVAL,4,6,9,10,1,NZ,1,1)
COVAL(PPOR1,VPOR,0.0,1.0)
 
COVAL(PPOR1,HPOR,0.0,1.0)
 
patch(epor1,inival,4,5,9,10,1,nz,1,1)
COVAL(EPOR1,EPOR,0.0,1.0)
 
patch(npor1,inival,4,6,9,9,1,nz,1,1)
COVAL(NPOR1,NPOR,0.0,1.0)
 
PATCH(PPOR2,INIVAL,10,12,9,10,1,NZ,1,1)
COVAL(PPOR2,VPOR,0.0,1.0)
COVAL(PPOR2,HPOR,0.0,1.0)
 
patch(epor2,inival,10,11,9,10,1,nz,1,1)
COVAL(EPOR2,EPOR,0.0,1.0)
 
patch(npor2,inival,10,12,9,9,1,nx,1,1)
COVAL(NPOR2,NPOR,0.0,1.0)
 
PATCH(PPOR3,INIVAL,4,6,4,5,1,NZ,1,1)
COVAL(PPOR3,VPOR,0.0,1.0)
COVAL(PPOR3,HPOR,0.0,1.0)
 
patch(epor3,inival,4,5,4,5,1,nz,1,1)
COVAL(EPOR3,EPOR,0.0,1.0)
 
patch(npor3,inival,4,6,4,4,1,nz,1,1)
COVAL(NPOR3,NPOR,0.0,1.0)
 
PATCH(PPOR4,INIVAL,10,12,4,5,1,NZ,1,1)
COVAL(PPOR4,VPOR,0.0,1.0)
COVAL(PPOR4,HPOR,0.0,1.0)
 
patch(epor4,inival,10,11,4,5,1,nz,1,1)
COVAL(EPOR4,EPOR,0.0,1.0)
 
patch(npor4,inival,10,12,4,4,1,nz,1,1)
COVAL(NPOR4,NPOR,0.0,1.0)
    GROUP 13. Boundary conditions and special sources
   **  First inlet
INLET(INLT1,LOW,4,6,9,10,1,1,1,1)
VALUE(INLT1,P1,RHO1*1.0)
VALUE(INLT1,W1,1.0)
VALUE(INLT1,H1,1.0)
VALUE(INLT1,AM,AMINL)
VALUE(INLT1,BM,BMINL)
VALUE(INLT1,CM,CMINL)
VALUE(INLT1,EM,EMINL)
   **  Second inlet
INLET(INLT2,LOW,10,12,4,5,1,1,1,1)
VALUE(INLT2,P1,RHO1*1.0)
VALUE(INLT2,W1,1.0)
VALUE(INLT2,H1,1.0)
VALUE(INLT2,AM,AMINL)
VALUE(INLT2,BM,BMINL)
VALUE(INLT2,CM,CMINL)
VALUE(INLT2,EM,EMINL)
   **  First outlet
OUTLET(OUTL1,HIGH,4,6,4,5,NZ,NZ,1,1)
VALUE(OUTL1,P1,0.0)
   ** Second outlet
OUTLET(OUTL2,HIGH,10,12,9,10,NZ,NZ,1,1)
VALUE(OUTL2,P1,0.0)
   ** North outlet
OUTLET(OUTLN,NORTH,1,NX,NY,NY,1,NZ,1,1)
VALUE(OUTLN,P1,0.0)
  ** quadritacally dependent momentum sink
PATCH(QUAD1,volume,1,3,1,NY,1,NZ,1,1)
COVAL(QUAD1,U1,-FRICX,0.0)
COVAL(QUAD1,V1,-FRICY,0.0)
COVAL(QUAD1,W1,-FRICZ,0.0)
  ** heat sink = - alfa*H1
COVAL(QUAD1,H1,0.1,0.0)
 
PATCH(QUAD2,VOLUME,4,6,1,3,1,NZ,1,1)
COVAL(QUAD2,U1,-FRICX,0.0)
COVAL(QUAD2,V1,-FRICY,0.0)
COVAL(QUAD2,W1,-FRICZ,0.0)
 
COVAL(QUAD2,H1,0.1,0.0)
 
PATCH(QUAD3,VOLUME,7,9,1,NY,1,NZ,1,1)
COVAL(QUAD3,U1,-FRICX,0.0)
COVAL(QUAD3,V1,-FRICY,0.0)
COVAL(QUAD3,W1,-FRICZ,0.0)
 
COVAL(QUAD3,H1,0.1,0.0)
 
PATCH(QUAD4,VOLUME,10,12,1,3,1,NZ,1,1)
COVAL(QUAD4,U1,-FRICX,0.0)
COVAL(QUAD4,V1,-FRICY,0.0)
COVAL(QUAD4,W1,-FRICZ,0.0)
 
COVAL(QUAD4,H1,0.1,0.0)
 
PATCH(QUAD5,VOLUME,13,15,1,NY,1,NZ,1,1)
COVAL(QUAD5,U1,-FRICX,0.0)
COVAL(QUAD5,V1,-FRICY,0.0)
COVAL(QUAD5,W1,-FRICZ,0.0)
 
COVAL(QUAD5,H1,0.1,0.0)
 
PATCH(QUAD6,VOLUME,4,6,6,8,1,NZ,1,1)
COVAL(QUAD6,U1,-FRICX,0.0)
COVAL(QUAD6,V1,-FRICY,0.0)
COVAL(QUAD6,W1,-FRICZ,0.0)
 
COVAL(QUAD6,H1,0.1,0.0)
 
PATCH(QUAD7,VOLUME,10,12,6,8,1,NZ,1,1)
COVAL(QUAD7,U1,-FRICX,0.0)
COVAL(QUAD7,V1,-FRICY,0.0)
COVAL(QUAD7,W1,-FRICZ,0.0)
 
COVAL(QUAD7,H1,0.1,0.0)
 
PATCH(QUAD8,VOLUME,4,6,11,NY,1,NZ,1,1)
COVAL(QUAD8,U1,-FRICX,0.0)
COVAL(QUAD8,V1,-FRICY,0.0)
COVAL(QUAD8,W1,-FRICZ,0.0)
 
COVAL(QUAD8,H1,0.1,0.0)
 
PATCH(QUAD9,VOLUME,10,12,11,NY,1,NZ,1,1)
COVAL(QUAD9,U1,-FRICX,0.0)
COVAL(QUAD9,V1,-FRICY,0.0)
COVAL(QUAD9,W1,-FRICZ,0.0)
COVAL(QUAD9,H1,0.1,0.0)

     PLANTBEGIN
   *  Chemical reaction sources
PATCH(CHEM,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
    CO=2.5*BM
COVAL(CHEM,AM,GRND,0.0)
    CO=5.55*AM
COVAL(CHEM,BM,GRND,0.0)
    CO=0.215
    VAL=24.9*AM*BM
COVAL(CHEM,CM,GRND,GRND)
    VAL=0.18*CM
COVAL(CHEM,EM,FIXFLU,GRND)
    DM=1.-AM-BM-CM-EM
     PLANTEND


    GROUP 15. Termination of sweeps
LSWEEP=50;ISWC1=10
RESREF(U1)=.0007;RESREF(V1)=.0007;RESREF(W1)=.0007
RESREF(P1)=.0007;RESREF(H1)=0.0007
    GROUP 16. Termination of iterations
LITER(P1)=20
  ;ENDIT(P1)=0.0
  ENDIT(U1)=0.0;ENDIT(V1)=0.0;ENDIT(W1)=0.0
LITER(U1)=1;LITER(V1)=1;LITER(W1)=1
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,.01);RELAX(V1,FALSDT,.01)
RELAX(W1,FALSDT,.01);RELAX(P1,linrlx,.75)
RELAX(H1,FALSDT,1.E9)
    GROUP 18. Limits on variables or increments to them
VARMAX(H1)=1.0;VARMIN(H1)=0.0
VARMIN(AM)=0.0;VARMAX(AM)=1.0
VARMIN(BM)=0.0;VARMAX(BM)=1.0
VARMIN(CM)=0.0;VARMAX(CM)=1.0
VARMIN(EM)=0.0;VARMAX(EM)=1.0
    GROUP 20. Preliminary print-out
NAMSAT=MOSG
tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=6.688E+00; EX(U1)=4.603E-02; EX(V1)=1.216E-01
EX(W1)=6.147E-02; EX(H1)=4.780E-01; EX(AM)=2.120E-01
EX(BM)=2.154E-02; EX(CM)=1.305E-01; EX(DM)=3.185E-01
EX(EM)=3.175E-01; EX(VPOR)=4.738E-01; EX(HPOR)=4.738E-01
EX(NPOR)=4.123E-01; EX(EPOR)=4.164E-01
 LIBREF=132
STOP