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 --- 858/CH4/EX4.1/example_1.sce | 9 +++++++++ 858/CH4/EX4.10/example_10.sce | 13 +++++++++++++ 858/CH4/EX4.11/example_11.sce | 23 +++++++++++++++++++++++ 858/CH4/EX4.12/example_12.sce | 19 +++++++++++++++++++ 858/CH4/EX4.13/example_13.sce | 22 ++++++++++++++++++++++ 858/CH4/EX4.14/example_14.sce | 20 ++++++++++++++++++++ 858/CH4/EX4.15/example_15.sce | 20 ++++++++++++++++++++ 858/CH4/EX4.16/example_16.sce | 24 ++++++++++++++++++++++++ 858/CH4/EX4.17/example_17.sce | 20 ++++++++++++++++++++ 858/CH4/EX4.18/example_18.sce | 20 ++++++++++++++++++++ 858/CH4/EX4.19/example_19.sce | 10 ++++++++++ 858/CH4/EX4.2/example_2.sce | 5 +++++ 858/CH4/EX4.20/example_20.sce | 10 ++++++++++ 858/CH4/EX4.21/example_21.sce | 26 ++++++++++++++++++++++++++ 858/CH4/EX4.22/example_22.sce | 29 +++++++++++++++++++++++++++++ 858/CH4/EX4.23/example_23.sce | 17 +++++++++++++++++ 858/CH4/EX4.3/example_3.sce | 14 ++++++++++++++ 858/CH4/EX4.4/example_4.sce | 4 ++++ 858/CH4/EX4.5/example_5.sce | 9 +++++++++ 858/CH4/EX4.6/example_6.sce | 4 ++++ 858/CH4/EX4.7/example_7.sce | 4 ++++ 858/CH4/EX4.8/example_8.sce | 31 +++++++++++++++++++++++++++++++ 858/CH4/EX4.9/example_9.sce | 18 ++++++++++++++++++ 23 files changed, 371 insertions(+) create mode 100755 858/CH4/EX4.1/example_1.sce create mode 100755 858/CH4/EX4.10/example_10.sce create mode 100755 858/CH4/EX4.11/example_11.sce create mode 100755 858/CH4/EX4.12/example_12.sce create mode 100755 858/CH4/EX4.13/example_13.sce create mode 100755 858/CH4/EX4.14/example_14.sce create mode 100755 858/CH4/EX4.15/example_15.sce create mode 100755 858/CH4/EX4.16/example_16.sce create mode 100755 858/CH4/EX4.17/example_17.sce create mode 100755 858/CH4/EX4.18/example_18.sce create mode 100755 858/CH4/EX4.19/example_19.sce create mode 100755 858/CH4/EX4.2/example_2.sce create mode 100755 858/CH4/EX4.20/example_20.sce create mode 100755 858/CH4/EX4.21/example_21.sce create mode 100755 858/CH4/EX4.22/example_22.sce create mode 100755 858/CH4/EX4.23/example_23.sce create mode 100755 858/CH4/EX4.3/example_3.sce create mode 100755 858/CH4/EX4.4/example_4.sce create mode 100755 858/CH4/EX4.5/example_5.sce create mode 100755 858/CH4/EX4.6/example_6.sce create mode 100755 858/CH4/EX4.7/example_7.sce create mode 100755 858/CH4/EX4.8/example_8.sce create mode 100755 858/CH4/EX4.9/example_9.sce (limited to '858/CH4') diff --git a/858/CH4/EX4.1/example_1.sce b/858/CH4/EX4.1/example_1.sce new file mode 100755 index 000000000..d87134ff3 --- /dev/null +++ b/858/CH4/EX4.1/example_1.sce @@ -0,0 +1,9 @@ +clc +clear +printf("example 4.1 page number 125\n\n") + +//to find water compressibility +delta_p=70; //in bar +Et=20680 //in bar +compressibility = delta_p/Et; +printf("compressibilty of water = %f",compressibility) diff --git a/858/CH4/EX4.10/example_10.sce b/858/CH4/EX4.10/example_10.sce new file mode 100755 index 000000000..ed8b4f6e7 --- /dev/null +++ b/858/CH4/EX4.10/example_10.sce @@ -0,0 +1,13 @@ +clc +clear +printf("example 4.10 page number 139\n\n") + +//to find the temperature increase + +Q=0.001*10^5 //in J/s +w=0.001*1000 //in kg/s +density=1000 //in kg/m3 +cp=4.19*10^3 //in J/kg K + +delta_T=Q/(w*cp); +printf("Temperature increase = %f degree celcius",delta_T) diff --git a/858/CH4/EX4.11/example_11.sce b/858/CH4/EX4.11/example_11.sce new file mode 100755 index 000000000..a10120041 --- /dev/null +++ b/858/CH4/EX4.11/example_11.sce @@ -0,0 +1,23 @@ +clc +clear +printf("example 4.11 page number 142\n\n") + +//to find the pressure + +u1=0; //in m/s +ws=0; +P1=0.7*10^5 //in Pa +P3=0 +density=1000 //in kg/m3 + +u3=((2*(P1-P3))/density)^0.5; +printf("u3 = %f m/s",u3) + +ratio_area=0.5; +u2=u3/ratio_area; +printf("\n\nu2 = %f m/s",u2) + +//applying bernoulli's equation +P2=1.7*10^5-((density*u2^2)/2) +printf("\n\nP2 = %f Pa",P2) +printf("\nthis flow is physically unreal") diff --git a/858/CH4/EX4.12/example_12.sce b/858/CH4/EX4.12/example_12.sce new file mode 100755 index 000000000..0d524f6f8 --- /dev/null +++ b/858/CH4/EX4.12/example_12.sce @@ -0,0 +1,19 @@ +clc +clear +printf("example 4.12 page number 143\n\n") + +//to find the power requirements + +Q=3800/(24*3600) //in m3/s +d=0.202 //in m + +u=Q/((3.14/4)*d^2); //in m/s +delta_P=5.3*10^6 //in Pa +density=897 //in kg/m3 +F=delta_P/density; //in J/kg +ws=9.8*30+F; +mass_flow_rate= Q*density; +power=(ws*mass_flow_rate)/0.6; + +printf("power required = %f kW",power/1000) + diff --git a/858/CH4/EX4.13/example_13.sce b/858/CH4/EX4.13/example_13.sce new file mode 100755 index 000000000..6d0973283 --- /dev/null +++ b/858/CH4/EX4.13/example_13.sce @@ -0,0 +1,22 @@ +clc +clear +printf("example 4.13 page number 146\n\n") + +//to find the tube length +density=1000 //in kg/m3 +viscosity=1*10^-3 //in Pa s +P=100*1000 //in Pa + +vdP=P/density; + +Q=2.5*10^-3/(24*3600) +A=3.14*(0.0005)^2/4; +u=Q/A; +printf("u = %f m/s",u) + +Re=density*u*0.0005/viscosity; +printf("\n\nRe = %f",Re) + +//F=18.86*L +L=(-u^2+vdP)/18.86; +printf("\n\nL = %f m",L) diff --git a/858/CH4/EX4.14/example_14.sce b/858/CH4/EX4.14/example_14.sce new file mode 100755 index 000000000..4cf05a660 --- /dev/null +++ b/858/CH4/EX4.14/example_14.sce @@ -0,0 +1,20 @@ +clc +clear +printf("example 4.14 page number 151\n\n") + +//to find the discharge pressure +d=0.025 //in m +u=3 //in m/s +density=894 //in kg/m3 +viscosity=6.2*10^4 //in Pa-s + +Re=(u*d*density)/viscosity; +f=0.0045; +L=50; + +delta_P=2*f*density*u^2*(L/d) +printf("frictional head loss = %f kPa",delta_P/1000) + +required_P=25*density*9.8; +total_head=delta_P+required_P; +printf("\n\ntotal pressure head = %f bar",total_head/10^5) diff --git a/858/CH4/EX4.15/example_15.sce b/858/CH4/EX4.15/example_15.sce new file mode 100755 index 000000000..2aa7c554e --- /dev/null +++ b/858/CH4/EX4.15/example_15.sce @@ -0,0 +1,20 @@ +clc +clear +printf("example 4.15 page number 152\n\n") + +//to find the level difference + +Q=0.8*10^-3; //in m3/s +d=0.026 //in m +A=(3.14*(d^2))/4 //in m2 + +u=Q/A; //in m/s +density=800 //in kg/m3 +viscosity=0.0005 //in Pa-s + +Re=(u*density*d)/viscosity; +f=0.079*(Re)^-0.25; +L=60 +h_f=2*f*((u^2)/9.8)*(L/d); + +printf("level difference = %f m",h_f) diff --git a/858/CH4/EX4.16/example_16.sce b/858/CH4/EX4.16/example_16.sce new file mode 100755 index 000000000..ad8351654 --- /dev/null +++ b/858/CH4/EX4.16/example_16.sce @@ -0,0 +1,24 @@ +clc +clear +printf("example 4.16 page number 153\n\n") + +//to find the engery cost +delta_z=50; //in m +L=290.36 //in m +d=0.18 //in m +Q=0.05 //in m3/s + +A=(3.14*d^2)/4; //in m2 +u=Q/A; //in m/s +density=1180; //in kg/m3 +viscosity=0.0012 //in Pa-s +Re=u*density*d/viscosity; + +f=0.004; +sigma_F=2*f*u^2*L/d; +ws=((9.8*50)+sigma_F)/0.6; +mass_flow_rate=Q*density; //in Kg/s +power=mass_flow_rate*ws/1000; //in KW +energy_cost=power*24*0.8; + +printf("Energy cost = Rs %f",energy_cost) diff --git a/858/CH4/EX4.17/example_17.sce b/858/CH4/EX4.17/example_17.sce new file mode 100755 index 000000000..2656cc805 --- /dev/null +++ b/858/CH4/EX4.17/example_17.sce @@ -0,0 +1,20 @@ +clc +clear +printf("example 4.17 page number 154\n\n") + +//to find the pressure loss +density=998 //in kg/m3 +viscosity=0.0008 //in Pa-s +d=0.03 //in m +u=1.2 //in m/s + +Re=density*d*u/viscosity; + +f=0.0088; +D=1 //in m +N=10 +L=3.14*D*N; +delta_P=(2*f*u^2*L)/d; //in Pa +delta_P_coil=delta_P*(1+(3.54*(d/D))); + +printf("frictional pressure drop = %f kPa",delta_P_coil) diff --git a/858/CH4/EX4.18/example_18.sce b/858/CH4/EX4.18/example_18.sce new file mode 100755 index 000000000..5f7d40a9f --- /dev/null +++ b/858/CH4/EX4.18/example_18.sce @@ -0,0 +1,20 @@ +clc +clear +printf("example 4.18 page number 154\n\n") + +//to find pressure drop per unit length + +b=0.050 //in m +a=0.025 //in m +d_eq=b-a //in m +density=1000 //in kg/m3 +u=3 //in m/s +viscosity = 0.001 + +Re=d_eq*u*density/viscosity; + +e=40*10^6 //in m +f=0.0062; +P_perunit_length=2*f*density*u^2/d_eq; //in Pa/m + +printf("pressure per unit length = %f Pa/m",P_perunit_length) diff --git a/858/CH4/EX4.19/example_19.sce b/858/CH4/EX4.19/example_19.sce new file mode 100755 index 000000000..eb57ad25e --- /dev/null +++ b/858/CH4/EX4.19/example_19.sce @@ -0,0 +1,10 @@ +clc +clear +printf("example 4.19 page number 155\n\n") + +//to find the flow rate +d = 0.3 //in m +u = 17.63 //avg velocity in m/s + +q = (3.14/4)*d^2*u; +printf("volumetric flow rate = %f cubic meter per second",q) diff --git a/858/CH4/EX4.2/example_2.sce b/858/CH4/EX4.2/example_2.sce new file mode 100755 index 000000000..faf242b5a --- /dev/null +++ b/858/CH4/EX4.2/example_2.sce @@ -0,0 +1,5 @@ +clc +clear +printf("example 4.2 page number 125\n\n") + +disp("this is a theoritical problem,book shall be referred for solution") diff --git a/858/CH4/EX4.20/example_20.sce b/858/CH4/EX4.20/example_20.sce new file mode 100755 index 000000000..2ecddb63f --- /dev/null +++ b/858/CH4/EX4.20/example_20.sce @@ -0,0 +1,10 @@ +clc +clear +printf("example 4.20 page number 156\n\n") + +//to find the size of pipe required +d = 0.15 //in m +u = (0.0191/0.15^2); //in m/s + +q = (3.14/4)*d^2*u; +printf("volumetric flow rate = %f cubic meter/s",q) diff --git a/858/CH4/EX4.21/example_21.sce b/858/CH4/EX4.21/example_21.sce new file mode 100755 index 000000000..f00ef1cb9 --- /dev/null +++ b/858/CH4/EX4.21/example_21.sce @@ -0,0 +1,26 @@ +clc +clear +printf("example 4.21 page number 160\n\n") + +//to find the pressure gradient + +Q=0.0003 //in m3/s +d=0.05 //in m +A=(3.14*d^2)/4; + +u=Q/A; + +density=1000; //in kg/m3 +viscosity=0.001; //in Pa-s +e=0.3; +dp=0.00125; //particle diameter in m + +Re=(dp*u*density)/(viscosity*(1-e)); +fm=(150/Re)+1.75; +L=0.5 //in m +delta_Pf=fm*((density*L*u^2)/dp)*((1-e)/e^3); //in Pa + +//applying bernoulli's equation, we get +delta_P=delta_Pf-(density*9.8*L); +pressure_gradient=delta_P/(L*1000); //in kPa/m +printf("required pressure gradient = %f kPa/m of packed height",pressure_gradient) diff --git a/858/CH4/EX4.22/example_22.sce b/858/CH4/EX4.22/example_22.sce new file mode 100755 index 000000000..8508ea21f --- /dev/null +++ b/858/CH4/EX4.22/example_22.sce @@ -0,0 +1,29 @@ +clc +clear +printf("example 4.22 page number 163\n\n") + +//to find minimum fluidization velocity + +d=120*10^-6 //in m +density=2500 //particle density in kg/m3 +e_min=0.45; +density_water=1000 //in kg/m3 +viscosity=0.9*10^-3; //in Pa-s +umf=(d^2*(density-density_water)*9.8*e_min^3)/(150*viscosity*(1-e_min)); +printf("minimum fludization velocity = %f m/s",umf) + +Re_mf=(d*umf*density_water)/(viscosity*(1-e_min)); + + +//given that uo/umf=10 +function[f] = F(e) + f = e^3+1.657*e-1.675; +endfunction + +//initial guess +x = 10; +e = fsolve(x,F); + +printf("\n\ne = %f",e) +length_ratio=(1-e_min)/(1-e); +printf("\n\nratio of heights = %f",length_ratio) diff --git a/858/CH4/EX4.23/example_23.sce b/858/CH4/EX4.23/example_23.sce new file mode 100755 index 000000000..a8c7ddc34 --- /dev/null +++ b/858/CH4/EX4.23/example_23.sce @@ -0,0 +1,17 @@ +clc +clear +printf("example 4.23 page number 167\n\n") + +//to find the power requirements + +P=9807 //in Pa +density=1000 //in kg/m3 +Q=250/(60*density) +head=25 //in m + +w= head*Q*P; //in kW +power_delivered=w/0.65; +power_taken=power_delivered/0.9; + +printf("power_delivered = %f kW",power_delivered/1000) +printf("\n\npower taken by motor = %f kW",power_taken/1000) diff --git a/858/CH4/EX4.3/example_3.sce b/858/CH4/EX4.3/example_3.sce new file mode 100755 index 000000000..89b3cddc0 --- /dev/null +++ b/858/CH4/EX4.3/example_3.sce @@ -0,0 +1,14 @@ +clc +clear +printf("example 4.3 page number 128\n\n") + +//to find the viscosity of oil + +F=0.5*9.8; //in N +A=3.14*0.05*0.15; //in m2 +shear_stress=F/A; //in Pa +printf("shear_stress = %f Pa",shear_stress) + +velocity_distribution =0.1/(0.05*10^-3); +viscosity=shear_stress/velocity_distribution; +printf("\n\nviscosity = %f Pa-s",viscosity) diff --git a/858/CH4/EX4.4/example_4.sce b/858/CH4/EX4.4/example_4.sce new file mode 100755 index 000000000..22ffeefa5 --- /dev/null +++ b/858/CH4/EX4.4/example_4.sce @@ -0,0 +1,4 @@ +clc +clear +printf("example 4.4 page number 130\n\n") +printf("this is a theoritical problem,book shall be referred for solution") diff --git a/858/CH4/EX4.5/example_5.sce b/858/CH4/EX4.5/example_5.sce new file mode 100755 index 000000000..718f55335 --- /dev/null +++ b/858/CH4/EX4.5/example_5.sce @@ -0,0 +1,9 @@ +clc +clear +printf("example 4.5 page number 133\n\n") + +//to find variation of losses with velocity +loss_ratio=3.6; //delta_P2/delta_P1=3.6 +velocity_ratio=2; //u2/u1=2 +n=log2(loss_ratio); //delta_P2/delta_P1=(u2/u1)^n +printf("power constant = %f flow is turbulent",n) diff --git a/858/CH4/EX4.6/example_6.sce b/858/CH4/EX4.6/example_6.sce new file mode 100755 index 000000000..77bf07c1e --- /dev/null +++ b/858/CH4/EX4.6/example_6.sce @@ -0,0 +1,4 @@ +clc +clear +printf("example 4.6 page number 133\n\n") +printf("this is a theoritical problem,book shall be referred for solution") diff --git a/858/CH4/EX4.7/example_7.sce b/858/CH4/EX4.7/example_7.sce new file mode 100755 index 000000000..1d0b4af71 --- /dev/null +++ b/858/CH4/EX4.7/example_7.sce @@ -0,0 +1,4 @@ +clc +clear +printf("example 4.7 page number 134") +disp("this is a theoritical problem,book shall be referred for solution") diff --git a/858/CH4/EX4.8/example_8.sce b/858/CH4/EX4.8/example_8.sce new file mode 100755 index 000000000..f0d9f2fd7 --- /dev/null +++ b/858/CH4/EX4.8/example_8.sce @@ -0,0 +1,31 @@ +clc +clear +printf("example 4.8 page number 137\n\n") + +//to find the boundary layer properties + +disp('part 1') +x=0.05 //in m +density=1000 //in kg/m3 +viscosity=1*10^-3 //in Pa-s +u=1 //in m/s +Re=(density*u*x)/viscosity; + +printf("Reynolds Number = %f",Re) + +thickness=4.65*x*(Re)^-0.5; +printf("\nboundary layer thickness = %f m\n",thickness) + +disp('part 2') +Re_x=3.2*10^5; +x_cr=(Re_x*viscosity)/(density*u); +printf("transition takes place at x = %f m\n",x_cr) + +disp('part 3') +x=0.5 //in m +Re=(density*u*x)/viscosity; +thickness=0.367*x*(Re)^-0.2; +printf("boundary layer thickness= %f m",thickness) + +t_sublayer=71.5*x*(Re)^-0.9; +printf("\nsub layer thickness= %f m",t_sublayer) diff --git a/858/CH4/EX4.9/example_9.sce b/858/CH4/EX4.9/example_9.sce new file mode 100755 index 000000000..3ccdea2eb --- /dev/null +++ b/858/CH4/EX4.9/example_9.sce @@ -0,0 +1,18 @@ +clc +clear +printf("example 4.9 page number 138\n\n") + +//to find the flow properties +d1=0.05 //in m +A1=(3.14*d1^2)/4; +density_1=2.1 //in kg/m3 +u1=15 //in m/s +P1=1.8; //in bar +P2=1.3; //in bar + +w=density_1*A1*u1; +density_2=density_1*(P2/P1); +printf("density at section 2 = %f kg/cubic meter",density_2) + +u2=u1*(density_1/density_2)*(0.05/0.075)^2; +printf("\n\nvelocity at section 2 = %f m/s",u2) -- cgit