diff options
Diffstat (limited to '3785/CH12/EX12.5/Ex12_5.sce')
-rw-r--r-- | 3785/CH12/EX12.5/Ex12_5.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/3785/CH12/EX12.5/Ex12_5.sce b/3785/CH12/EX12.5/Ex12_5.sce new file mode 100644 index 000000000..1563e54cc --- /dev/null +++ b/3785/CH12/EX12.5/Ex12_5.sce @@ -0,0 +1,16 @@ +// Example 12_5
+clc;funcprot(0);
+// Given data
+r=1.3;// The specific heat ratio
+V_e=0.90;// Exit velocity in % of maximum possible velocity
+
+// Calculation
+V_mebya_s=sqrt(2/(r-1));// The maximum possible exit velocity
+function[X]=machnumber(y)
+ X(1)=(V_e*V_mebya_s)-(y(1)*(1+((0.3*y(1)^2)/2))^(-1/2));
+endfunction
+y=[1];
+M_e=fsolve(y,machnumber);// The Mach number of the exit flow
+A_ebyA_c=M_e*((2/(r+1))*((1+(((r-1)/2)*(M_e)^2))))^((r+1)/(2*(r-1)));// The area ratio
+D_r=sqrt(A_ebyA_c);// Corresponding diameter ratio
+printf("\nThe exit Mach number,M_e=%1.3f \nThe area ratio=%1.3e \nThe diameter ratio=%2.2f",M_e,A_ebyA_c,D_r)
|