From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1187/CH2/EX2.1/1.sce | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 1187/CH2/EX2.1/1.sce (limited to '1187/CH2/EX2.1/1.sce') diff --git a/1187/CH2/EX2.1/1.sce b/1187/CH2/EX2.1/1.sce new file mode 100755 index 000000000..86f554e5d --- /dev/null +++ b/1187/CH2/EX2.1/1.sce @@ -0,0 +1,21 @@ +clc +d=1.5; // m +m=1.2; // kg +rate=0.0065; // K/m +R=287; // J/(kg.K) +T_0=288.15; // K +p_0=101*10^3; // Pa +g=9.81; // m/s^2 + +rho=m/(%pi*d^3/6); +rho_0=p_0/R/T_0; + +// log(rho/rho_0)=(g/R*rate - 1)*log((T_0-rate*z)/T_0) + +z=1/rate*(T_0-T_0*exp(log(rho/rho_0)/(g/R/rate-1))); + +disp("The height above sea level to which the ballon will rise = ") +disp(z) +disp("m") + +printf("The height above sea level to which the ballon will rise = %f m", z) \ No newline at end of file -- cgit