From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3720/CH12/EX12.12/Ex12_12.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 3720/CH12/EX12.12/Ex12_12.sce (limited to '3720/CH12/EX12.12/Ex12_12.sce') diff --git a/3720/CH12/EX12.12/Ex12_12.sce b/3720/CH12/EX12.12/Ex12_12.sce new file mode 100644 index 000000000..1f2ce61eb --- /dev/null +++ b/3720/CH12/EX12.12/Ex12_12.sce @@ -0,0 +1,23 @@ +// Example 12_12 +clc;clear;funcprot(0); +//Given values +Ma_1=2.0;// Mach number +P_1=230;// kPa +delta=10;// degree +//Properties +k=1.4//The specific heat ratio + +//Calculation +theta=delta; +v_1=(sqrt((k+1)/(k-1))*atand(sqrt(((k-1)*(Ma_1^2-1))/(k+1))))-atand(sqrt(Ma_1^2-1));// degree +v_2=theta+v_1;// degree +// Ma_2=y(1); +function[X]=Machnumber(y); + X(1)=((sqrt((k+1)/(k-1))*atand(sqrt(((k-1)*(y(1)^2-1))/(k+1))))-atand(sqrt(y(1)^2-1))-v_2); +endfunction +y=[1]; +z=fsolve(y,Machnumber); +printf('The downstream Mach number Ma_2=%0.3f\n',z(1)); +Ma_2=z(1); +P_2=((((1+(((k-1)/2)*Ma_2^2)))^(-k/(k-1)))/(((1+(((k-1)/2)*Ma_1^2)))^(-k/(k-1))))*(P_1); +printf('The downstream pressure,P_2=%0.0f kPa\n',P_2); -- cgit