CCM Test: Laminar natural convection in concentric and
               eccentric annuli.
  **************************************************************
  DISPLAY
   The problem considers the prediction of heat transfer due
   to natural convection  between horizontal concentric  and
   eccentric cylinders of radii  RINT and REXT and  vertical
   eccentricity  ECCEN  (or  spheres,  LSPH=T).   The  inner
   cylinder  is  heated  (THOT)  and  the  outer cylinder is
   cooled (TCOLD). The  flow between cylinders  for Rayleigh
   number (RANUM) of 4.8e4  and 4.9e4 has been  investigated
   experimentally by T. Kuehn and R.  Goldstein (J. of Fluid
   Mechanics, vol.74, pp. 695-719, 1976).
 
   User can switch from the default colocated  computational
   algorithm (CCM)  to the  staggered one  (STAG) by setting
   LCCM= F.
   ---------------------------------------------------------
  ENDDIS
L(PAUSE
  **************************************************************
BOOLEAN(LCCM,LNORT,LSPH);  LCCM= T;  LSPH= F
  **************************************************************
  PHOTON USE
   p ; ; ; ; ;
 
   msg Computational Domain:
   g 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 Any Key to Continue...
   pause
   cl
   msg Contours of Temprature:
   con temp k 1 fi;0.005
   msg Press E  to exit PHOTON ...
  ENDUSE
  **************************************************************
    GROUP 1. Run title and other preliminaries
  **************************************************************
    For CCM:
              BUOYA = Gx  BUOYB = Gy  BUOYC = Gz
      BUOYE # 0.0  sets the following method
              Rho * BUOYD *(H -  BUOYE) * G resolute.
  **************************************************************
REAL(RANUM,THOT,TCOLD,RINT,REXT,ECCEN,DTHYD)
RANUM= 4.8E4;  BUOYB= -1.0;  THOT= 1.0;  TCOLD= 0.0
IF(LCCM) THEN
+ BUOYD=  RANUM;   BUOYE=  TCOLD
+ TEXT(CCM : Laminar convection in Annuli.
+ LNORT= T
ELSE
+ BUOYD= -RANUM;   BUOYE= -BUOYD*TCOLD
+ TEXT(STAG: Laminar convection in Annuli.
+ NONORT= T
ENDIF
TITLE
RINT= 0.5;  REXT= 2.6*RINT;  ECCEN= -0.623*(REXT-RINT)
NX  = 30;   NY  = 20
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T; GSET(D,NX,NY,1,1.0,1.0,1.0)
GSET(P,P1,0.0,0.0,            0.0); GSET(P,P2,0.0,2*REXT,0.0)
GSET(P,P3,0.0,REXT+ECCEN+RINT,0.0)
GSET(P,P4,0.0,REXT+ECCEN-RINT,0.0)
GSET(L,L12,P1,P2,NX,1.3,ARC,REXT,REXT,      0.0)
GSET(L,L34,P3,P4,NX,1.0,ARC,RINT,REXT+ECCEN,0.0)
GSET(L,L23,P2,P3,NY,1.0); GSET(L,L41,P4,P1,NY,1.0)
GSET(F,F1,P1,-,P2,-,P3,-,P4,-); GSET(M,F1,+I+J,1,1,1)
IF(LSPH) THEN
+ GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,RY,-0.2,0.0,0.0,INC,1.0);
ELSE
+ GSET(C,K:NZ+1:,F,K1,1,NX,1,NY, +, 0.0,0.0,1.0,INC,1.0);
ENDIF
GVIEW(Z); VIEW
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1); NAME(H1)=TEMP; SOLUTN(TEMP,Y,Y,Y,N,N,N)
IF(LCCM) THEN
L($F150)
ENDIF
    GROUP 8. Terms (in differential equations) & devices
TERMS(TEMP,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
ENUL= 1.0; RHO1= 1.0 ; cp1=1.0
    GROUP 13. Boundary conditions and special sources
    ** Walls:
    ***** Adiabatic walls:
PATCH(WW,WWALL,1, 1, 1,1, 1,1,1,1)
PATCH(WE,EWALL,NX,NX,1,NY,1,1,1,1)
    ***** Hot wall:
PATCH(WN,NWALL,1,NX,NY,NY,1,1,1,1); COVAL(WN,TEMP,1.0,THOT)
    ***** Cold wall:
PATCH(WS,SWALL,1,NX,1,  1,1,1,1,1); COVAL(WS,TEMP,1.0,TCOLD)
IF(LCCM) THEN
+ COVAL(WS,UC1,1.0,0.0); COVAL(WS,VC1,1.0,0.0)
+ COVAL(WN,UC1,1.0,0.0); COVAL(WN,VC1,1.0,0.0)
ELSE
+ COVAL(WS,U1, 1.0,0.0); COVAL(WS,V1, 1.0,0.0)
+ COVAL(WN,U1, 1.0,0.0); COVAL(WN,V1, 1.0,0.0)
ENDIF
  ** Buoyancy force:
IF(.NOT.LCCM) THEN
+ PATCH(BUOY,PHASEM,1,NX,1,NY,1,NZ,1,1)
+ COVAL(BUOY,U1,FIXFLU,BOUSS); COVAL(BUOY,V1,FIXFLU,BOUSS)
ENDIF
  ** Reference pressure at the center of the cavity:
PATCH(REFP,CELL,NX/2,NX/2,NY/2,NY/2,1,1,1,1);COVAL(REFP,P1,FIXP,0.0)
IF(LCCM) THEN
+ COVAL(REFP,UC1,ONLYMS,0.0); COVAL(REFP,VC1,ONLYMS,0.0)
ELSE
+ COVAL(REFP,U1, ONLYMS,0.0); COVAL(REFP,V1, ONLYMS,0.0)
ENDIF
    GROUP 15. Termination of sweeps
LSWEEP = 60; TSTSWP = -1
    GROUP 16. Termination of iterations
SELREF = T;   RESFAC = 1.E-3
    GROUP 17. Under-relaxation devices
DTHYD = RINT*RINT/NX/RANUM**0.5
IF(LCCM) THEN
+ RELAX(P1,LINRLX,0.5)
ELSE
+ RELAX(P1,LINRLX,0.1)
+ RELAX(U1,FALSDT,DTHYD); RELAX(V1,FALSDT,DTHYD)
ENDIF
    GROUP 19. Data communicated by satellite to GROUND
IF(LCCM) THEN
    * LSG4 activates non-orthogonality treatment in CCM/MBFGE.
+ LSG4= LNORT
ENDIF
    GROUP 21. Print-out of variables
OUTPUT(P1,Y,N,N,Y,Y,Y); OUTPUT(TEMP,Y,N,N,Y,Y,Y)
    GROUP 22. Spot-value print-out
IXMON= NX/2+1; IYMON= NY/2+1; IZMON= 1