PHOTON USE
   AUTOPLOT
   file
   phi 5
 
   cl
   msg U1 DIFFUSION IN AN ANNULUS: OMEGI = 0.
   msg Velocity (U1) profile
   msg Green line --- PHOENICS solution
   msg crosses ---   analytical solution
   da 1 u1;da 1 uana
   col9 1;blb4 2
 
   msg press  to end
   pause
   end
   END_USE
 
  The case considered is one-dimensional tangential laminar
  flow of an incompressible fluid between two coaxial
  cylinders of radius RADI and RADO, the outer one of which
  is rotating with an angular velocity of OMEGO. This case
  provides a test of the radial diffusion terms in the U1
  equation and the wall boundary treatment with RINNER=0.
  The analyical solution for the tangential velocity is
  U1=OMEGO*GRADO**2*(GRADI**2-GR**2)/[GR*(GRADI**2-GRADO**2)]
  where GR is the radius.
 
TEXT(1D U1 Diffusion In An Annulus;Omegi=0.
REAL(GRADI,GRADO,OMEGO,GAP,BETA,AA,BB,GR,UA,PI)
INTEGER(JJM1)
  ** BETA = GRADI/GRADO
BETA=0.5;PI=3.14159265
OMEGO=10*PI;GRADI=0.05;GRADO=GRADI/BETA;GAP=GRADO-GRADI
    GROUP 3. X-direction grid specification
CARTES=F
    GROUP 4. Y-direction grid specification
NY=10;RINNER=GRADI;GRDPWR(Y,NY,GAP,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(U1);STORE(UANA)
    GROUP 8. Terms (in differential equations) & devices
TERMS(U1,P,N,P,P,P,P)
    GROUP 9. Properties of the medium (or media)
RHO1=1000.0;ENUL=1.E-3/RHO1
    GROUP 11. Initialization of variable or porosity fields
IURINI=-1;FIINIT(U1)=OMEGO
  ** compute analytical solutions
AA=OMEGO*GRADO*GRADO
BB=GRADI*GRADI-GRADO*GRADO
DO JJ=1,NY
+PATCH(IN:JJ:,INIVAL,1,NX,JJ,JJ,1,NZ,1,1)
+GR=0.5*YFRAC(JJ)
IF(JJ.NE.1) THEN
+JJM1=JJ-1
+GR=YFRAC(JJM1)+0.5*(YFRAC(JJ)-YFRAC(JJM1))
ENDIF
+GR=GR*GAP+GRADI
+UA=AA*(GRADI*GRADI-GR*GR)/(BB*GR)
+INIT(IN:JJ:,UANA,ZERO,UA)
ENDDO
    GROUP 13. Boundary conditions and special sources
PATCH(OUTER,NWALL,1,NX,NY,NY,1,NZ,1,1)
COVAL(OUTER,U1,1.0,OMEGO*GRADO)
PATCH(INNER,SWALL,1,NX,1,1,1,NZ,1,1)
COVAL(INNER,U1,1.0,0.0)
    GROUPS 14 to 24
LSWEEP=10
IYMON=3;NYPRIN=1;NPRINT=LSWEEP;NPLT=1
IPLTL=LSWEEP;TSTSWP=12345