PHOTON USE
   AUTOPLOT
   file
   phi 5
 
   cl
   msg 1D U1 CORIOLIS/DIFFUSION TEST:RINNER>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
 
TEXT(1D U1 Coriolis/Diff. Test:Rinner.gt.0 And V.lt.0
  DISPLAY
  The case considered is the same as case 825, except that the
  flow is radially inward, thereby providing a test of negative
  v velocities in the coriolis and convection terms. The case
  considered is therefore 1d radial laminar flow of a swirling
  fluid between two rotating porous coaxial cylinders. The
  analyical solution for the tangential velocity is: U=A/R+B*R**
  (1.+REYM) where the Reynolds number REYM=VIN*RADI/ENUL and the
  constants A and B are given by:B=(OMEGI*RADI**2-OMEGO*RADO**2)/
  (RADI**(2.+REYM)-RADO**(2.+REYM) and A=OMEGI*RADI**2-B*RADI**
  (2.+REYM).
  ENDDIS
REAL(GRADI,GRADO,OMEGI,GAP,ALFA,BETA,AA,BB,CC,GRADI2,GR,UA,PI)
REAL(QFLOW,OMEGO,REYM,GGAM,FLOWIN,VIN);INTEGER(JJM1)
  ** REYM = VIN*GRADO/ENUL i.e. Reynolds number
  ** BETA = GRADI/GRADO  ALFA = OMEGO/OMEGI
REYM=-25.0;ALFA=2.0;BETA=0.5;PI=3.14159265;GRADI=1.0
GRADO=GRADI/BETA;OMEGI=10.*PI;OMEGO=ALFA*OMEGI;GAP=GRADO-GRADI
    GROUP 3. X-direction grid specification
CARTES=F;XULAST=1.0
    GROUP 4. Y-direction grid specification
NY=20;RINNER=GRADI;GRDPWR(Y,NY,GAP,1.2)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,U1);STORE(UANA)
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=1./RHO1;QFLOW=REYM*ENUL
VIN=QFLOW/GRADO;FLOWIN=-RHO1*VIN
    GROUP 11. Initialization of variable or porosity fields
IURINI=-1;FIINIT(U1)=OMEGI
  ** compute analytical solutions
GGAM=1.+REYM;CC=GGAM+1.;GRADI2=GRADI*GRADI
BB=(OMEGI*GRADI2-OMEGO*GRADO*GRADO)/(GRADI**CC-GRADO**CC)
AA=OMEGI*GRADI2-BB*GRADI**CC
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/GR+BB*GR**GGAM
+INIT(IN:JJ:,UANA,ZERO,UA)
ENDDO
    GROUP 13. Boundary conditions and special sources
PATCH(INLET,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(INLET,P1,FIXFLU,FLOWIN);COVAL(INLET,V1,ONLYMS,VIN)
COVAL(INLET,U1,ONLYMS,OMEGO*GRADO)
PATCH(OUTLET,SOUTH,1,NX,1,1,1,NZ,1,1)
COVAL(OUTLET,P1,FIXP,0.0)
PATCH(INNER,SWALL,1,NX,1,1,1,NZ,1,1)
COVAL(INNER,U1,1.0,OMEGI*GRADI)
PATCH(OUTER,NWALL,1,NX,NY,NY,1,NZ,1,1)
COVAL(OUTER,U1,1.0,OMEGO*GRADO)
    GROUPS 14 to 24
LSWEEP=25;IYMON=7;NYPRIN=1;NPRINT=LSWEEP;NPLT=5
IPLTL=LSWEEP;TSTSWP=12345