blob: 863795a573e7c930b9280bb82a34f9580ceaf618 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
clc ;funcprot(0);
//Example 2.2
//Initializing the variables
p1 = 22.4*10^3;//Initial Pressure
z1 = 11000;//Initial Height
z2 = 15000;//final Height
g = 9.81;//Acceleration due to gravity
R = 287; //Gas Constant
T = 273-56.6;//Temperature
//Calculations
p2 = p1*exp(-g*(z2-z1)/(R*T));
rho2=p2/(R*T);
disp(rho2,"Final Density (kg/m3) :",p2/1000,"Final Pressure (kN/m2):");
|