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 --- 2135/CH1/EX1.10/Exa_1_10.sce | 15 +++++++++++++++ 2135/CH1/EX1.11/Exa_1_11.sce | 19 +++++++++++++++++++ 2135/CH1/EX1.12/Exa_1_12.sce | 21 +++++++++++++++++++++ 2135/CH1/EX1.13/Exa_1_13.sce | 16 ++++++++++++++++ 2135/CH1/EX1.14/Exa_1_14.sce | 16 ++++++++++++++++ 2135/CH1/EX1.16/Exa_1_16.sce | 14 ++++++++++++++ 2135/CH1/EX1.17/Exa_1_17.sce | 21 +++++++++++++++++++++ 2135/CH1/EX1.18/Exa_1_18.sce | 11 +++++++++++ 2135/CH1/EX1.19/Exa_1_19.sce | 17 +++++++++++++++++ 2135/CH1/EX1.20/Exa_1_20.sce | 34 ++++++++++++++++++++++++++++++++++ 2135/CH1/EX1.21/Exa_1_21.sce | 17 +++++++++++++++++ 2135/CH1/EX1.22/Exa_1_22.sce | 20 ++++++++++++++++++++ 2135/CH1/EX1.23/Exa_1_23.sce | 27 +++++++++++++++++++++++++++ 2135/CH1/EX1.24/Exa_1_24.sce | 17 +++++++++++++++++ 2135/CH1/EX1.26/Exa_1_26.sce | 17 +++++++++++++++++ 2135/CH1/EX1.27/Exa_1_27.sce | 16 ++++++++++++++++ 2135/CH1/EX1.28/Exa_1_28.sce | 12 ++++++++++++ 2135/CH1/EX1.29/Exa_1_29.sce | 15 +++++++++++++++ 2135/CH1/EX1.30/Exa_1_30.sce | 22 ++++++++++++++++++++++ 2135/CH1/EX1.31/Exa_1_31.sce | 15 +++++++++++++++ 2135/CH1/EX1.32/Exa_1_32.sce | 13 +++++++++++++ 2135/CH1/EX1.33/Exa_1_33.sce | 16 ++++++++++++++++ 2135/CH1/EX1.34/Exa_1_34.sce | 23 +++++++++++++++++++++++ 2135/CH1/EX1.35/Exa_1_35.sce | 22 ++++++++++++++++++++++ 2135/CH1/EX1.36/Exa_1_36.sce | 20 ++++++++++++++++++++ 2135/CH1/EX1.37/Exa_1_37.sce | 20 ++++++++++++++++++++ 2135/CH1/EX1.38/Exa_1_38.sce | 16 ++++++++++++++++ 2135/CH1/EX1.39/Exa_1_39.sce | 17 +++++++++++++++++ 2135/CH1/EX1.4/Exa_1_4.sce | 22 ++++++++++++++++++++++ 2135/CH1/EX1.40/Exa_1_40.sce | 26 ++++++++++++++++++++++++++ 2135/CH1/EX1.41/Exa_1_41.sce | 26 ++++++++++++++++++++++++++ 2135/CH1/EX1.42/Exa_1_42.sce | 41 +++++++++++++++++++++++++++++++++++++++++ 2135/CH1/EX1.43/Exa_1_43.sce | 29 +++++++++++++++++++++++++++++ 2135/CH1/EX1.44/Exa_1_44.sce | 32 ++++++++++++++++++++++++++++++++ 2135/CH1/EX1.5/Exa_1_5.sce | 13 +++++++++++++ 2135/CH1/EX1.6/Exa_1_6.sce | 25 +++++++++++++++++++++++++ 2135/CH1/EX1.7/Exa_1_7.sce | 22 ++++++++++++++++++++++ 2135/CH1/EX1.8/Exa_1_8.sce | 13 +++++++++++++ 2135/CH1/EX1.9/Exa_1_9.sce | 27 +++++++++++++++++++++++++++ 39 files changed, 785 insertions(+) create mode 100755 2135/CH1/EX1.10/Exa_1_10.sce create mode 100755 2135/CH1/EX1.11/Exa_1_11.sce create mode 100755 2135/CH1/EX1.12/Exa_1_12.sce create mode 100755 2135/CH1/EX1.13/Exa_1_13.sce create mode 100755 2135/CH1/EX1.14/Exa_1_14.sce create mode 100755 2135/CH1/EX1.16/Exa_1_16.sce create mode 100755 2135/CH1/EX1.17/Exa_1_17.sce create mode 100755 2135/CH1/EX1.18/Exa_1_18.sce create mode 100755 2135/CH1/EX1.19/Exa_1_19.sce create mode 100755 2135/CH1/EX1.20/Exa_1_20.sce create mode 100755 2135/CH1/EX1.21/Exa_1_21.sce create mode 100755 2135/CH1/EX1.22/Exa_1_22.sce create mode 100755 2135/CH1/EX1.23/Exa_1_23.sce create mode 100755 2135/CH1/EX1.24/Exa_1_24.sce create mode 100755 2135/CH1/EX1.26/Exa_1_26.sce create mode 100755 2135/CH1/EX1.27/Exa_1_27.sce create mode 100755 2135/CH1/EX1.28/Exa_1_28.sce create mode 100755 2135/CH1/EX1.29/Exa_1_29.sce create mode 100755 2135/CH1/EX1.30/Exa_1_30.sce create mode 100755 2135/CH1/EX1.31/Exa_1_31.sce create mode 100755 2135/CH1/EX1.32/Exa_1_32.sce create mode 100755 2135/CH1/EX1.33/Exa_1_33.sce create mode 100755 2135/CH1/EX1.34/Exa_1_34.sce create mode 100755 2135/CH1/EX1.35/Exa_1_35.sce create mode 100755 2135/CH1/EX1.36/Exa_1_36.sce create mode 100755 2135/CH1/EX1.37/Exa_1_37.sce create mode 100755 2135/CH1/EX1.38/Exa_1_38.sce create mode 100755 2135/CH1/EX1.39/Exa_1_39.sce create mode 100755 2135/CH1/EX1.4/Exa_1_4.sce create mode 100755 2135/CH1/EX1.40/Exa_1_40.sce create mode 100755 2135/CH1/EX1.41/Exa_1_41.sce create mode 100755 2135/CH1/EX1.42/Exa_1_42.sce create mode 100755 2135/CH1/EX1.43/Exa_1_43.sce create mode 100755 2135/CH1/EX1.44/Exa_1_44.sce create mode 100755 2135/CH1/EX1.5/Exa_1_5.sce create mode 100755 2135/CH1/EX1.6/Exa_1_6.sce create mode 100755 2135/CH1/EX1.7/Exa_1_7.sce create mode 100755 2135/CH1/EX1.8/Exa_1_8.sce create mode 100755 2135/CH1/EX1.9/Exa_1_9.sce (limited to '2135/CH1') diff --git a/2135/CH1/EX1.10/Exa_1_10.sce b/2135/CH1/EX1.10/Exa_1_10.sce new file mode 100755 index 000000000..9ec40beb1 --- /dev/null +++ b/2135/CH1/EX1.10/Exa_1_10.sce @@ -0,0 +1,15 @@ +//Exa 1.10 +clc; +clear; +close; +format('v',9); + +//Given Data : +Patm=75;//mm of Hg +Patm=Patm*1.01325/76;//bar +rho=800;//Kg.m^3 +h=30/100;//m +g=9.81;//gravity constant +deltaP=rho*g*h*10^-5;//bar +Pabs=deltaP+Patm;//bar +disp(Pabs,"Absolute pressure of gas in bar : "); diff --git a/2135/CH1/EX1.11/Exa_1_11.sce b/2135/CH1/EX1.11/Exa_1_11.sce new file mode 100755 index 000000000..0aebf462c --- /dev/null +++ b/2135/CH1/EX1.11/Exa_1_11.sce @@ -0,0 +1,19 @@ +//Exa 1.11 +clc; +clear; +close; +format('v',7); + +//Given Data : +h1=5.1/100;//m +h2=10/100;//m +Patm=75.5;//mm of Hg +Patm=Patm*1.01325/76*10^5;//bar +sg_k=0.8; +sg_Hg=13.6; +rho_w=1000;//Kg/m^3 +g=9.81;//gravity constant +P_kerosine=sg_k*rho_w*g*h1;//N/m^2 +P_Hg=sg_Hg*rho_w*g*h2;//N/m^2 +Pabs=P_Hg+Patm-P_kerosine;//Nm^2 +disp(Pabs/1000,"Absolute pressure of gas in KPa : "); diff --git a/2135/CH1/EX1.12/Exa_1_12.sce b/2135/CH1/EX1.12/Exa_1_12.sce new file mode 100755 index 000000000..caa1a154a --- /dev/null +++ b/2135/CH1/EX1.12/Exa_1_12.sce @@ -0,0 +1,21 @@ +//Exa 1.12 +clc; +clear; +close; +format('v',7); + +//Given Data : +t_ice=0;//degree centigrade +p_ice=1.5; +t_steam=100;//degree centigrade +p_steam=7.5; +//t=a*log(p)+b +//solving for a and b by matrix +A=[log(p_ice) 1;log(p_steam) 1]; +B=[t_ice;t_steam]; +X=A^-1*B; +a=X(1); +b=X(2); +p=3.5;//bar +t=a*log(p)+b;//degree C +disp(t,"Temperature scale in degree C : "); diff --git a/2135/CH1/EX1.13/Exa_1_13.sce b/2135/CH1/EX1.13/Exa_1_13.sce new file mode 100755 index 000000000..0e9ca9b96 --- /dev/null +++ b/2135/CH1/EX1.13/Exa_1_13.sce @@ -0,0 +1,16 @@ +//Exa 1.13 +clc; +clear; +close; +format('v',7); + +//Given Data : +theta1_p1=273.16;//K +p_gauge1=32;//mm of Hg +p_atm=752;//mm of Hg +p_gauge2=76;//mm of Hg +P1=p_gauge1+p_atm;//mm of Hg +P2=p_gauge2+p_atm;//mm of Hg +theta2_p2=theta1_p1*(P2/P1);//in K +theta2_p2=theta2_p2-273;//degree C +disp(theta2_p2,"Temperature in degree C : "); diff --git a/2135/CH1/EX1.14/Exa_1_14.sce b/2135/CH1/EX1.14/Exa_1_14.sce new file mode 100755 index 000000000..0470cd700 --- /dev/null +++ b/2135/CH1/EX1.14/Exa_1_14.sce @@ -0,0 +1,16 @@ +//Exa 1.14 +clc; +clear; +close; +format('v',7); + +//Given Data : +R0=2.8;//ohm +t0=0;//degree C +R1=3.8;//ohm +t1=100;//degree C +R2=5.8;//ohm\ +//R=R0*(1+alfa*t) +alfa=(R1/R0-1)/t1; +t2=(R2/R0-1)/alfa;//degree C +disp(t2,"Temperature at R2 in degree C : "); diff --git a/2135/CH1/EX1.16/Exa_1_16.sce b/2135/CH1/EX1.16/Exa_1_16.sce new file mode 100755 index 000000000..4e65b53dd --- /dev/null +++ b/2135/CH1/EX1.16/Exa_1_16.sce @@ -0,0 +1,14 @@ +//Exa 1.16 +clc; +clear; +close; +format('v',7); + +//Given Data : +//F=2*C; +FbyC=2; +disp("(F-32)/9=C/5"); +C=32/(FbyC-9/5);//degree C +F=C*FbyC;//degree F +disp(F+460,"Temperature fluid in degree R : "); +disp(C+273,"Temperature fluid in degree K : "); diff --git a/2135/CH1/EX1.17/Exa_1_17.sce b/2135/CH1/EX1.17/Exa_1_17.sce new file mode 100755 index 000000000..a3a2a3dd7 --- /dev/null +++ b/2135/CH1/EX1.17/Exa_1_17.sce @@ -0,0 +1,21 @@ +//Exa 1.17 +clc; +clear; +close; +format('v',7); + +//Given Data : +T1=0;//degree centigrade +K1=1.83; +T2=100;//degree centigrade +K2=6.78; +//T=a*log(K)+b +//solving for a and b by matrix +A=[log(K1) 1;log(K2) 1]; +B=[T1;T2]; +X=A^-1*B; +a=X(1); +b=X(2); +K=2.42;//bar +T=a*log(K)+b;//degree C +disp(T,"Temperature in degree C : "); diff --git a/2135/CH1/EX1.18/Exa_1_18.sce b/2135/CH1/EX1.18/Exa_1_18.sce new file mode 100755 index 000000000..3a8abf85b --- /dev/null +++ b/2135/CH1/EX1.18/Exa_1_18.sce @@ -0,0 +1,11 @@ +//Exa 1.18 +clc; +clear; +close; +format('v',6); + +//Given Data : +//t=N/30-100/3 +//t=N +N=(-100/3)/(1-1/30);//degree C +disp(N,"Temperatur at which degree C equals to degree N(degree C) : "); diff --git a/2135/CH1/EX1.19/Exa_1_19.sce b/2135/CH1/EX1.19/Exa_1_19.sce new file mode 100755 index 000000000..5413d7f8f --- /dev/null +++ b/2135/CH1/EX1.19/Exa_1_19.sce @@ -0,0 +1,17 @@ +//Exa 1.19 +clc; +clear; +close; +format('v',6); + +//Given Data : +//epsilon=0.2*t-5*10^-4*t^2;//mV +t_ice=0;//degree C +epsilon_ice=0.2*t_ice-5*10^-4*t_ice^2;//mV +t_steam=100;//degree C +epsilon_steam=0.2*t_steam-5*10^-4*t_steam^2;//mV +//At t=60; +t=60;//degree C +epsilon=0.2*t-5*10^-4*t^2;//mV +reading=(t_steam-t_ice)/(epsilon_steam-epsilon_ice)*(epsilon-epsilon_ice) +disp(reading,"Thermometer will read(degree C) : "); diff --git a/2135/CH1/EX1.20/Exa_1_20.sce b/2135/CH1/EX1.20/Exa_1_20.sce new file mode 100755 index 000000000..308cead2a --- /dev/null +++ b/2135/CH1/EX1.20/Exa_1_20.sce @@ -0,0 +1,34 @@ +//Exa 1.20 +clc; +clear; +close; +format('v',7); + +//Given Data : +tA1=0;//degree centigrade +tB1=0;//degree centigrade +tA2=100;//degree centigrade +tB2=100;//degree centigrade +//tA=l+m*tB+n*tb^2 +l=0;//by putting tA and tB equals to zero +//tA=m*tB+n*tB^2 +//Thermometer immersed in oil bath +tA1=51;//degree centigrade +tB1=50;//degree centigrade +//solving for m and n by matrix +A=[tB1 tB1^2;tB2 tB2^2]; +B=[tA1;tA2]; +X=A^-1*B; +m=X(1); +n=X(2); +tA=25;//degree centigrade +P=[n m -tA];//polynomial for calculation of tB +tB=roots(P); +tB=tB(2);//neglecting +ve sign +disp(tB,"When A reads 25 degree C, B reading in degree C : "); +//let tB=25;//degree C +tB=25;//degree C +tA=l+m*tB+n*tB^2;//degree C +disp(tA,"When B reads 25 degree C, A reading in degree C : "); +disp("B is correct. A shows error greater than B.") +//Answer is not accurate in the book. diff --git a/2135/CH1/EX1.21/Exa_1_21.sce b/2135/CH1/EX1.21/Exa_1_21.sce new file mode 100755 index 000000000..0afd942e4 --- /dev/null +++ b/2135/CH1/EX1.21/Exa_1_21.sce @@ -0,0 +1,17 @@ +//Exa 1.21 +clc; +clear; +close; +format('v',7); + +//Given Data : +p=10;//bar +T=327+273;//K +M=42.4; +m=1;//Kg +Rdegree=8314.3;//Nm/KgK +R=Rdegree/M;//Nm/KgK +V=m*R*T/p/10^5;//m^3/Kg +disp(V,"Specific volume in m^3/Kg ; "); +rho=m/V;//Kg/m^3 +disp(rho,"Density of gas in Kg/m^3 : "); diff --git a/2135/CH1/EX1.22/Exa_1_22.sce b/2135/CH1/EX1.22/Exa_1_22.sce new file mode 100755 index 000000000..fe3b78b6b --- /dev/null +++ b/2135/CH1/EX1.22/Exa_1_22.sce @@ -0,0 +1,20 @@ +//Exa 1.22 +clc; +clear; +close; +format('v',6); + +//Given Data : +Rdegree=8314.3;//Universal Gas Constant +M=32;//Molecular weight of gas +p1=3*10^6;//N/m^2 +V1=250*10^-3;//m^3 +T1=20+273;//K +p2=1.8*10^6;//N/m^2 +V2=V1;//m^3 +T2=16+273;//K +R=Rdegree/M;//Nm/KgK +m1=p1*V1/R/T1;//Kg +m2=p2*V2/R/T2;//Kg +mass_used=m1-m2;//Kg +disp(mass_used,"Mass of oxygen used in Kg : "); diff --git a/2135/CH1/EX1.23/Exa_1_23.sce b/2135/CH1/EX1.23/Exa_1_23.sce new file mode 100755 index 000000000..b6b87bab8 --- /dev/null +++ b/2135/CH1/EX1.23/Exa_1_23.sce @@ -0,0 +1,27 @@ +//Exa 1.23 +clc; +clear; +close; +format('v',8); + +//Given Data : +Rdegree=8314.3;//Universal Gas Constant +r=12;//meter +Patm=75;//cm of Hg +Patm=Patm/76*1.01325*10^5;//N/m^2 +V=4/3*%pi*r^3;//m^3 +M_air=28.97; +M_H2=2 +Tair=18+273;//K +g=9.81;//gravity constant +Rair=Rdegree/M_air;//Nm/KgK +RH2=Rdegree/M_H2;//Nm/KgK +//p*V=m*R*T +m_air=Patm*V/Rair/Tair;//Kg +disp(m_air,"Mass of air in kg : "); +n_air=m_air/M_air;//moles +disp(n_air,"No. of moles : "); +m_H2=n_air*M_H2;//Kg +disp(m_H2,"Mass of H2 in kg : "); +Load=g*(m_air-m_H2);//N +disp(Load,"Load balloon can lift in N ; "); diff --git a/2135/CH1/EX1.24/Exa_1_24.sce b/2135/CH1/EX1.24/Exa_1_24.sce new file mode 100755 index 000000000..0862d5657 --- /dev/null +++ b/2135/CH1/EX1.24/Exa_1_24.sce @@ -0,0 +1,17 @@ +//Exa 1.24 +clc; +clear; +close; +format('v',6); + +//Given Data : +p1=1;//bar +p2=0.45;//bar +R=287;//KJ/KgK +V=40;//m^3 +V1=40;//m^3 +V2=40;//m^3 +T1=35+273;//K +T2=5+273;//K +m=p1*10^5*V1/R/T1-p2*10^5*V2/R/T2 +disp(m,"Mass of air removed in Kg : "); diff --git a/2135/CH1/EX1.26/Exa_1_26.sce b/2135/CH1/EX1.26/Exa_1_26.sce new file mode 100755 index 000000000..370cfcd30 --- /dev/null +++ b/2135/CH1/EX1.26/Exa_1_26.sce @@ -0,0 +1,17 @@ +//Exa 1.26 +clc; +clear; +close; +format('v',6); + +//Given Data : +m=1;//Kg +t=80;//degree C +mw=10;//Kg +t1=25;//degree C +delta_t=5;//degree C +t2=delta_t+t1;//degree C +Sw=4.187;//Kj/KgK +//m*S*(t-t2)=mw*Sw*(t2-t1) +S=mw*Sw*(t2-t1)/m/(t-t2);//Kj/KgK +disp(S,"Specific heat of metal in KJ/KgK : "); diff --git a/2135/CH1/EX1.27/Exa_1_27.sce b/2135/CH1/EX1.27/Exa_1_27.sce new file mode 100755 index 000000000..f646f04bd --- /dev/null +++ b/2135/CH1/EX1.27/Exa_1_27.sce @@ -0,0 +1,16 @@ +//Exa 1.27 +clc; +clear; +close; +format('v',6); + +//Given Data : +m=500;//Kg +t1=45;//degree C +t0=5;//degree C +CP=4.18;//KJ/Kg-degree C +Qdot=41.87;//MJ/hr +Q=m*CP*(t1-t0);//KJ +Q=Q/1000;//MJ +Time=Q/Qdot;//hrs +disp(Time,"Time required in hours : "); diff --git a/2135/CH1/EX1.28/Exa_1_28.sce b/2135/CH1/EX1.28/Exa_1_28.sce new file mode 100755 index 000000000..e58d60cf8 --- /dev/null +++ b/2135/CH1/EX1.28/Exa_1_28.sce @@ -0,0 +1,12 @@ +//Exa 1.28 +clc; +clear; +close; +format('v',7); + +//Given Data : +V1=2;//m^3 +V2=4;//m^3 +W=integrate('10^5*(V^2+6*V)','V',V1,V2);//Nm or J +W=W/1000;//KJ +disp(W,"Work done in KJ : "); diff --git a/2135/CH1/EX1.29/Exa_1_29.sce b/2135/CH1/EX1.29/Exa_1_29.sce new file mode 100755 index 000000000..15acc1f43 --- /dev/null +++ b/2135/CH1/EX1.29/Exa_1_29.sce @@ -0,0 +1,15 @@ +//Exa 1.29 +clc; +clear; +close; +format('v',7); + +//Given Data : +p1=3;//bar +V1=0.18;//m^3/Kg +p2=0.6;//bar +C=p1*10^5*V1^2;//Nm +V2=sqrt((p1/p2)*V1^2);//m^3Kg +W=integrate('C/V^2','V',V1,V2);//Nm/Kg +W=W/1000;//KJ/Kg +disp(W,"Work done in KJ/Kg : "); diff --git a/2135/CH1/EX1.30/Exa_1_30.sce b/2135/CH1/EX1.30/Exa_1_30.sce new file mode 100755 index 000000000..c7fa7f19c --- /dev/null +++ b/2135/CH1/EX1.30/Exa_1_30.sce @@ -0,0 +1,22 @@ +//Exa 1.30 +clc; +clear; +close; +format('v',7); + +//Given Data : +W=160;//kJ +W=W*1000;//J +V1=800;//litres +V1=V1/1000;//m^3 +//p=7-3*V +//[7*(V2-V1)-1.5*(V2^2-V1^2)]-W/10^5=0;//Nm or J +//7*V2-7*V1-1.5*V2^2+1.5*V1^2-W/10^5;//Nm or J +//P=[-10^5*1.5 10^5*7 -10^5*7*V1+10^5*1.5*V1^2-W] +P=[-1.5 7 -7*V1+1.5*V1^2-W/10^5]; +V2=roots(P);//m^3 +V2=V2(2);//(V2(1) gives -ve value which is not possible) +disp(V2,"Final Volume in m^3 : "); +P2=7-3*V2;//bar +disp(P2,"Final Pressure in bar : "); +//Answer is wrong in the book as calculation is wrong for V2. diff --git a/2135/CH1/EX1.31/Exa_1_31.sce b/2135/CH1/EX1.31/Exa_1_31.sce new file mode 100755 index 000000000..c93ea525e --- /dev/null +++ b/2135/CH1/EX1.31/Exa_1_31.sce @@ -0,0 +1,15 @@ +//Exa 1.31 +clc; +clear; +close; +format('v',7); + +//Given Data : +p0=1;//bar +p0=p0*10^5;//N/m^2 +V1=0;//m^3 +V2=0.7;//m^3 +//No p.dV work for cylinder as boundaries are +W=p0*integrate('1','V',V1,V2); +W=W/1000;//KJ/Kg +disp(W,"Workdone by the system in KJ : "); diff --git a/2135/CH1/EX1.32/Exa_1_32.sce b/2135/CH1/EX1.32/Exa_1_32.sce new file mode 100755 index 000000000..e0ca7ba21 --- /dev/null +++ b/2135/CH1/EX1.32/Exa_1_32.sce @@ -0,0 +1,13 @@ +//Exa 1.32 +clc; +clear; +close; +format('v',7); + +//Given Data : +p0=101.3;//KPa +V1=1.2;//m^3 +V2=0;//m^3 +//No p.dV work by rigid boundary +W=p0*integrate('1','V',V1,V2); +disp(W,"Workdone by the air in KJ : "); diff --git a/2135/CH1/EX1.33/Exa_1_33.sce b/2135/CH1/EX1.33/Exa_1_33.sce new file mode 100755 index 000000000..e848b3ed4 --- /dev/null +++ b/2135/CH1/EX1.33/Exa_1_33.sce @@ -0,0 +1,16 @@ +//Exa 1.33 +clc; +clear; +close; +format('v',9); + +//Given Data : +T1=300;//K +T2=2300;//K +Gamma=1.5; +m=1;//Kg +//Cp=0.85+0.0004*T+50*10^-5*T^2 +H2subH1=integrate('m*(0.85+0.00004*T+5*10^-5*T^2)','T',T1,T2);//KJ/Kg +disp(H2subH1,"Change in enthalpy in KJ/Kg : "); +U2subU1=integrate('m*(0.85+0.00004*T+5*10^-5*T^2)/Gamma','T',T1,T2);//KJ/Kg +disp(U2subU1,"Change in internal energy in KJ : "); diff --git a/2135/CH1/EX1.34/Exa_1_34.sce b/2135/CH1/EX1.34/Exa_1_34.sce new file mode 100755 index 000000000..c8e2ef158 --- /dev/null +++ b/2135/CH1/EX1.34/Exa_1_34.sce @@ -0,0 +1,23 @@ +//Exa 1.34 +clc; +clear; +close; +format('v',9); + +//Given Data : +m=1;//Kg +v=1;//m^3 +T=127+273;//K +a=138;//KNm^4/(Kgmol)^2 +a=a*10^3;//Nm^4/(Kgmol)^2 +M_O2=32;// +vm=v*M_O2;//m^3/Kgmol +//p*v=n*R*T +n=1; +R=8314.3;//gas constant +p=n*R*T/vm;//N/m^2 +disp(p,"Pressure using perfect gas equation in N/m^2 : "); +//[p+a/vm^2]*[vm-b]=R*T +b=0.0318; +p=R*T/(vm-b)-a/vm^2;//N/m^2 +disp(p,"Pressure using Vander Walls equation in N/m^2 : "); diff --git a/2135/CH1/EX1.35/Exa_1_35.sce b/2135/CH1/EX1.35/Exa_1_35.sce new file mode 100755 index 000000000..64f553f2c --- /dev/null +++ b/2135/CH1/EX1.35/Exa_1_35.sce @@ -0,0 +1,22 @@ +//Exa 1.35 +clc; +clear; +close; +format('v',7); + +//Given Data : +m=22;//Kg +T=300;//K +V=5;//m^3 +M=44;//Kg/Kgmol +a=362.9;//KNm^4/Kgmol^2 +b=0.0314;//m^3/Kgmol +Rdash=8314.3;//gas constant +R=Rdash/M;//Nm/KgK +p=m*R*T/V;//Pa +p=p/10^5;//bar +disp(p,"Pressure, when gas behaves like a perfect gas in bar : "); +Vdash=V/m*M;//m^3/Kgmole +//[p+a/vm^2]*[vm-b]=R*T +p=Rdash*T/(Vdash-b)-a*10^3/Vdash^2;//N/m^2 +disp(p/10^5,"Pressure using Vander Walls equation in bar : "); diff --git a/2135/CH1/EX1.36/Exa_1_36.sce b/2135/CH1/EX1.36/Exa_1_36.sce new file mode 100755 index 000000000..30f0732e6 --- /dev/null +++ b/2135/CH1/EX1.36/Exa_1_36.sce @@ -0,0 +1,20 @@ +//Exa 1.36 +clc; +clear; +close; +format('v',7); + +//Given Data : +pc=37.7;//bar +Tc=132.5;//K +vc=0.093;//m^3Kgmol +R=287;//Nm/KgK +m=10;//Kg +T=300;//K +V=0.3;//m^3 +a=27*R^2*Tc^2/64/pc/10^5; +b=R*Tc/8/pc/10^5;// +//(p+a/V^2)*(V-b)=R*T +p=R*T/(V-b)-a/V^2;//N/m^2 +p=p/10^5;//bar +disp(p,"Pressure exerted by air in bar : "); diff --git a/2135/CH1/EX1.37/Exa_1_37.sce b/2135/CH1/EX1.37/Exa_1_37.sce new file mode 100755 index 000000000..830910a56 --- /dev/null +++ b/2135/CH1/EX1.37/Exa_1_37.sce @@ -0,0 +1,20 @@ +//Exa 1.37 +clc; +clear; +close; +format('v',8); + +//Given Data : +pc=221.2;//bar +Tc=374.15+273;//K +p=100;//bar +T=400+273;//K +R=462;//Nm/KgK +//p*v=R*T +v=R*T/p/10^5;//m^3/Kg +disp(v,"Specific volume, v by perfect gas equation in m^3/Kg : "); +pr=p/pc; +Tr=T/Tc; +Z=0.84;//From compressibility chart +v=Z*R*T/p/10^5 +disp(v,"Specific volume, v by compressibility chart in m^3/Kg : "); diff --git a/2135/CH1/EX1.38/Exa_1_38.sce b/2135/CH1/EX1.38/Exa_1_38.sce new file mode 100755 index 000000000..03f88b5b3 --- /dev/null +++ b/2135/CH1/EX1.38/Exa_1_38.sce @@ -0,0 +1,16 @@ +//Exa 1.38 +clc; +clear; +close; +format('v',8); + +//Given Data : +pr=5; +Z=0.8; +pc=46.4;//bar +Tc=191.1;//K +Tr=1.44;// +p=pr*pc;//bar +disp(p,"Pressure in bar : "); +T=Tr*Tc;//K +disp(T,"Temperature in K : "); diff --git a/2135/CH1/EX1.39/Exa_1_39.sce b/2135/CH1/EX1.39/Exa_1_39.sce new file mode 100755 index 000000000..5e4b95568 --- /dev/null +++ b/2135/CH1/EX1.39/Exa_1_39.sce @@ -0,0 +1,17 @@ +//Exa 1.39 +clc; +clear; +close; +format('v',7); + +//Given Data : +V=0.01653;//m^3 +m=5.6;//Kg +M=28;//Kg/Kgmol +p=200;//bar +Z=0.605; +Rdash=8314.3;//J/Kgk +R=Rdash/M;//J/Kgk +//p*V=m*Z*R*T +T=p*10^5*V/m/Z/R;//K +disp(T,"Temperature in K : "); diff --git a/2135/CH1/EX1.4/Exa_1_4.sce b/2135/CH1/EX1.4/Exa_1_4.sce new file mode 100755 index 000000000..cd8a2d24a --- /dev/null +++ b/2135/CH1/EX1.4/Exa_1_4.sce @@ -0,0 +1,22 @@ +//Exa 1.4 +clc; +clear; +close; +format('v',9); + +//Given Data : +m=500;//Kg +g=7.925;//m/s^2 +Z=40;//Km +C=2400;//Kmph +PE=m*g*Z*1000;//Nm +disp("Relative to earth."); +disp(PE,"Potential Energy in Nm : "); +KE=m*(C*1000/3600)^2/2;//Nm +disp(KE,"Kinetic Energy in Nm : "); +disp("Relative to moon."); +w=2.94*m;//Nm +PE=w*Z*1000;//Nm +disp(PE,"Potential Energy in Nm : "); +KE=m*(C*1000/3600)^2/2;//Nm +disp(KE,"Kinetic Energy in Nm : "); diff --git a/2135/CH1/EX1.40/Exa_1_40.sce b/2135/CH1/EX1.40/Exa_1_40.sce new file mode 100755 index 000000000..1ba1ba6d9 --- /dev/null +++ b/2135/CH1/EX1.40/Exa_1_40.sce @@ -0,0 +1,26 @@ +//Exa 1.40 +clc; +clear; +close; +format('v',7); + +//Given Data : +mCO=0.45;//Kg +mAir=1;//Kg +V=0.4;//m^3 +T=15+273;//K +MCO=28;//Kg/Kgmo +MO2=32;//Kg/Kgmol +MN2=28;//Kg/Kgmol +mO2=23.3/100*mAir;//Kg +mN2=76.7/100*mAir;//Kg +Rdash=8314.3;//J/Kgk +//p*V=m*Z*R*T +pCO=mCO*Rdash/MCO*T/V/10^5;//bar +pO2=mO2*Rdash/MO2*T/V/10^5;//bar +pN2=mN2*Rdash/MN2*T/V/10^5;//bar +disp(pCO,"Pressure of CO in bar : "); +disp(pO2,"Pressure of O2 in bar : "); +disp(pN2,"Pressure of N2 in bar : "); +p=pCO+pO2+pN2;//bar +disp(p,"Total pressure in vessel in bar : "); diff --git a/2135/CH1/EX1.41/Exa_1_41.sce b/2135/CH1/EX1.41/Exa_1_41.sce new file mode 100755 index 000000000..85b03ab2a --- /dev/null +++ b/2135/CH1/EX1.41/Exa_1_41.sce @@ -0,0 +1,26 @@ +//Exa 1.41 +clc; +clear; +close; +format('v',7); + +//Given Data : +ma=0.4;//Kg +mb=0.8;//Kg +Ma=44; +Mb=29; +V=0.4;//m^3 +T=300;//K +Rdash=8314.3;//J/Kgk +Ra=Rdash/Ma;//Nm/KgK +Rb=Rdash/Mb;//Nm/KgK +na=ma/Ma;//moles +nb=mb/Mb;//moles +//p*V=n*R*T +pa=na*Rdash/1000*T/V;//bar +pb=nb*Rdash/1000*T/V;//bar +disp(pa,"Pressure of container A in KPa : "); +disp(pb,"Pressure of container B in KPa : "); +p=pa+pb;//Kpa +disp(p,"Pressure of mixture in KPa : "); +//Ans of Pb is wrong in the book. diff --git a/2135/CH1/EX1.42/Exa_1_42.sce b/2135/CH1/EX1.42/Exa_1_42.sce new file mode 100755 index 000000000..1a0717b51 --- /dev/null +++ b/2135/CH1/EX1.42/Exa_1_42.sce @@ -0,0 +1,41 @@ +//Exa 1.42 +clc; +clear; +close; +format('v',8); + +//Given Data : +Rdash=8314.3;//J/Kgk +mO2=23.15/100; +mN2=75.52/100; +mArgon=1.29/100; +mCO2=0.04/100; +MO2=32; +MN2=28; +MArgon=40; +MCO2=44; +RO2=Rdash/MO2;//J/KgK +RN2=Rdash/MN2;//J/KgK +RArgon=Rdash/MArgon;//J/KgK +RCO2=Rdash/MCO2;//J/KgK +R=(mO2*RO2+mN2*RN2+RArgon*mArgon+RCO2*mCO2)/(mO2+mN2+mArgon+mCO2);//J/KgK +disp(R,"Characteristic gas constant for air in J/KgK : "); +M=Rdash/R;//Kg/Kgmol +disp(M,"Molecular weight of air in Kg/Kgmol : "); +p=1.013;//bar +nO2=mO2/MO2;//moles +nCO2=mCO2/MCO2;//moles +nN2=mN2/MN2;//moles +nArgon=mArgon/MArgon;//moles +n=nO2+nN2+nArgon+nCO2; +pO2=nO2/n*p;//bar +pN2=nN2/n*p;//bar +pArgon=nArgon/n*p;//bar +pCO2=nCO2/n*p;//bar +disp(pO2,"Pressure of O2 in bar : "); +disp(pN2,"Pressure of N2 in bar : "); +disp(pArgon,"Pressure of Argon in bar : "); +disp(pCO2,"Pressure of CO2 in bar : "); + + + diff --git a/2135/CH1/EX1.43/Exa_1_43.sce b/2135/CH1/EX1.43/Exa_1_43.sce new file mode 100755 index 000000000..23cd206ec --- /dev/null +++ b/2135/CH1/EX1.43/Exa_1_43.sce @@ -0,0 +1,29 @@ +//Exa 1.43 +clc; +clear; +close; +format('v',7); + +//Given Data : +yO2=0.3; +yN2=0.5; +yCO2=0.2; +V=1;//m^3 +T=27+273;//K +m=8;//Kg +MO2=32; +MN2=28; +MCO2=44; +M=1/(yO2/MO2+yN2/MN2+yCO2/MCO2);//Kg/Kgmol +disp(M,"Molecular mass for mixture in Kg/Kgmol : "); +Rdash=8314.3;//J/Kgk +R=Rdash/M;//Nm/KgK +disp(R,"Gas constant R of mixture in Nm/KgK : "); +p=m*R*T/V/10^5;//bar +disp(p,"Pressure exerted by gases in bar : "); +nO2=yO2/MO2*m;//moles +nCO2=yCO2/MCO2*m;//moles +nN2=yN2/MN2*m;//moles +disp(nO2,"Mole fraction of O2(moles) : "); +disp(nN2,"Mole fraction of N2(moles) : "); +disp(nCO2,"Mole fraction of CO2(moles) : "); diff --git a/2135/CH1/EX1.44/Exa_1_44.sce b/2135/CH1/EX1.44/Exa_1_44.sce new file mode 100755 index 000000000..00855bfc7 --- /dev/null +++ b/2135/CH1/EX1.44/Exa_1_44.sce @@ -0,0 +1,32 @@ +//Exa 1.44 +clc; +clear; +close; +format('v',7); + +//Given Data : +mN2=4;//Kg +mO2=2.4;//Kg +mCO2=1.6;//Kg +MO2=32; +MN2=28; +MCO2=44; +Gamma=1.4; +//Rdash=Cpdash*(1-1/Gamma) +Rdash=8.3143;//J/KgK +Cpdash=Rdash*Gamma/(Gamma-1);//KJ/KgmolK +Cvdash=Cpdash/Gamma;//KJ/KgmolK +CpO2=Cpdash/MO2;//KJ/KgmolK +CpN2=Cpdash/MN2;//KJ/KgmolK +CpCO2=Cpdash/MCO2;//KJ/KgmolK +CvO2=Cvdash/MO2;//KJ/Kg +CvN2=Cvdash/MN2;//KJ/Kg +CvCO2=Cvdash/MCO2;//KJ/Kg +disp("Specific heat of gases : "); +disp("For N2, Cp is "+string(CpN2)+" KJ/Kg & Cv is "+string(CvN2)+" KJ/Kg."); +disp("For O2, Cp is "+string(CpO2)+" KJ/Kg & Cv is "+string(CvO2)+" KJ/Kg."); +disp("For CO2, Cp is "+string(CpCO2)+" KJ/Kg & Cv is "+string(CvCO2)+" KJ/Kg."); +Cp=(mO2*CpO2+mN2*CpN2+mCO2*CpCO2)/(mO2+mN2+mCO2);//KJ/KgK +disp(Cp,"Specific heat of mixture, Cp in KJ/KgK : "); +Cv=(mO2*CvO2+mN2*CvN2+mCO2*CvCO2)/(mO2+mN2+mCO2);//KJ/KgK +disp(Cv,"Specific heat of mixture, Cv in KJ/KgK : "); diff --git a/2135/CH1/EX1.5/Exa_1_5.sce b/2135/CH1/EX1.5/Exa_1_5.sce new file mode 100755 index 000000000..567944b82 --- /dev/null +++ b/2135/CH1/EX1.5/Exa_1_5.sce @@ -0,0 +1,13 @@ +//Exa 1.5 +clc; +clear; +close; +format('v',7); + +//Given Data : +VGR=57;//KN/m^2 +Patm=765;//mm of Hg +//101.325KN/m^2=760 mm of Hg +VGR=VGR*760/101.325;//mm og Hg +Pabs=Patm-VGR;//mm of Hg +disp(Pabs,"Absolute pressure in mm of Hg : "); diff --git a/2135/CH1/EX1.6/Exa_1_6.sce b/2135/CH1/EX1.6/Exa_1_6.sce new file mode 100755 index 000000000..9b75af1d6 --- /dev/null +++ b/2135/CH1/EX1.6/Exa_1_6.sce @@ -0,0 +1,25 @@ +//Exa 1.6 +clc; +clear; +close; +format('v',8); + +//Given Data : +g=9.81;//m/s^2 +rho_o=0.825*10^3;//Kg/m^3 +rho_w=1*10^3;//Kg/m^3 +rho_Hg=13.45*10^3;//Kg/m^3 +h_o=50/100;//m +h_w=65/100;//m +h_Hg=45/100;//m +Patm=1.01325;//bar +P_Hg=rho_Hg*g*h_Hg;//N/m^2 +P_w=rho_w*g*h_w;//N/m^2 +P_o=rho_o*g*h_o;//N/m^2 +Pbase=(Patm*10^5+P_Hg+P_o+P_w);//N/m^2 +disp(Pbase,"Pressure at the base of column in N/m^2 : "); +P_OilWater=Patm*10^5+P_o;//N/m^2 +disp(P_OilWater,"Pressure at the oil-water surface in N/m^2 : "); +P_WaterMercury=Patm*10^5+P_o+P_w;//N/m^2 +disp(P_WaterMercury,"Pressure at the water-mercury surface in N/m^2 : "); +//Answer in the book is not accurate. diff --git a/2135/CH1/EX1.7/Exa_1_7.sce b/2135/CH1/EX1.7/Exa_1_7.sce new file mode 100755 index 000000000..1c093edd9 --- /dev/null +++ b/2135/CH1/EX1.7/Exa_1_7.sce @@ -0,0 +1,22 @@ +//Exa 1.7 +clc; +clear; +close; +format('v',7); + +//Given Data : +rho=1000;//Kg/m^3 +d=0.3;//m +C=1.5;//m/s +h=4.5;//m +FlowRate=2000;//Kg/min +d2=15/100;//diameter of discharging line in meter +t=15;//min +r=3;//m +WaterDischarge=rho*%pi/4*(d/2)^2*C*t*60;//Kg +WaterReceived=FlowRate*t;//Kg +NetWaterReceived=WaterReceived-WaterDischarge;//Kg +disp(NetWaterReceived,"Mass change in tank in Kg : "); +//m=rho*A*h +h=NetWaterReceived/rho/(%pi/4*r^2);//m +disp(h,"Water level in meter : "); diff --git a/2135/CH1/EX1.8/Exa_1_8.sce b/2135/CH1/EX1.8/Exa_1_8.sce new file mode 100755 index 000000000..52575fbed --- /dev/null +++ b/2135/CH1/EX1.8/Exa_1_8.sce @@ -0,0 +1,13 @@ +//Exa 1.8 +clc; +clear; +close; +format('v',7); + +//Given Data : +Pmercury=10;//cm of Hg +Patm=76;//cm of Hg +Pwater=3.5/13.6;//cm of Hg +Pabs=Pmercury+Patm-Pwater;//cm of Hg +Pabs=Pabs/76*1.01325;//bar +disp(Pabs,"Absolute pressure of steam in bar : "); diff --git a/2135/CH1/EX1.9/Exa_1_9.sce b/2135/CH1/EX1.9/Exa_1_9.sce new file mode 100755 index 000000000..2ee44df26 --- /dev/null +++ b/2135/CH1/EX1.9/Exa_1_9.sce @@ -0,0 +1,27 @@ +//Exa 1.9 +clc; +clear; +close; +format('v',7); + +//Given Data : +Pmercury=10;//cm of Hg +Patm=760;//mm of Hg +Patm=1.01325;//bar +Pabs=1.2;//bar +sg_oil=0.8; +sg_water=13.6; +sg_mercury=13.6; +rho_w=1000;//Kg.m^3 +g=9.81;//gravity constant +deltaP=Pabs-Patm;//bar +deltaP=deltaP*10^5;//N/m^2 +//deltaP=rho_o*g*h_o +rho_o=sg_oil*rho_w;//kg/m^3 +h_o=deltaP/rho_o/g;//m +disp(h_o,"Height of fluid in oil manometer in meter : "); +h_w=deltaP/rho_w/g;//m +disp(h_w,"Height of fluid in water manometer in meter : "); +rho_m=sg_mercury*rho_w;//kg/m^3 +h_m=deltaP/rho_m/g;//m +disp(h_m,"Height of fluid in mercury manometer in meter : "); -- cgit