blob: 2fbcea3e68111d95ef788b394b74a1bc1ac752b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clc;
disp("Example 10.2")
G=50 // in kg/m^2/s
L=1000 // length in m
d=0.075 // diameter in m
T=298 // in kelvin
mew=1e-5 //viscosity
p2=1.1e5 // pressure of air
m=16 // molecular mass
Re=d*G/mew
f=0.0014+(0.125/(Re^0.32))
p1=(2*f*L*G*G*8314*T/(d*m)+(p2^2))^0.5
if((p1/p2)>1) then
p1=(2*f*L*G*G*8314*T/(d*m)+(p2^2)+(2*G*G*8314*T*log(p1/p2)/m))^0.5
end
disp(p1,"Pressure is ")
disp(" Pascals")
|