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 --- 1379/CH2/EX2.1.1/example2_1.sce | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 1379/CH2/EX2.1.1/example2_1.sce (limited to '1379/CH2/EX2.1.1') diff --git a/1379/CH2/EX2.1.1/example2_1.sce b/1379/CH2/EX2.1.1/example2_1.sce new file mode 100755 index 000000000..1cc9f2556 --- /dev/null +++ b/1379/CH2/EX2.1.1/example2_1.sce @@ -0,0 +1,35 @@ + + +//exapple 2.1 +clc; funcprot(0); +// Initialization of Variable +pi=3.1428; +mmm=16.04/1000;//molar mass of methane +mV=22.414/1000;//molar volume +R=8.314; +mu=1.08/10^5; +r=4.2/100;//radius +rr=0.026/2/r;//relative roughness +Pfinal=560*1000; +tfinal=273+24; +l=68.5; +m=2.35;//mass flow rate +//calculation +A=pi*r^2; +A=round(A*10^5)/10^5; +rho=mmm/mV; +rho24=mmm*Pfinal*273/mV/101.3/tfinal;//density at 24'C +u=m/rho24/A; +Re=u*rho24*2*r/mu; +//from graph +phi=0.0032; +//for solving using fsolve we copy numerical value of constant terms +//using back calculation +//as pressure maintained should be more than Pfinal so guessed value is Pfinal; +function[y]=eqn(x) + y=m^2/A^2*log(x/Pfinal)+(Pfinal^2-x^2)/2/R/tfinal*mmm+4*phi*l/2/r*m^2/A^2; +endfunction +[x,v,info]=fsolve(560*10^3,eqn); +disp(x/1000,"pressure maintained at compressor in (kN/m^2):"); + + -- cgit