PHOTON USE p gr z 1 msg Grid msg vec z 1 sh MSG Velocity vectors msg msg Press return to redraw pause gr off; gr ou z 1; red msg Press return to plot pressure contours pause cont p1 z 1 fil;.001 msg msg Type e to End ENDUSE GROUP 1. Run title TEXT(PRANDTL-MEYER turning in the X-Y: B536 TITLE DISPLAY This case simulates Prandtl-Meyer turning. The geometry is depicted below: North boundary (not shown) is curved to follow the theoretical position of the streamline. y ^ / |---------------------- V Uniform | in flow | / at Mach | / number | / 1.0 | / \ | / Outlet boundary is set | / to coincide with a |----------->-------/ characteristic line. x CHAR(ANSW) mesg(Press return to continue readvdu(answ,char,y) The North boundary is impervious to flow because it is located along a streamline (the location of which is calculated from Prandtl-Meyer expansion theory). At the exit, the pressure is fixed to the constant value that pertains to the characteristic line along which the exit boundary is prescribed to run. The last row of cells is very thin compared to the others to ensure the accuracy of this pressure fixation. The grid lines of constant I are set to be coincident with the theoretically-calculated locations of the characteristic lines. The grid lines of constant J are uniformly spaced, and hence must correspond to streamlines. The predicted contours of pressure are very close to the grid lines of constant I, which demonstrates the ability of EARTH to calculate accurately Prandtl-Meyer turning. ENDDIS INTEGER(NI,NJ,NK); REAL(PT,PS,UIN,RHOIN,COEF) GROUP 3. X-direction grid specification NX=13 GROUP 4. Y-direction grid specification NY=5 GROUP 6. Body-fitted coordinates or grid distortion BFC=T;NONORT=T;NI=NX+1;NJ=NY+1;NK=2 ** Set corner points for frame GSET(P,A,-1.1000E-01,0,0) GSET(P,C,1.0000E-03,-1.0000E-02,0) GSET(P,D,3.4756E+00,1.4970E-01,0) GSET(P,E,-1.1000E-01,1,0) ** Set points for curved part GSET(P,B,1.0000E-03,-1.0000E-02,0) GSET(P,D0,-1.0000E-02,1,0) GSET(P,D1,5.7410E-01,9.9430E-01,0) GSET(P,D2,9.7960E-01,9.6660E-01,0) GSET(P,D3,1.5386E+00,8.7760E-01,0) GSET(P,D4,2.1825E+00,7.0380E-01,0) GSET(P,D5,2.9870E+00,3.9250E-01,0) GSET(P,D6,3.4746E+00,1.5970E-01,0) ** Set SOUTH boundaries GSET(L,L1,A,B,1,1.0) GSET(L,L2,B,C,NX-1,1.0) ** Set EAST boundary GSET(L,L3,C,D,NY,1.0) ** Grid north boundary is a theoretical streamline. GSET(L,L4A,D0,E,1,1.0) GSET(L,L4B,D0,D1,2,1.5,ARC,2.0000E-01,1,0) GSET(L,L4C,D1,D2,2,-1.05,ARC,7.9020E-01,9.8310E-01,0) GSET(L,L4D,D2,D3,2,1.0,ARC,1.2542E+00,9.3040E-01,0) GSET(L,L4E,D3,D4,2,1.1,ARC,1.8448E+00,8.0400E-01,0) GSET(L,L4F,D4,D5,2,1.1,ARC,2.5600E+00,5.6980E-01,0) GSET(L,L4G,D5,D6,1,1.0) GSET(L,L4H,D6,D,1,1.0) ** Set WEST boundary GSET(L,L5,E,A,NY,1.0) ** Define frame GSET(F,F1,A,B,C,-,D,D6.D5.D4.D3.D2.D1.D0,E,-) ** Set grid dimension GSET(D,NX,NY,1) ** Match frame onto K1 GSET(M,F1,K1,1,NX,1,NY,TRANS) ** Copy K1 to K2 GSET(C,K2,F,K1,+,0,0,1) GROUP 7. Variables stored, solved & named SOLVE(P1,U1,V1) GROUP 9. Properties of the medium (or media) ** Total pressure, inlet velocity and inlet density (with total density taken to be 1.0)... PT=1.0E5;UIN=(1.4*PT/1.2)**0.5; RHOIN=1.0/1.57744 ** The isentropic gas law is activated which is valid for expanding flow... RHO1=COMPRESS;PRESS0=0.0; RHO1A=PT**(-1.0/1.4); RHO1B=1.0/1.4 ENUL=1.E-10 GROUP 11. Initialization of variable or porosity fields FIINIT(U1)=UIN;FIINIT(P1)=PT*0.5 GROUP 13. Boundary conditions and special sources ** Uniform inflow at Mach 1.0 is prescribed at the inlet plane INLET(INLET,WEST,1,1,1,NY,1,1,1,1) VALUE(INLET,P1,RHOIN*UIN) VALUE(INLET,U1,UIN) ** Constant pressure boundary condition is prescribed at the exit PATCH(OUTLET,CELL,NX,NX,1,NY,1,1,1,1) COEF=1000.;PS=PT/7.87329-RHOIN*UIN/(NY*COEF) COVAL(OUTLET,P1,COEF,PS) GROUP 15. Termination of sweeps LSWEEP=100 GROUP 17. Under-relaxation devices RELAX(U1,FALSDT,0.2/UIN); RELAX(V1,FALSDT,0.2/UIN) GROUP 22. Spot-value print-out IYMON=3 GROUP 23. Field print-out and plot control PATCH(MAP,CONTUR,1,NX,1,NY,1,1,1,1) PLOT(MAP,P1,0.0,20.0) TSTSWP=-1