You are on page 1of 27

MATLAB CODE FOR SHOCK TUBE PROBLEMRIEMANN SOLVER

BY ANAND DHARIYA AERO-520: COMPRESSIBLE FLOW PROF. BRAM VAN LEER

Pageintentionallyleftblank

AE 520 Fall 2006 Prof. van Leer Computer Problem: Writing a Riemann Solver Posted 10/04/06 Due 11/20/06 (a) Write a Riemann solver, i. e., an iterative procedure for nding the states L and R from the interaction of the initial states L and R. NB: using a canned equation-solver is not acceptable. (b) Compute all quantities needed to graph the solutions for u, p, and e as a function of x/t. (c) Write plotting instructions for these functions. (d) Choose sets of initial values that will produce a shock and an expansion; take uL = uR = 0, as in a shock tube; two shocks of unequal strength; two expansions of unequal strength; cavitation between expansion waves of unequal strength. In addition, construct initial values according to the following instructions. Start from initial values that dene a strong steady shock, with the inow state on the left (you may use the formulas from your undergraduate textbook). Exchange the left and right states. Your initial values now form a steady expansion shock, which does not satisfy the entropy condition and therefore must break up. (e) Solve the Riemann problems for the above sets of initial values with your code; plot the solutions. For cavitating ow, the initial values and a cavitation message produced by your program will suce. (f) Make a short write-up to go with the plots. Start your write-up with stating the goals of the project. In continuing, dont copy the Instructions; rather describe whats not found in there. This includes your iterative procedure, plotting routines, an occasional formula (how do you compute a shock position?), tables of in- and output parameters, an example of converging iterates. Explain how you arrived at the sets 1

of initial values. (NB: these values must be of your own choosing, not copied from a book. If you wish to test your code on published cases, do that in addition to the cases you have created yourself.) Regarding the expansion shock, explain its break-up with a (u, p) diagram. (g) Attach the program and hand in.

==oo00OO00oo==

Abstract: The following report gives a detail explanation of the Mat LAB code written to solve 1-dimensional, inviscid flow, unsteady Euler equations for a shock tube in which 2 gases are separated by a wall. On removal of the wall a system of shock and expansion waves is generated. This constitutes a Riemann initial problem. The code explained herein is an exact solver to solve the Riemann problem and compute the pressure, density and velocity outputs. Also, it displays plots for these quantities in addition to curve for internal energy versus x/t along the shock tube.

Riemann Solver: Our Riemann solver has 6 possible cases of initial values. Based on user selection, one of the case and hence corresponding values for density, velocity and pressure at time t=0 are selected. The 6 different cases and corresponding output values are tabulated. Once the initial values are selected, the speed of sound at given conditions is calculated. Next, the solver checks for cavitation. If
__

u1 +

2 a1 1

<

u4 +

2 a4 -1

cavitation is observed and the solver stops and prints error message. Solving the initial value problem boils down to solving the following set of equations: P* = m1 P4 + m4 P1 m1m4 (u4 u1) m1 + m4 u* = m1 u1 + m4 u4 (P4 P1) m1 + m4 m= pre apre sqrt {1 + +1 (P* - Ppre) } 2 m= pre apre -1 2 1-P* / Ppre Ppre .. for expansion .. for shock

1-(P* / Ppre)(-1)/2

If no cavitation is observed, the solver calculates the lower and upper limit for the iterative root finder. The lower limit is given by linear theory and it is given by m1=1a1 and m4=4a4. From m1 and m4, P*low is calculated. The upper limit is found by assuming double expansion. After comparing the initial values with pressure obtained from linear theory, the solver determines whether a shock or an expansion wave is formed, so that m1 and m4 are calculated accordingly. The pressure, P* denoted as P23 is calculated

from the given equations and is compared with the upper boundary. In case of deviation the upper pressure limit is re-calculated using the following equation for tangent-secant root finder method: P*n = P*n-1 f( P*n-1) ( P*n-1 - P*n-2) f( P*n-1) - f( P*n-2) where f is function in P* whose root is to be found out. The root-finder continues to iterate and successively improve the value of P* (i.e. P23) until f(P*) 0.000001 or 450000 iterations, whichever first. Once convergence is achieved, the velocity u* and other intermediate flow parameters viz. 1, 4, a1, a4, the shock and expansion speeds are calculated and displayed. Next, the parameter x/t is varied and corresponding values of velocity, density, pressure and energy are calculated. Arrays are constructed to store these values and they are plotted against x/t. The plots for the 5 cases are attached herewith.

TABLE FOR VARIOUS CASES

SR. NO. 1 2 3 4 5 6

CASE Sod's Problem Left expansion and right strong shock Right expansion and left shock Double shock Double expansion Cavitation

P1 1 1000 7 450 40 0.4

P4 0.1 0.1 10 45 40 0.4

u1 0 0 0 20 -2 -20

u4 0 0 0 -6 2 20

1 1 3 1 6 1 1

P*

u* 0.927453

0.125 0.30313 2 1 6 2.5 1

0.426319 0.265574 1.578286 11.99828 1.146676 0.888968 14.530506 31.206924 0.712733 1.781833

406.90239 13.020508 8.48087 1701.5942 24.89761 -0.435229 8.933681 0.450296

NO SOLUTION POSSIBLE

% % Riemann solver for solving shock-tube problem % by Anand Dhariya as part of Computer project for Aero 520: Compressible % flow course % Date: 22/11/2006 % % Note: % 6 possible cases of formation of shock waves and expansion fan have been % considered including the case of cavitation. The cavitation check is % incorporated in the code. It further prevents plotting for mathematically % possible but physically unlikely case of expansion shocks. % clear; clc; close all; % Ratio of specific heats for air gamma = 1.4; % Problem definition: Conditions at time t=0 % Case 1 : Sod's Problem ch=0; while(ch==0) fprintf ('Choose one of the following cases :- \n'); fprintf ('\n \t Case 1: Sods problem \n'); fprintf ('\t Case 2: Left running expansion and right running "STRONG" shock \n'); fprintf ('\t Case 3: Left running shock and right running expansion \n'); fprintf ('\t Case 4: Double shock \n'); fprintf ('\t Case 5: Double expansion \n'); fprintf ('\t Case 6: Cavitation \n'); cas=input ('\nEnter a case no. <1-6>: '); if cas==1 % Case 1:Left Expansion & right Shock fprintf('Case 1:Sods problem \n'); rho1=1; rho4=0.125; u1=0; u4=0; p1=1; p4=0.1; fprintf ('P1 = %f \n',p1); fprintf ('P4 = %f \n',p4); fprintf ('U1 = %f \n',u1); fprintf ('U4 = %f \n',u4); fprintf ('rho1 = %f \n',rho1); fprintf ('rho4 = %f \n',rho4); ch=1; elseif cas==2 % Case 2:Strong Expansion & Shock

fprintf('Case 2:Strong Expansion & Shock \n'); rho1=3; rho4=2; u1=0; u4=0; p1=1000; p4=0.01; fprintf ('P1 = %f \n',p1); fprintf ('P4 = %f \n',p4); fprintf ('U1 = %f \n',u1); fprintf ('U4 = %f \n',u4); fprintf ('rho1 = %f \n',rho1); fprintf ('rho4 = %f \n',rho4); ch=1; elseif cas==3 % Case 3:Shock & Expansion fprintf('Case 3:Shock & Expansion \n'); rho1=1; rho4=1; u1=0; u4=0; p1=7; p4=10; fprintf ('P1 = %f \n',p1); fprintf ('P4 = %f \n',p4); fprintf ('U1 = %f \n',u1); fprintf ('U4 = %f \n',u4); fprintf ('rho1 = %f \n',rho1); fprintf ('rho4 = %f \n',rho4); ch=1; elseif cas==4 % Case 4:Double Shock fprintf('Case 4:Double Shock \n'); rho1=6; rho4=6; u1=20; u4=-6; p1=450; p4=45; fprintf ('P1 = %f \n',p1); fprintf ('P4 = %f \n',p4); fprintf ('U1 = %f \n',u1); fprintf ('U4 = %f \n',u4); fprintf ('rho1 = %f \n',rho1); fprintf ('rho4 = %f \n',rho4); ch=1; elseif cas==5 % Case 5:Double Expansion fprintf('Case 5:Double Expansion \n'); rho1=1; rho4=2.5; u1=-2; u4=2; p1=40; p4=40; fprintf ('P1 = %f \n',p1); fprintf ('P4 = %f \n',p4);

fprintf ('U1 = %f \n',u1); fprintf ('U4 = %f \n',u4); fprintf ('rho1 = %f \n',rho1); fprintf ('rho4 = %f \n',rho4); ch=1; elseif cas==6 % Case 6:Cavitation fprintf('Case 6:Cavitation \n'); rho1=1; rho4=1; u1=-20; u4=20; p1=0.40; p4=0.40; fprintf ('P1 = %f \n',p1); fprintf ('P4 = %f \n',p4); fprintf ('U1 = %f \n',u1); fprintf ('U4 = %f \n',u4); fprintf ('rho1 = %f \n',rho1); fprintf ('rho4 = %f \n',rho4); ch=1; else fprintf ('Please enter an appropriate choice \n'); end % for case selection if-else loop end % for case selection while loop % Calculation of flow parameters at initial condition a1=sqrt(gamma*p1/rho1); a4=sqrt(gamma*p4/rho4); M1=u1/a1; M4=u4/a4; if u1<0 && u4>0 && (u1+(2/(gamma-1))*a1)<=(u4-(2/(gamma-1))*a4) %chk for cavitation fprintf('\n Cavitation is observed in this case of double expansion. No solution possible \n'); break; else % Secant Method for getting pressure P* p23up=(((gamma-1)/2*(u1u4)+a1+a4)/((a1*(p1)^((2*gamma)/(gamma-1)))+(a4*(p4)^((2*gamma)/(gamma1)))))^((2*gamma)/(gamma-1)); % upper limit p23down=(rho1*a1*p4+rho4*a4*p1-(rho1*a1*rho4*a4*(u4u1)))/(rho1*a1+rho4*a4); %lower limit by linear theory s=0; if p23down>=p1 s=1; end ss=0; if p23down>=p4 ss=1; end if s==1 m1=rho1*a1*sqrt(1+((gamma+1)*(p23up-p1)/(2*gamma*p1))); m1d=rho1*a1*sqrt(1+((gamma+1)*(p23downp1)/(2*gamma*p1)));

else m1=rho1*a1*(gamma-1)/(2*gamma)*(1-p23up/p1)/(1(p23up/p1)^((gamma-1)/(2*gamma))); m1d=rho1*a1*(gamma-1)/(2*gamma)*(1-p23down/p1)/(1(p23down/p1)^((gamma-1)/(2*gamma))); end if ss==1 m4=rho4*a4*sqrt(1+((gamma+1)*(p23up-p4)/(2*gamma*p4))); m4d=rho4*a4*sqrt(1+((gamma+1)*(p23downp4)/(2*gamma*p4))); else m4=rho4*a4*(gamma-1)/(2*gamma)*(1-p23up/p4)/(1(p23up/p4)^((gamma-1)/(2*gamma))); m4d=rho4*a4*(gamma-1)/(2*gamma)*(1-p23down/p4)/(1(p23down/p4)^((gamma-1)/(2*gamma))); end p23=(m1*p4+m4*p1-m1*m4*(u4-u1))/(m1+m4); f=p23up-p23; p23d=(m1d*p4+m4d*p1-m1d*m4d*(u4-u1))/(m1d+m4d); ff=p23d-p23; j=0; % iteration procedure starts from here while abs(f)>0.000001 p23up=p23up-(f*(p23up-p23d)/(f-ff)); if s==1 m1=rho1*a1*sqrt(1+((gamma+1)*(p23upp1)/(2*gamma*p1))); m1d=rho1*a1*sqrt(1+((gamma+1)*(p23downp1)/(2*gamma*p1))); else m1=rho1*a1*(gamma-1)/(2*gamma)*(1-p23up/p1)/(1(p23up/p1)^((gamma-1)/(2*gamma))); m1d=rho1*a1*(gamma-1)/(2*gamma)*(1-p23down/p1)/(1(p23down/p1)^((gamma-1)/(2*gamma))); end if ss==1 m4=rho4*a4*sqrt(1+((gamma+1)*(p23upp4)/(2*gamma*p4))); m4d=rho4*a4*sqrt(1+((gamma+1)*(p23downp4)/(2*gamma*p4))); else m4=rho4*a4*(gamma-1)/(2*gamma)*(1-p23up/p4)/(1(p23up/p4)^((gamma-1)/(2*gamma))); m4d=rho4*a4*(gamma-1)/(2*gamma)*(1-p23down/p4)/(1(p23down/p4)^((gamma-1)/(2*gamma))); end p23=(m1*p4+m4*p1-m1*m4*(u4-u1))/(m1+m4); f=p23up-p23; p23d=(m1d*p4+m4d*p1-m1d*m4d*(u4-u1))/(m1d+m4d); ff=p23d-p23; j=j+1; if j>450000; fprintf ('No convergance \n'); break; end end % for while loop of secant method

% Root finder ends %Calculation of flow parameters depending whether shock or an %expansion is observed u23=(m1*u1+m4*u4-(p4-p1))/(m1+m4); if s==1 rho2=rho1*(1+(((gamma+1)/(gamma1))*p23/p1))/(((gamma+1)/(gamma-1))+p23/p1); if u23>u1 fprintf('Expansion shock-not physically possible \n'); return; end else rho2=rho1*(p23/p1)^(1/gamma); end if ss==1 rho3=rho4*(1+(((gamma+1)/(gamma1))*p23/p4))/(((gamma+1)/(gamma-1))+p23/p4); if u23<u4 fprintf('Expansion shock-not physically possible \n'); return; end else rho3=rho4*(p23/p4)^(1/gamma); end a2=sqrt(gamma*p23/rho2); a3=sqrt(gamma*p23/rho3); end % for cavitation test % Print fprintf fprintf fprintf fprintf fprintf calculated flow quantities ('\n Solution of Riemann problem :- \n'); ('P* = %f \n',p23); ('U* = %f \n',u23); ('rho2 = %f \n',rho2); ('rho3 = %f \n',rho3);

% Variable initialization cs12=0; cs34=0; expc121=0; expc122=0; expc341=0; expc342=0; % Calculation of shock/expansion speeds if s==1 cs12l=a1*sqrt(1+(gamma+1)/(2*gamma)*(p23-p1)/p1); cs12=u1-abs(cs12l); else expc121=u1-a1; expc122=u23-a2; end

if ss==1 cs34r=a4*sqrt(1+(gamma+1)/(2*gamma)*(p23-p4)/p4); cs34=u4+abs(cs34r); else expc341=u4+a4; expc342=u23+a3; end %Array construction maxxt=max([cs12 cs34 expc121 expc122 expc341 expc342]); minxt=min([cs12 cs34 expc121 expc122 expc341 expc342]); offsetxt=0.1*(maxxt-minxt); if s==1 xt(1)=cs12-offsetxt; incr=abs(offsetxt)/1500; for i=1:1500 xt(i+1)=xt(i)+incr; u(i)=u1; rho(i)=rho1; p(i)=p1; e(i)=p(i)/(gamma-1)/rho(i); end xt(1500)=cs12; incr=abs(u23-cs12)/1500; for i=1501:3000 xt(i+1)=xt(i)+incr; u(i)=u23; rho(i)=rho2; p(i)=p23; e(i)=p(i)/(gamma-1)/rho(i); end xt(3000)=u23; else xt(1)=expc121-offsetxt; incr=abs(offsetxt)/1000; for i=1:1000 xt(i+1)=xt(i)+incr; u(i)=u1; rho(i)=rho1; p(i)=p1; e(i)=p(i)/(gamma-1)/rho(i); end xt(1000)=expc121; incr=abs(expc122-expc121)/1000; for i=1001:2000 xt(i+1)=xt(i)+incr; if expc122>=0 u(i)=2/(gamma+1)*(xt(i)-a1)+(gamma-1)/(gamma+1)*u1; a=((gamma-1)/(gamma+1)*(xt(i)u1))+(2/(gamma+1)*a1); else u(i)=2/(gamma+1)*(xt(i)+a1)+(gamma-1)/(gamma+1)*u1; a=(-(gamma-1)/(gamma+1)*(xt(i)u1))+(2/(gamma+1)*a1); end

rho(i)=rho1*(a/a1)^(2/(gamma-1)); p(i)=p1*(a/a1)^(2*gamma/(gamma-1)); e(i)=p(i)/(gamma-1)/rho(i); end xt(2000)=expc122; incr=abs(expc122-u23)/1000; for i=2001:3000 xt(i+1)=xt(i)+incr; u(i)=u23; rho(i)=rho2; p(i)=p23; e(i)=p(i)/(gamma-1)/rho(i); end xt(3000)=u23; end if ss==1 incr=abs(u23-cs34)/1500; for i=3001:4500 xt(i)=xt(i-1)+incr; u(i)=u23; rho(i)=rho3; p(i)=p23; e(i)=p(i)/(gamma-1)/rho(i); end xt(4500)=cs34; incr=abs(offsetxt)/1500; for i=4501:6000 xt(i)=xt(i-1)+incr; u(i)=u4; rho(i)=rho4; p(i)=p4; e(i)=p(i)/(gamma-1)/rho(i); end else incr=abs(expc342-u23)/1000; for i=3001:4000 xt(i)=xt(i-1)+incr; u(i)=u23; rho(i)=rho3; p(i)=p23; e(i)=p(i)/(gamma-1)/rho(i); end xt(4000)=expc342; incr=abs(expc342-expc341)/1000; for i=4001:5000 xt(i)=xt(i-1)+incr; if expc341>=0 u(i)=2/(gamma+1)*(xt(i)-a4)+(gamma-1)/(gamma+1)*u4; a=((gamma-1)/(gamma+1)*(xt(i)u4))+(2/(gamma+1)*a4); else u(i)=2/(gamma+1)*(xt(i)+a4)+(gamma-1)/(gamma+1)*u4; a=(-(gamma-1)/(gamma+1)*(xt(i)u4))+(2/(gamma+1)*a4);

end rho(i)=rho4*(a/a4)^(2/(gamma-1)); p(i)=p4*(a/a4)^(2*gamma/(gamma-1)); e(i)=p(i)/(gamma-1)/rho(i); end xt(5000)=expc341; incr=abs(offsetxt)/1000; for i=5001:6000 xt(i)=xt(i-1)+incr; u(i)=u4; rho(i)=rho4; p(i)=p4; e(i)=p(i)/(gamma-1)/rho(i); end end % Plotting instructions subplot (2,2,1) plot(xt,u); title('Plot of U v/s x/t'); xlabel ('x/t'); ylabel ('u'); axis tight; subplot (2,2,2) plot(xt,rho); title('Plot of Density v/s x/t'); xlabel ('x/t'); ylabel ('rho'); axis tight; subplot (2,2,3) plot(xt,p); title('Plot of Pressure v/s x/t'); xlabel ('x/t'); ylabel ('P'); axis tight; subplot (2,2,4) plot(xt,e); title('Plot of Internal Energy v/s x/t'); xlabel ('x/t'); ylabel ('E'); axis tight; % ---------END OF CODE----------- %

Flowchart for Riemann Solver:


SELECT CASE & fix 1, 4, u1, u4, P1, P4

CALC a1, a4, M1, M4

IS CAVITATION PRESENT ?

YES

PRINT ERROR MESSAGE

STOP NO
CALC. UPPER AND LOWER PRESSURE LIMIT FOR SECANT METHOD

ENTER ITERATIVE ROOT FINDER

ITERATE

IS ERROR < 0.000001

NO

YES CALC. U23, 2, 3, a2, a3 & SHOCK/EXPANSION SPEEDS BUILD ARRAY FOR U, , P & E. PLOT THEM AGAINST VARYING x/t

END

Choose one of the following cases :Case 1: Sods problem Case 2: Left running expansion and right running "STRONG" shock Case 3: Left running shock and right running expansion Case 4: Double shock Case 5: Double expansion Case 6: Cavitation Enter a case no. <1-6>: 1 Case 1:Sods problem P1 = 1.000000 P4 = 0.100000 U1 = 0.000000 U4 = 0.000000 rho1 = 1.000000 rho4 = 0.125000 Solution of Riemann problem :P* = 0.303130 U* = 0.927453 rho2 = 0.426319 rho3 = 0.265574 >>

Plot of U v/s x/t 1 0.8 0.8 0.6 0.4 0.2 0.2 0 1 0.5 0 0.5 x/t 1 1.5 2 1 rho u 0.6

Plot of Density v/s x/t

0.4

0.5

0 x/t

0.5

1.5

Plot of Pressure v/s x/t 1 0.8 2.8 2.6 2.4 E 2.2 2 0.2 1.8 1 0.5 0 0.5 x/t 1 1.5 2 1

Plot of Internal Energy v/s x/t

0.6 P 0.4

0.5

0 x/t

0.5

1.5

Choose one of the following cases :Case 1: Sods problem Case 2: Left running expansion and right running "STRONG" shock Case 3: Left running shock and right running expansion Case 4: Double shock Case 5: Double expansion Case 6: Cavitation Enter a case no. <1-6>: 1 Case 1:Sods problem P1 = 1.000000 P4 = 0.100000 U1 = 0.000000 U4 = 0.000000 rho1 = 1.000000 rho4 = 0.125000 Solution of Riemann problem :P* = 0.303130 U* = 0.927453 rho2 = 0.426319 rho3 = 0.265574 >>

Plot of U v/s x/t 12 10 8 6 4 4 2 0 2 20 10 x/t Plot of Pressure v/s x/t 1000 800 600 P E 400 200 800 700 600 500 400 300 200 100 20 10 x/t 0 10 20 0 10 20 rho u 10 8 6

Plot of Density v/s x/t

10 x/t

10

Plot of Internal Energy v/s x/t

10 x/t

10

Choose one of the following cases :Case 1: Sods problem Case 2: Left running expansion and right running "STRONG" shock Case 3: Left running shock and right running expansion Case 4: Double shock Case 5: Double expansion Case 6: Cavitation Enter a case no. <1-6>: 3 Case 3:Shock & Expansion P1 = 7.000000 P4 = 10.000000 U1 = 0.000000 U4 = 0.000000 rho1 = 1.000000 rho4 = 1.000000 Solution of Riemann problem :P* = 8.480870 U* = -0.435229 rho2 = 1.146676 rho3 = 0.888968 >>

Plot of U v/s x/t 0 1.1 1.05 rho u 0.2 1 0.95 0.4 4 2 0 x/t 2 4 0.9 4 2

Plot of Density v/s x/t

0.1

0.3

0 x/t

Plot of Pressure v/s x/t 10 9.5 9 22 8.5 8 7.5 7 4 P E 21 20 19 18 2 0 x/t 2 4 4 25 24 23

Plot of Internal Energy v/s x/t

0 x/t

Choose one of the following cases :Case 1: Sods problem Case 2: Left running expansion and right running "STRONG" shock Case 3: Left running shock and right running expansion Case 4: Double shock Case 5: Double expansion Case 6: Cavitation Enter a case no. <1-6>: 4 Case 4:Double Shock P1 = 450.000000 P4 = 45.000000 U1 = 20.000000 U4 = -6.000000 rho1 = 6.000000 rho4 = 6.000000 Solution of Riemann problem :P* = 1701.594168 U* = 8.933681 rho2 = 14.530506 rho3 = 31.206924 >>

Plot of U v/s x/t 20 15 10 5 0 10 5 0 2 4 6 x/t Plot of Pressure v/s x/t 1600 1400 1200 1000 P E 800 600 400 200 0 2 4 6 x/t 8 10 12 50 0 2 150 100 250 200 8 10 12 0 2 rho u 30 25 20 15

Plot of Density v/s x/t

6 x/t

10

12

Plot of Internal Energy v/s x/t

6 x/t

10

12

Choose one of the following cases :Case 1: Sods problem Case 2: Left running expansion and right running "STRONG" shock Case 3: Left running shock and right running expansion Case 4: Double shock Case 5: Double expansion Case 6: Cavitation Enter a case no. <1-6>: 5 Case 5:Double Expansion P1 = 40.000000 P4 = 40.000000 U1 = -2.000000 U4 = 2.000000 rho1 = 1.000000 rho4 = 2.500000 Solution of Riemann problem :P* = 24.897610 U* = 0.450296 rho2 = 0.712733 rho3 = 1.781833 >>

Plot of U v/s x/t 2 1.5 1 0.5 0 0.5 1 1.5 2 10 5 x/t Plot of Pressure v/s x/t 40 100 90 35 P E 80 70 60 50 40 25 10 5 x/t 0 5 10 0 5 rho u 2.4 2.2 2 1.8 1.6 1.4 1.2 1 0.8 10

Plot of Density v/s x/t

5 x/t

Plot of Internal Energy v/s x/t

30

5 x/t

Choose one of the following cases :Case 1: Sods problem Case 2: Left running expansion and right running "STRONG" shock Case 3: Left running shock and right running expansion Case 4: Double shock Case 5: Double expansion Case 6: Cavitation Enter a case no. <1-6>: 6 Case 6:Cavitation P1 = 0.400000 P4 = 0.400000 U1 = -20.000000 U4 = 20.000000 rho1 = 1.000000 rho4 = 1.000000 Cavitation is observed in this case of double expansion. No solution possible >>

You might also like