GROUP 1. Run title and other preliminaries
TEXT(Transonic Flow In A Curved Duct   
TITLE
  DISPLAY
  The run analyses the transonic flow in a curved duct. As before,
  the density is set as a function of the pressure via GREX3.
     Interesting variants are as in the previous example.
  ENDDIS
 
    GROUP 3. X-direction grid specification
  ** Activate polar coordinates system
CARTES=F; IREGX=1; GRDPWR(X,14,1.0,1.0)
 
    GROUP 4. Y-direction grid specification
RINNER=0.5; IREGY=1; GRDPWR(Y,16,1.0,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1)
  ** Provide storage for density field
STORE(RHO1)
 
    GROUP 8. Terms (in differential equations) & devices
TERMS(U1,Y,Y,N,Y,Y,Y); TERMS(V1,Y,Y,N,Y,Y,Y)
 
    GROUP 9. Properties of the medium (or media)
  ** Set density to RHO1A*(P1+PRESS0)**RHO1B+RHO1C
RHO1=COMPRESS; RHO1A=1.0; RHO1B=0.714; PRESS0=1.0; RHO1C=0.0
  ** Set d(ln(density))/dp=1.0/(PRESS0/RHO1B+P1/RHO1B)
DRH1DP=COMPRESS
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(P1)=0.0; FIINIT(U1)=1.1; FIINIT(RHO1)=1.0
 
    GROUP 13. Boundary conditions and special sources
INLET(IN,WEST,#1,#1,#1,#NREGY,#1,#1,1,1)
VALUE(IN,P1,1.1); VALUE(IN,U1,1.1); VALUE(IN,V1,0.0)
PATCH(OUTLET,EAST,#NREGX,#NREGX,#1,#NREGY,#1,#1,1,1)
COVAL(OUTLET,P1,FIXVAL,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0); COVAL(OUTLET,V1,ONLYMS,0.0)
 
    GROUP 15. Termination of sweeps
LSWEEP=50
 
    GROUP 22. Spot-value print-out
IXMON=10; IYMON=14
 
    GROUP 23. Field print-out and plot control
IPLTL=50; NXPRIN=4; NYPRIN=2
PATCH(DOMAIN,CONTUR,1,NX,1,NY,1,1,1,1)
PLOT(DOMAIN,P1,0.0,10.0); PLOT(DOMAIN,U1,0.0,10.0)
PLOT(DOMAIN,V1,0.0,10.0); PLOT(DOMAIN,RHO1,0.0,10.0)
PATCH(IYEQNY,PROFIL,1,NX,NY,NY,1,1,1,1)
PLOT(IYEQNY,P1,0.0,0.); PLOT(IYEQNY,U1,0.0,0.0)
PATCH(IYEQ1,PROFIL,1,NX,1,1,1,1,1,1)
PLOT(IYEQ1,P1,0.0,0.0); PLOT(IYEQ1,U1,0.0,0.0)