photon use
  p
 
 
 
  gr z 1
  msg velocity vectors
  vec z 1 sh
  pause
  msg pressure contours
  con p1 z 1 fi;0.001
  pause
  con off
  red
  msg temperature contours
  con temp z 1 fi;0.001
  vec z 1
  msg
  msg Press e to END
  enduse
  DISPLAY
 
  This case tests the "link" procedure in the x-y plane.
  The geometry and boundary conditions are as shown:
 
        ----------------------------------
        |                |               |
        | outflow        |link           |
    <--------            Isection        I
        I                I               I
        I   barrier      I   open        I
        I--------------------------------I
        I                I               I
        I inflow         I               I
     ------->            I               I
        I                I               I
        I                I               I
        I----------------I---------------I
 
 
  ENDDIS
  delay(500)
      GROUP 1. Run title and other preliminaries
TEXT(East-West Link Test In X-Y Plane   
TITLE
mesg(PC486/50 time last reported as 1.5 min
REAL(XLENGTH,YLENGTH,ZLENGTH)
INTEGER(NXNOM,IYSHFT,ISHIFT,IYPLUS,IYBOT)
 
XLENGTH=1.0;YLENGTH=1.0;ZLENGTH=1.0
NXNOM=10;NY=10;NZ=1
NPHI=20
NX=NXNOM+2
ISHIFT=2*NY-IYSHFT
    GROUP 3. X-direction grid specification
   **Domain is XLENGTH m long in x-direction, with equal intervals
XULAST=XLENGTH
XFRAC(1)=-NXNOM/2
XFRAC(2)=1/NXNOM
XFRAC(5)=-XFRAC(1)
XFRAC(6)=XFRAC(2)
  dummy link cells are made thin for print-out purposes
XFRAC(3)=2
XFRAC(4)=0.01*XFRAC(2)
    GROUP 4. Y-direction grid specification
   **Domain is YLENGTH m long in y-direction, with equal intervals
GRDPWR(Y,NY,YLENGTH,1.0)
    GROUP 5. Z-direction grid specification
   **Domain is ZLENGTH m long in z-direction, with equal intervals
GRDPWR(Z,NZ,ZLENGTH,1.0)
    GROUP 7. Variables stored, solved & named
   **Choose first-phase enthalpy (H1) as dependent variable
     and activate the whole-field elliptic solver
SOLUTN(H1,Y,Y,Y,N,N,N);NAME(H1)=TEMP
SOLVE(P1,U1,V1);SOLUTN(P1,Y,Y,Y,N,N,N)
    GROUP 8. Terms (in differential equations) & devices
   **For pure conduction, cut out built-in source and convection
     terms
TERMS(TEMP,N,N,Y,N,Y,Y)
    GROUP 9. Properties of the medium (or media)
   **Thermal conductivity will be ENUL*RHO1/PRNDTL(TEMP), so :
ENUL=1.0e-3;PRNDTL(TEMP)=1.0
    GROUP 11. Initialization of variable or porosity fields
INIADD=F
FIINIT(U1)=1.0
PATCH(INIT,INIVAL,1,NX,NY/2+1,NY,1,1,1,1)
COVAL(INIT,U1,0.0,-1.0)
    GROUP 13. Boundary conditions and special sources
   ** Cold inflow boundary on the bottom left
PATCH(COLD,WEST,1,1,1,NY/2,1,1,1,1)
COVAL(COLD,U1,ONLYMS,1.0)
COVAL(COLD,TEMP,FIXVAL,-0.9)
COVAL(COLD,P1,FIXFLU,1.0)
   ** hot outflow boundary on the top left
PATCH(HOT,CELL,1,1,NY/2+1,NY,NZ,NZ,1,1)
COVAL(HOT,TEMP,FIXVAL,0.9)
COVAL(HOT,P1,1.E-2,0.0)
   ** the link patches
PATCH(+1,EAST,NXNOM/2+1,NXNOM/2+1,1,NY,1,1,1,1)
COVAL(+1,TEMP,fixval,ISHIFT)
COVAL(+1,P1,FIXVAL,ISHIFT)
COVAL(+1,U1,FIXVAL,ISHIFT)
COVAL(+1,V1,FIXVAL,ISHIFT)
PATCH(+2, WEST,NXNOM/2+2,  NXNOM/2+2,  1,NY,1,1,1,1)
COVAL(+2,TEMP,FIXVAL,-ISHIFT)
COVAL(+2,P1,FIXVAL,-ISHIFT)
COVAL(+2,V1,FIXVAL,-ISHIFT)
   ** halving the diiffusion coefficients because the dummy
      cells are very small
PATCH(GP12DFE1,EAST,NXNOM/2,NXNOM/2,1,NY,1,1,1,1)
COVAL(GP12DFE1,TEMP,0.5,0.0)
PATCH(GP12DFE2,EAST,NXNOM/2+2,NXNOM/2+2,1,NY,1,1,1,1)
COVAL(GP12DFE2,TEMP,0.5,0.0)
   ** the barrier between the top and bottom left-hand halves
PATCH(FENCE,NORTH,1,NX/2,NY/2,NY/2,1,1,1,1)
COVAL(FENCE,V1,FIXVAL,0.0)
PATCH(GP12DFN1,NORTH,1,nxnom/2,NY/2,NY/2,1,1,1,1)
COVAL(GP12DFN1,TEMP,0.0,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=20
    GROUP 16. Termination of iterations
  ** Set the frequencies of application of the one-dimensional
     correction features in the linear-equation solver to once
     per iteration for each direction.
ISOLX=1;ISOLY=1;ISOLZ=1
LITER(TEMP)=10;LITER(P1)=20
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.5);RELAX(V1,FALSDT,0.01);RELAX(U1,FALSDT,0.01)
    GROUP 21. Print-out of variables
   **Print fields of temperature
OUTPUT(TEMP,Y,Y,Y,Y,Y,Y)
    GROUP 22. Spot-value print-out
IYMON=NY/2+1;IZMON=NZ/2+1;IXMON=NX-1;ITABL=1
    GROUP 23. Field print-out and plot control
IXPRF=NXNOM/2;IXPRL=NXNOM/2+4
    GROUP 24. Dumps for restarts
NPLT=1;TSTSWP=-1
LSWEEP=200
SELREF=T;RESFAC=1.E-5
IF(NY.EQ.1) THEN
 SOLUTN(V1,N,N,N,N,N,N);OUTPUT(V1,N,N,N,N,N,N)
ENDIF
lsg57=t