PHOTON USE
  p



  up z
  g ou ce x 1
  g ou ce x 1 y 1 5 z 9 12
  ve x 1 sh
  msg                    Velocity distribution:
  msg Press  to continue
  pause;ve off;red
  msg                   Temperature distribution :
  con temp x 1 fil;0.001
  g ou ce x 1 y 1 5 z 9 12 col 4
  msg Press e to END
  ENDUSE
   *  GROUP 1. Run title and other preliminaries.
TEXT( NATURAL STIRRING IN A STABLY FLUID:124

  DISPLAY
   This case simulates the natural convection phenomena which occur
   when passive solids are placed in stably  stratified  fluids  of
   different  thermal conductivities.  Because of highly non-linear
   problem nature   the  number  of  sweeps  for  under-relaxations
   employed may not be enough for  completely  converged  solution.
   More details  of physical nature and mathematical statement plus
   the experimental and numeric data for comparisons can  be  found
   in  G.L.Quarini and K.H.  Winters ( Proc.  of 1st U.K.  National
   Conference on Heat Transfer, 1984, v.2, pp. 857-866)
  ENDDIS

   *  GROUP 3. X-direction grid specification.
   *  Cylindrical-Polar Grid Selected
CARTES=F;XULAST=0.1
   *  GROUP 4. Y-direction grid specification.
   *  Number of Cells in the RADIAL Direction
NY=10
   *  Power-Law Grid Spacing in Subregion 1
SUBGRD(Y,1,5, 3.750E-02,-1.5)
INTEGER(NYF01,NYL01); NYF01=1; NYL01=5
   *  Power-Law Grid Spacing in Subregion 2
SUBGRD(Y,6,10, 5.000E-02, 1.5)
INTEGER(NYF02,NYL02); NYF02=6; NYL02=10
   *  GROUP 5. Z-direction grid specification.
   *  Number of Cells in the AXIAL Direction
NZ=20
   *  Power-Law Grid Spacing in Subregion 1
SUBGRD(Z,1,8, 1.125E-01,-2.0)
INTEGER(NZF01,NZL01); NZF01=1; NZL01=8
   *  Symmetric Power-Law Grid Spacing in Subregion 2
SUBGRD(Z,9,-12, 7.500E-02, 2.0)
INTEGER(NZF02,NZL02); NZF02=9; NZL02=12
   *  Power-Law Grid Spacing in Subregion 3
SUBGRD(Z,13,20, 1.125E-01, 2.000E+00)
INTEGER(NZF03,NZL03); NZF03=13; NZL03=20
   *  GROUP 7. Variables stored, solved & named.
SOLVE(P1,V1,W1,TEMP)
STORE(VISC,DIFS)
    Activate harmonic averaging
SOLUTN(V1,P,P,P,P,P,Y);SOLUTN(W1,P,P,P,P,P,Y)
SOLUTN(TEMP,P,P,P,P,P,Y)
   *  GROUP 8. Terms (in differential equations) & devices.
   *  GROUP 9. Properties of the medium (or media).
RHO1= 1.0

ENUL=GRND
PRNDTL(TEMP)=-GRND

INIADD=F
     Viscosity
PATCH(VISCF,INIVAL,1,1,1,NY,1,NZ,1,1)
INIT(VISCF,VISC,0.0,5.4)
PATCH(VISCS,INIVAL,1,1,NYF01,NYL01,NZF02,NZL02,1,1)
INIT(VISCS,VISC,0.0,1.e10)
     Diffusivity
PATCH(KOVRF,INIVAL,1,1,1,NY,1,NZ,1,1)
INIT(KOVRF,DIFS,0.0,1.)
PATCH(KOVRM,INIVAL,1,1,NYF01,NYL01,NZF02,NZL02,1,1)
INIT(KOVRM,DIFS,0.0,600.)
   *  GROUP 11. Initialization of variable or porosity fields.
FIINIT(W1)=.01
   *  GROUP 13. Boundary conditions and special sources.
PATCH(REP,VOLUME,1,1,1,1,NZ,NZ,1,1)
COVAL(REP,P1,FIXP,0.0)
COVAL(REP,W1,ONLYMS,0.0)
COVAL(REP,V1,ONLYMS,0.0)
COVAL(REP,TEMP,ONLYMS,SAME)
     Low cold wall
PATCH(COLD,LWALL,1,1,1,NY,1,1,1,1)
COVAL(COLD,TEMP,1./5.4,0.0)
COVAL(COLD,V1,1.,0.0)
     High hot wall
PATCH(HOT,HWALL,1,1,1,NY,NZ,NZ,1,1)
COVAL(HOT,TEMP,1./5.4,1.0)
COVAL(HOT,V1,1.,0.0)
     Zero-slip adiabatic side walls
PATCH(RIGHT,NWALL,1,1,NY,NY,1,NZ,1,1)
COVAL(RIGHT,W1,1.,0.0)
PATCH(LEFT,SWALL,1,1,1,1,1,NZ,1,1)
COVAL(LEFT,W1,1.,0.0)
     Solid material:  set velocities to zero.
PATCH(ZEROW,CELL,1,1,NYF01,NYL01,NZL01,NZL02,1,1)
COVAL(ZEROW,W1,FIXVAL,0.0)
PATCH(ZEROV,CELL,1,1,NYF01,NYL01,NZF02,NZL02,1,1)
COVAL(ZEROV,V1,FIXVAL,0.0)
   *  GROUP 15. Termination of sweeps.
LSWEEP=500
   *  GROUP 16. Termination of iterations.
   *  GROUP 17. Under-relaxation devices.
RELAX(P1,LINRLX,0.5)
RELAX(V1,FALSDT,1.e-05);RELAX(W1,FALSDT,1.e-05)
RELAX(TEMP,FALSDT,1.e-05)
   *  GROUP 18. Limits on variables or increments to them.
   *  GROUP 19. Data communicated by satellite to GROUND.
NAMSAT=MOSG
   *  GROUP 20. Preliminary print-out.
   *  Deactivate Print-Out of Satellite Data.
   *  GROUP 22. Spot-value print-out.
IYMON=6;IZMON=8
   *  GROUP 23. Field print-out and plot control.
ITABL=3
   *  GROUP 24. Preparations for continuation runs.
tstswp=-1
dmpstk=t

  PLANTBEGIN
    VISL=VISC
    LAMPR(TEMP)=DIFS
PATCH(TMP,INIVAL,1,1,1,NY,1,NZ,1,1)
   VAL=ZGNZ/0.3
INIT(TMP,TEMP,0.0,GRND)
     Buoyancy forces
PATCH(BODY,VOLUME,1,1,1,NY,1,NZ,1,1)
    VAL=100.*5.4*TEMP
COVAL(BODY,W1,FIXFLU,GRND)
  PLANTEND

DISTIL=T
EX(P1)=2.959E+02; EX(V1)=5.016E-05; EX(W1)=8.165E-05
EX(DIFS)=6.090E+01; EX(VISC)=1.000E+09; EX(TEMP)=5.000E-01
 LIBREF=124
STOP