diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2135/CH2 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2135/CH2')
49 files changed, 1140 insertions, 0 deletions
diff --git a/2135/CH2/EX2.1/Exa_2_1.sce b/2135/CH2/EX2.1/Exa_2_1.sce new file mode 100755 index 000000000..00094b5b8 --- /dev/null +++ b/2135/CH2/EX2.1/Exa_2_1.sce @@ -0,0 +1,18 @@ +//Exa 2.1
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+mc=10;//Kg
+Cpc=0.4;//KJ/KgK
+Cpw=4.187;//KJ/KgK(Specific heat of water)
+tc=90;//degree_centigrade
+Vw=0.35;//m^3
+tw=30;//degree_centigrade
+density_water=1000;//Kg/m^3
+mw=Vw*density_water;//Kg
+//mc*Cpc*(tc-t)=mw*Cpw*(t-tw)
+t=(mw*Cpw*tw+mc*Cpc*tc)/(mw*Cpw+mc*Cpc);//degree_centigrade
+disp(t,"Equillibrium temperature in degree_centigrade : ");
diff --git a/2135/CH2/EX2.10/Exa_2_10.sce b/2135/CH2/EX2.10/Exa_2_10.sce new file mode 100755 index 000000000..3896adee6 --- /dev/null +++ b/2135/CH2/EX2.10/Exa_2_10.sce @@ -0,0 +1,19 @@ +//Exa 2.10
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data
+mw=100;//Kg
+T=30;//min
+T=T*60;//sec
+P=1;//KW
+Q=-50;//KJ
+Sw=4.19;//KJ/KgK(Specific heat of water)
+W=-P*T;//KJ
+//Q=W+deltaU
+deltaU=Q-W;//KJ
+disp(deltaU,"Chnge in internal energy in kJ : ");
+delta_t=deltaU/mw/Sw;//sec
+disp(delta_t,"Rise in temperature in degree C : ");
diff --git a/2135/CH2/EX2.11/Exa_2_11.sce b/2135/CH2/EX2.11/Exa_2_11.sce new file mode 100755 index 000000000..3a5be753a --- /dev/null +++ b/2135/CH2/EX2.11/Exa_2_11.sce @@ -0,0 +1,15 @@ +//Exa 2.11
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data
+V=12;//Volt
+I=6;//Ampere
+t=1.5;//hr
+t=t*3600;//sec
+deltaU=-750;//KJ
+W=V*I*t/1000;//KJ
+Q=W+deltaU;//KJ
+disp(Q,"Heat transfer in KJ : ");
diff --git a/2135/CH2/EX2.12/Exa_2_12.sce b/2135/CH2/EX2.12/Exa_2_12.sce new file mode 100755 index 000000000..21d3daf75 --- /dev/null +++ b/2135/CH2/EX2.12/Exa_2_12.sce @@ -0,0 +1,24 @@ +//Exa 2.12
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data
+Q=82;//KJ
+p1=4;//bar
+m=1;//Kg
+V1=0.21;//m^3
+T2=127;//degree Centigrade
+R=300;//Nm/KgK
+W=0;//because V is constant.
+disp(W,"Work done in KJ : ");
+//Q-W=deltaU
+deltaU=Q-W;//KJ
+disp(deltaU,"Change in internal energy in KJ : ");
+//p1*V1=m*R*T1
+T1=p1*10^5*V1/m/R;//kelvin
+T1=T1-273;//degree centigrade
+delta_t=T2-T1;//degree centigrade
+Cv=deltaU/delta_t;//KJ/KgK
+disp(Cv,"Specific Heat in KJ/KgK : ");
diff --git a/2135/CH2/EX2.13/Exa_2_13.sce b/2135/CH2/EX2.13/Exa_2_13.sce new file mode 100755 index 000000000..cf860def6 --- /dev/null +++ b/2135/CH2/EX2.13/Exa_2_13.sce @@ -0,0 +1,33 @@ +//Exa 2.13
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+V1=250;//litres
+V2=250;//litres
+p1=3;//Mpa
+t1=20;//degree_centigrade
+p2=1.8;//Mpa
+t2=16;//degree_centigrade
+Gamma=1.4;//
+rho=1.43;//Kg/m^3
+p=0.1013;//Mpa
+
+V1=V1/1000;//m^3
+V2=V2/1000;//m^3
+T1=t1+273;//Kelvin
+T2=t2+273;//Kelvin
+//p=rho*R*T
+T=0+273;//Kelvin
+R=p*10^6/rho/T;//Nm/KgK
+//p*V=m*R*T
+m1=p1*10^6*V1/R/T1;//Kg
+m2=p2*10^6*V2/R/T2;//Kg
+Mass_oxygen=m1-m2;//Kg
+disp(Mass_oxygen,"Mass of oxygen used in Kg : ");
+//Cv*(Gamma-1)=R
+Cv=R/(Gamma-1);//Nm/KgK
+Q=m2*Cv*(t1-t2);//J
+disp(Q,"Heat transfered in J : ");
diff --git a/2135/CH2/EX2.14/Exa_2_14.sce b/2135/CH2/EX2.14/Exa_2_14.sce new file mode 100755 index 000000000..38a21ef3e --- /dev/null +++ b/2135/CH2/EX2.14/Exa_2_14.sce @@ -0,0 +1,27 @@ +//Exa 2.14
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+m=50/1000;//Kg
+t1=14;//degree_centigrade
+t2=74;//degree_centigrade
+t_heating=300;//sec
+Pheater=10.04;//Watts
+Gamma=1.4;
+
+
+Q=Pheater*t_heating;//J
+//Q=m*Cp*(t2-t1)
+Cp=Q/m/(t2-t1);//J/KgK
+disp(Cp,"Specific heat of air in J/KgK : ");
+//Cp*(1-1/Gamma)=R
+R=Cp*(1-1/Gamma);//Gas Constant in Nm/KgK
+disp(R,"Gas constant of air in Nm/KgK : ");
+//p=rho*R*T
+p=0.1;//Mpa
+T=0+273;//kelvin
+rho=p*10^6/R/T;//Kg/m^3
+disp(rho,"Density of air in Kg/m^3 : ");
diff --git a/2135/CH2/EX2.15/Exa_2_15.sce b/2135/CH2/EX2.15/Exa_2_15.sce new file mode 100755 index 000000000..239419a81 --- /dev/null +++ b/2135/CH2/EX2.15/Exa_2_15.sce @@ -0,0 +1,24 @@ +//Exa 2.15
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+m=1;//Kg
+V1=0.3;//m^3
+p=3.2*100;//Kpa
+p1=3.2*100;//Kpa
+p2=3.2*100;//Kpa
+V2=2*V1;//m^3
+Cp=1.003;//KJ/KgK
+R=0.2927;//KJ/kgK
+//p*V=m*R*T
+T1=p1*V1/m/R;//kelvin
+T2=p2*V2/m/R;//kelvin
+Q=m*Cp*(T2-T1);//KJ
+disp(Q,"Heat Added in KJ : ");
+W=p*(V2-V1);//KJ
+disp(W,"Work done in KJ : ");
+disp(round(T1),"Initial temperature of air in kelvin : ");
+disp(round(T2),"Final temperature of air in kelvin : ");
diff --git a/2135/CH2/EX2.16/Exa_2_16.sce b/2135/CH2/EX2.16/Exa_2_16.sce new file mode 100755 index 000000000..79d45d759 --- /dev/null +++ b/2135/CH2/EX2.16/Exa_2_16.sce @@ -0,0 +1,23 @@ +//Exa 2.16
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+p=105;//Kpa
+p1=105;//Kpa
+p2=105;//Kpa
+V1=0.25;//m^3
+V2=0.45;//m^3
+T1=10+273;//kelvin
+T2=240+273;//kelvin
+
+Q=integrate('0.4+18/(T+40)','T',T1,T2);//KJ
+disp(Q,"Heat Transfer in KJ : ");
+W=p*(V2-V1);//KJ
+disp(W,"Work Transfer in KJ : ");
+deltaU=Q-W;//KJ
+disp(deltaU,"Change in internal energy in KJ L ; ");
+deltaH=Q;//KJ
+disp(deltaH,"Change in enthalpy in KJ :");
diff --git a/2135/CH2/EX2.17/Exa_2_17.sce b/2135/CH2/EX2.17/Exa_2_17.sce new file mode 100755 index 000000000..84caa74b8 --- /dev/null +++ b/2135/CH2/EX2.17/Exa_2_17.sce @@ -0,0 +1,26 @@ +//Exa 2.17
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data :
+N=250;//rpm
+tau=10;//min
+Q1=-5;//KJ
+deltaU=2;//KJ
+p=1.2;//bar
+p=p*100;//KJ
+E=24;//volt
+I=0.45;//Ampere
+A=0.1;//m^2
+T=0.5;//Nm
+Q2=E*I*tau*60/1000;//KJ
+Q=Q1+Q2;//KJ
+//Consider piston moves through a distance y
+//Q-(W1+W2)=deltaU where W1=p*A*y
+W2=-T*2*%pi*N*tau;//Nm
+W2=W2/1000;//KJ
+y=(Q-W2-deltaU)/A/p;//meter
+disp(y*100,"Distance in cm : ");
+//Ans is wrong in the book.
diff --git a/2135/CH2/EX2.18/Exa_2_18.sce b/2135/CH2/EX2.18/Exa_2_18.sce new file mode 100755 index 000000000..e9096203f --- /dev/null +++ b/2135/CH2/EX2.18/Exa_2_18.sce @@ -0,0 +1,18 @@ +//Exa 2.18
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+m=0.8;//Kg
+p1=1;//bar
+p2=5;//bar
+T1=25+273;//kelvin
+R=287;//KJ/kgK
+
+W=m*R*T1*log(p1/p2);//J
+disp(W/1000,"Work done in KJ : ");
+U2subU1=0;//change in internal energy
+Q=W+U2subU1;//J
+disp(Q/1000,"Heat Transfer in KJ : ");
diff --git a/2135/CH2/EX2.19/Exa_2_19.sce b/2135/CH2/EX2.19/Exa_2_19.sce new file mode 100755 index 000000000..3eeb1c450 --- /dev/null +++ b/2135/CH2/EX2.19/Exa_2_19.sce @@ -0,0 +1,21 @@ +//Exa 2.19
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+m=1;//Kg
+p1=100;//Kpa
+T1=300;//kelvin
+V_ratio=1/2;//V2/V1
+T=1;//Nm
+tau=1;//hr
+tau=tau*60;//min
+N=400;//rpm
+R=0.287;//KJ/kgK
+
+W1=m*R*T1*log(V_ratio);//KJ
+W2=-T*2*%pi*N*tau/1000;//KJ
+W=W1+W2;//KJ
+disp(W,"Net work transfer in KJ : ");
diff --git a/2135/CH2/EX2.2/Exa_2_2.sce b/2135/CH2/EX2.2/Exa_2_2.sce new file mode 100755 index 000000000..513e8aa12 --- /dev/null +++ b/2135/CH2/EX2.2/Exa_2_2.sce @@ -0,0 +1,13 @@ +//Exa 2.2
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+Q1=2500;//KJ/Kg
+Q2=1800;//KJ/Kg
+Pdev=210;//MW
+//Power developed = Heat transfered: Pdev=m*(Q1-Q2)
+m=Pdev*1000/(Q1-Q2);//mass flow rate of steam in Kg/s
+disp(m,"Mass flow rate of steam in Kg/s : ");
diff --git a/2135/CH2/EX2.20/Exa_2_20.sce b/2135/CH2/EX2.20/Exa_2_20.sce new file mode 100755 index 000000000..d3b0e68fc --- /dev/null +++ b/2135/CH2/EX2.20/Exa_2_20.sce @@ -0,0 +1,21 @@ +//Exa 2.20
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+m=2;//Kg
+T1=125+273;//kelvin
+T2=30+273;//kelvin
+W=152;//KJ
+deltaH=-212.8;//KJ
+Q=0;//KJ(For adiabatic process)
+//Q=W+m*Cv*(T2-T!)
+Cv=(Q-W)/m/(T2-T1);//KJ/KgK
+disp(Cv,"Specific heat at constant volume in KJ/KgK : ");
+//deltaH=m*Cp*(T2-T1);
+Cp=deltaH/m/(T2-T1);//KJ/KgK
+disp(Cp,"Specific heat at cinstant pressure in KJ/KgK : ");
+R=Cp-Cv;//KJ/KgK
+disp(R,"Characteristic gas constyant in KJ/KgK : ");
diff --git a/2135/CH2/EX2.21/Exa_2_21.sce b/2135/CH2/EX2.21/Exa_2_21.sce new file mode 100755 index 000000000..c031e17e4 --- /dev/null +++ b/2135/CH2/EX2.21/Exa_2_21.sce @@ -0,0 +1,22 @@ +//Exa 2.21
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+V1=0.5;//m^3
+p1=1.5;//bar
+T1=100+273;//kelvin
+V2=0.125;//m^3
+p2=9;//bar
+R=287;//KJ/KgK
+
+m=p1*10^5*V1/R/T1;//Kg
+disp(m,"Mass of air in Kg : ");
+//p1*V1^n=p2*V2^n
+n=log(p2/p1)/log(V1/V2);//
+disp(n,"Value of index : ");
+W=(p1*V1-p2*V2)*10^5/(n-1);//Nm
+disp(W/1000,"Work done in KJ : ");
+
diff --git a/2135/CH2/EX2.22/Exa_2_22.sce b/2135/CH2/EX2.22/Exa_2_22.sce new file mode 100755 index 000000000..aa8cdef84 --- /dev/null +++ b/2135/CH2/EX2.22/Exa_2_22.sce @@ -0,0 +1,20 @@ +//Exa 2.22
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+p1=1;//bar
+V1=0.14;//m^3
+V2=0.07;//m^3
+R=287;//KJ/KgK
+
+//p*V=R*k1*V^(-2/5) or p*V^(7/5)=K
+K=p1*10^5*V1^(7/5);//Nm/Kg
+W=integrate('K*V^(-7/5)','V',V1,V2);//Nm
+disp(W,"Work done in Nm : ");
+p2=K*V2^(-7/5);//N/m^2
+p2=p2/10^5;//bar
+disp(p2,"Final pressure in bar : ");
+//Ans in the book is wrong.
diff --git a/2135/CH2/EX2.23/Exa_2_23.sce b/2135/CH2/EX2.23/Exa_2_23.sce new file mode 100755 index 000000000..0e6355420 --- /dev/null +++ b/2135/CH2/EX2.23/Exa_2_23.sce @@ -0,0 +1,28 @@ +//Exa 2.23
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+m=2;//Kg
+Q=0;//KJ(because of adiabatic process)
+p1=1;//Mpa
+p1=p1*10^6/1000;//Kpa
+t1=200;//degree centigrade
+T1=t1+273;//kelvin
+p2=100;//Kpa
+n=1.2;
+R=0.196;//KJ/KgK
+
+T2=T1*(p2/p1)^((n-1)/n);//kelvin
+t2=T2-273;//degree centigrade
+u1=196+0.718*t1;//KJ
+u2=196+0.718*t2;//KJ
+deltau=u2-u1;//KJ
+deltaU=m*deltau;//KJ
+disp(deltaU,"Change in internal energy in KJ : ");
+W=Q-deltaU;//KJ
+disp(W,"Work transfer in KJ : ");
+W1=m*R*(T1-T2)/(n-1);//KJ
+disp(W1,"Displacement work in KJ : ");
diff --git a/2135/CH2/EX2.24/Exa_2_24.sce b/2135/CH2/EX2.24/Exa_2_24.sce new file mode 100755 index 000000000..f81b762ec --- /dev/null +++ b/2135/CH2/EX2.24/Exa_2_24.sce @@ -0,0 +1,23 @@ +//Exa 2.24
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+m=1.5;//Kg
+V1=0.06;//m^3
+p1=5.6*10;//Kpa
+t2=240;//degree centigrade
+T2=t2+273;//kelvin
+a=0.946;
+b=0.662;
+K=10^-4;
+
+//p*V=m*R*T=m*(a-b)*T
+T1=p1*10^5*V1/m/(a-b)/1000;//Kelvin
+U2subU1=integrate('m*(b+K*T)','T',T1,T2);//KJ
+Q=0;//isentropic process
+W=Q-U2subU1;//KJ
+disp(W,"Work done in KJ : ");
+//Answer in the book is wrong.
diff --git a/2135/CH2/EX2.25/Exa_2_25.sce b/2135/CH2/EX2.25/Exa_2_25.sce new file mode 100755 index 000000000..ece05ffd0 --- /dev/null +++ b/2135/CH2/EX2.25/Exa_2_25.sce @@ -0,0 +1,32 @@ +//Exa 2.25
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+m=1.5;//Kg
+p1=1000;//Kpa
+p2=200;//Kpa
+V1=0.2;//m^3
+V2=1.2;//m^3
+//p=a+b*v
+//solving for a and b by matrix
+A=[1 V1;1 V2];
+B=[p1;p2];
+X=A^-1*B;
+a=X(1);
+b=X(2);
+W=integrate('a+b*V','V',V1,V2);//KJ/Kg
+disp(W,"Work transfer in KJ/Kg : ");
+u2SUBu1=(1.5*p2*V2+35)-(1.5*p1*V1+35);//KJ/Kg
+disp(u2SUBu1,"Change in internal energy in KJ/Kg : ");
+q=W+u2SUBu1;//KJ/Kg
+disp(q,"Heat transfer in KJ/Kg : ");
+//u=1.5*(a+b*V)*V+35;
+//1.5*a+2*V*1.5*b=0;//for max value putting du/dV=0
+V=-1.5*a/2/1.5/b;//m^3/Kg
+p=a+b*V;//KPa
+u_max=1.5*p*V+35;//KJ/Kg
+disp(u_max,"Maximum internal energy in KJ/Kg : ");
+//Answer in the book is wrong because a is 1160 instead of 1260.
diff --git a/2135/CH2/EX2.26/Exa_2_26.sce b/2135/CH2/EX2.26/Exa_2_26.sce new file mode 100755 index 000000000..6893cade5 --- /dev/null +++ b/2135/CH2/EX2.26/Exa_2_26.sce @@ -0,0 +1,29 @@ +//Exa 2.26
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+V1=5;//m^3
+p1=2;//bar
+t1=27;//degree centigrade
+T1=t1+273;//kelvin
+p2=6;//bar
+p3=p1;//bar
+R=287;//KJ/KgK
+n=1.3;
+
+//p*V^(1/3)=C
+V2=V1*(p1/p2)^(1/1.3);//m^3
+//p*V=m*R*T1
+m=p1*10^5*V1/R/T1;//Kg
+W1_2=10^5*(p1*V1-p2*V2)/(n-1);//Nm
+W1_2=W1_2/1000;//KJ
+Gamma=1.4;//for air
+//p*V^Gamma=C
+V3=(p2/p3)^(1/Gamma)*V2;//m^3
+W2_3=10^5*(p2*V2-p3*V3)/(Gamma-1);//Nm
+W2_3=W2_3/1000;//KJ
+W=W1_2+W2_3;//KJ
+disp(W,"Net work done in KJ : ");
diff --git a/2135/CH2/EX2.27/Exa_2_27.sce b/2135/CH2/EX2.27/Exa_2_27.sce new file mode 100755 index 000000000..b30e079cc --- /dev/null +++ b/2135/CH2/EX2.27/Exa_2_27.sce @@ -0,0 +1,16 @@ +//Exa 2.27
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+Q1_2=85;//KJ
+Q2_3=-90;//KJ
+W2_3=-20;//KJ
+
+Q3_1=0;//Adiabatic process
+W1_2=0;//constant volume process
+//integrate(dQ)=integrate(dW)
+W3_1=Q1_2+Q2_3+Q3_1-W1_2-W2_3;//KJ
+disp(W3_1,"Direction is 3-1 and work in KJ : ");
diff --git a/2135/CH2/EX2.28/Exa_2_28.sce b/2135/CH2/EX2.28/Exa_2_28.sce new file mode 100755 index 000000000..037206a0e --- /dev/null +++ b/2135/CH2/EX2.28/Exa_2_28.sce @@ -0,0 +1,31 @@ +//Exa 2.28
+clc;
+clear;
+close;
+format('v',5);
+
+//Given Data :
+V1=200/1000;//m^3
+p1=4;//bar
+T1=400;//K
+p2=1;//bar
+H3subH2=72;//KJ
+Cp=1;//KJ/KgK
+Cv=0.714;//KJ/KgK
+
+Gamma=Cp/Cv;
+R=Cp-Cv;//KJ/KgK
+//p*V=m*R*T
+m=p1*10^5*V1/R/1000/T1;//Kg
+T2=T1*(p2/p1)^((Gamma-1)/Gamma);//K
+V2=p1*V1/T1*T2/p2;//m^3
+W1_2=m*R*(T1-T2)/(Gamma-1);//KJ
+disp(W1_2,"Work done W1-2 in KJ : ");
+//H3subH2=m*Cp(T3-T2);
+T3=(H3subH2+m*Cp*T2)/m/Cp;//K
+W2_3=m*R*(T3-T2);//KJ
+W=W1_2+W2_3;//KJ
+disp(W,"Workdone in KJ : ");
+//W=m*R*(T1-T3)/(n-1)
+n=m*R*(T1-T3)/W+1;//
+disp(n,"Index of expansion : ");
diff --git a/2135/CH2/EX2.29.a/Exa_2_29A.sce b/2135/CH2/EX2.29.a/Exa_2_29A.sce new file mode 100755 index 000000000..9ace45df4 --- /dev/null +++ b/2135/CH2/EX2.29.a/Exa_2_29A.sce @@ -0,0 +1,23 @@ +//Exa 2.29A
+clc;
+clear;
+close;
+format('v',9);
+
+//Given Data :
+m=5;//Kg
+//u=3.62*p*v
+
+p1=550;//KPa
+p2=125;//KPa
+V1=0.25;//m^3
+//p*V^(1/2)=C
+n=1.2;
+V2=(p1/p2)^(1/n)*V1;//m^3/Kg
+W=(p1*V1-p2*V2)*10^5/(n-1)/1000;//KJ
+delta_u=(3.62*p2*V2)-(3.62*p1*V1);//KJ/Kg
+deltaU=m*delta_u;//KJ
+disp(deltaU,"Change in internal energy in KJ : ");
+Q=W+deltaU;//KJ
+Q=Q/1000;//MJ
+disp(Q,"Heat transfer in MJ : ");
diff --git a/2135/CH2/EX2.29/Exa_2_29.sce b/2135/CH2/EX2.29/Exa_2_29.sce new file mode 100755 index 000000000..848d9c197 --- /dev/null +++ b/2135/CH2/EX2.29/Exa_2_29.sce @@ -0,0 +1,38 @@ +//Exa 2.29
+clc;
+clear;
+close;
+format('v',9);
+
+//Given Data :
+p1=10;//bar
+p2=2;//bar
+V1=0.1;//m^3
+V2=0.9;//m^3
+R=300;//Nm/Kg-K
+m=1;//Kg
+//p=a*v+b
+//solving for a and b by matrix
+A=[V1 1;V2 1];
+B=[p1;p2];
+X=A^-1*B;
+a=X(1);
+b=X(2);
+//p=a*v+b=a*R*T/p+b
+//2*p-b=0;//on differentiating
+p=b/2;//bar
+//p=a*v+b
+v=(p-b)/a;//m^3/Kg
+T=p*10^5*v/R;//K
+disp(T,"Maximum temperature in K : ");
+W=integrate('(a*v+b)*10^5','v',V1,V2);//Nm/Kg
+W=W/10^3;//KJ/KgK
+disp(W,"Work done in KJ : ");
+T1=p1*10^5*V1/R;//K
+T2=p2*10^5*V2/R;//K
+Gamma=1.4;
+Cv=R/(Gamma-1);//Nm/KgK
+Cv=Cv/1000;//KJ/KgK
+deltaU=m*Cv*(T2-T1);//KJ/Kg
+Q=W+deltaU;//KJ
+disp(-Q,"Net Heat transfer in KJ ; ");
diff --git a/2135/CH2/EX2.3/Exa_2_3.sce b/2135/CH2/EX2.3/Exa_2_3.sce new file mode 100755 index 000000000..de3e4c9c9 --- /dev/null +++ b/2135/CH2/EX2.3/Exa_2_3.sce @@ -0,0 +1,12 @@ +//Exa 2.3
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+WA=20;//KJ
+QA=15;//KJ
+QB=10;//KJ
+U2subU1=QA-WA;//change in internal energy in KJ
+disp(U2subU1,"Change in internal energy in KJ : ");
diff --git a/2135/CH2/EX2.30/Exa_2_30.sce b/2135/CH2/EX2.30/Exa_2_30.sce new file mode 100755 index 000000000..f78b25aa0 --- /dev/null +++ b/2135/CH2/EX2.30/Exa_2_30.sce @@ -0,0 +1,16 @@ +//Exa 2.30
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data :
+Vdot=0.032;//m^3/s
+d=1.5;//m
+L=4.2;//m
+m=3500;//Kg
+V=%pi/4*d^2*L;//m^3
+rho=m/V;//Kg/m^3
+disp(rho,"Density of liquid in Kg/m^3 : ");
+m_dot=rho*Vdot;//Kg/s
+disp(m_dot,"Mass flow rate in Kg/s : ");
diff --git a/2135/CH2/EX2.31/Exa_2_31.sce b/2135/CH2/EX2.31/Exa_2_31.sce new file mode 100755 index 000000000..e3eb935e1 --- /dev/null +++ b/2135/CH2/EX2.31/Exa_2_31.sce @@ -0,0 +1,46 @@ +//Exa 2.31
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+p1=1;//bar
+T1=20+273;//K
+p2=6;//bar
+m=1;//Kg
+R=287;//Nm/Kg
+Gamma=1.4;
+Cp=1.005;//KJ/KgK
+Cv=0.7175;//KJ/KgK
+//T2=T1 : Isothermal compression
+T2subT1=0;
+deltaU=m*Cv*(T2subT1);//KJ
+disp("Isothermal :");
+disp(deltaU,"Change in internal energy in KJ : ");
+Wsf=m*R/1000*T1*log(p1/p2);//KJ/Kg
+disp(Wsf,"Work done in KJ/Kg : ");
+p2V2subp1V1=0;//isothermal process
+Q=Wsf+deltaU+p2V2subp1V1;//KJ/Kg
+disp(Q,"Heat transfer in KJ/Kg : ");
+disp("Isentropic :");
+T2=T1*(p2/p1)^((Gamma-1)/Gamma);//K
+U2subU1=m*Cv*(T2-T1);//KJ/Kg
+disp(U2subU1,"Change in internal energy in KJ/Kg : ");
+H2subH1=m*Cp*(T2-T1);//KJ/Kg
+disp(H2subH1,"Change in heat in KJ/Kg : ");
+Q=0;//adiabatic process
+disp(Q,"Heat transfer in KJ/Kg : ");
+Wsf=Q-H2subH1;//KJ/Kg
+disp(Wsf,"Work done in KJ/Kg : ");
+disp("Polytropic : ");
+n=1.25;//index
+T2=T1*(p2/p1)^((n-1)/n);//K
+deltaU=m*Cv*(T2-T1);//KJ/Kg
+disp(deltaU,"Change in internal energy in KJ/Kg : ");
+H2subH1=m*Cp*(T2-T1);//KJ/Kg
+Wsf=(n/(n-1))*m*R/1000*(T1-T2);//KJ/Kg
+disp(Wsf,"Work done in KJ/Kg : ");
+Q=Wsf+H2subH1;//KJ/Kg
+disp(Q,"Heat transfer in KJ/Kg : ");
+//Answer of chane in internal energy for last part is wrong in the book.
diff --git a/2135/CH2/EX2.32/Exa_2_32.sce b/2135/CH2/EX2.32/Exa_2_32.sce new file mode 100755 index 000000000..3361dc69f --- /dev/null +++ b/2135/CH2/EX2.32/Exa_2_32.sce @@ -0,0 +1,15 @@ +//Exa 2.32
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data :
+p1=5;//bar
+p2=50;//bar
+V=0.001;//m^3/Kg
+m_dot=10;//Kg/s
+wsf=integrate('-V',"p",p1*10^5,p2*10^5);//J/kg
+wsf=wsf/1000;//KJ/Kg
+Wsf=abs(wsf)*m_dot;//KW(leaving -ve sign as it is to indiacte heat is supplied)
+disp(Wsf,"Power required in KW : ");
diff --git a/2135/CH2/EX2.33/Exa_2_33.sce b/2135/CH2/EX2.33/Exa_2_33.sce new file mode 100755 index 000000000..0d41e2c47 --- /dev/null +++ b/2135/CH2/EX2.33/Exa_2_33.sce @@ -0,0 +1,19 @@ +//Exa 2.33
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+p1=10^5;//Pa
+p2=5*10^5;//Pa
+T1=25+273;//K
+V1=1.8;//m^3/Kg
+V2=p1/p2*V1;//m^3/Kg
+W=-p1*V1*log(p2/p1);//J/kg
+W=W/1000;//KJ/Kg
+disp(W,"Workdone in KJ : ");
+deltaU=0;//As in a isothermal process T2-T1 =0
+disp(deltaU,"Change in internal energy in KJ : ");
+Q=-W;//KJ/Kg(As in a isothermal process T2-T1 =0 )
+disp(Q,"Heat Transfered in KJ/Kg : ");
diff --git a/2135/CH2/EX2.34/Exa_2_34.sce b/2135/CH2/EX2.34/Exa_2_34.sce new file mode 100755 index 000000000..3dd93cf16 --- /dev/null +++ b/2135/CH2/EX2.34/Exa_2_34.sce @@ -0,0 +1,29 @@ +//Exa 2.34
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+p=6;//bar
+m=18;//Kg
+v=260;//m/s
+rho=4;//Kg/m^3
+Q=42;//KJ/Kg
+W=261;//KW
+Cv=0.715;//KJ/KgK
+pA=1;//bar
+vA=60;//m/s
+mdotA=14;//Kg/s
+CvA=0.835;//m^3/Kg
+TA=115+273;//K
+pB=5.5;//bar
+vB=15;//m/s
+mdotB=4;//Kg/s
+CvB=0.46;//m^3/Kg
+TB=600+273;//K
+v1=1/rho;//m^3/Kg
+//m*(Cv*T+p*10^5*v1/1000+v^2/2000)+Q*rho-W=mdotA*(Cv*TA+pA*10^5*CvA/1000+vA^2/2000)+m_dotB*(Cv*TB+pB*10^5*CvB/1000+vB^2/2000);
+T=(((mdotA*(Cv*TA+pA*10^5*CvA/1000+vA^2/2000)+mdotB*(Cv*TB+pB*10^5*CvB/1000+vB^2/2000))+W-Q*rho)/m-v^2/2000-p*10^5*v1/1000)/Cv;//K
+disp(T,"Temperature of air at inlet in K : ");
+//Answer in the book is wrong.
diff --git a/2135/CH2/EX2.35/Exa_2_35.sce b/2135/CH2/EX2.35/Exa_2_35.sce new file mode 100755 index 000000000..d501a34de --- /dev/null +++ b/2135/CH2/EX2.35/Exa_2_35.sce @@ -0,0 +1,25 @@ +//Exa 2.35
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+h1=3000;//KJ/Kg
+C1=60;//m/s
+h2=2762;//KJ/Kg
+Q=0;//KJ
+m=1;//Kg
+W=0;//in case of nozzle
+//Q-W=m*[(h2-h1)+(C2^2-C1^2)/2/1000+g*(Z2-Z1)/1000]
+Z2subZ1=0;//as Z1=Z2 for horizontal nozzle
+C2=sqrt(-(h2-h1)*2*1000+C1^2);//m/s
+disp(C2,"Velocity at exit of nozzle in m/s : ");
+A1=0.1;//m^3
+v1=0.187;//m^3/Kg
+mdot=A1*C1/v1;//Kg/s
+disp(mdot,"Mass flow rate through the nozzle in Kg/s : ");
+v2=0.498;//m^3/Kg
+//mdot=A2*C2/v2=%pi/4*d^2*C2/v2
+d2=sqrt(mdot/%pi*4*v2/C2);//m
+disp(d2,"Diameter of nozzle at exit in meter : ");
diff --git a/2135/CH2/EX2.36/Exa_2_36.sce b/2135/CH2/EX2.36/Exa_2_36.sce new file mode 100755 index 000000000..7dcfd9690 --- /dev/null +++ b/2135/CH2/EX2.36/Exa_2_36.sce @@ -0,0 +1,19 @@ +//Exa 2.36
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data :
+p1=4;//bar
+p2=1;//bar
+T1=40+273;//K
+T2=2.5+273;//K
+C1=40;//m/s
+C2=200;//m/s
+W=52;//KJKg
+m=1;//Kg
+Cp=1.005;//KJ/KgK
+Z2subZ1=0;//as Z1=Z2
+Q=W+m*[Cp*(T2-T1)+(C2^2-C1^2)/2/1000];//KJ/Kg
+disp(Q,"Heat transfered per Kg of air in KJ/Kg : ");
diff --git a/2135/CH2/EX2.37/Exa_2_37.sce b/2135/CH2/EX2.37/Exa_2_37.sce new file mode 100755 index 000000000..8fc24373c --- /dev/null +++ b/2135/CH2/EX2.37/Exa_2_37.sce @@ -0,0 +1,24 @@ +//Exa 2.37
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+m1dot=0.01;//Kg/s
+h1=2950;//KJ/Kg
+C1=20;//m/s
+m2dot=0.1;//Kg/s
+h2=2565;//KJ/Kg
+C2=120;//m/s
+m3dot=0.001;//Kg/s
+h3=421;//KJ/Kg
+C3=0;//m/s
+C4=0;//m/s
+Wsf_dot=25;//KW
+Qdot=0;//KJ
+//m1dot+m2dot=m3dot+m4dot
+m4dot=m1dot+m2dot-m3dot;//Kg/s
+//m1dot*(h1+C1^2/2/1000)+m2dot*(h2+C2^2/2/1000)=m3dot*(h3+C3^2/2/1000)+m4dot*(h4+C4^2/2/1000)+Wsf_dot
+h4=(m1dot*(h1+C1^2/2/1000)+m2dot*(h2+C2^2/2/1000)-m3dot*(h3+C3^2/2/1000)-Wsf_dot)/m4dot-C4^2/2/1000;//KJ/Kg
+disp(h4,"Enthalpy of 2nd exit stream in KJ/Kg : ");
diff --git a/2135/CH2/EX2.38/Exa_2_38.sce b/2135/CH2/EX2.38/Exa_2_38.sce new file mode 100755 index 000000000..597e3c026 --- /dev/null +++ b/2135/CH2/EX2.38/Exa_2_38.sce @@ -0,0 +1,24 @@ +//Exa 2.38
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+mdot=0.5;//kg/s
+p1=1.4;//bar
+rho1=2.5;//kg/m^3
+u1=920;//kJ/kg
+C1=200;//m/s
+p2=5.6;//bar
+rho2=5;//kg/m^3
+u2=720;//kJ/kg
+C2=180;//m/s
+Qdot=-60;//kW
+Z21=60;//m
+g=9.81;//gravity constant
+h21=u2-u1+(p2*10^5/(rho2*1000)-p1*10^5/(rho1*1000));//kJ/kg(change in enthalpy)
+H21=mdot*h21;//kW(total change in enthalpy)
+disp(H21,"Change in enthalpy, H2-H1 in kW : ");
+Wsf=Qdot-mdot*[h21+(C2^2-C1^2)/2/1000+g*(Z21)/1000];//kW
+disp(Wsf,"Rate of workdone, Wsf in kW : ");
diff --git a/2135/CH2/EX2.39/Exa_2_39.sce b/2135/CH2/EX2.39/Exa_2_39.sce new file mode 100755 index 000000000..2fc7f51bc --- /dev/null +++ b/2135/CH2/EX2.39/Exa_2_39.sce @@ -0,0 +1,21 @@ +//Exa 2.39
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+mdot=0.4;//Kg/s
+C1=6;//m/s
+p1=1;//bar
+p1=p1*100;//KPa
+V1=0.16;//m^3/Kg
+u2subu1=88;//KJ/Kg
+Qdot=-59;//W
+Qdot=Qdot/1000;//KJ/s
+W=0.059;//KJ/
+Gamma=1.4;
+Z2subZ1=0;
+h2subh1=Gamma*u2subu1;//KJ
+Wdot=Qdot-mdot*(h2subh1);//As C1=C2, C2^2-C1^2=0 & Z2-Zi=0
+disp(Wdot,"Power in KW : ");
diff --git a/2135/CH2/EX2.4/Exa_2_4.sce b/2135/CH2/EX2.4/Exa_2_4.sce new file mode 100755 index 000000000..199794e50 --- /dev/null +++ b/2135/CH2/EX2.4/Exa_2_4.sce @@ -0,0 +1,18 @@ +//Exa 2.4
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+Q1=120;//KJ
+Q2=-16;//KJ
+Q3=-48;//KJ
+Q4=12;//KJ
+W1=60000;//N-m
+W2=68000;//N-m
+W3=120000;//N-m
+W4=44000;//N-m
+Net_work=Q1+Q2+Q3+Q4;//KJ
+disp(Net_work*1000,"Net Work in N-m : ");
+disp("Option (ii) is true.")
diff --git a/2135/CH2/EX2.40/Exa_2_40.sce b/2135/CH2/EX2.40/Exa_2_40.sce new file mode 100755 index 000000000..3e00d299e --- /dev/null +++ b/2135/CH2/EX2.40/Exa_2_40.sce @@ -0,0 +1,23 @@ +//Exa 2.40
+clc;
+clear;
+close;
+format('v',5);
+
+//Given Data :
+mdot=1;//Kg/s
+p1=40;//bar
+T1=1047+273;//K
+C1=200;//m/s
+C2=100;//m/s
+p2=1;//bar
+Qdot=0;//W
+Cp=1.05;//KJ/KgK
+R=300;//Nm/KgK
+Gamma=1.4;
+//p*v=m*R*T
+v1dot=mdot*R*T1/p1/10^5;//m^3/s
+v2dot=(p1/p2)^(1/Gamma)*v1dot;//m^3/s
+T2=p2*v2dot/p1/v1dot*T1;//K
+Wsf_dot=Qdot-mdot*[Cp*(T2-T1)+(C2^2-C1^2)/2/1000];//KJ/s or KW
+disp(Wsf_dot,"Output of turbine in KJ/s or KW : ");
diff --git a/2135/CH2/EX2.41/Exa_2_41.sce b/2135/CH2/EX2.41/Exa_2_41.sce new file mode 100755 index 000000000..00ca5f79b --- /dev/null +++ b/2135/CH2/EX2.41/Exa_2_41.sce @@ -0,0 +1,24 @@ +//Exa 2.41
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+A1C1=0.7;//m^3/s
+p1=85;//KPa
+p2=650;//KPa
+v1=0.35;//m^3/Kg
+v2=0.1;//m^3/Kg
+d1=10/100;//m
+d2=6.25/100;//m
+
+mdot=A1C1/v1;//Kg/s
+p2v2SUBp1v1=mdot*(p2*v2-p1*v1);//KJ/s
+disp(p2v2SUBp1v1,"Change in flow work in KJ/s : ");
+disp(mdot,"Mass flow rate in Kg/s : ");
+C1=A1C1/(%pi/4*d1^2);//m/s
+A2C2=mdot*v2;//m^3/s
+C2=A2C2/(%pi/4*d2^2);//m/s
+C2subC1=C2-C1;//m/s
+disp(C2subC1,"Velocity change in m/s : ");
diff --git a/2135/CH2/EX2.42/Exa_2_42.sce b/2135/CH2/EX2.42/Exa_2_42.sce new file mode 100755 index 000000000..fba5367d1 --- /dev/null +++ b/2135/CH2/EX2.42/Exa_2_42.sce @@ -0,0 +1,23 @@ +//Exa 2.42
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+m=12/60;//Kg/s
+C1=12;//m/s
+p1=1*100;//KPa
+v1=0.5;//m^3/Kg
+C2=90;//m/s
+p2=8*100;//KPa
+v2=0.14;//m^3/Kg
+deltah=150;//KJ/Kg
+Qdot=-700/60;//KJ/s
+//Assuming deltaPE=0=g*(Z2-Z1)
+//Qdot-Wdot=mdot*(deltah+(C2^2-C1^2)/2/1000+g*(Z2-Z1)/1000)
+Wdot=Qdot-m*(deltah+(C2^2-C1^2)/2/1000);//KW
+disp(abs(Wdot),"Power required to drive the compressor in KW : ");
+//A1C1/v1=A2C2/v2
+d1BYd2=sqrt(C2/v2*v1/C1);
+disp(d1BYd2,"Ratio of inlet to outlet pipe diameter : ");
diff --git a/2135/CH2/EX2.43/Exa_2_43.sce b/2135/CH2/EX2.43/Exa_2_43.sce new file mode 100755 index 000000000..c9c0bff6a --- /dev/null +++ b/2135/CH2/EX2.43/Exa_2_43.sce @@ -0,0 +1,20 @@ +//Exa 2.43
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+h1=160;//KJ/Kg
+h2=2380;//KJ/Kg
+m1dot=10;//Kg/s
+m2dot=0.8;//Kg/s
+Qdot=10;//KJ/s
+Wdot=0;//KJ
+deltaKE=0;
+deltaPE=0;
+m3dot=m1dot+m2dot;//Kg/s
+disp(m3dot,"Mass flow of heated water in Kg/s : ");
+//m1dot*h1+m2dot*h2=m3dot*h3+Qdot
+h3=(m1dot*h1+m2dot*h2-Qdot)/m3dot;//KJ/Kg
+disp(h3,"Specific enthalpy of heated water in KJ/Kg : ");
diff --git a/2135/CH2/EX2.44/Exa_2_44.sce b/2135/CH2/EX2.44/Exa_2_44.sce new file mode 100755 index 000000000..bdfb1b923 --- /dev/null +++ b/2135/CH2/EX2.44/Exa_2_44.sce @@ -0,0 +1,26 @@ +//Exa 2.44
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+v=0.001;//m^3/Kg
+DisRate=10/60;//m^3/s
+p1=100;//KN/m^2
+p2=300;//KN/m^2
+Z1=3;//m
+Z2=9;//m
+d1=0.25;//m
+d2=0.17;//m
+Qdot=0;//KJ/s(Adiabatic process)
+//A1*C1=A2*C2=DisRate
+C1=DisRate/(%pi/4*d1^2);//m/s
+C2=DisRate/(%pi/4*d2^2);//m/s
+mdot=DisRate/v;//Kg/s
+g=9.81;//gravity constant
+delta_u=0;
+//Qdot-Wdot=mdot*(delta_u+p2*v2-p1*v1+C2^2-C1^2+g*(Z2-Z1))
+Wdot=mdot*(delta_u+p2*10^3*v-p1*10^3*v+(C2^2-C1^2)/2+g*(Z2-Z1))-Qdot;//J/s
+Wdot=Wdot/1000;//KJ/s or KW
+disp(Wdot,"Power required to drive the pump in KW : ");
diff --git a/2135/CH2/EX2.45/Exa_2_45.sce b/2135/CH2/EX2.45/Exa_2_45.sce new file mode 100755 index 000000000..5b425f16b --- /dev/null +++ b/2135/CH2/EX2.45/Exa_2_45.sce @@ -0,0 +1,21 @@ +//Exa 2.45
+clc;
+clear;
+close;
+format('v',8);
+
+//Given Data :
+mdot=5;//Kg/s
+T1=27+273;//K
+//Z1=Z2
+deltaPE=0;
+Wdot=-100;//KW
+C1=60;//m/s
+C2=150;//m/s
+q=-2;//KJ/Kg
+Cp=1.05;//KJ/Kg
+Qdot=mdot*q;//KJ/s
+delta_h=Cp;//KJ/Kg
+//Qdot-Wdot=mdot*(delta_h*(T2-T1)+(C2^2-C1^2)/2/1000+g*(Z2-Z1))/1000)
+T2=((Qdot-Wdot)/mdot-(C2^2-C1^2)/2/1000)/delta_h+T1;//K
+disp(T2,"Exit temperature in K : ");
diff --git a/2135/CH2/EX2.46/Exa_2_46.sce b/2135/CH2/EX2.46/Exa_2_46.sce new file mode 100755 index 000000000..4cdc3f644 --- /dev/null +++ b/2135/CH2/EX2.46/Exa_2_46.sce @@ -0,0 +1,22 @@ +//Exa 2.46
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+t1=90;//degreeC
+t2=30;//degreeC
+modot=3;//Kg/s
+//h=1.7*t+11*10^-4*t^2
+h1=1.7*t1+11*10^-4*t1^2;//KJ/Kg
+h2=1.7*t2+11*10^-4*t2^2;//KJ/Kg
+tw1=27;//degreeC
+tw2=67;//degreeC
+Cp=4.2;//KJ/KgK
+//h=Cp*tw;//KJ/Kg
+hw1=Cp*tw1;//KJ/Kg
+hw2=Cp*tw2;//KJ/Kg
+//modot*(h1-h2)=mwdot*(hw2-hw1)
+mwdot=modot*(h1-h2)/(hw2-hw1);//Kg/s
+disp(mwdot,"Rate of flow of water in Kg/s : ");
diff --git a/2135/CH2/EX2.47/Exa_2_47.sce b/2135/CH2/EX2.47/Exa_2_47.sce new file mode 100755 index 000000000..5d1b4b770 --- /dev/null +++ b/2135/CH2/EX2.47/Exa_2_47.sce @@ -0,0 +1,20 @@ +//Exa 2.47
+clc;
+clear;
+close;
+format('v',6);
+
+//Given Data :
+V1=6;//m^3
+p1=20*100;//Kpa
+T1=37+273;//K
+p2=10*100;//Kpa
+V2=V1;//m^3
+R=0.287;//KJ/KgK
+m1=p1*V1/R/T1;//Kg
+//T2=T1*(p2/p1)^((Gamma-1)/Gamma)
+Gamma=1.4;
+T2=T1*(p2/p1)^((Gamma-1)/Gamma);//K
+m2=p2*V2/R/T2;//Kg
+m=m1-m2;//mass of air discharged in Kg
+disp(m,"Mass of air discharged in Kg : ");
diff --git a/2135/CH2/EX2.48/Exa_2_48.sce b/2135/CH2/EX2.48/Exa_2_48.sce new file mode 100755 index 000000000..38338fcd4 --- /dev/null +++ b/2135/CH2/EX2.48/Exa_2_48.sce @@ -0,0 +1,12 @@ +//Exa 2.48
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data :
+V1=1.5;//m^3
+V2=0;//m^3
+p=1.02;//bar
+W=p*10^5*integrate('1','V',V1,V2);//J
+disp(W/1000,"Work done by the air in KJ : ");
diff --git a/2135/CH2/EX2.5/Exa_2_5.sce b/2135/CH2/EX2.5/Exa_2_5.sce new file mode 100755 index 000000000..56e98b66b --- /dev/null +++ b/2135/CH2/EX2.5/Exa_2_5.sce @@ -0,0 +1,18 @@ +//Exa 2.5
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+T1=100;//degree_centigrade
+T1=T1+273;//kelvin
+T2=200;//degree_centigrade
+T2=T2+273;//kelvin
+
+delQbydelT=1.005;//KJ/k
+//delWbydelT=(4-0.12*T);//KJ/k
+Q=integrate('1.005','T',T1,T2);
+W=integrate('4-0.12*T','T',T1,T2);
+U2subU1=Q-W;//change in internal energy in KJ
+disp(U2subU1,"Change in internal energy in KJ : ");
diff --git a/2135/CH2/EX2.6/Exa_2_6.sce b/2135/CH2/EX2.6/Exa_2_6.sce new file mode 100755 index 000000000..da6dbe880 --- /dev/null +++ b/2135/CH2/EX2.6/Exa_2_6.sce @@ -0,0 +1,51 @@ +//Exa 2.6
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+m=20;//Kg
+mw=200;//Kg
+Z1=15;//m
+Z2=0;//m
+g=9.81;//gravity constant
+
+disp("(i) Stone is about to enter the water");
+deltaPE=m*g*(Z2-Z1)/1000;//KJ
+Q=0;//Heat Transfer
+W=0;//Work Transfer
+deltaE=Q-W;//Energy Transfer
+//deltaE=deltaU+deltaKE+deltaPE
+deltaU=0;//no change in temperature
+deltaKE= deltaE-deltaU-deltaPE;//KJ
+disp(deltaU,"deltaU in KJ : ");
+disp(deltaPE,"deltaPE in KJ : ");
+disp(deltaKE,"deltaKE in KJ : ");
+disp(Q,"Q in KJ : ");
+disp(W,"W in KJ : ");
+
+disp("(ii) Stone has come to rest near the tank.");
+Q=0;//Heat Transfer
+W=0;//Work Transfer
+deltaE=Q-W;//Energy Transfer
+deltaKE=0;//rest condition
+//deltaE=deltaU+deltaKE+deltaPE
+deltaU= deltaE-deltaKE-deltaPE;//KJ
+disp(deltaU,"deltaU in KJ : ");
+disp(deltaPE,"deltaPE in KJ : ");
+disp(deltaKE,"deltaKE in KJ : ");
+disp(Q,"Q in KJ : ");
+disp(W,"W in KJ : ");
+
+disp("(iii) Heat is transfered to surroundings.");
+deltaKE=0;//Energy Transfered to water
+deltaPE=0;
+W=0;
+deltaE=deltaU+deltaKE+deltaPE
+Q=deltaE+W;//KJ
+disp(deltaU,"deltaU in KJ : ");
+disp(deltaPE,"deltaPE in KJ : ");
+disp(deltaKE,"deltaKE in KJ : ");
+disp(Q,"Q in KJ : ");
+disp(W,"W in KJ : ");
diff --git a/2135/CH2/EX2.7/Exa_2_7.sce b/2135/CH2/EX2.7/Exa_2_7.sce new file mode 100755 index 000000000..b3cb5c73c --- /dev/null +++ b/2135/CH2/EX2.7/Exa_2_7.sce @@ -0,0 +1,37 @@ +//Exa 2.7
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+SigmaW=30;//KJ
+n=10;//cycles/min
+Q1_2=50;//KJ
+//Q2_3=0;//KJ
+//Q3_1=0;//KJ
+//W1_2=0;//KJ
+W2_3=30;//KJ
+//W3_1=0;//KJ
+deltaU1_2=20;//KJ
+deltaU2_3=-10;//KJ
+//deltaU3_1=0;//KJ
+//Q-W=deltaU
+//For Proess 1-2 :
+W1_2=Q1_2-deltaU1_2;//KJ
+disp(W1_2,"W1-2 in KJ : ");
+//For Proess 2-3
+Q2_3=W2_3+deltaU2_3;//KJ
+disp(Q2_3,"Q2-3 in KJ : ");
+//For Proess 3-1
+W3_1=SigmaW-W1_2-W2_3;//KJ
+disp(W3_1,"W3-1 in KJ : ");
+SigmaQ=SigmaW;//KJ
+Q3_1=SigmaQ-Q1_2-Q2_3;//KJ
+disp(Q3_1,"Q3-1 in KJ : ");
+deltaU3_1=Q3_1-W3_1;//KJ
+disp(deltaU3_1,"U1-U3 or deltaU3-1 in KJ : ");
+RateOfWork=SigmaW*n;//KJ/min
+RateOfWork=RateOfWork/60;//KJ/sec or KW
+disp(RateOfWork,"Rate of work in KW : ");
+
diff --git a/2135/CH2/EX2.8/Exa_2_8.sce b/2135/CH2/EX2.8/Exa_2_8.sce new file mode 100755 index 000000000..9a3940fe3 --- /dev/null +++ b/2135/CH2/EX2.8/Exa_2_8.sce @@ -0,0 +1,19 @@ +//Exa 2.8
+clc;
+clear;
+close;
+format('v',9);
+
+//Given Data :
+m=50;//Kg
+C1=10;//m/s
+C2=30;//m/s
+Z2subZ1=40;//m
+Q=30000;//J
+W1=-4500;//J
+W2=0.002;//KWh
+g=9.81;//gravity constant
+W2=W2*3600*1000;//J
+//sigmaQ-sigmaW=E2-E1=(U2-U1)+(C2^2-C1^2)/2+g*(Z2-Z1)
+U2subU1=Q-(W1+W2)-(C2^2-C1^2)/2-g*(Z2subZ1);//J
+disp(U2subU1,"Change in Internal energy in J : ");
diff --git a/2135/CH2/EX2.9/Exa_2_9.sce b/2135/CH2/EX2.9/Exa_2_9.sce new file mode 100755 index 000000000..ab356253e --- /dev/null +++ b/2135/CH2/EX2.9/Exa_2_9.sce @@ -0,0 +1,12 @@ +//Exa 2.9
+clc;
+clear;
+close;
+format('v',7);
+
+//Given Data
+deltaU=-4000;//KJ
+W=-1.2;//KWh
+W=W*3600;//KJ
+Q=W+deltaU;//KJ/hr
+disp(Q,"Net heat transfer in KJ/hr : ");
|