Professional Documents
Culture Documents
A
pitot tube on the vertical tail measures a pressure of 29,600 Pa. At which Mach number is the
airplane flying? ( At 12 km, the pressure in a standard atmosphere is 19320 Pa).
1 1
=[1+ ( ) (2 )]
2
M= Mach number
Analytical Solution:
M= 0.805
package regulafalsi2;
import java.util.Scanner;
double Po,P,y,M,A,a,b,d1,d2,d3,fxa,fxb,c,fxc,fxd,xa,xb;
int n,i,j;
double weir [][]= new double [30][8];
Domagas|Faycan|Lopez|Umalla|Dacwag|Danigos|Degay,Z.|Gamboa|Piano|Ramos,E. Page 1
System.out.println(" At 12km, the pressure in a standard atmosphere is 19320 Pa");
fxa=((Po/P)-(Math.pow(d1,3.5)));
fxb=((Po/P)-(Math.pow(d2,3.5)));
xa= a*fxb;
xb=b*fxa;
c= ((xa-xb)/(fxb-fxa));
d3=(1+((y-1)/2)*c*c);
fxc=((Po/P)-(Math.pow(d3,3.5)));
fxd= fxa*fxb;
if (j==0){weir[n][j]=a;}
if (j==1){weir[n][j]=fxa;}
if (j==2){weir[n][j]=b;}
if (j==3){weir[n][j]=fxb;}
if (j==4){weir[n][j]=c;}
if (j==5){weir[n][j]=fxc;}
if (j==6){weir[n][j]=fxd;}
System.out.printf("%10.4f", weir[n][j]);
System.out.print(" ");
}
System.out.println(" ");
if(fxa*c>0){a=c;}
else {b=c;}
}}}
Domagas|Faycan|Lopez|Umalla|Dacwag|Danigos|Degay,Z.|Gamboa|Piano|Ramos,E. Page 2
The result of the program is:
Domagas|Faycan|Lopez|Umalla|Dacwag|Danigos|Degay,Z.|Gamboa|Piano|Ramos,E. Page 3