PHOTON USE
   AUTOPLOT
   file
   phi 5
 
   cl
   msg U1 DIFFUSION OF A FREE VORTEX
   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
 
    GROUP 1. Run title and other preliminaries
TEXT(1D U1 Diffusion Of A Free Vortex
TITLE
  DISPLAY
  
  The case considered is 1d radial diffusion of a free vortex with
  fixed-value boundary conditions at the axis and outer boundary.
  The predictions show a 20% discrepancy with the analytical
  solution in the core of the vortex. However, the view is taken
  that a pure free vortex will never be encountered in practice,
  but rather a combined vortex will be observed  in which a forced
  vortex is present in the core and a free vortex outside this
  region. For this case PHOENICS procures exact agreement with the
  analytical solution as demonstrated by case 830 below.
  
  ENDDIS
  
    GROUP 3. X-direction grid specification
REAL(GRADO,GUR,GR,UA);INTEGER(JJM1);GRADO=1.0;GUR=0.025
CARTES=F;XULAST=0.001
    GROUP 4. Y-direction grid specification
NY=20;RINNER=0.;GRDPWR(Y,NY,GRADO,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(U1);STORE(UANA);TERMS(U1,P,N,P,P,P,P)
    GROUP 9. Properties of the medium (or media)
ENUL=1.0
    GROUP 11. Initialization of variable or porosity fields
FIINIT(U1)=GUR;IURINI=1
  ** compute analytical solutions
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*GRADO
+ UA=GUR/GR
INIT(IN:JJ:,UANA,ZERO,UA)
ENDDO
    GROUP 13. Boundary conditions and special sources
PATCH(INNER,CELL,1,NX,1,1,1,1,1,1);IURVAL=1
COVAL(INNER,U1,FIXVAL,GUR)
PATCH(OUTER,NORTH,1,NX,NY,NY,1,1,1,1)
COVAL(OUTER,U1,FIXVAL,GUR)
    GROUP 15. Termination of sweeps
LSWEEP=4;RESREF(U1)=1.E-7
    GROUP 22. Spot-value print-out
IYMON=6;TSTSWP=1
    GROUP 23. Field print-out and plot control
ITABL=2;NYPRIN=1
PATCH(LONGPLOT,PROFIL,1,1,1,NY,1,1,1,1)
PLOT(LONGPLOT,U1,0.0,0.0)
    GROUP 24. Dumps for restarts