PHOTON USE
   p
 
 
 
 
 
   view z
   gr ou z 1
   msg velocity vectors
   vec z 1 sh
   pause
   msg Press  and then  to END
   pause
 
   ENDUSE
  GROUP 1. Run title and other preliminaries
TEXT(2D 360 Deg Polar Wind Flow
TITLE
  DISPLAY
  
  Parallel flow is prescribed at the circumferential boundary
  of a 360 degree polar grid, in order to demonstrate that EARTH
  predicts a uniform parallel flow within the domain. The results
  show that the curvilinear grid does not distort the flow field.
  This case may be run at a high Reynolds number to test the
  convection terms, or at a low Reynolds number to test the
  diffusion terms.
  
  ENDDIS
INTEGER(XFLOW1,XFLOW2);XFLOW1=6;XFLOW2=15
REAL(VIN,REY,GRP,PI);REY=2.5;VIN=1.0;PI=3.14159
    GROUP 3. X-direction grid specification
CARTES=F;GRDPWR(X,20,2.0*PI,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,2.5,1.)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1);SOLUTN(P1,Y,Y,Y,N,N,N )
SOLUTN(U1,Y,Y,N,Y,P,P);SOLUTN(V1,Y,Y,N,Y,P,P)
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=VIN*YVLAST/REY
    GROUP 13. Boundary conditions and special sources
XCYCLE=T;GRP=YVLAST-0.5*YVLAST/NY
PATCH(PINF,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(PINF,P1,1.0E6,0.0);COVAL(PINF,V1,ONLYMS, 0.0)
  ** U1 diffusive boundary link, which will be required at
     low reynolds numbers;
     n.b: diffn=(rho*enut+enul)*gn*arean*(uN-rN*uP/rP)/(rN-rP)
          where gn=0.5*(rP+rN)/rn
     n.b: uN=uP in present flow
COVAL(PINF,U1,RHO1*(ENUT+ENUL)/GRP,0.0)
 
PATCH(UPOL,CELL,XFLOW1-1,XFLOW2,NY,NY,1,NZ,1,1)
COVAL(UPOL,U1,FIXVAL,SETSPEED)
 
PATCH(VPOL,CELL,XFLOW1,XFLOW2,NY-1,NY-1,1,NZ,1,1)
COVAL(VPOL,V1,FIXVAL,SETSPEED)
    GROUP 15. Termination of sweeps
RESREF(P1)=2.0E-10*YVLAST*VIN;RESREF(U1)=RESREF(P1)*VIN
RESREF(V1)=RESREF(U1)
    GROUP 16. Termination of iterations
LITER(P1) = 12;LITER(U1)=1;LITER(V1)=1
    GROUP 17. Under-relaxation devices
IF(REY.LT.10.) THEN
+ LSWEEP=1200;DIFCUT=0.0;NPLT=5
+ ADDDIF=T;RELAX(U1,FALSDT,1.E4);RELAX(V1,FALSDT,1.E4)
ELSE
+ LSWEEP=100
+ RELAX(U1,FALSDT,0.15);RELAX(V1,FALSDT,0.15)
ENDIF
    GROUP 19. Special calls from EARTH to GROUND
   **Inlet region extends from pi/2 to 3pi/2 and V1=VIN*CosX ,which
     gives a negative value (-Y direction) in this region
POLRA=VIN
    GROUP 21. Print-out of variables
 
    GROUP 22. Spot-value print-out
IXMON=2;IYMON=1;IZMON=1
    GROUP 23. Field print-out and plot control
NYPRIN=NY/5;NXPRIN=NX/5;TSTSWP=-1