PHOTON USE p gr x 1 msg Grid vec x 1 sh MSG Velocity vectors msg Press return to redraw pause gr cl; gr ou x 1; red msg Press return to plot pressure contours pause cont p1 x 1 fil;.01 msg Type e to End ENDUSE GROUP 1. Run title TEXT(Flow in Hobson's cascade : B526 TITLE DISPLAY This case represents the flow between two blades in a cascade. The geometry is that of Hobson's first impulse cascade (1974) for which a hodograph solution exists for inviscid compressible flow. It is treated as a 2-dimensional curved duct. The grid in file is generated by using the MAGIC algorithm to smooth a preliminary grid generated by linear interpolation. ENDDIS REAL(WIN) REAL(YTF,ZTF,DYLF,DZLF,RLNJ,RLNK);INTEGER(KKA,NZKK) ARRAY(YA,REAL,11);ARRAY(YB,REAL,6) ARRAY(ZA,REAL,11);ARRAY(ZB,REAL,6) YA(1) =0.0000E00;YA(2) =6.0460E-2;YA(3) =0.1248 ;YA(4) =0.1924 YA(5) =0.2672 ;YA(6) =0.3432 ;YA(7) =0.3902 ;YA(8) =0.4300 YA(9) =0.4619 ;YA(10)=0.4807 ;YA(11)=0.4854 ZA(1) =0.0000E00;ZA(2) =3.4510E-2;ZA(3) =7.1980E-2;ZA(4) =0.1144 ZA(5) =0.1614 ;ZA(6) =0.2174 ;ZA(7) =0.2646 ;ZA(8) =0.3175 ZA(9) =0.3751 ;ZA(10)=0.4366 ;ZA(11)=0.5000 YB(1) =1.012 ;YB(2) =1.045 ;YB(3) =1.070 ;YB(4) =1.088 YB(5) =1.098 ;YB(6) =1.103 ZB(1) =0.0000E00;ZB(2) =9.6470E-2;ZB(3) =0.1954 ;ZB(4) =0.2961 ZB(5) =0.3978 ;ZB(6) =0.5000 GROUP 4. Y-direction grid specification NY=9 GROUP 5. Z-direction grid specification NZ=30 GROUP 6. Body-fitted coordinates or grid distortion BFC=T;INTEGER(NJ,NK,NZ2); REAL(YY,ZZ) NJ=NY+1;NK=NZ+1;NZ2=NZ+2 ** Set endpoints of low and high boundaries YY=-0.4804;ZZ=-0.5045 SETPT(1,1,1,0.0,YY,ZZ);SETPT(2,1,1,1.0,YY,ZZ) SETPT(1,1,NK,0.0,YY,1.0-ZZ);SETPT(2,1,NK,1.0,YY,1.0-ZZ) YY=5.139E-2;ZZ=-1.011 SETPT(1,NJ,1,0.0,YY,ZZ);SETPT(2,NJ,1,1.0,YY,ZZ) SETPT(1,NJ,NK,0.0,YY,1.0-ZZ);SETPT(2,NJ,NK,1.0,YY,1.0-ZZ) ** Set points on curved surface at J=1 DO II=1,2 + DO KK=1,11 + KKA=KK+5;NZKK=NZ2-KKA + YC(II,1,KKA)=YA(KK);YC(II,1,NZKK)=YA(KK) + ZC(II,1,KKA)=ZA(KK);ZC(II,1,NZKK)=1.0-ZA(KK) + ENDDO ENDDO ** Set points on curved surface at J=NJ DO II=1,2 + DO KK=1,6 + KKA=KK+10;NZKK=NZ2-KKA + YC(II,NJ,KKA)=YB(KK);YC(II,NJ,NZKK)=YB(KK) + ZC(II,NJ,KKA)=ZB(KK);ZC(II,NJ,NZKK)=1.0-ZB(KK) + ENDDO ENDDO ** Set points along high and low boundaries DO II=1,2 + DO KK=1,NK,NZ + YTF=YC(II,1,KK);DYLF=YC(II,NJ,KK)-YTF + ZTF=ZC(II,1,KK);DZLF=ZC(II,NJ,KK)-ZTF + DO JJ=1,NJ + RLNJ=(JJ-1)/(NJ-1) + YC(II,JJ,KK)=YTF+RLNJ*DYLF;ZC(II,JJ,KK)=ZTF+RLNJ*DZLF + ENDDO + ENDDO ENDDO ** Set remaining points on south and north boundaries DO II=1,2 + YTF=YC(II,1,1);DYLF=YC(II,1,6)-YTF + ZTF=ZC(II,1,1);DZLF=ZC(II,1,6)-ZTF + DO KK=1,6 + NZKK=NZ2-KK; RLNK=(KK-1)/5 + YC(II,1,KK)=YTF+RLNK*DYLF;ZC(II,1,KK)=ZTF+RLNK*DZLF + YC(II,1,NZKK)=YC(II,1,KK);ZC(II,1,NZKK)=1.0-ZC(II,1,KK) + ENDDO ENDDO DO II=1,2 + YTF=YC(II,NJ,1);DYLF=YC(II,NJ,11)-YTF + ZTF=ZC(II,NJ,1);DZLF=ZC(II,NJ,11)-ZTF + DO KK=1,11 + NZKK=NZ2-KK; RLNK=(KK-1)/10 + YC(II,NJ,KK)=YTF+RLNK*DYLF;ZC(II,NJ,KK)=ZTF+RLNK*DZLF + YC(II,NJ,NZKK)=YC(II,NJ,KK);ZC(II,NJ,NZKK)=1.0-ZC(II,NJ,KK) + ENDDO ENDDO ** Interpolate DOMAIN(1,2,1,NJ,1,NK);MAGIC(T) VIEW(I,1) MSWP=5;MAGIC(L) GROUP 7. Variables stored, solved & named ** Solve for pressure (whole-field) and velocity. SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N);STORE(RHO1) GROUP 9. Properties of the medium (or media) RHO1=COMPRESS;DRH1DP=COMPRESS;PRESS0=1.0E5;ENUL=1.0E-10 RHO1B=1./1.4 RHO1A=1./PRESS0**RHO1B WIN=0.476*(PRESS0/RHO1B)**.5 GROUP 11. Initialization of variable or porosity fields FIINIT(W1)=WIN;FIINIT(RHO1)=1.0 GROUP 13. Boundary conditions and special sources ** Inlet INLET(INLET,LOW,1,NX,1,NY,1,1,1,1) VALUE(INLET,P1,WIN);VALUE(INLET,W1,WIN) ** Outlet PATCH(OUTLET,HIGH,1,NX,1,NY,NZ,NZ,1,1);COVAL(OUTLET,P1,1000.,0.0) COVAL(OUTLET,V1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0) GROUP 15. Termination of sweeps LSWEEP=20 GROUP 17. Under-relaxation devices RELAX(P1,LINRLX,.4); RELAX(RHO1,LINRLX,.3) RELAX(V1,FALSDT,.5E-3); RELAX(W1,FALSDT,.5E-3) GROUP 22. Spot-value print-out ITABL=3;IYMON=3;IZMON=10;TSTSWP=-1 SELREF=T; RESFAC=0.01 GROUP 23. Field print-out and plot control NYPRIN=2;NZPRIN=2 PATCH(YZ,CONTUR,1,1,1,NY,1,NZ,1,1) PLOT(YZ,P1,0.0,20.0);PLOT(YZ,W1,0.0,20.0) PATCH(PRESSURE,PROFIL,1,1,NY,NY,1,NZ,1,1) PLOT(PRESSURE,P1,0.0,0.0) PATCH(SUCTION,PROFIL,1,1,1,1,1,NZ,1,1) PLOT(SUCTION,P1,0.0,0.0)