Laminar flow through a porous 'thin-plate'.
           Simple test for the pressure drop.
  **************************************************************
INTEGER(IDIR,IOPT);  IDIR= 1; IOPT= 2
MESG(Select direction of the thin plate:
MESG(X-direction  -  1 (default)
MESG(Y-direction  -  2
MESG(Z-direction  -  3
READVDU(IDIR,INT,1)
MESG(Select Pressure drop option over plate:
MESG(Constant=100  -  1
MESG(GRND function -  2 (default)
READVDU(IOPT,INT,2)
  **************************************************************
  PHOTON USE
   p ; ; ; ; ;
 
   msg Computational Domain:
   gr k 1
   msg Press Any Key to Continue...
   pause
   cl
   set vec av off
   msg Velocity Vectors:
   vec k 1 sh
   msg Press Any Key to Continue...
   pause
   cl
   msg Contours of Pressure:
   con p1 k 1 fi;0.005
   msg Press E  to exit PHOTON ...
  ENDUSE
  **************************************************************
TEXT(Porous Plate (Laminar)          
TITLE
    GROUP 1. Run title and other preliminaries
REAL(LEN,DIAM,UIN,DTF)
  ** Problem definition:
DIAM= 0.1;  LEN= 5.*DIAM; UIN= 1.0
    *** IDIR=1 'thin-plate' is in X-direction
IF(IDIR.EQ.1) THEN
+ NX= 10;  NY= 5;  NZ= 1;  DTF= 10.*DIAM/UIN/NX
+ GRDPWR(X,NX,LEN,1.0); GRDPWR(Y,NY,DIAM,1.0)
+ SOLVE(P1,U1,V1,TEM1)
ENDIF
    *** IDIR=2 'thin-plate' is in Y-direction
IF(IDIR.EQ.2) THEN
+ NX= 5;  NY= 10;  NZ= 1;  DTF= 10.*DIAM/UIN/NY
+ GRDPWR(X,NX,DIAM,1.0); GRDPWR(Y,NY,LEN,1.0)
+ SOLVE(P1,U1,V1,TEM1)
ENDIF
    *** IDIR=3 'thin-plate' is in Z-direction
IF(IDIR.EQ.3) THEN
+ NX= 1;  NY= 5;  NZ= 10;  DTF= 10.*DIAM/UIN/NZ
+ GRDPWR(Y,NY,DIAM,1.0); GRDPWR(Z,NZ,LEN,1.0)
+ SOLVE(P1,V1,W1,TEM1)
+ SOLUTN(P1,Y,Y,Y,P,P,P); SOLUTN(TEM1,Y,Y,Y,P,P,P)
ENDIF
STORE(DEN1,PRPS,TWAL);  WALLCO= 1.0
    GROUP 8. Terms & Devices
TERMS(TEM1,N,Y,Y,P,P,P)
    GROUP 11. Initialization of variable or porosity fields
RHO1= 1.00001
INIADD= F;  FIINIT(PRPS)= 0.0;  FIINIT(TEM1)= 10.0
    GROUP 13. Boundary conditions and special sources
INTEGER(IVEL)
IF(IDIR.EQ.1) THEN
+ PATCH(IN,WEST, 1, 1,1,NY,1,NZ,1,LSTEP)
+ COVAL(IN,U1,ONLYMS,UIN); COVAL(IN,V1,ONLYMS,0.0)
+ PATCH(OUT,EAST,NX,NX,1,NY,1,NZ,1,LSTEP)
+ PATCH(PLT*1,EWALL,NX/2,NX/2,1,NY,1,NZ,1,LSTEP)
+ COVAL(PLT*1,V1,1.0,0.0)
+ PATCH(PLT_1,WWALL,NX/2+1,NX/2+1,1,NY,1,NZ,1,LSTEP)
+ COVAL(PLT_1,V1,1.0,0.0)
+ PATCH(PPD*1,FREEE,NX/2,NX/2,1,NY,1,NZ,1,LSTEP); IVEL=3
ENDIF
IF(IDIR.EQ.2) THEN
+ PATCH(IN,SOUTH, 1,NX, 1, 1,1,NZ,1,LSTEP)
+ COVAL(IN,U1,ONLYMS,0.0); COVAL(IN,V1,ONLYMS,UIN)
+ PATCH(OUT,NORTH,1,NX,NY,NY,1,NZ,1,LSTEP)
+ PATCH(PLT*1,NWALL,1,NX,NY/2,NY/2,1,NZ,1,LSTEP)
+ COVAL(PLT*1,U1,1.0,0.0)
+ PATCH(PLT_1,SWALL,1,NX,NY/2+1,NY/2+1,1,NZ,1,LSTEP)
+ COVAL(PLT*1,U1,1.0,0.0)
+ PATCH(PPD*1,FREEN,1,NX,NY/2,NY/2,1,NZ,1,LSTEP); IVEL=5
ENDIF
IF(IDIR.EQ.3) THEN
+ PATCH(IN,LOW,1,NX,1,NY,1,1,1,LSTEP)
+ COVAL(IN,V1,ONLYMS,0.0); COVAL(IN,W1,ONLYMS,UIN)
+ PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,LSTEP)
+ PATCH(PLT*1,HWALL,1,NX,1,NY,NZ/2,NZ/2,1,LSTEP)
+ COVAL(PLT*1,V1,1.0,0.0)
+ PATCH(PLT_1,LWALL,1,NX,1,NY,NZ/2+1,NZ/2+1,1,LSTEP)
+ COVAL(PLT_1,V1,1.0,0.0)
+ PATCH(PPD*1,FREEH,1,NX,1,NY,NZ/2,NZ/2,1,LSTEP); IVEL=7
ENDIF
COVAL(PLT*1,TEM1,0.0,0.0); COVAL(PLT_1,TEM1,0.0,0.0)
    ** Inlet:
COVAL(IN,P1,FIXFLU,RHO1*UIN); COVAL(IN,TEM1,ONLYMS,90.)
    ** Outlet:
COVAL(OUT,P1,FIXP,0.0)
    ** PLATE-patch:
COVAL(PLT*1,PRPS,101.,0.001)
SPEDAT(SET,MATERIAL,101,L,T)
SPEDAT(SET,POROSITY,PLT*1,R,0.01)
IF(IOPT.EQ.1) THEN
+ SPEDAT(SET,PDROP_LAW,PLT*1,R,100.0)
+ COVAL(PPD*1,IVEL,100.0,0.0)
ENDIF
IF(IOPT.EQ.2) THEN
+ SPEDAT(SET,PDROP_LAW,PLT*1,R,GRND2)
+ SPEDAT(SET,PDROP_COE,PLT*1,R,1.0)
+ COVAL(PPD*1,IVEL,GRND2,0.0)
ENDIF
    GROUP 15. Termination of sweeps
LSWEEP= 30;  TSTSWP= -1
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,1.); RELAX(V1,FALSDT,1.); RELAX(W1,FALSDT,1.)
RELAX(TEM1,LINRLX,0.5)
    GROUP 22. Spot-value print-out
IXMON= NX/2+1; IYMON= NY/2+1; IZMON= NZ/2+1