summaryrefslogtreecommitdiff
path: root/2870
diff options
context:
space:
mode:
Diffstat (limited to '2870')
-rwxr-xr-x2870/CH1/EX1.10/Ex1_10.sce20
-rwxr-xr-x2870/CH1/EX1.2/Ex1_2.sce10
-rwxr-xr-x2870/CH1/EX1.3/Ex1_3.sce12
-rwxr-xr-x2870/CH1/EX1.4/Ex1_4.sce14
-rwxr-xr-x2870/CH1/EX1.5/Ex1_5.sce10
-rwxr-xr-x2870/CH1/EX1.6/Ex1_6.sce16
-rwxr-xr-x2870/CH1/EX1.7/Ex1_7.sce18
-rwxr-xr-x2870/CH1/EX1.8/Ex1_8.sce13
-rwxr-xr-x2870/CH1/EX1.9/Ex1_9.sce14
-rwxr-xr-x2870/CH10/EX10.1/Ex10_1.sce33
-rwxr-xr-x2870/CH10/EX10.2/Ex10_2.sce33
-rwxr-xr-x2870/CH10/EX10.3/Ex10_3.sce56
-rwxr-xr-x2870/CH10/EX10.4/Ex10_4.sce44
-rwxr-xr-x2870/CH10/EX10.5/Ex10_5.sce53
-rwxr-xr-x2870/CH10/EX10.6/Ex10_6.sce46
-rwxr-xr-x2870/CH10/EX10.7/Ex10_7.sce34
-rwxr-xr-x2870/CH10/EX10.8/Ex10_8.sce49
-rwxr-xr-x2870/CH10/EX10.9/Ex10_9.sce34
-rwxr-xr-x2870/CH11/EX11.1/Ex11_1.sce26
-rwxr-xr-x2870/CH11/EX11.2/Ex11_2.sce28
-rwxr-xr-x2870/CH11/EX11.3/Ex11_3.sce29
-rwxr-xr-x2870/CH11/EX11.4/Ex11_4.sce37
-rwxr-xr-x2870/CH11/EX11.5/Ex11_5.sce36
-rwxr-xr-x2870/CH11/EX11.6/Ex11_6.sce20
-rwxr-xr-x2870/CH12/EX12.1/Ex12_1.sce13
-rwxr-xr-x2870/CH12/EX12.11/Ex12_11.sce48
-rwxr-xr-x2870/CH12/EX12.2/Ex12_2.sce16
-rwxr-xr-x2870/CH12/EX12.5/Ex12_5.sce18
-rwxr-xr-x2870/CH12/EX12.6/Ex12_6.sce17
-rwxr-xr-x2870/CH13/EX13.1/Ex13_1.sce43
-rwxr-xr-x2870/CH13/EX13.2/Ex13_2.sce64
-rwxr-xr-x2870/CH13/EX13.3/Ex13_3.sce39
-rwxr-xr-x2870/CH13/EX13.4/Ex13_4.sce20
-rwxr-xr-x2870/CH13/EX13.5/Ex13_5.sce68
-rwxr-xr-x2870/CH13/EX13.6/Ex13_6.sce36
-rwxr-xr-x2870/CH14/EX14.1/Ex14_1.sce30
-rwxr-xr-x2870/CH14/EX14.2/Ex14_2.sce13
-rwxr-xr-x2870/CH14/EX14.3/Ex14_3.sce26
-rwxr-xr-x2870/CH14/EX14.5/Ex14_5.sce37
-rwxr-xr-x2870/CH14/EX14.6/Ex14_6.sce26
-rwxr-xr-x2870/CH14/EX14.8/Ex14_8.sce34
-rwxr-xr-x2870/CH14/EX14.9/Ex14_9.sce31
-rwxr-xr-x2870/CH15/EX15.1/Ex15_1.sce28
-rwxr-xr-x2870/CH15/EX15.10/Ex15_10.sce57
-rwxr-xr-x2870/CH15/EX15.11/Ex15_11.sce58
-rwxr-xr-x2870/CH15/EX15.2/Ex15_2.sce28
-rwxr-xr-x2870/CH15/EX15.3/Ex15_3.sce27
-rwxr-xr-x2870/CH15/EX15.4/Ex15_4.sce36
-rwxr-xr-x2870/CH15/EX15.5/Ex15_5.sce15
-rwxr-xr-x2870/CH15/EX15.6/Ex15_6.sce52
-rwxr-xr-x2870/CH15/EX15.7/Ex15_7.sce35
-rwxr-xr-x2870/CH15/EX15.8/Ex15_8.sce40
-rwxr-xr-x2870/CH15/EX15.9/Ex15_9.sce13
-rwxr-xr-x2870/CH16/EX16.1/Ex16_1.sce20
-rwxr-xr-x2870/CH16/EX16.10/Ex16_10.sce17
-rwxr-xr-x2870/CH16/EX16.11/Ex16_11.sce19
-rwxr-xr-x2870/CH16/EX16.2/Ex16_2.sce18
-rwxr-xr-x2870/CH16/EX16.6/Ex16_6.sce34
-rwxr-xr-x2870/CH16/EX16.7/Ex16_7.sce19
-rwxr-xr-x2870/CH16/EX16.8/Ex16_8.sce16
-rwxr-xr-x2870/CH16/EX16.9/Ex16_9.sce17
-rwxr-xr-x2870/CH17/EX17.1/Ex17_1.sce22
-rwxr-xr-x2870/CH17/EX17.10/Ex17_10.sce12
-rwxr-xr-x2870/CH17/EX17.11/Ex17_11.sce37
-rwxr-xr-x2870/CH17/EX17.12/Ex17_12.sce23
-rwxr-xr-x2870/CH17/EX17.15/Ex17_15.sce55
-rwxr-xr-x2870/CH17/EX17.16/Ex17_16.sce52
-rwxr-xr-x2870/CH17/EX17.2/Ex17_2.sce17
-rwxr-xr-x2870/CH17/EX17.3/Ex17_3.sce26
-rwxr-xr-x2870/CH17/EX17.4/Ex17_4.sce21
-rwxr-xr-x2870/CH17/EX17.5/Ex17_5.sce47
-rwxr-xr-x2870/CH17/EX17.6/Ex17_6.sce31
-rwxr-xr-x2870/CH17/EX17.7/Ex17_7.sce58
-rwxr-xr-x2870/CH17/EX17.9/Ex17_9.sce46
-rwxr-xr-x2870/CH2/EX2.1/Ex2_1.sce19
-rwxr-xr-x2870/CH2/EX2.10/Ex2_10.sce12
-rwxr-xr-x2870/CH2/EX2.11/Ex2_11.sce13
-rwxr-xr-x2870/CH2/EX2.12/Ex2_12.sce12
-rwxr-xr-x2870/CH2/EX2.13/Ex2_13.sce16
-rwxr-xr-x2870/CH2/EX2.15/Ex2_15.sce19
-rwxr-xr-x2870/CH2/EX2.16/Ex2_16.sce22
-rwxr-xr-x2870/CH2/EX2.17/Ex2_17.sce24
-rwxr-xr-x2870/CH2/EX2.18/Ex2_18.sce16
-rwxr-xr-x2870/CH2/EX2.19/Ex2_19.sce20
-rwxr-xr-x2870/CH2/EX2.2/Ex2_2.sce15
-rwxr-xr-x2870/CH2/EX2.7/Ex2_7.sce10
-rwxr-xr-x2870/CH2/EX2.8/Ex2_8.sce15
-rwxr-xr-x2870/CH2/EX2.9/Ex2_9.sce13
-rwxr-xr-x2870/CH3/EX3.1/Ex3_1.sce15
-rwxr-xr-x2870/CH3/EX3.10/Ex3_10.sce17
-rwxr-xr-x2870/CH3/EX3.11/Ex3_11.sce31
-rwxr-xr-x2870/CH3/EX3.12/Ex3_12.sce32
-rwxr-xr-x2870/CH3/EX3.13/Ex3_13.sce58
-rwxr-xr-x2870/CH3/EX3.14/Ex3_14.sce25
-rwxr-xr-x2870/CH3/EX3.2/Ex3_2.sce15
-rwxr-xr-x2870/CH3/EX3.3/Ex3_3.sce20
-rwxr-xr-x2870/CH3/EX3.4/Ex3_4.sce18
-rwxr-xr-x2870/CH3/EX3.5/Ex3_5.sce27
-rwxr-xr-x2870/CH3/EX3.7/Ex3_7.sce21
-rwxr-xr-x2870/CH3/EX3.8/Ex3_8.sce20
-rwxr-xr-x2870/CH3/EX3.9/Ex3_9.sce93
-rwxr-xr-x2870/CH4/EX4.10/Ex4_10.sce35
-rwxr-xr-x2870/CH4/EX4.11/Ex4_11.sce28
-rwxr-xr-x2870/CH4/EX4.12/Ex4_12.sce22
-rwxr-xr-x2870/CH4/EX4.13/Ex4_13.sce15
-rwxr-xr-x2870/CH4/EX4.14/Ex4_14.sce29
-rwxr-xr-x2870/CH4/EX4.15/Ex4_15.sce12
-rwxr-xr-x2870/CH4/EX4.2/Ex4_2.sce17
-rwxr-xr-x2870/CH4/EX4.3/Ex4_3.sce12
-rwxr-xr-x2870/CH4/EX4.4/Ex4_4.sce27
-rwxr-xr-x2870/CH4/EX4.5/Ex4_5.sce31
-rwxr-xr-x2870/CH4/EX4.6/Ex4_6.sce40
-rwxr-xr-x2870/CH4/EX4.7/Ex4_7.sce34
-rwxr-xr-x2870/CH4/EX4.8/Ex4_8.sce28
-rwxr-xr-x2870/CH4/EX4.9/Ex4_9.sce24
-rwxr-xr-x2870/CH5/EX5.1/Ex5_1.sce17
-rwxr-xr-x2870/CH5/EX5.10/Ex5_10.sce27
-rwxr-xr-x2870/CH5/EX5.11/Ex5_11.sce20
-rwxr-xr-x2870/CH5/EX5.12/Ex5_12.sce20
-rwxr-xr-x2870/CH5/EX5.13/Ex5_13.sce38
-rwxr-xr-x2870/CH5/EX5.2/Ex5_2.sce20
-rwxr-xr-x2870/CH5/EX5.3/Ex5_3.sce28
-rwxr-xr-x2870/CH5/EX5.4/Ex5_4.sce24
-rwxr-xr-x2870/CH5/EX5.5/Ex5_5.sce24
-rwxr-xr-x2870/CH5/EX5.6/Ex5_6.sce19
-rwxr-xr-x2870/CH5/EX5.7/Ex5_7.sce32
-rwxr-xr-x2870/CH5/EX5.8/Ex5_8.sce22
-rwxr-xr-x2870/CH5/EX5.9/Ex5_9.sce24
-rwxr-xr-x2870/CH6/EX6.1/Ex6_1.sce12
-rwxr-xr-x2870/CH6/EX6.2/Ex6_2.sce12
-rwxr-xr-x2870/CH6/EX6.3/Ex6_3.sce12
-rwxr-xr-x2870/CH6/EX6.4/Ex6_4.sce12
-rwxr-xr-x2870/CH6/EX6.5/Ex6_5.sce14
-rwxr-xr-x2870/CH6/EX6.6/Ex6_6.sce14
-rwxr-xr-x2870/CH6/EX6.7/Ex6_7.sce12
-rwxr-xr-x2870/CH6/EX6.8/Ex6_8.sce18
-rwxr-xr-x2870/CH7/EX7.1/Ex7_1.sce10
-rwxr-xr-x2870/CH7/EX7.10/Ex7_10.sce16
-rwxr-xr-x2870/CH7/EX7.11/Ex7_11.sce14
-rwxr-xr-x2870/CH7/EX7.12/Ex7_12.sce24
-rwxr-xr-x2870/CH7/EX7.13/Ex7_13.sce27
-rwxr-xr-x2870/CH7/EX7.14/Ex7_14.sce30
-rwxr-xr-x2870/CH7/EX7.15/Ex7_15.sce26
-rwxr-xr-x2870/CH7/EX7.16/Ex7_16.sce22
-rwxr-xr-x2870/CH7/EX7.17/Ex7_17.sce16
-rwxr-xr-x2870/CH7/EX7.18/Ex7_18.sce20
-rwxr-xr-x2870/CH7/EX7.19/Ex7_19.sce21
-rwxr-xr-x2870/CH7/EX7.2/Ex7_2.sce28
-rwxr-xr-x2870/CH7/EX7.20/Ex7_20.sce29
-rwxr-xr-x2870/CH7/EX7.21/Ex7_21.sce14
-rwxr-xr-x2870/CH7/EX7.22/Ex7_22.sce29
-rwxr-xr-x2870/CH7/EX7.23/Ex7_23.sce16
-rwxr-xr-x2870/CH7/EX7.3/Ex7_3.sce26
-rwxr-xr-x2870/CH7/EX7.4/Ex7_4.sce23
-rwxr-xr-x2870/CH7/EX7.5/Ex7_5.sce20
-rwxr-xr-x2870/CH7/EX7.7/Ex7_7.sce27
-rwxr-xr-x2870/CH7/EX7.8/Ex7_8.sce30
-rwxr-xr-x2870/CH7/EX7.9/Ex7_9.sce24
-rwxr-xr-x2870/CH8/EX8.1/Ex8_1.sce15
-rwxr-xr-x2870/CH8/EX8.10/Ex8_10.sce18
-rwxr-xr-x2870/CH8/EX8.11/Ex8_11.sce37
-rwxr-xr-x2870/CH8/EX8.12/Ex8_12.sce19
-rwxr-xr-x2870/CH8/EX8.13/Ex8_13.sce29
-rwxr-xr-x2870/CH8/EX8.14/Ex8_14.sce24
-rwxr-xr-x2870/CH8/EX8.15/Ex8_15.sce35
-rwxr-xr-x2870/CH8/EX8.16/Ex8_16.sce27
-rwxr-xr-x2870/CH8/EX8.17/Ex8_17.sce20
-rwxr-xr-x2870/CH8/EX8.2/Ex8_2.sce13
-rwxr-xr-x2870/CH8/EX8.3/Ex8_3.sce14
-rwxr-xr-x2870/CH8/EX8.4/Ex8_4.sce18
-rwxr-xr-x2870/CH8/EX8.5/Ex8_5.sce16
-rwxr-xr-x2870/CH8/EX8.6/Ex8_6.sce12
-rwxr-xr-x2870/CH8/EX8.7/Ex8_7.sce19
-rwxr-xr-x2870/CH8/EX8.8/Ex8_8.sce22
-rwxr-xr-x2870/CH9/EX9.10/Ex9_10.sce36
-rwxr-xr-x2870/CH9/EX9.2/Ex9_2.sce47
-rwxr-xr-x2870/CH9/EX9.3/Ex9_3.sce56
-rwxr-xr-x2870/CH9/EX9.5/Ex9_5.sce35
-rwxr-xr-x2870/CH9/EX9.6/Ex9_6.sce27
-rwxr-xr-x2870/CH9/EX9.7/Ex9_7.sce18
-rwxr-xr-x2870/CH9/EX9.8/Ex9_8.sce42
-rwxr-xr-x2870/CH9/EX9.9/Ex9_9.sce39
182 files changed, 4783 insertions, 0 deletions
diff --git a/2870/CH1/EX1.10/Ex1_10.sce b/2870/CH1/EX1.10/Ex1_10.sce
new file mode 100755
index 000000000..12708807b
--- /dev/null
+++ b/2870/CH1/EX1.10/Ex1_10.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 1.10
+
+//constants used
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+p=1040;
+h1=0.8;
+H=4;
+x0=0;
+x1=4;// x0 & x1 are limits of integration
+
+//calculation
+P1=p*g*h1/1000;//standard pressure determination formula
+P2=integrate('p*g*(sqrt(1+(tan(3.14*z/4/H)^2)))','z',x0,x1);//integrant
+P2=P2/1000;//converting into kPa
+P=P1+P2;
+P=ceil(P);//roundingoff to match answer
+disp(P,'the gage pressure at the bottom of gradient zone in kPa is')
diff --git a/2870/CH1/EX1.2/Ex1_2.sce b/2870/CH1/EX1.2/Ex1_2.sce
new file mode 100755
index 000000000..e485c81e0
--- /dev/null
+++ b/2870/CH1/EX1.2/Ex1_2.sce
@@ -0,0 +1,10 @@
+clc;clear;
+//Example 1.2
+
+//given values
+p=850;
+V=2;
+
+//calculation
+m=p*V;//mass, density and volumne corealtion
+disp(m,'the amount of oil in tank is (in kg)')
diff --git a/2870/CH1/EX1.3/Ex1_3.sce b/2870/CH1/EX1.3/Ex1_3.sce
new file mode 100755
index 000000000..c77145083
--- /dev/null
+++ b/2870/CH1/EX1.3/Ex1_3.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 1.3
+
+//constants used
+g=32.174;//gravitational constant in ft/s^2
+
+//given values
+m=1;
+
+//calculation
+w=(m*g)/g;//weight is mass times the local value of gravitational acceleration
+disp(m,'the weight on earth is (in lbf)')
diff --git a/2870/CH1/EX1.4/Ex1_4.sce b/2870/CH1/EX1.4/Ex1_4.sce
new file mode 100755
index 000000000..261107a51
--- /dev/null
+++ b/2870/CH1/EX1.4/Ex1_4.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 1.4
+
+//given values
+Tc=10;//change in temp in Celcius
+
+//calculation
+Tk=Tc;
+Tr=1.8*Tk;
+Tf=Tr;
+//calculated using the corealtions b/w these scales
+disp(Tk,'the corresponding change in K');
+disp(Tr,'the corresponding change in R');
+disp(Tf,'the corresponding change in F')
diff --git a/2870/CH1/EX1.5/Ex1_5.sce b/2870/CH1/EX1.5/Ex1_5.sce
new file mode 100755
index 000000000..e1443fc58
--- /dev/null
+++ b/2870/CH1/EX1.5/Ex1_5.sce
@@ -0,0 +1,10 @@
+clc;clear;
+//Example 1.5
+
+//given values
+Patm=14.5;
+Pvac=5.8;
+
+//calculation
+Pabs=Patm-Pvac;//pressure in vaccumm is always treated to be negative
+disp(Pabs,'the absolute pressure in the chamber in psi is')
diff --git a/2870/CH1/EX1.6/Ex1_6.sce b/2870/CH1/EX1.6/Ex1_6.sce
new file mode 100755
index 000000000..c3c272e78
--- /dev/null
+++ b/2870/CH1/EX1.6/Ex1_6.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 1.6
+
+//constants used
+pw=1000;//density of water in kg/m^3;
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+SG=0.85;
+h=55/100;//converting height from cm to m
+Patm=96;
+
+//calculation
+p=SG*pw;
+Ptank=Patm+(p*g*h/1000);//calculating pressure using liquid at same height have same pressure
+disp(Ptank,'absolute pressure in tank in kPa is')
diff --git a/2870/CH1/EX1.7/Ex1_7.sce b/2870/CH1/EX1.7/Ex1_7.sce
new file mode 100755
index 000000000..148b47847
--- /dev/null
+++ b/2870/CH1/EX1.7/Ex1_7.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 1.7
+
+//constants used
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+h1=0.1;
+h2=0.2;
+h3=0.35;//respective heights in m
+pw=1000;
+pHg=13600;
+poil=800;//density of water, mercury and oil in kg/m^3
+Patm=85.6;
+
+//calculation
+P1=Patm-(pw*g*h1+poil*g*h2-pHg*g*h3)/1000;//calculating pressure using liquid at same height have same pressure
+disp(P1,'the air pressure in tank in kPa is ')
diff --git a/2870/CH1/EX1.8/Ex1_8.sce b/2870/CH1/EX1.8/Ex1_8.sce
new file mode 100755
index 000000000..630df60bb
--- /dev/null
+++ b/2870/CH1/EX1.8/Ex1_8.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 1.8
+
+//constants used
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+pHg=13570;
+h=74/100;//converting height into m from mm
+
+//calculation
+Patm=pHg*g*h/1000;//standard pressure formula
+disp(Patm,'the atmospheric pressure in kPa is')
diff --git a/2870/CH1/EX1.9/Ex1_9.sce b/2870/CH1/EX1.9/Ex1_9.sce
new file mode 100755
index 000000000..7cab24ee0
--- /dev/null
+++ b/2870/CH1/EX1.9/Ex1_9.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 1.9
+
+//constants used
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+m=60;
+Patm=0.97;
+A=0.04;
+
+//calculation
+P=Patm+(m*g/A)/10^5;//standard pressure formula
+disp(P,'the pressure inside the cylinder in bar is')
diff --git a/2870/CH10/EX10.1/Ex10_1.sce b/2870/CH10/EX10.1/Ex10_1.sce
new file mode 100755
index 000000000..e5af001b8
--- /dev/null
+++ b/2870/CH10/EX10.1/Ex10_1.sce
@@ -0,0 +1,33 @@
+clc;clear;
+//Example 10.1
+
+//given data
+P1=75;
+P2=3000;//in kPa
+P3=P2;
+T3=350;
+P4=P1;
+
+//from steam tables
+//at state 1
+v1=0.001037;
+h1=384.44;
+//at state 3
+h3=3116.1;
+s3=6.7450;
+//at state 4
+s4=s3;
+sf=1.2132;
+sfg=6.2426;
+hf=384.44;
+hfg=2278;
+
+//calculations
+win=v1*(P2-P1);
+h2=h1+win;
+x4=(s4-sf)/sfg;
+h4=hf+x4*hfg;
+qin=h3-h2;
+qout=h4-h1;
+nth=1-(qout/qin);
+disp(nth*100,'thermal efficency % is')
diff --git a/2870/CH10/EX10.2/Ex10_2.sce b/2870/CH10/EX10.2/Ex10_2.sce
new file mode 100755
index 000000000..6b977d08b
--- /dev/null
+++ b/2870/CH10/EX10.2/Ex10_2.sce
@@ -0,0 +1,33 @@
+clc;clear;
+//Example 10.2
+
+//given data
+P1=9;
+T1=38;
+P2=16000;
+P3=15.9;
+T3=35;
+P4=15.2;
+T4=625;
+P5=15;
+T5=600;
+nT=0.87;
+nP=0.85;
+m=15;
+
+//from steam tables
+v1=0.001009;
+h5=3583.1;
+h6s=2115.3;
+h4=3647.6;
+h3=160.1;
+
+//calculations
+Win=v1*(P2-P1)/nP;
+Wout=nT*(h5-h6s);
+qin=h4-h3;
+Wnet=Wout-Win;
+nth=Wnet/qin;
+disp(nth,'thermal efficiency is');
+Wnet=m*Wnet;
+disp(Wnet/1000,'power output in MW')
diff --git a/2870/CH10/EX10.3/Ex10_3.sce b/2870/CH10/EX10.3/Ex10_3.sce
new file mode 100755
index 000000000..9c44e9688
--- /dev/null
+++ b/2870/CH10/EX10.3/Ex10_3.sce
@@ -0,0 +1,56 @@
+clc;clear;
+//Example 10.3
+
+//given data
+P1=10;
+P2=3000;
+P3=3000;
+T3=350;
+P4=10;
+
+//from steam tables
+//at state 1
+h1=191.81;
+v1=0.00101;
+//at state 2
+//s2=s1
+//at state 3
+h3=3116.1;
+s3=6.7450;
+//at state 4
+s4=s3;
+sf=0.6492;
+sfg=7.4996;
+hf=191.81;
+hfg=2392.1;
+
+//calculations
+//part - a
+win=v1*(P2-P1);
+h2=h1+win;
+x4=(s4-sf)/sfg;
+h4=hf+x4*hfg;
+qin=h3-h2;
+qout=h4-h1;
+nth=1-(qout/qin);
+disp(nth,'the thermal efficiency of this power plant');
+//part - b
+//States 1 and 2 remain the same in this case, and the enthalpies at state 3 (3 MPa and 600°C) and state 4 (10 kPa and s4=s3) are determined to be
+h3=3682.8;
+h4=2380.3;
+x4=0.915;
+qin=h3-h2;
+qout=h4-h1;
+nth=1-(qout/qin);
+disp(nth,'the thermal efficiency if steam is superheated to 600° instead of 350°C');
+//part - c
+//State 1 remains the same in this case, but the other states change. The enthalpies at state 2 (15 MPa and s2  s1), state 3 (15 MPa and 600°C),and state 4 (10 kPa and s4  s3) are determined in a similar manner to be
+h2=206.95;
+h3=3583.1;
+h4=2115.3;
+x4=0.804;
+qin=h3-h2;
+qout=h4-h1;
+nth=1-(qout/qin);
+disp(nth,'the thermal efficiency if the boiler pressure is raised to 15 MPa while the turbine inlet temperature is maintained at 600°C');
+
diff --git a/2870/CH10/EX10.4/Ex10_4.sce b/2870/CH10/EX10.4/Ex10_4.sce
new file mode 100755
index 000000000..443c95bfe
--- /dev/null
+++ b/2870/CH10/EX10.4/Ex10_4.sce
@@ -0,0 +1,44 @@
+clc;clear;
+//Example 10.4
+
+//given data
+P1=10;
+P2=15000;
+P3=15000;
+T3=600;
+P4=4000;
+T5=600;
+P6=10;
+x6=0.896;
+
+//from steam table
+//at state 1
+h1=191.81;
+v1=0.00101;
+//at state 3
+h3=3593.1;
+s3=6.6796;
+//at state 4
+h4=3155;
+T4=375.5;
+//at state 6
+sf=0.6492;
+sfg=7.4996;
+hf=191.81;
+hfg=2392.1;
+
+//calculations
+s6=sf+x6*sfg;
+h6=hf+x6*hfg;
+//s5 = s6
+//from tables
+P5=4000;//in kPa
+h5=3674.9;
+disp(P5/1000,'the pressure at which the steam should be reheated in MPa');
+//s2 = s1
+win=v1*(P2-P1);
+h2=h1+win;
+qin=(h3-h2)+(h5-h4);
+qout=h6-h1;
+nth=1-(qout/qin);
+disp(nth,'thermal efficiency is')
diff --git a/2870/CH10/EX10.5/Ex10_5.sce b/2870/CH10/EX10.5/Ex10_5.sce
new file mode 100755
index 000000000..4ac9e0da0
--- /dev/null
+++ b/2870/CH10/EX10.5/Ex10_5.sce
@@ -0,0 +1,53 @@
+clc;clear;
+//Example 10.5
+
+//given data
+P1=10;
+P2=1200;
+P3=1200;
+P4=15000;
+P5=15000;
+T5=600;
+P6=1200;
+P7=10;
+
+//from steam table
+//at state 1
+h1=191.81;
+v1=0.00101;
+//at state 3
+h3=798.33;
+v3=0.001138;
+//at state 4
+h4=3155;
+T4=375.5;
+//at state 5
+h5=3583.1;
+s5=6.6796;
+//at state 6
+h6=2860.2;
+T6=218.4;
+//at state 7
+P7=10;
+sf=0.6492;
+sfg=7.4996;
+hf=191.81;
+hfg=2392.1;
+
+//calculations
+//s2 = s1
+win=v1*(P2-P1);
+h2=h1+win;
+//s4 = s3
+win=v3*(P4-P3);
+h4=h3+win;
+s7=s5;
+x7=(s7-sf)/sfg;
+h7=hf+(x7*hfg);
+//y is the fraction of steam extracted from the turbine
+y=(h3-h2)/(h6-h2);
+qin=h5-h4;
+qout=(1-y)*(h7-h1);
+nth=1-(qout/qin);
+disp(y,'fraction of steam extracted');
+disp(nth,'thermal efficiency is')
diff --git a/2870/CH10/EX10.6/Ex10_6.sce b/2870/CH10/EX10.6/Ex10_6.sce
new file mode 100755
index 000000000..78640d962
--- /dev/null
+++ b/2870/CH10/EX10.6/Ex10_6.sce
@@ -0,0 +1,46 @@
+clc;clear;
+//Example 10.6
+
+//given data
+P1=10;
+P2=500;
+P3=500;
+P4=15000;
+P5=P4;
+P6=4000;
+P7=P5;
+P8=P7;
+P9=P7;
+P10=P6;
+P11=P10;
+P12=P3;
+P13=10;
+
+//enthalpies at the various states and the pump work per unit mass of fluid flowing through them are
+h1=191.81;
+h2=192.30;
+h3=640.09;
+h4=643.92;
+h5=1087.4;
+h6=h5;
+h7=1101.2;
+h8=1089.8;
+h9=3583.1;
+h10=3155;
+h11=3679.9;
+h12=3014.8;
+h13=2335.7;
+wIin=0.49;
+wIIin=3.83;
+wIIIin=13.77;
+
+//calculations
+y=(h5-h4)/((h10-h6)+(h5-h4));
+z=(1-y)*(h3-h2)/(h12-h2);
+h8=(1-y)*h5+(y*h7);
+qin=(h9-h8)+(1-y)*(h11-h10);
+qout=(1-y-z)*(h13-h1);
+nth=1-(qout/qin);
+disp(y,'fraction of steam extracted from closed feedwater');
+disp(z,'fraction of steam extracted from open feedwater');
+disp(nth,'thermal efficiency is')
diff --git a/2870/CH10/EX10.7/Ex10_7.sce b/2870/CH10/EX10.7/Ex10_7.sce
new file mode 100755
index 000000000..1dc8c2012
--- /dev/null
+++ b/2870/CH10/EX10.7/Ex10_7.sce
@@ -0,0 +1,34 @@
+clc;clear;
+//Example 10.7
+
+//given data
+T0=290;
+Tsource=1600;
+Tsink=T0;
+//from Ex 10.1
+qin=2728.6;
+qout=2018.6;
+h4=2403;
+
+//from steam tables
+s1=1.2132;
+s3=6.7450;
+
+//calculations
+s2=s1;s4=s3;//isentropic processes
+xdest12=0;
+xdest34=0;
+xdest23=T0*(s3-s2-(qin/Tsource));
+xdest41=T0*(s1-s4+(qout/Tsink));
+disp(xdest12,'exergy destruction in 1-2 in kJ/kg');
+disp(round(xdest23),'exergy destruction in 2-3 in kJ/kg');
+disp(xdest34,'exergy destruction in 3-4 in kJ/kg');
+disp(round(xdest41),'exergy destruction in 4-1 in kJ/kg');
+xdestcy=xdest12+xdest23+xdest34+xdest41;
+disp(round(xdestcy),'exergy destruction in cycle in kJ/kg');
+//from steam tables
+//at 290 K and 100 kPa
+h0=71.355;
+s0=0.2533;
+X4=(h4-h0)-T0*(s4-s0);
+disp(round(X4),'exergy of the leaving steam in kJ/kg')
diff --git a/2870/CH10/EX10.8/Ex10_8.sce b/2870/CH10/EX10.8/Ex10_8.sce
new file mode 100755
index 000000000..852646366
--- /dev/null
+++ b/2870/CH10/EX10.8/Ex10_8.sce
@@ -0,0 +1,49 @@
+clc;clear;
+//Example 10.8
+
+//given data
+m1=15;
+P1=7000;
+P2=P1;
+P3=P1;
+P4=500;
+P5=P4;
+P6=5;
+P7=500;
+P8=5;
+P9=7000;
+P10=7000;
+
+//from steam tables
+v7=0.001005;
+v8=0.001093;
+h1=3411.4;
+h2=h1;
+h3=h1;
+h4=h1;
+h5=2739.3;
+h6=2073.0;
+h7=640.09;
+h8=137.75;
+h11=144.78;
+
+//calculations
+wIin=v8*(P9-P8);
+wIIin=v7*(P10-P7);
+h9=h8+wIin;
+h10=h7+wIIin;
+Qmax=m1*(h1-h7);
+disp(Qmax,'the maximum rate in kW');
+Wtout=m1*(h3-h6);//turbine
+Wpin=m1*wIin;//pump
+Wnet=Wtout-Wpin;
+disp(round(Wnet/1000),'the power produced in MW');
+Qp=0;
+Qin=m1*(h1-h11);
+Eu=(Wnet+Qp)/Qin;
+disp(Eu,'the utilization factor');
+m4=0.1*m1;
+m5=0.7*m1;
+m7=m4+m5;
+Qout=m4*h4+m5*h5-m7*h7;
+disp(Qout/1000,'the rate of process heat supply in MW')
diff --git a/2870/CH10/EX10.9/Ex10_9.sce b/2870/CH10/EX10.9/Ex10_9.sce
new file mode 100755
index 000000000..c4a106351
--- /dev/null
+++ b/2870/CH10/EX10.9/Ex10_9.sce
@@ -0,0 +1,34 @@
+clc;clear;
+//Example 10.9
+
+//given data
+P1=5;
+P2=7000;
+P3=P2;
+T3=500;
+P4=P1;
+
+//gas cycle from Ex9-6
+//d stands for '
+h4d=880.36;
+T4d=853;
+qin=790.58;
+wnetg=210.41;
+nth=0.266
+h5d=451.80;
+//steam cycle
+h2=144.78;
+T2=33;
+h3=3411.4;
+T3=500;
+wnets=1331.4;
+nth=0.408;
+
+//calculations
+//Ein = Eout
+//y is the ratio of ms/mg
+y=(h4d-h5d)/(h3-h2);
+disp(y,'the ratio of the mass flow rates of the steam and the combustion gases');
+wnet=wnetg+y*wnets
+nth=wnet/qin;
+disp(nth,'the thermal efficiency of the combined cycle')
diff --git a/2870/CH11/EX11.1/Ex11_1.sce b/2870/CH11/EX11.1/Ex11_1.sce
new file mode 100755
index 000000000..3d43e271a
--- /dev/null
+++ b/2870/CH11/EX11.1/Ex11_1.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 11.1
+
+//given values
+P1=0.14;
+P2=0.8;
+m=0.05;
+
+//from refrigerant-134a tables
+h1=239.16;
+s1=0.94456;
+h2=275.39;
+h3=95.47;
+
+//calculation
+s2=s1;//isentropic process
+h4=h3;//throttling
+QL=(h1-h4)*m;
+Wm=m*(h2-h1);
+Qh=m*(h2-h3);
+Qh=ceil(Qh);
+COPR=QL/Wm;
+disp(QL,'the rate of heat removal from the refrigerated space in kW');
+disp(Wm,'the power input to the compressor in kW');
+disp(Qh,'the rate of heat rejection to the environment in kW');
+disp(COPR,'the COP of the refrigerator');
diff --git a/2870/CH11/EX11.2/Ex11_2.sce b/2870/CH11/EX11.2/Ex11_2.sce
new file mode 100755
index 000000000..622bd9953
--- /dev/null
+++ b/2870/CH11/EX11.2/Ex11_2.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 11.2
+
+//given data
+m=0.05;
+P1=0.14;
+T1=-10;
+P2=0.8;
+T2=50;
+P3=0.72;
+T3=26;
+
+//from refrigerant tables
+h1=246.36;
+h2=286.69;
+h3=87.83;
+h2S=284.21;//at isentropic conditions
+
+//calculations
+h4=h3;//throttling
+QL=m*(h1-h4);
+Wm=m*(h2-h1);
+nC=(h2S-h1)/(h2-h1);
+COPR=QL/Wm;
+disp(QL,'the rate of heat removal from the refrigerated space in kW');
+disp(Wm,'the power input to the compressor in kW');
+disp(nC,'the isentropic efficiency of the compressor');
+disp(COPR,'he coefficient of performance of the refrigerator');
diff --git a/2870/CH11/EX11.3/Ex11_3.sce b/2870/CH11/EX11.3/Ex11_3.sce
new file mode 100755
index 000000000..47a0e959f
--- /dev/null
+++ b/2870/CH11/EX11.3/Ex11_3.sce
@@ -0,0 +1,29 @@
+clc;clear;
+//Example 11.3
+
+//given data
+mA=0.05;
+P1=0.14;
+P5=0.32;
+P7=0.8;
+h1=239.16;
+h2=255.93;
+h3=55.16;
+h5=251.88;
+h6=270.92;
+h7=95.47;
+
+//calculations
+h4=h3;//throttling
+h8=h7;//throttling
+// E out = E in
+// mA*h5 + mB*h3 = mA*h8 + mB*h2
+mB=mA*(h5-h8)/(h2-h3);
+QL=mB*(h1-h4);
+// W in = Wcomp I,in + Wcomp II,in
+Win=mA*(h6-h5)+mB*(h2-h1);
+COPR=QL/Win;
+disp(mB,'the mass flow rate of the refrigerant through the lower cycle in kg/s');
+disp(QL,'the rate of heat removal from the refrigerated space in kW');
+disp(Win,'the power input to the compressor in kW');
+disp(COPR,'the coefficient of performance of this cascade refrigerator');
diff --git a/2870/CH11/EX11.4/Ex11_4.sce b/2870/CH11/EX11.4/Ex11_4.sce
new file mode 100755
index 000000000..170e9dc63
--- /dev/null
+++ b/2870/CH11/EX11.4/Ex11_4.sce
@@ -0,0 +1,37 @@
+clc;clear;
+//Example 11.4
+
+//given data
+P1=0.14;
+P5=0.32;
+P7=0.8;
+h1=239.16;
+h2=255.93;
+h3=251.88;
+h5=95.47;
+h7=55.16;
+
+//from saturated liquid-vapour table
+//at P=0.32 MPa
+hf=55.16;
+hfg=196.71;
+
+//calculations
+h8=h7;//throttling
+h6=h5;//throttling
+//the quality at state 6
+x6=(h6-hf)/hfg;
+qL=(1-x6)*(h1-h8);
+// W in = Wcomp I,in + Wcomp II,in
+//enthalaoy at state 9
+// E out = E in
+h9=x6*h3+(1-x6)*h2;
+// s9 = s4 i.e isentropic process
+//at 0.8MPa and s4=0.9416 kJ/kg
+h4=274.48;
+Win=(1-x6)*(h2-h1)+(1)*(h4-h9);
+COPR=qL/Win;
+disp(x6,'the fraction of the refrigerant that evaporates as it is throttled to the flash chamber');
+disp(qL,'the amount of heat removed from the refrigerated space in kJ/kg');
+disp(Win,'the compressor work per unit mass of refrigerant flowing through the condensor in kJ/kg');
+disp(COPR,'the coefficient of performance');
diff --git a/2870/CH11/EX11.5/Ex11_5.sce b/2870/CH11/EX11.5/Ex11_5.sce
new file mode 100755
index 000000000..04421a22c
--- /dev/null
+++ b/2870/CH11/EX11.5/Ex11_5.sce
@@ -0,0 +1,36 @@
+clc;clear;
+//Example 11.5
+
+//given data
+m=0.1;
+T1=0+460;
+T3=80+460;//converting into R from F
+
+//from Table A–17E
+// at T1
+h1=109.90;
+Pr1=.7913;
+//pressure ratio at compressor is 4
+Pr2=4*Pr1;
+//at Pr2
+h2=163.5;
+T2=683;
+//at T3
+h3=129.06;
+Pr3=1.3860;
+//pressure ratio at compressor is 4
+Pr4=Pr3/4;
+//at Pr4
+h4=86.7;
+T4=363;
+
+//calculations
+qL=h1-h4;
+Wout=h3-h4;
+Win=h2-h1;
+COPR=qL/(Win-Wout);
+Qrefrig=m*qL;
+disp((T4-460),'the minimum temperatures in the cycle in F');
+disp((T2-460),'the maximum temperatures in the cycle in F');
+disp(COPR,'the coefficient of performance');
+disp(Qrefrig,'the rate of refrigeration for a mass flow rate of 0.1 lbm/s. in Btu/s')
diff --git a/2870/CH11/EX11.6/Ex11_6.sce b/2870/CH11/EX11.6/Ex11_6.sce
new file mode 100755
index 000000000..7e4e62319
--- /dev/null
+++ b/2870/CH11/EX11.6/Ex11_6.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 11.6
+
+//given data
+COPR=0.1;
+T1=20;
+T2=4;
+t=30*60;//converted in sec
+V=0.350;
+
+//constants used
+p=1;//on kg/L
+c=4.18;//in kJ/kg-C from Table A-3
+
+//calculations
+m=p*V;
+Qcooling=m*c*(T1-T2)/t*1000;//converted in W by multiplying by 1000
+Win=Qcooling/COPR;
+Win=floor(Win);
+disp(Win,'the average electric power consumed by the thermoelectric refrigerator in W')
diff --git a/2870/CH12/EX12.1/Ex12_1.sce b/2870/CH12/EX12.1/Ex12_1.sce
new file mode 100755
index 000000000..3eca56b2b
--- /dev/null
+++ b/2870/CH12/EX12.1/Ex12_1.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 12.1
+
+//given data
+h1=305.22;
+T1=305;
+h2=295.17;
+T2=295;
+
+//calculations
+//from the given equation we can calculate
+cp=(h1-h2)/(T1-T2);
+disp(cp,'the cp of air at 300 K in kJ/ kg - K')
diff --git a/2870/CH12/EX12.11/Ex12_11.sce b/2870/CH12/EX12.11/Ex12_11.sce
new file mode 100755
index 000000000..76e8d2e8e
--- /dev/null
+++ b/2870/CH12/EX12.11/Ex12_11.sce
@@ -0,0 +1,48 @@
+clc;clear;
+//Example 12.11
+
+//given data
+T1=220;
+P1=5;
+T2=300;
+P2=10;
+
+//constants used
+Ru=8.314;//on kJ/kmol- K
+
+//from Table A–1
+Tcr=154.8;
+Pcr=5.08;
+
+//calculations
+
+//part - a
+disp('part - a');
+//by assuming ideal-gas behavior
+//from Table A–19
+h1=6404;
+h2=8736;
+s2=205.213;
+s1=196.171;
+h21i=h2-h1;//h2 - h1 ideal
+s21i=(s2-s1)-Ru*log(P2/P1);//s2 - s1 ideal
+disp(h21i,'the enthalpy change in kJ/kmol');
+disp(s21i,'the entropy change in kJ/kmol-K');
+
+//part - b
+disp('part - b');
+//by accounting for the deviation from ideal-gas behavior
+TR1=T1/Tcr;
+Pr1=P1/Pcr;
+//from the generalized charts at each state
+Zh1=0.53;
+Zs1=0.25;
+TR2=T2/Tcr;
+Pr2=P2/Pcr;
+//from the generalized charts at each state
+Zh2=0.48;
+Zs2=0.20;
+h21=h21i-Ru*Tcr*(Zh2-Zh1);
+s21=s21i-Ru*(Zs2-Zs1);
+disp(h21,'the enthalpy change in kJ/kmol');
+disp(s21,'the entropy change in kJ/kmol-K');
diff --git a/2870/CH12/EX12.2/Ex12_2.sce b/2870/CH12/EX12.2/Ex12_2.sce
new file mode 100755
index 000000000..603141038
--- /dev/null
+++ b/2870/CH12/EX12.2/Ex12_2.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 12.2
+
+//given data
+dT=302-300;
+dv=0.87-0.86;
+T=(302+300)/2;
+v=(0.87+0.86)/2;//average values
+
+//constants used
+R=0.287;//in kJ/kg-K
+
+//calculations
+//using eq 12-3 by diffrentiating P= R*T/v
+dP= R*dT/v - R*T*dv/v^2;
+disp(dP,'the change in the pressure of air in kPa');
diff --git a/2870/CH12/EX12.5/Ex12_5.sce b/2870/CH12/EX12.5/Ex12_5.sce
new file mode 100755
index 000000000..b85c91915
--- /dev/null
+++ b/2870/CH12/EX12.5/Ex12_5.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 12.5
+
+//given data
+T=20+273.15;//converted into K
+
+//from Table A–11
+vf=0.0008161;
+vg=0.035969;
+
+//calculations
+//using Eq 12-22
+// hfg= T*vfg*(dP/dT)sat
+//(dP/dT)sat b/w 24 C - 16 C
+dPT=(646.18-504.58)/(24-16);//dP/dT ; values from Table A–11
+vfg=vg-vf;
+hfg=T*vfg*dPT;
+disp(hfg,'the value of the enthalpy of vaporization of refrigerant-134a in kJ/kg')
diff --git a/2870/CH12/EX12.6/Ex12_6.sce b/2870/CH12/EX12.6/Ex12_6.sce
new file mode 100755
index 000000000..d7c69b46a
--- /dev/null
+++ b/2870/CH12/EX12.6/Ex12_6.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 12.6
+
+//given data
+T1=-40+460;
+T2=-50+460;//converted into R from F
+R=0.01946;
+
+//from Table A-11E
+P1=7.432;
+hfg=97.100;
+
+//calcualation\
+//using Equation 12–24
+//ln(P2/P1)= hfg/R *(1/T1 - 1/T2)
+P2=P1*exp(hfg/R *(1/T1 - 1/T2));
+disp(P2,'the saturation pressure of refrigerant-134a in psia')
diff --git a/2870/CH13/EX13.1/Ex13_1.sce b/2870/CH13/EX13.1/Ex13_1.sce
new file mode 100755
index 000000000..13834aa73
--- /dev/null
+++ b/2870/CH13/EX13.1/Ex13_1.sce
@@ -0,0 +1,43 @@
+clc;clear;
+//Example 13.1
+
+//given data
+mO2=3;
+mN2=5;
+mCH4=12;
+//molecular masses
+MO2=32;
+MN2=28;
+MCH4=16;
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+//calculations
+
+//part - a
+mm=mO2+mN2+mCH4;
+mfO2=mO2/mm;
+mfN2=mN2/mm;
+mfCH4=mCH4/mm;
+disp(mfO2,'mass fraction of oxygen is');
+disp(mfN2,'mass fraction of nitrogen is');
+disp(mfCH4,'mass fraction of methane is');
+
+//part - b
+NO2=mO2/MO2;
+NN2=mN2/MN2;
+NCH4=mCH4/MCH4;
+Nm=NO2+NN2+NCH4;
+yO2=NO2/Nm;
+yN2=NN2/Nm;
+yCH4=NCH4/Nm;
+disp(yO2,'mole fraction of oxygen is');
+disp(yN2,'mole fraction of nitrogen is');
+disp(yCH4,'mole fraction of methane is');
+
+//part - c
+Mm=mm/Nm;
+disp(Mm,'average molecular mass in kg/kmol');
+Rm=Ru/Mm;
+disp(Rm,'gas constant of mixture in kJ/kg - K')
diff --git a/2870/CH13/EX13.2/Ex13_2.sce b/2870/CH13/EX13.2/Ex13_2.sce
new file mode 100755
index 000000000..e6f0d69d9
--- /dev/null
+++ b/2870/CH13/EX13.2/Ex13_2.sce
@@ -0,0 +1,64 @@
+clc;clear;
+//Example 13.2
+
+//given data
+NN2=2;
+NCO2=6;
+Tm=300;
+Pm=15000;
+
+//constants used
+Ru=8.314;//in kJ/kmol - K
+
+//calculations
+
+//part - a
+Nm=NN2+NCO2;
+Vm=Nm*Ru*Tm/Pm;
+disp(Vm,'the volume of the tank on the basis of the ideal-gas equation of state in m^3');
+
+//part - b
+//from Table A-1
+//for nitrogen
+TcrN=126.2;
+PcrN=3390;
+//for Carbondioxide
+TcrC=304.2;
+PcrC=7390;
+yN2=NN2/Nm;
+yCO2=NCO2/Nm;
+Tcr=yN2*TcrN+yCO2*TcrC;
+Pcr=yN2*PcrN+yCO2*PcrC;
+Tr=Tm/Tcr;
+Pr=Pm/Pcr;
+//from Fig A-15b
+Zm=0.49;
+Vm=Zm*Nm*Ru*Tm/Pm;
+disp(Vm,'the volume of the tank on the basis Kay’s rule in m^3');
+
+//part - c
+//for nitrogen
+TrN=Tm/TcrN;
+PrN=Pm/PcrN;
+//from Fig A-15b
+Zn=1.02;
+//for Carbondioxide
+TrC=Tm/TcrC;
+PcrC=Pm/PcrC;
+//from Fig A-15b
+Zc=0.3;
+Zm=yN2*Zn+yCO2*Zc;
+Vm=Zm*Nm*Ru*Tm/Pm;
+disp(Vm,'the volume of the tank on the basis compressibility factors and Amagat’s law in m^3');
+
+//part - d
+VRN=(Vm/NN2)/(Ru*TcrN/PcrN);
+VRC=(Vm/NCO2)/(Ru*TcrC/PcrC);
+//from Fig A-15b
+Zn=0.99;
+Zc=0.56;
+Zm=yN2*Zn+yCO2*Zc;
+Vm=Zm*Nm*Ru*Tm/Pm;
+//When the calculations are repeated we obtain 0.738 m3 after the second iteration, 0.678 m3 after the third iteration, and 0.648 m3 after the fourth iteration.
+Vm=0.648;
+disp(Vm,'compressibility factors and Dalton’s law the volume of the tank on the basis in m^3');
diff --git a/2870/CH13/EX13.3/Ex13_3.sce b/2870/CH13/EX13.3/Ex13_3.sce
new file mode 100755
index 000000000..109bb61d0
--- /dev/null
+++ b/2870/CH13/EX13.3/Ex13_3.sce
@@ -0,0 +1,39 @@
+clc;clear;
+//Example 13.3
+
+//given data
+mN=4;
+T1N=20;
+P1N=150;
+mO=7;
+T1O=40;
+P1O=100;
+//molecular masses
+MO=32;
+MN=28;
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+
+//from Table A-2a
+CvN=0.743;
+CvO=0.658;
+
+//calculations
+
+//part - a
+//Ein - Eout = dEsystem
+// (m*cv*dT)N2 + (m*cv*dT)= 0;
+Tm= (mN*CvN*T1N+ mO*CvO*T1O)/(mN*CvN+mO*CvO);
+disp(Tm,'the mixture temperature in C');
+
+//part - b
+NO=mO/MO;
+NN=mN/MN;
+Nm=NO+NN;
+VO=NO*Ru*(T1O+273)/P1O;
+VN=NN*Ru*(T1N+273)/P1N;
+Vm=VO+VN;
+Pm=Nm*Ru*(Tm+273)/Vm;
+disp(Pm,'the mixture pressure after equilibrium has been established in kPa')
diff --git a/2870/CH13/EX13.4/Ex13_4.sce b/2870/CH13/EX13.4/Ex13_4.sce
new file mode 100755
index 000000000..fb49a2d00
--- /dev/null
+++ b/2870/CH13/EX13.4/Ex13_4.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 13.4
+
+//given data
+NO=3;
+NC=5;//moles of oxygen and carbondioxide repesctively
+T0=25+273;//in K
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+//calculations
+Nm=NO+NC;
+yO=NO/Nm;
+yC=NC/Nm;
+//dSm= -Ru*(NO*log(yO)+NC*log(yC))
+Sm=-Ru*(NO*log(yO)+NC*log(yC));
+disp(Sm,'the entropy change in kJ/K');
+Xdestroyed=T0*Sm/1000;
+disp(Xdestroyed,'exergy destruction associated in MJ')
diff --git a/2870/CH13/EX13.5/Ex13_5.sce b/2870/CH13/EX13.5/Ex13_5.sce
new file mode 100755
index 000000000..5e5da2d15
--- /dev/null
+++ b/2870/CH13/EX13.5/Ex13_5.sce
@@ -0,0 +1,68 @@
+clc;clear;
+//Example 13.5
+
+//given data
+T1=220;
+T2=160;
+Pm=10;
+yN=0.79;
+yO=0.21;//mole fractions of nitrogen and oxygen repesctively
+//critical properties
+//for Nitrogen
+TcrN=126.2;
+PcrN=3.39;
+//for Oxygen
+TcrO=154.8;
+PcrO=5.08;
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+//from Tables A-18 & 19
+//at T1
+h1N=6391;
+h1O=6404;
+//for T2
+h2N=4648;
+h2O=4657;
+
+//calculations
+//part - a
+qouti=yN*(h1N-h2N)+yO*(h1O-h2O);
+qouti=ceil(qouti);
+disp(qouti,'the heat transfer during this process using the ideal-gas approximation in kJ/kmol');
+
+//part - b
+Tcrm=yN*TcrN+yO*TcrO;
+Pcrm=yN*PcrN+yO*PcrO;
+Tr1=T1/Tcrm;
+Tr2=T2/Tcrm;
+Pr=Pm/Pcrm;
+//at these values we get
+Zh1=1;
+Zh2=2.6;
+qout=qouti-Ru*Tcrm*(Zh1-Zh2);
+qout=ceil(qout);
+disp(qout,'the heat transfer during this process using Kay’s rule in kJ/kmol');
+
+//part - c
+//for nitrogen
+TrN1=T1/TcrN;
+TrN2=T2/TcrN;
+PrN=Pm/PcrN;
+//from Fig A-15b
+Zh1n=0.9;
+Zh2n=2.4;
+//for Oxygen
+TrO1=T1/TcrO;
+TrO2=T2/TcrO;
+PcrO=Pm/PcrO;
+//from Fig A-15b
+Zh1O=1.3;
+Zh2O=4.0;
+//from Eq 12-58
+h12N=h1N-h2N-Ru*TcrN*(Zh1n-Zh2n);// h1 - h2 for nitrogen
+h12O=h1O-h2O-Ru*TcrO*(Zh1O-Zh2O);// h1 - h2 for oxygen
+qout=yN*h12N+yO*h12O;
+qout=ceil(qout);
+disp(qout,'the heat transfer during this process using Amagat’s law in kJ/kmol');
diff --git a/2870/CH13/EX13.6/Ex13_6.sce b/2870/CH13/EX13.6/Ex13_6.sce
new file mode 100755
index 000000000..a1dd47006
--- /dev/null
+++ b/2870/CH13/EX13.6/Ex13_6.sce
@@ -0,0 +1,36 @@
+clc;clear;
+//Example 13.6
+//13.6 (d) answer not matching as float datatype is giving more accurate answer in comparison to textbook that has given approximate due to rounding off to two decimal places
+
+//given data
+mfs=0.0348;
+mfw=0.9652;
+T0=288.15;
+
+//constants used
+Mw=18;
+Ms=58.44;
+Rw=0.4615;
+pm=1028;
+Ru=8.314;
+
+//calculations
+//part - a
+Mm=1/((mfs/Ms)+(mfw/Mw));
+yw=mfw*Mm/Mw;
+ys=1-yw;
+disp(yw,'the mole fraction of the water');
+disp(ys,'the mole fraction of the saltwater');
+
+//part - b
+wmin=-Ru*T0*(ys*log(ys)+yw*log(yw));
+wm=wmin/Mm;
+disp(wm,'the minimum work input required to separate 1 kg of seawater completely into pure water and pure salts in kJ');
+
+//part - c
+wmin=Rw*T0*log(1/yw);
+disp(wmin,'the minimum work input required to obtain 1 kg of fresh water from the sea in kJ');
+
+//part - d
+Pmin=pm*Rw*T0*log(1/yw);
+disp(Pmin,'the minimum gauge pressure that the seawater must be raised if fresh water is to be obtained by reverse osmosis using semipermeable membranes in kPa')
diff --git a/2870/CH14/EX14.1/Ex14_1.sce b/2870/CH14/EX14.1/Ex14_1.sce
new file mode 100755
index 000000000..aa258e1a4
--- /dev/null
+++ b/2870/CH14/EX14.1/Ex14_1.sce
@@ -0,0 +1,30 @@
+clc;clear;
+//Example 14.1
+
+//given data
+V=5*5*3;//volume of the room
+RH=0.75;
+P=100;
+T=25;
+
+//constants used
+Ra=0.287;//in kPa.m^3 / kg.k
+Rv=0.4615;//in kPa.m^3 / kg.k
+
+//from Table A-2a and A-4
+cp=1.005;
+Psat=3.1698;
+hg=2564.6;
+
+//calculation
+Pv=RH*Psat;
+Pa=P-Pv;
+w=0.622*Pv/(P-Pv);
+h=cp*T+w*hg;
+ma=V*Pa/(Ra*(T+273));
+mv=V*Pv/(Rv*(T+273));
+disp(Pa,'the partial pressure of dry air in kPa');
+disp(w,'the specific humidity in kg water/kg of dry air');
+disp(h,'the enthalpy per unit mass of the dry air in kJ');
+disp(ma,'mass of air in kg');
+disp(mv,'mass of water vapour in kg');
diff --git a/2870/CH14/EX14.2/Ex14_2.sce b/2870/CH14/EX14.2/Ex14_2.sce
new file mode 100755
index 000000000..57ef29ca9
--- /dev/null
+++ b/2870/CH14/EX14.2/Ex14_2.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 14.2
+
+//given data
+T=20;
+RH=0.75;
+
+//from Table A-4
+Psat=2.3392;
+Pv=RH*Psat;
+//thus at this from Eq 14-13
+Tdp=15.4;
+disp(Tdp,'window temperature in C')
diff --git a/2870/CH14/EX14.3/Ex14_3.sce b/2870/CH14/EX14.3/Ex14_3.sce
new file mode 100755
index 000000000..505c3449d
--- /dev/null
+++ b/2870/CH14/EX14.3/Ex14_3.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 14.3
+
+//given data
+T1=25;
+T2=15;
+P2=101.325;
+
+//from Table A-2a & A-4
+//at T1
+Psat1=3.1698;
+hg1=2546.5;
+//at T2
+Psat2=1.7057;
+hfg2=2465.4;
+hf2=62.982;
+cp=1.005;
+
+//calculations
+w2=0.622*Psat2/(P2-Psat2);
+w1=(cp*(T2-T1)+w2*hfg2)/(hg1-hf2);
+disp(w1,'the specific humidity in kg water/kg of dry ai');
+RH1=w1*P2/((0.622+w1)*Psat1);
+disp(RH1,'the relative humidity');
+h=cp*T1+w1*hg1;
+disp(h,'the enthalpy of the air in kJ/kg of dry air')
diff --git a/2870/CH14/EX14.5/Ex14_5.sce b/2870/CH14/EX14.5/Ex14_5.sce
new file mode 100755
index 000000000..c62b904b0
--- /dev/null
+++ b/2870/CH14/EX14.5/Ex14_5.sce
@@ -0,0 +1,37 @@
+clc;clear;
+//Example 14.5
+//difference in first part is due to selective roundingoff to particular decimals in h1 and h2
+
+//given data
+RH1=0.3;
+P1=100;
+V1=45;
+T1=10;
+T2=22;
+RH3=0.6;
+T3=25;
+
+//from Table A-2a & A-4
+cp=1.005;
+Ra=0.287;
+Pg1=1.2281;
+hg1=2519.2;
+hg2=2541.0;
+Pg3=3.1698;
+
+//calculations
+Pv1=RH1*Pg1;
+Pa1=P1-Pv1;
+v1=Ra*(T1+273)/Pa1;
+ma=V1/v1;
+w1=0.622*Pv1/(P1-Pv1);
+h1=cp*T1+w1*hg1;
+w2=w1;
+h2=cp*T2+w2*hg2;
+Q=ma*(h2-h1);
+// ma2*w2 + mw = ma3*w3
+//which reduces to mw = ma * (w3 - w2)
+w3=0.622*RH3*Pg3/(P1-(RH3*Pg3));
+mw=ma*(w3-w2);
+disp(Q,'the rate of heat supply in the heating section in kJ/min');
+disp(mw,'the mass flow rate of the steam required in the humidifying section in kg/min')
diff --git a/2870/CH14/EX14.6/Ex14_6.sce b/2870/CH14/EX14.6/Ex14_6.sce
new file mode 100755
index 000000000..e6c6d4518
--- /dev/null
+++ b/2870/CH14/EX14.6/Ex14_6.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 14.6
+
+//given data
+V1=10;
+T1=30;
+RH1=0.8;
+T2=14;
+RH2=1;
+
+//from Table A-4
+hw=58.8;
+h1=85.4;
+h2=39.3;
+w1=0.0216;
+w2=0.0100;
+v1=0.889;
+
+//calculations
+//mw= ma*(w1-w2)
+//Qout=ma*(h1-h2) - mw*hw
+ma=V1/v1;
+mw= ma*(w1-w2);
+Qout=ma*(h1-h2) - mw*hw;
+disp(mw,'rates of moisture removal from the air in kg/min');
+disp(Qout,'rate of moisture removal from the air in kJ/min');
diff --git a/2870/CH14/EX14.8/Ex14_8.sce b/2870/CH14/EX14.8/Ex14_8.sce
new file mode 100755
index 000000000..684a947f9
--- /dev/null
+++ b/2870/CH14/EX14.8/Ex14_8.sce
@@ -0,0 +1,34 @@
+clc;clear;
+//Example 14.8
+
+//given values
+V1=50;
+T1=14;
+V2=20;
+T2=32;
+RH2=60;
+
+//from psychrometric chart
+h1=39.4;
+w1=0.010;
+v1=0.826;
+h2=79;
+w2=0.0182;
+v2=0.889;
+
+//calculations
+ma1=V1/v1;
+ma2=V2/v2;
+ma3=ma1+ma2;
+//from Eq 14-24
+w3=(w2*ma2+w1*ma1)/(ma1+ma2);
+h3=(h2*ma2+h1*ma1)/(ma1+ma2);
+disp(w3,'the specific humidity in kg of water/kg of dry air');
+//from psychrometric chart
+T3=19;
+RH3=0.89;
+v3=0.844;
+V3=ma3*v3;
+disp(RH3,'the relative humidity');
+disp(T3,'the dry-bulb temperature in C');
+disp(V3,'the volume flow rate of the mixture in m^3/min ')
diff --git a/2870/CH14/EX14.9/Ex14_9.sce b/2870/CH14/EX14.9/Ex14_9.sce
new file mode 100755
index 000000000..2e47b5c93
--- /dev/null
+++ b/2870/CH14/EX14.9/Ex14_9.sce
@@ -0,0 +1,31 @@
+clc;clear;
+//Example 14.9
+
+//given data
+m=100;
+T1=20;
+P1=1;
+RH1=60;
+T2=30;
+RH2=1;
+T3=35;
+T4=22;
+
+//from Table A-4
+h1=42.2;
+w1=0.0087;
+v1=0.842;
+h2=100;
+w2=0.0273;
+h3=146.64;
+h4=92.28;
+
+//calculations
+//Dry air balane = ma1 = ma2 = ma
+//Water balance = m3 - m4 = ma*(w2 - w1)
+//Energy balance = ma1*h1 + m3*h3 = ma2*h2 + m4*h4
+ma= m*(h3-h4)/(h2-h1-(w2-w1)*h4);
+V1=ma*v1;
+mmakeup=ma*(w2-w1);
+disp(V1,'the volume flow rate of air into the cooling tower in m^3/s');
+disp(mmakeup,'the mass flow rate of the required makeup water in kg/s')
diff --git a/2870/CH15/EX15.1/Ex15_1.sce b/2870/CH15/EX15.1/Ex15_1.sce
new file mode 100755
index 000000000..c0bffe43c
--- /dev/null
+++ b/2870/CH15/EX15.1/Ex15_1.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 15.1
+
+//given data
+nO2i=20;
+nC8H18i=1;//intial moles of air and octane
+
+//from Table A-1
+Mair=29;
+MC=12;
+MH=2;
+
+//calculations
+// Chemical Reaction
+// C8H18 + 20(O2+3.76N2)= xCO2 + yH2O + zO2 + wN2
+//by elemental balance of moles
+x=8;
+y=18/2;
+z=20*2-2*x-y;
+w=20*3.76;
+disp(x,'kmoles of CO2');
+disp(y,'kmoles of H2O');
+disp(z,'kmoles of O2');
+disp(w,'kmoles of N2');
+//thus equn becomes
+// C8H18 + 20(O2+3.76N2)= 8CO2 + 9H2O + 7.5O2 +75.2N2
+AF=nO2i*4.76*Mair/(x*MC + y*MH);
+disp(AF,'air-fuel ratio of combustion process in kg air/kg fuel')
diff --git a/2870/CH15/EX15.10/Ex15_10.sce b/2870/CH15/EX15.10/Ex15_10.sce
new file mode 100755
index 000000000..8b85924fa
--- /dev/null
+++ b/2870/CH15/EX15.10/Ex15_10.sce
@@ -0,0 +1,57 @@
+clc;clear;
+//Example 15.10
+
+//given values
+T0=298;//in K
+
+//contansts used
+Ru=8.314;//in kJ/kmol K
+
+//calculations
+// CH4 + 3(O2 + 3.76N2) = CO2 + 2H2O + O2 + 11.28N2
+//from std. values of heat of formation and ideal gasses in Appendix
+//methane as m
+hfm=-74850;
+//oxygen as o
+hfo=0;
+h298o=8682;
+//nitrogen as n
+hfn=0;
+h298n=8669;
+//water as w
+hfw=-241820;
+h298w=9904;
+//carbondioxide as c
+hfc=-393520;
+h298c=9364;
+//x refers to hCO2 + 2hH2O + 11.28hN2
+xac=1*(hfm)+1*(h298c-hfc)+2*(h298w-hfw)+11.28*(h298n-hfn);
+//from EES the Tprod is determined by trial and error
+Tprod=1789;
+disp(Tprod,'the temperature of the products in K');
+//entropy calculations by using table A-26
+//Si = Ni*(si - Ruln yiPm
+//reactants
+Sm=1*(186.16-Ru*log(1*1));
+So=3*(205.04-Ru*log(0.21*1));
+Sn=11.28*(191.61-Ru*log(.79*1));
+Sreact=Sm+So+Sn;
+//products
+Nt=1+2+1+11.28;//total moles
+yc=1/Nt;
+yw=2/Nt;
+yo=1/Nt;
+yn=11.28/Nt;
+Sc=1*(302.517-Ru*log(yc*1));
+Sw=2*(258.957-Ru*log(yw*1));
+So=1*(264.471-Ru*log(yo*1));
+Sn=11.28*(247.977-Ru*log(yn*1));
+Sprod=Sc+Sw+So+Sn;
+Sgen=Sprod-Sreact;
+disp(Sgen,'exergy destruction in kJ/kmol - K');
+Xdestroyed=T0*Sgen/1000;//factor of 1000 for converting kJ to MJ
+Xdestroyed=ceil(Xdestroyed);
+disp(Xdestroyed,'in MJ/kmol');
+//This process involves no actual work. Therefore, the reversible work and energy destroyed are identical
+Wrev=Xdestroyed;
+disp(Wrev,'the reversible work in MJ/kmol')
diff --git a/2870/CH15/EX15.11/Ex15_11.sce b/2870/CH15/EX15.11/Ex15_11.sce
new file mode 100755
index 000000000..82d856c45
--- /dev/null
+++ b/2870/CH15/EX15.11/Ex15_11.sce
@@ -0,0 +1,58 @@
+clc;clear;
+//Example 15.11
+
+//given values
+Tsurr=298;//in K
+
+//contansts used
+Ru=8.314;//in kJ/kmol K
+
+//calculations
+
+//part - a
+// CH4 + 3(O2 + 3.76N2) = CO2 + 2H2O + O2 + 11.28N2
+//The amount of water vapor that remains in the products is determined as in Example 15–3
+Nv=0.43;//moles of water vapour
+Nw=1.57;//moles of water in liquid
+//hf values
+//methane as m
+hfm=-74850;
+//carbondioxide as c
+hfc=-393520;
+//water vapour as v
+hfv=-241820;
+//water in liquid as w
+hfw=-285830;
+Qout=1*hfm-1*hfc-Nv*hfv-Nw*hfw;
+disp(Qout,'in kJ/kmol')
+
+//part - b
+//entropy calculations by using table A-26
+//Si = Ni*(si - Ruln yiPm
+//reactants
+Sm=1*(186.16-Ru*log(1*1));
+So=3*(205.04-Ru*log(0.21*1));
+Sn=11.28*(191.61-Ru*log(.79*1));
+Sreact=Sm+So+Sn;
+//products
+Nt=Nv+1+1+11.28;//total moles
+yw=1;
+yc=1/Nt;
+yv=Nv/Nt;
+yo=1/Nt;
+yn=11.28/Nt;
+Sw=Nw*(69.92-Ru*log(yw*1));
+Sc=1*(213.80-Ru*log(yc*1));
+Sv=Nv*(188.83-Ru*log(yv*1));
+So=1*(205.04-Ru*log(yo*1));
+Sn=11.28*(191.61-Ru*log(yn*1));
+Sprod=Sc+Sw+So+Sn+Sv;
+Sgen=Sprod-Sreact+Qout/Tsurr;
+Sgen=ceil(Sgen);
+disp(Sgen,'exergy destruction in kJ/kmol - K');
+Xdestroyed=Tsurr*Sgen/1000;//factor of 1000 for converting kJ to MJ
+Xdestroyed=floor(Xdestroyed);
+disp(Xdestroyed,'in MJ/kmol');
+//This process involves no actual work. Therefore, the reversible work and energy destroyed are identical
+Wrev=Xdestroyed;
+disp(Wrev,'the reversible work in MJ/kmol')
diff --git a/2870/CH15/EX15.2/Ex15_2.sce b/2870/CH15/EX15.2/Ex15_2.sce
new file mode 100755
index 000000000..6becc2d29
--- /dev/null
+++ b/2870/CH15/EX15.2/Ex15_2.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 15.2
+
+//given data
+P=100;
+
+//from Table A-1
+Mair=29;
+MC=12;
+MH=2;
+
+//calculations
+//Chemical reaction
+//C2H6 + 1.2at(1O2 + 3.76) =2CO2 + 3H2O + 0.2athO2 + (1.2*3.76)athN2
+//ath is the stoichiometric coefficient for air
+//Oxygen balance gives
+// 1.2ath = 2 + 1.5 + 0.2ath
+ath=(2+1.5)/(1.2-0.2);
+AF=(1.2*ath)*4.76*Mair/(2*MC+3*MH);
+disp(AF,'air-fuel ratio of combustion process in kg air/kg fuel');
+//C2H6 + 4.2(O2 + 3.76N2) = 2CO2 + 3H2O + 0.7O2 + 15.79N2;
+Nprod=2+3+0.7+15.79;
+//for dew point water vapour condenses
+Nv=3;
+Pv=Nv/Nprod*P;
+//at this Pv
+Tdp=52.3;
+disp(Tdp,'the dew-point in C')
diff --git a/2870/CH15/EX15.3/Ex15_3.sce b/2870/CH15/EX15.3/Ex15_3.sce
new file mode 100755
index 000000000..158a40cd9
--- /dev/null
+++ b/2870/CH15/EX15.3/Ex15_3.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 15.3
+
+//given data
+P=101.325;
+RH=0.8;
+T1=20;
+
+//from Table A-4
+Psat=2.3392;
+
+//calculations
+//consedering 1 kmol of fuel
+// 0.72CH4 + 0.09H2 + 0.14N2 + 0.02O2 + 0.03CO2 + ath(O2 + 3.76N2) = xCO2 + yH2O + zN2
+//element balance
+x=0.72+0.03
+y=(0.72*4+0.09*2)/2;
+ath=x+y/2-0.02-0.03;
+z=0.14+3.76*ath;
+Pv=RH*Psat;
+// Nv,air = Pv,air/Ptotal * Ntotal
+Nvair=Pv/P*6.97/(1-(Pv/P));
+//0.72CH4 + 0.09H2 + 0.14N2 + 0.02O2 + 0.03CO2 + 1.465(O2 + 3.76N2) + 0.131H20 = 0.75CO2 + 1.661H2O + 5.648N2
+Pvprod=1.661/8.059*P;
+//at this Pvprod
+Tdp=60.9;
+disp(Tdp,'the dew-point in C')
diff --git a/2870/CH15/EX15.4/Ex15_4.sce b/2870/CH15/EX15.4/Ex15_4.sce
new file mode 100755
index 000000000..2935c8355
--- /dev/null
+++ b/2870/CH15/EX15.4/Ex15_4.sce
@@ -0,0 +1,36 @@
+clc;clear;
+//Example 15.4
+
+//given data
+Pprod=100;
+
+//from Table A-1
+Mair=29;
+MC=12;
+MH=2;
+
+//from Table A-4
+Psat=3.1698;
+
+//calculations
+//consedering 100 kmol of dry products
+// xC8H18 + a (O2 + 3.76N2) = 10.02CO2 + 0.88C0 + 84.48N2 + bH20
+//from mass balamces
+a=83.48/3.76;
+x=(0.88+10.02)/8;
+b=18*x/2;
+// 1.36C8H18 + 22.2 (O2 + 3.76N2) = 10.02CO2 + 0.88C0 + 84.48N2 + 12.24H20
+// 1 mol conversion
+// C8H18 + 16.32 (O2 + 3.76N2) = 7.37CO2 + 4.13C0 + 61.38N2 + 9H20
+AF= 16.32*4.76*Mair/(8*MC+9*MH);
+disp(AF,'air-fuel ratio of combustion process in kg air/kg fuel')
+// C8H18 + ath (O2 + 3.76N2) = 8CO2 + 9H2O + 3.76athN2
+ath=8+4.5;
+Pth=16.32/ath*4.76/4.76*100;
+Pth=ceil(Pth);
+disp(Pth,'percentage of theoretical air');
+Nprod=7.37+0.65+4.13+61.98+9;
+// Nv/Nprod = Pv/Pprod
+Pv=Psat;
+Nw= (Nprod*Pv-9*Pprod)/(Pv-Pprod);
+disp(Nw,'the amount of H2O that condenses as the products in kmol')
diff --git a/2870/CH15/EX15.5/Ex15_5.sce b/2870/CH15/EX15.5/Ex15_5.sce
new file mode 100755
index 000000000..0761e8813
--- /dev/null
+++ b/2870/CH15/EX15.5/Ex15_5.sce
@@ -0,0 +1,15 @@
+clc;clear;
+//Example 15.5
+//round off error
+
+//from Table A-6
+HCO2=-393520;
+HH2O=-285830;
+HC8H18=-249950;
+
+//calculations
+// C8H18 + ath (O2 + 3.76N2) = 8CO2 + 9H2O + 3.76athN2
+//N2 and O2 are stable elements, and thus their enthalpy of formation is zero
+//hc = Hprod - Hreact
+hc= 8*HCO2 + 9*HH2O - HC8H18;
+disp(hc,'the enthalpy of combustion of liquid octane in kJ/kmol')
diff --git a/2870/CH15/EX15.6/Ex15_6.sce b/2870/CH15/EX15.6/Ex15_6.sce
new file mode 100755
index 000000000..cc495a3f0
--- /dev/null
+++ b/2870/CH15/EX15.6/Ex15_6.sce
@@ -0,0 +1,52 @@
+clc;clear;
+//Example 15.6
+
+//given data
+mfuel=0.05;
+
+//from Table A-1
+Mair=29;
+MC=12;
+MH=2;
+
+//calculation
+//stochiometric reaction
+//C3H8 + ath(O2 + 3.76N2) = 3CO2 + 4H2O + 3.76athN2
+//O2 balance
+ath=3+5;
+//50 percent excess air and some CO in the products
+//C3H8 + 7.5(O2 + 3.76N2) = 2.7CO2 + 0.3CO + 4H2O + 2.65O2+ 28.2N2
+AF=7.5*4.76*Mair/(3*MC+4*MH);
+mair=AF*mfuel;
+disp(mair,'the mass flow rate of air in kg air/min');
+//from property tables
+//C3H8 designated as p
+hfp=-118910;
+//oxygen as o
+hfo=0;
+ho280=8150;
+ho298=8682;
+ho1500=49292;
+//nitrogen as n
+hfn=0;
+hn280=8141;
+hn298=8669;
+hn1500=47073;
+//water as w
+hfw=-241820;
+hw298=9904;
+hw1500=57999;
+//carbondioxode as c
+hfc=-393520;
+hc298=9364;
+hc1500=71078;
+//carbon monoxide as co
+hfco=-110530;
+hco298=8669;
+hco1500=47517;
+qout=1*(hfp)+7.5*(hfo+ho280-ho298)+28.2*(hfn+hn280-hn298)-2.7*(hfc+hc1500-hc298)-0.3*(hfco+hco1500-hco298)-4*(hfw+hw1500-hw298)-2.65*(hfo+ho1500-ho298)-28.2*(hfn+hn1500-hn298);
+//for kg of propane
+qout=qout/44;
+Qout=mfuel*qout/60;
+disp(Qout,'the rate of heat transfer from the combustion chamber in kW')
+
diff --git a/2870/CH15/EX15.7/Ex15_7.sce b/2870/CH15/EX15.7/Ex15_7.sce
new file mode 100755
index 000000000..0604f043c
--- /dev/null
+++ b/2870/CH15/EX15.7/Ex15_7.sce
@@ -0,0 +1,35 @@
+clc;clear;
+//Example 15.7
+//error of 0.17% in (b) part calulation error in textbook
+
+//given data
+Preact=1;
+Treact=77+460;
+Tprod=1800;
+
+//constants used
+Ru=1.986;
+
+//calculation
+//CH4 + 3O2 = CO2 + 2H2O + O2
+Nreact=4;
+Nprod=4;
+Pprod=Preact*Nprod/Nreact*Tprod/Treact;
+disp(Pprod,'the final pressure in the tank in atm');
+//from std. values of heat of formation and ideal gasses in Appendix
+//CH4 as m
+hfm=-32210;
+//O2 as o
+hfo=0;
+h537o=3725.1;
+h1800o=13485.8;
+//water as w
+hfw=-104040;
+h537w=4528;
+h1800w=15433;
+//carbondioxide as c
+hfc=-169300;
+h537c=4027.5;
+h1800c=18391.5;
+Qout=1*(hfm-Ru*Treact)+3*(hfo-Ru*Treact)-1*(hfc+h1800c-h537c-Ru*Tprod)-2*(hfw+h1800w-h537w-Ru*Tprod)-1*(hfo+h1800o-h537o-Ru*Tprod);
+disp(Qout,'the heat transfer during this process in Btu/lbmol')
diff --git a/2870/CH15/EX15.8/Ex15_8.sce b/2870/CH15/EX15.8/Ex15_8.sce
new file mode 100755
index 000000000..3284c4e42
--- /dev/null
+++ b/2870/CH15/EX15.8/Ex15_8.sce
@@ -0,0 +1,40 @@
+clc;clear;
+//Example 15.8
+//this invovles EES hence the below code explains a approach with approximation
+
+//calculations
+
+//part - a
+//C8H18 + 12.5 (O2 + 3.76N2) = 8CO+ 9H2O + 47N2
+//from std. values of heat of formation and ideal gasses in Appendix
+//octane as oc
+hfoc=-249950;
+//oxygen as o
+hfo=0;
+h298o=8682;
+//nitrogen as n
+hfn=0;
+h298n=8669;
+//water as w
+hfw=-241820;
+h298w=9904;
+//carbondioxide as c
+hfc=-393520;
+h298c=9364;
+//x refers to 8hCO2 + 9hH20 + 47hN2
+xac=1*(hfoc)+8*(h298c-hfc)+9*(h298w-hfw)+47*(h298n-hfn);
+//from EES the Tprod is determined by trial and error
+//at 2400K
+x2400=5660828;
+//at 2350K
+x2350=5526654;
+//the actual value of x is xac and T can be determined by interpolation
+Tprod=(xac-x2350)*(2400-2350)/(x2400-x2350)+2350;
+Tprod=ceil(Tprod);
+disp(Tprod,'adiabatic flame temperature for complete combustion with 100 percent theoretical air,in K');
+
+//part - b
+//C8H18 + 50 (O2 + 3.76N2) = 8CO+ 9H2O + 37.5O2 + 188N2
+//solved similarly using EES and approximation and interpolation
+//similarly we can solve the part - c
+//the above concept is applied
diff --git a/2870/CH15/EX15.9/Ex15_9.sce b/2870/CH15/EX15.9/Ex15_9.sce
new file mode 100755
index 000000000..5c5c81118
--- /dev/null
+++ b/2870/CH15/EX15.9/Ex15_9.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 15.9
+
+//from Table A-26E
+//Gibbs function of formation at 77°F
+gfc=0;//for carbon
+gfo=0;//for oxygen
+gfco=-169680;//for carbondioxide
+
+//calculations
+// C + O2 = CO2
+Wrev=1*gfc+1*gfo-1*gfco;
+disp(Wrev,'the reversible work for this process in Btu')
diff --git a/2870/CH16/EX16.1/Ex16_1.sce b/2870/CH16/EX16.1/Ex16_1.sce
new file mode 100755
index 000000000..abc4dceaf
--- /dev/null
+++ b/2870/CH16/EX16.1/Ex16_1.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 16.1
+//round off error
+
+//given data
+T=298.15;
+
+//from Table A-26
+g=455510;
+
+//constants used
+R=8.314;//in kJ/kmol K
+
+//calculations
+// N2 = 2N
+dG=2*g;
+lnKp=-dG/(R*T);
+disp(lnKp,'in comparison to Table A-28 ln Kp value of -367.5 our result is');
+Kp=exp(lnKp);
+disp(Kp,'the equilibrium constant is')
diff --git a/2870/CH16/EX16.10/Ex16_10.sce b/2870/CH16/EX16.10/Ex16_10.sce
new file mode 100755
index 000000000..c3b68d6e8
--- /dev/null
+++ b/2870/CH16/EX16.10/Ex16_10.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 16.10
+
+//given data
+T=358;
+P=300/100;//in bar
+
+//constants used
+M=2;
+s=0.00901;//solubility in kmol/m^3 bar
+p=0.027;
+
+//calculations
+pH2=s*P;
+disp(pH2,'molar density of H2 in kmol/m^3');
+pH2=p*M;
+disp(pH2,'mass density of H2 in kg/m^3')
diff --git a/2870/CH16/EX16.11/Ex16_11.sce b/2870/CH16/EX16.11/Ex16_11.sce
new file mode 100755
index 000000000..6373b7a58
--- /dev/null
+++ b/2870/CH16/EX16.11/Ex16_11.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 16.11
+
+//given data
+yw=0.30;//w for water
+ya=0.70;//a for ammonia
+T=40;
+
+//saturation pressure
+pw=7.3851;
+pa=1554.33;
+//calulations
+Pw=yw*pw;
+Pa=ya*pa;
+Pt=Pw+Pa;
+yw=Pw/Pt;
+ya=Pa/Pt;
+disp(yw,'mole fraction of water vapour');
+disp(ya,'mole fraction of ammonia')
diff --git a/2870/CH16/EX16.2/Ex16_2.sce b/2870/CH16/EX16.2/Ex16_2.sce
new file mode 100755
index 000000000..842493fe4
--- /dev/null
+++ b/2870/CH16/EX16.2/Ex16_2.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 16.2
+
+//given data
+vH2=1;
+vH=2;
+P=10;
+
+//calculations
+// H2 = 0.9H2 + 0.2H
+NH=0.2;
+NH2=0.9;
+Nt=NH+NH2;
+//from Eq. 16-15
+Kp=((NH^vH)/(NH2^vH2))*(P/Nt)^(vH-vH2);
+//at this value of Kp from Table A-28
+T=3535;
+disp(T,'temperature in K is')
diff --git a/2870/CH16/EX16.6/Ex16_6.sce b/2870/CH16/EX16.6/Ex16_6.sce
new file mode 100755
index 000000000..d4bb459c3
--- /dev/null
+++ b/2870/CH16/EX16.6/Ex16_6.sce
@@ -0,0 +1,34 @@
+clc;clear;
+//Example 16.6
+
+//reaction
+// H2 + 0.5O2 = H2O
+//enthalpy data
+//of H2
+hfH=-241820;
+h2000H=82593;
+h298H=9904;
+//of O2
+hfO=0;
+h2000O=61400;
+h298O=8468;
+//of H2O
+hfw=0;
+h2000w=67881;
+h298w=8682;
+//Kp data from A-28
+Kp2=869.6;
+Kp1=18509;
+T1=1800;
+T2=2200;
+
+//constants used
+Ru=8.314;//in kJ/kmol K
+
+//calculations
+//part - a
+hR=1*(hfH+h2000H-h298H)-1*(hfO+h2000O-h298O)-0.5*(hfw+h2000w-h298w);
+disp(floor(hR),'enthalpy of the reaction in kJ/kmol using enthalpy data');
+//part - b
+hR=Ru*(T1*T2)/(T2-T1)*log(Kp2/Kp1);
+disp(round(hR),'enthalpy of the reaction in kJ/kmol using Kp data');
diff --git a/2870/CH16/EX16.7/Ex16_7.sce b/2870/CH16/EX16.7/Ex16_7.sce
new file mode 100755
index 000000000..3875a0abd
--- /dev/null
+++ b/2870/CH16/EX16.7/Ex16_7.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 16.7
+
+//given data
+T=120+273.15;//in K
+
+//from Table A-4
+hf=503.81;
+hg=2706;
+sf=1.5279;
+sg=7.1292;
+
+//calculations
+disp('liquid phase');
+gf=hf-T*sf;
+disp(gf,'gf value in kJ/kg');
+disp('vapour phase');
+gg=hg-T*sg;
+disp(gg,'gg value in kJ/kg');
diff --git a/2870/CH16/EX16.8/Ex16_8.sce b/2870/CH16/EX16.8/Ex16_8.sce
new file mode 100755
index 000000000..c12f000cd
--- /dev/null
+++ b/2870/CH16/EX16.8/Ex16_8.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 16.8
+
+//given data
+T=15;
+P=92;
+
+//from Table A-4
+Pv=1.7057;
+
+//calculations
+yv=Pv/P;
+disp(yv,'mole fraction of water vapor at the surface');
+yw=1-yv;
+yw=round(yw)
+disp(yw,'mole fraction of water in the lake')
diff --git a/2870/CH16/EX16.9/Ex16_9.sce b/2870/CH16/EX16.9/Ex16_9.sce
new file mode 100755
index 000000000..ecfe70504
--- /dev/null
+++ b/2870/CH16/EX16.9/Ex16_9.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 16.9
+
+//given data
+T=17;
+P=92;
+
+//from Table A-4
+Pv=1.96;
+
+//constants from Table 16-2
+H=62000;
+
+//calculations
+Pda=P-Pv;//dry air
+yda=Pda/H/100;//in bar
+disp(yda,'mole fraction of air')
diff --git a/2870/CH17/EX17.1/Ex17_1.sce b/2870/CH17/EX17.1/Ex17_1.sce
new file mode 100755
index 000000000..be542d830
--- /dev/null
+++ b/2870/CH17/EX17.1/Ex17_1.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 17.1
+
+//given data
+V1=250;
+T1=255.07;
+P1=54.05;
+h=5000;
+
+//from Table A-2a
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+T01=T1+V1^2/(2*cp*1000);//factor of 1000 to convert kJ to J
+P01=P1*(T01/T1)^(k/(k-1));
+//given pressure ratio in compressor *
+// T02 = T01*(P02/P01)^((k-1)/k)
+T02 = T01*(8)^((k-1)/k);
+win=cp*(T02-T01);
+disp(P01,'the stagnation pressure at the compressor inlet in kPa');
+disp(win,'the required compressor work per unit mass in kJ/kg')
diff --git a/2870/CH17/EX17.10/Ex17_10.sce b/2870/CH17/EX17.10/Ex17_10.sce
new file mode 100755
index 000000000..e7de46e5f
--- /dev/null
+++ b/2870/CH17/EX17.10/Ex17_10.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 17.10
+
+//given data
+//using protactor frpm Fig 17-36
+u=19;//u stands for angle of the mach lines
+
+//calculations
+//by Eq. 17-47
+//i.e u= asin(1/Ma)
+Ma=1/sind(u);
+disp(Ma,'The Mach number is')
diff --git a/2870/CH17/EX17.11/Ex17_11.sce b/2870/CH17/EX17.11/Ex17_11.sce
new file mode 100755
index 000000000..d3585e02c
--- /dev/null
+++ b/2870/CH17/EX17.11/Ex17_11.sce
@@ -0,0 +1,37 @@
+clc;clear;
+//Example 17.11
+
+//given data
+Ma1=2;
+P1=75;
+O=10;//angle b/w shock wave and normal
+
+//constants used
+k=1.4;
+
+//calcualtions
+//with given values of Ma1 and O from Eq 17-46
+Bweak=39.3;
+Bstrong=83.7;
+//Weak shock
+Ma1w=Ma1*sind(Bweak);
+//Strong shock
+Ma1s=Ma1*sind(Bstrong);
+//from second part Eq 17-40
+Ma2w=0.8032;
+Ma2s=0.5794;
+//pressure ratio = (2*k*Ma^2 - k + 1)/(k + 1 )
+//Weak shock
+P2w=P1*(2*k*Ma1w^2 - k + 1)/(k + 1 );
+P2w=ceil(P2w);
+disp(P2w,'pressure for weak shock in kPa');
+//Strong shock
+P2s=P1*(2*k*Ma1s^2 - k + 1)/(k + 1 );
+P2s=floor(P2s);
+disp(P2s,'pressure for strong shock in kPa');
+//Weak shock
+Ma2=Ma2w/sind(Bweak-O);
+disp(Ma2,'Mach number downstream for weak shock');
+//Strong shock
+Ma2=Ma2s/sind(Bstrong-O);
+disp(Ma2,'Mach number downstream for strong shock');
diff --git a/2870/CH17/EX17.12/Ex17_12.sce b/2870/CH17/EX17.12/Ex17_12.sce
new file mode 100755
index 000000000..9807e4715
--- /dev/null
+++ b/2870/CH17/EX17.12/Ex17_12.sce
@@ -0,0 +1,23 @@
+clc;clear;
+//Example 17.12
+
+//given data
+Ma1=2;
+P1=230;
+O=10;//O stands for angle of the mach lines
+
+//constants used
+k=1.4;
+
+//calculations
+//Eq. 17–49 for the upstream Prandtl–Meyer function
+vMa1=sqrt((k+1)/(k-1))*atand(sqrt((k-1)*(Ma1^2-1)/(k+1)))-atand(sqrt(Ma1^2-1));
+//Eq. 17–48 to calculate the downstream Prandtl–Meyer function
+vMa2=O+vMa1;
+//using equation solver as implict nature of Eq 17-49
+Ma2=2.385;
+disp(Ma2,'downstream Mach number Ma2 is');
+//P2 = (P2/P0)/(P1/P0) * P1
+P2= (1 + (k-1)*Ma2^2/2 )^(-k/(k-1)) / (1 + (k-1)*Ma1^2/2 )^(-k/(k-1)) * P1;
+P2=floor(P2);
+disp(P2,'downstream pressure in kPa')
diff --git a/2870/CH17/EX17.15/Ex17_15.sce b/2870/CH17/EX17.15/Ex17_15.sce
new file mode 100755
index 000000000..a52aa1b13
--- /dev/null
+++ b/2870/CH17/EX17.15/Ex17_15.sce
@@ -0,0 +1,55 @@
+clc;clear;
+//Example 17.15
+
+//given data
+P1=480;
+T1=550;
+V1=80;
+d1=15/100;//diameter in m
+AF=40;//air to fuel ratio
+HV=40000;//heating value in kJ/kg
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+p1=P1/(R*T1);
+A1=%pi*d1^2/4;
+mair=p1*A1*V1;
+mfuel=mair/AF;
+Q=mfuel*HV;
+q=Q/mair;
+T01=T1+V1^2/(2*cp);
+c1=sqrt(k*R*T1*1000);//factor of 1000 to convert kJ to J
+Ma1=V1/c1;
+//exit stagnation energy equation q= Cp (T02 - T01)
+T02=T01+q/cp;
+//from Table A–34
+//at Ma1
+//s stands for * symbol
+T0s=0.1291;//T0/Ts
+Ts0=T01/T0s;
+T2s=T02/Ts0;//T02/T*0
+//from Table A–34 at this ratio
+Ma2=0.3142;
+//Rayleigh flow relations corresponding to the inlet and exit Mach no
+//at Ma1
+T1s=0.1541;//T1/Ts
+P1s=2.3065;//P1/Ps
+V1s=0.0668;//V1/Vs
+//at Ma2
+T2s=0.4389;//T2/Ts
+P2s=2.1086;//P2/Ps
+V2s=0.2082;//V2/Vs
+T2=T2s/T1s*T1;
+T2=floor(T2);
+P2=P2s/P1s*P1;
+P2=ceil(P2);
+V2=V2s/V1s*V1;
+V2=floor(V2);
+disp(Ma2,'Mach Number at exit');
+disp(T2,'Temperature in K');
+disp(P2,'Pressure in kPa');
+disp(V2,'Velocity in m/s')
diff --git a/2870/CH17/EX17.16/Ex17_16.sce b/2870/CH17/EX17.16/Ex17_16.sce
new file mode 100755
index 000000000..b868f27ff
--- /dev/null
+++ b/2870/CH17/EX17.16/Ex17_16.sce
@@ -0,0 +1,52 @@
+clc;clear;
+//Example 17.16
+
+//given data
+P01=2*1000;//factor of 1000 to convert MPa to kPa
+T1=400;
+V1=0;//negligible
+nN=0.93;
+m=2.5;
+P2=300;
+
+//calculations
+
+//part - a
+P201=P2/P01;
+//critical pressure ratio at this values is 0.546
+Pt=0.546*P01;
+//at inlet
+h1=3248.4;
+h01=h1;
+s1=7.1292;
+//at throat
+st=s1;
+ht=3076.8;
+vt=0.24196;
+Vt=sqrt(2*(h01-ht)*1000);//factor of 1000 to convert kJ to J
+At=m*vt/Vt;
+//at state 2s
+s2s=s1;
+h2s=2783.6;
+//nN = (h01 - h2)/ (h01 - h2s)
+h2=h01-nN*(h01-h2s);
+//at P2 and h2
+v2=0.67723;
+s2=7.2019;
+V2=sqrt(2*(h01-h2)*1000);//factor of 1000 to convert kJ to J
+A2=m*v2/V2;
+disp((At*10000),'throat area in cm^2');
+disp((A2*10000),'exit area in cm^2');
+
+//part - b
+// at st=7.1292
+//pressures of 1.115 and 1.065 MPa
+//c calculated using tables
+c=sqrt((1115-1065)/(1/0.23776 - 1/0.24633)*1000);//factor of 1000 to convert kPa to Pa
+Ma=Vt/c;
+disp(Ma,'the Mach number at the throat');
+// at s2=7.2019
+//pressures of 325 and 275 kPa
+c=sqrt((325-276)/(1/0.63596 - 1/0.72245)*1000);//factor of 1000 to convert kPa to Pa
+Ma=V2/c;
+disp(Ma,'the Mach number at the nozzle exit')
diff --git a/2870/CH17/EX17.2/Ex17_2.sce b/2870/CH17/EX17.2/Ex17_2.sce
new file mode 100755
index 000000000..adb616759
--- /dev/null
+++ b/2870/CH17/EX17.2/Ex17_2.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 17.2
+
+//given data
+V=200;
+T=30+273;//converted in K
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+k=1.4;
+
+//calculations
+c=sqrt(k*R*T*1000);//factor of 1000 to convert kJ to J
+c=ceil(c);
+disp(c,'the speed of sound in m/s');
+Ma=V/c;
+disp(Ma,'the Mach number at the diffuser inlet')
diff --git a/2870/CH17/EX17.3/Ex17_3.sce b/2870/CH17/EX17.3/Ex17_3.sce
new file mode 100755
index 000000000..3bcbe259d
--- /dev/null
+++ b/2870/CH17/EX17.3/Ex17_3.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 17.3
+
+//given data
+T0=200+273;//converted in K
+P0=1400;
+//stagnant temp. & pressure is same as inlet due to small inlet velocity
+P=1200;
+m=3;
+
+//from Table A-2a
+cp=0.846;//in kJ/kg-K
+R=0.1889;//in kJ/kg-K
+k=1.289;
+
+//calculations
+T=T0*(P/P0)^((k-1)/k);
+V=sqrt(2*cp*(T0-T)*1000);//factor of 1000 to convert kJ to J
+p=P/(R*T);
+A=m/(p*V);
+c=sqrt(k*R*T*1000);//factor of 1000 to convert kJ to J
+Ma=V/c;
+disp(V,'velocity in m/s');
+disp(p,'density in kg/m^3');
+disp((A*10000),'flow area in cm^2');
+disp(Ma,'Mach number');
diff --git a/2870/CH17/EX17.4/Ex17_4.sce b/2870/CH17/EX17.4/Ex17_4.sce
new file mode 100755
index 000000000..b79795a73
--- /dev/null
+++ b/2870/CH17/EX17.4/Ex17_4.sce
@@ -0,0 +1,21 @@
+clc;clear;
+//Example 17.4
+
+//given data
+T0=200+273;//converted in K
+P0=1400;
+
+//from Table A-2a
+k=1.289;
+
+//calculations
+//Tc & Tr stands for critical temp and ratio respectively
+//Pc & Pr stands for critical temp and ratio respectively
+Tr=2/(k+1);
+Pr=(2/(k+1))^(k/(k-1));
+Tc=Tr*T0;
+Pc=Pr*P0;
+Tc=floor(Tc);
+Pc=ceil(Pc);
+disp(Tc,'critical temperature in K');
+disp(Pc,'critical pressure on kPa')
diff --git a/2870/CH17/EX17.5/Ex17_5.sce b/2870/CH17/EX17.5/Ex17_5.sce
new file mode 100755
index 000000000..a5b9c1738
--- /dev/null
+++ b/2870/CH17/EX17.5/Ex17_5.sce
@@ -0,0 +1,47 @@
+clc;clear;
+//Example 17.5
+
+//given data
+Vi=150;
+Ti=600+273;
+Pi=1;
+At=50/10000;//converted into m^2
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+Toi=Ti+Vi^2/(2*cp*1000);//factor of 1000 to convert kJ to J
+Poi=Pi*(Toi/Ti)^(k/(k-1));
+//flow is isentropic
+//stagnation temp. and pressure values remain constant
+To=Toi;
+Po=Poi;
+//from Table 17–2
+//The critical-pressure ratio is 0.5283
+
+//Part a
+Pb=0.7;
+Pca=Pb/Po;
+// Pca > 0.5283
+//exit plane pressure is equal to the back pressure
+Pt=Pb;
+//from Table A–32
+Mat=0.778;
+//Tt/To = 0.892
+Tt=0.892*To;
+pt=Pt*1000/(R*Tt);//factor of 1000 to convert MPa to kPa
+Vt=Mat*sqrt(k*R*Tt*1000);//factor of 1000 to convert kJ to J
+ma=pt*At*Vt;
+disp(ma,'the mass flow rate through the nozzle when the back pressure is 0.7 MPa in kg/s');
+
+//Part b
+Pb=0.4;
+Pca=Pb/Po;
+// Pca < 0.5283
+//sonic conditions exists at the exit
+Ma=1;
+mb=At*(Po*1000)*(sqrt(k*1000/(R*To)))*(2/(k+1))^((k+1)/(2*(k-1)));//factor of 1000 to convert MPa to kPa and kJ to J
+disp(mb,'the mass flow rate through the nozzle when the back pressure is 0.4 MPa in kg/s');
diff --git a/2870/CH17/EX17.6/Ex17_6.sce b/2870/CH17/EX17.6/Ex17_6.sce
new file mode 100755
index 000000000..3d96d25c0
--- /dev/null
+++ b/2870/CH17/EX17.6/Ex17_6.sce
@@ -0,0 +1,31 @@
+clc;clear;
+//Example 17.6
+
+//given data
+T1=400;
+P1=100;
+Ma1=0.3;
+A21=0.8;//A2/A1
+
+//assumption
+k=1.4;
+
+//from Table A–32
+//at Ma1=0.3
+//s stands for * symbol
+A1s = 2.0351;//A1/As
+T10 = 0.9823;//T1/T0
+P10 = 0.9305;//P1/P0
+A2s = A21*A1s;//A2/As
+//at this value of A2/As
+T20=0.9701;//T2/T0
+P20=0.8993;//P2/P0
+Ma2=0.391;
+
+//calculations
+T2=T1*T20/T10;
+T2=floor(T2);
+P2=P1*P20/P10;
+disp(Ma2,'Ma2 is ');
+disp(T2,'T2 in K is');
+disp(P2,'P2 in kPa is')
diff --git a/2870/CH17/EX17.7/Ex17_7.sce b/2870/CH17/EX17.7/Ex17_7.sce
new file mode 100755
index 000000000..71a049ec0
--- /dev/null
+++ b/2870/CH17/EX17.7/Ex17_7.sce
@@ -0,0 +1,58 @@
+clc;clear;
+//Example 17.7
+
+//given data
+T0=800;
+P0=1;
+Vi=0;//negligible
+At=20;
+Mae=2
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+k=1.4;
+
+//calculations
+
+//part - a
+// Mach no. at exit is 2 hence sonic conditions at throat
+p0=P0*1000/(R*T0);//factor of 1000 to convert MPa to kPa
+//from Table A-32 at Mat=1
+//s stands for * symbol
+Ps0 = 0.5283;//Ts/T0
+Ts0 = 0.8333;//Ps/P0
+ps0=0.6339;//ps/p0
+Ps=Ps0*P0;
+Ts=Ts0*T0;
+ps=ps0*p0;
+As=At;
+Vs=sqrt(k*R*Ts*1000);//factor of 1000 to convert kJ to J
+disp('the throat conditions');
+disp(Ps,'Presssure in MPa');
+disp(Ts,'Temperature in K');
+disp(ps,'density in kg/m^3');
+disp(As,'area in cm^2');
+disp(Vs,'velocity in m/s');
+
+//part - b
+//from Table A-32
+//at Mae=2
+Te0 = 0.5556;//Te/T0
+Pe0 = 0.1278;//Pe/P0
+pe0= 0.2300;//pe/p0
+Ae0= 1.6875;//Ae/Ao
+Pe=Pe0*P0;
+Te=Te0*T0;
+pe=pe0*p0;
+Ae=Ae0*At;
+Ve=Mae*sqrt(k*R*Te*1000);//factor of 1000 to convert kJ to J
+disp('the exit plane conditions, including the exit area');
+disp(Pe,'Presssure in MPa');
+disp(Te,'Temperature in K');
+disp(pe,'density in kg/m^3');
+disp(Ae,'area in cm^2');
+disp(Ve,'velocity in m/s');
+
+//part - c
+m=ps*As*Vs/10000;//factor of 10000 to convert cm^2 to m^2
+disp(m,'the mass flow rate through the nozzle in kg/s');
diff --git a/2870/CH17/EX17.9/Ex17_9.sce b/2870/CH17/EX17.9/Ex17_9.sce
new file mode 100755
index 000000000..28e3da2c2
--- /dev/null
+++ b/2870/CH17/EX17.9/Ex17_9.sce
@@ -0,0 +1,46 @@
+clc;clear;
+//Example 17.9
+
+//given data
+m=2.86;
+Ma1=2;
+P01=1;
+P1=0.1278;
+T1=444.5;
+p1=1.002;
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+
+//part - a
+//from Table A-33 at Ma1=2.0
+Ma2=0.5774;
+P0201=0.7209;//P02/P01
+P21=4.5;//P2/P1;
+T21=1.6875;//T2/T1
+p21=2.6667;//p2/p1
+P02=P0201*P01;
+P2=P21*P1;
+T2=T21*T1;
+p2=p21*p1;
+disp(P02,'the stagnation pressure in MPa');
+disp(P2,'the static pressure in MPa');
+disp(T2,'static temperature in K');
+disp(p2,'static density in kg/m^3');
+
+//part - b
+//s21 = s2 - s1
+s21=cp*log(T2/T1)-R*log(P2/P1);
+disp(s21,'the entropy change across the shock in kJ/kg-K');
+
+//part - c
+V2=Ma2*sqrt(k*R*T2*1000);//factor of 1000 to convert kJ to J
+V2=ceil(V2);
+disp(V2,'the exit velocity in m/s');
+
+//part - d
+disp('flow rate is not affected by presence of shock waves amd remains 2.86 kg/sec')
diff --git a/2870/CH2/EX2.1/Ex2_1.sce b/2870/CH2/EX2.1/Ex2_1.sce
new file mode 100755
index 000000000..cc8cdcf12
--- /dev/null
+++ b/2870/CH2/EX2.1/Ex2_1.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 2.1
+
+//constants used
+Hu=6.73*10^10;//Energy liberated by 1 kg of uranium
+
+//given values
+p=0.75;//assuming the avg density of gasoline in kg/L
+V=5;
+Hv=44000;
+mu=0.1;//mass of uranium used
+
+//calculation
+mgas=p*V;//mass of gasoline required per day
+Egas=mgas*Hv;
+Eu=mu*Hu;
+d=Eu/Egas;
+d=ceil(d);
+disp(d,'the numnber of days the car can run with uranium')
diff --git a/2870/CH2/EX2.10/Ex2_10.sce b/2870/CH2/EX2.10/Ex2_10.sce
new file mode 100755
index 000000000..2b982ce43
--- /dev/null
+++ b/2870/CH2/EX2.10/Ex2_10.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 2.10
+
+//given values
+Win=100;
+Qout=500;
+U1=800;
+
+//calculationu
+// Win - Qout = U2- U1 i.e change in internal energy
+U2=U1-Qout+Win
+disp(U2,'final internal of the system in kJ-')
diff --git a/2870/CH2/EX2.11/Ex2_11.sce b/2870/CH2/EX2.11/Ex2_11.sce
new file mode 100755
index 000000000..1c82e1bbc
--- /dev/null
+++ b/2870/CH2/EX2.11/Ex2_11.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 2.11
+
+//given values
+Win=20;
+mair=0.25;
+
+//calculation
+v=sqrt(Win/2/mair)//Win = 1/2*m*v^2
+if(v >= 8)
+ disp('True');
+else
+ disp('False')
diff --git a/2870/CH2/EX2.12/Ex2_12.sce b/2870/CH2/EX2.12/Ex2_12.sce
new file mode 100755
index 000000000..3dabf34cb
--- /dev/null
+++ b/2870/CH2/EX2.12/Ex2_12.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 2.12
+
+//given values
+Win=200;
+U=6;
+A=30;
+To=25;
+
+//calculation
+Ti= (Win/U/A)+To;// Win = Qout = U*A*(Ti - To)
+disp(Ti,'the indoor air temperature in Celcius')
diff --git a/2870/CH2/EX2.13/Ex2_13.sce b/2870/CH2/EX2.13/Ex2_13.sce
new file mode 100755
index 000000000..6247e5cd1
--- /dev/null
+++ b/2870/CH2/EX2.13/Ex2_13.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 2.13
+
+//given values
+Plamp=80;
+N=30;//no of lamps
+t=12;
+y=250;//days in a year
+UC=0.07;//unit cost in USD
+
+//calculation
+LP=Plamp * N/1000;//Lighting power in kW
+OpHrs=t*y;//Operating hours
+LE=LP * OpHrs;//Lighting energy in kW
+LC=LE*UC;//Lighting cost
+disp(LC ,'the annual energy cost in USD is ')
diff --git a/2870/CH2/EX2.15/Ex2_15.sce b/2870/CH2/EX2.15/Ex2_15.sce
new file mode 100755
index 000000000..4c8c26fec
--- /dev/null
+++ b/2870/CH2/EX2.15/Ex2_15.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 2.15
+
+//given values
+Ein=2;
+n1=0.73;
+n2=0.38;//efficency n1 and n2
+CinH=0.09;
+CinB=0.55;//unit cost of electricity and natural gas
+
+//calculation
+QutH= Ein * n1;
+disp(QutH,'rate of energy consumption by the heater in kW');
+CutH= CinH / n1;
+disp(CutH,'the unit cost of utilized energy for heater in USD');
+QutB= QutH / n2 ;
+disp(QutB,'rate of energy consumption by the burner in kW');
+CutB= CinB / n2 / 29.3; // 1 therm = 29.3 kWh
+disp(CutB,'the unit cost of utilized energy for burner in USD')
diff --git a/2870/CH2/EX2.16/Ex2_16.sce b/2870/CH2/EX2.16/Ex2_16.sce
new file mode 100755
index 000000000..3df5d310e
--- /dev/null
+++ b/2870/CH2/EX2.16/Ex2_16.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 2.16
+//answers vary due to round off error
+
+//constants used
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+h=50;
+m=5000;
+Wout=1862;
+ngen=0.95;//efficiency of turbine
+
+//calculation
+X=g*h/1000;// X stands for the differnce b/w change in mechanical energy per unit mass
+R=m*X;//rate at which mech. energy is supplied to turbine in kW
+nov=Wout/R;//overall efficiency i.e turbine and generator
+disp(nov,'overall efficiency is');
+ntu=nov/ngen;//efficiency of turbine
+disp(ntu,'efficiency of turbine is');
+Wsh=ntu*R;//shaft output work
+disp(Wsh,'shaft power output in kW')
diff --git a/2870/CH2/EX2.17/Ex2_17.sce b/2870/CH2/EX2.17/Ex2_17.sce
new file mode 100755
index 000000000..c1a0d43e0
--- /dev/null
+++ b/2870/CH2/EX2.17/Ex2_17.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 2.17
+
+//given values
+Pstd=4520;
+Phem=5160;//prices of std and high eff motor in USD
+R=60*0.7457;//rated power in kW from hp
+OpHrs=3500;//Operating hours
+Lf=1;//Load Factor
+nsh=0.89;
+nhem=0.932;//efficiency of shaft and high eff. motor
+CU=0.08;//per unit cost in USD
+
+//calculation
+PS=R*Lf*(1/nsh-1/nhem);//Power savings = W electric in,standard -  W electric in,efficient
+ES=PS*OpHrs;//Energy savings = Power savings * Operating hours
+ES=floor(ES);//rounding off
+disp(ES,'Energy savings in kWh/year');
+CS=ES*CU;
+CS=floor(CS);//rounding off
+disp(CS,'Cost savings per year in USD');
+EIC=Phem-Pstd;//excess intial cost
+Y=EIC/CS;
+disp(Y,'simple payback period in years')
diff --git a/2870/CH2/EX2.18/Ex2_18.sce b/2870/CH2/EX2.18/Ex2_18.sce
new file mode 100755
index 000000000..eb1858842
--- /dev/null
+++ b/2870/CH2/EX2.18/Ex2_18.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 2.18
+
+//given values
+//NOx details
+m1=0.0047;
+N1=18*10^6;
+//CO2 details
+m2=6.4;
+N2=18*10^6;
+
+//calculation
+NOxSav=m1*N1;
+disp(NOxSav,'NOx savings in kg/year');
+CO2Sav=m2*N2;
+disp(CO2Sav,'CO2 savings in kg/year')
diff --git a/2870/CH2/EX2.19/Ex2_19.sce b/2870/CH2/EX2.19/Ex2_19.sce
new file mode 100755
index 000000000..cb6972908
--- /dev/null
+++ b/2870/CH2/EX2.19/Ex2_19.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 2.19
+
+//constants used
+e=.95;//Emissivity
+tc=5.67*10^-8;//thermal conductivity in W/m^2 K^4
+
+//given values
+h=6;
+A=1.6;
+Ts=29;
+Tf=20;
+
+//calculation
+//convection rate
+Q1=h*A*(Ts-Tf);
+//radiation rate
+Q2=e*tc*A*((Ts+273)^4-(Tf+273)^4)
+Qt=Q1+Q2;
+disp(Qt,'the total rate of heat transfer in W')
diff --git a/2870/CH2/EX2.2/Ex2_2.sce b/2870/CH2/EX2.2/Ex2_2.sce
new file mode 100755
index 000000000..345584c4c
--- /dev/null
+++ b/2870/CH2/EX2.2/Ex2_2.sce
@@ -0,0 +1,15 @@
+clc;clear;
+//Example 2.2
+
+//given values
+v=8.5;
+m=10;
+mf=1154;
+
+//calculation
+e=v^2/2;
+disp(e,'wind energy per unit mass J/kg');
+E=m*e;
+disp(E,'wind energy for 10kg mass in J');
+E=mf*e/1000;
+disp(E,'wind energy for mass flow are of 1154kg/s in kW')
diff --git a/2870/CH2/EX2.7/Ex2_7.sce b/2870/CH2/EX2.7/Ex2_7.sce
new file mode 100755
index 000000000..31fd1ab6e
--- /dev/null
+++ b/2870/CH2/EX2.7/Ex2_7.sce
@@ -0,0 +1,10 @@
+clc;clear;
+//Example 2.7
+
+//given values
+T=200;
+n=4000/60;//converting rpm into rps
+
+//calculation
+Wsh=2*3.14*n*T/1000;
+disp(Wsh,'Power transmitted in kW')
diff --git a/2870/CH2/EX2.8/Ex2_8.sce b/2870/CH2/EX2.8/Ex2_8.sce
new file mode 100755
index 000000000..b78d770ae
--- /dev/null
+++ b/2870/CH2/EX2.8/Ex2_8.sce
@@ -0,0 +1,15 @@
+ clc;clear;
+//Example 2.8
+
+//constants used
+g=9.81;//acceleration due to gravity in m/s^2;
+
+//given values
+m=1200;
+V=90/3.6;//converting km/h into m/s
+d=30;
+
+//calculation
+Vver=V*sind(d);//velocity in vertical direction
+Wg=m*g*Vver/1000;
+disp(Wg,'the addtional power in kW')
diff --git a/2870/CH2/EX2.9/Ex2_9.sce b/2870/CH2/EX2.9/Ex2_9.sce
new file mode 100755
index 000000000..b92a6e925
--- /dev/null
+++ b/2870/CH2/EX2.9/Ex2_9.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 2.9
+
+//given values
+m=900;
+v1=0;
+v2=80/3.6;//converting km/h into m/s
+t=20;
+
+//calculation
+Wa=m*(v2^2-v1^2)/2/1000;
+Wavg=Wa/t;
+disp(Wavg,'the average power in kW')
diff --git a/2870/CH3/EX3.1/Ex3_1.sce b/2870/CH3/EX3.1/Ex3_1.sce
new file mode 100755
index 000000000..ce4ad4598
--- /dev/null
+++ b/2870/CH3/EX3.1/Ex3_1.sce
@@ -0,0 +1,15 @@
+clc;clear;
+//Example 3.1
+
+//given values
+m=50;
+T=90;
+
+//Values from Table A-4
+P=70.183;//in kPa
+v=0.001036;//in m^3/kg
+
+//calculation
+disp(P,'pressure in the tank in kPa')
+V=m*v;//equating dimensions
+disp(V,'total volumne of tank becomes in m^3')
diff --git a/2870/CH3/EX3.10/Ex3_10.sce b/2870/CH3/EX3.10/Ex3_10.sce
new file mode 100755
index 000000000..d2c0745ec
--- /dev/null
+++ b/2870/CH3/EX3.10/Ex3_10.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 3.10
+
+//constants used
+R=0.287// in kPa m^3/kg K
+
+//given values
+l=4;
+b=5;
+h=6;
+P=100;
+T=25+273;//in Kelvin
+
+//calculation
+V=l*b*h;
+m=P*V/R/T;
+disp(m,'the mass of the air in kg')
diff --git a/2870/CH3/EX3.11/Ex3_11.sce b/2870/CH3/EX3.11/Ex3_11.sce
new file mode 100755
index 000000000..6f804c93d
--- /dev/null
+++ b/2870/CH3/EX3.11/Ex3_11.sce
@@ -0,0 +1,31 @@
+clc;clear;
+//Example 3.11
+
+//given values
+P=1;
+T=50+273;//converting into Kelvin
+vgiv=0.021796;//specific vol. given
+
+//from Table A-1
+R=0.0815;
+Pcr=4.059;
+Tcr=374.2;
+
+//calculation
+
+//Part A
+v1=R*T/(P*1000);
+disp(v1,'specific volume of refrigerant-134a under the ideal-gas assumption in m^3/kg');
+e=(v1-vgiv)/vgiv;
+disp(e,'an error of');
+
+//Part B
+//determine Z from the compressibility chart, we will calculate the reduced pressure and temperature
+Pr=P/Pcr;
+Tr=T/Tcr;
+//from chart
+Z=0.84;
+v=Z*v1;
+disp(v,'specific volume of refrigerant-134a under the generalized compressibility chart in m^3/kg');
+e=(v-vgiv)/vgiv;
+disp(e,'an error of');
diff --git a/2870/CH3/EX3.12/Ex3_12.sce b/2870/CH3/EX3.12/Ex3_12.sce
new file mode 100755
index 000000000..0d949a30a
--- /dev/null
+++ b/2870/CH3/EX3.12/Ex3_12.sce
@@ -0,0 +1,32 @@
+clc;clear;
+//Example 3.12
+
+//given values
+v=0.51431;
+T=600;
+
+//from Table A-1E
+R=0.5956;
+Pcr=3200;
+Tcr=1164.8;
+
+//calculation
+
+//Part A
+//from Table A-6E
+P=1000;//in psia
+disp(P,'from the steam tables in psia');
+
+//Part B
+T=1060;//converted into R from F
+P=R*T/v;
+disp(P,'from the ideal-gas equation in psia');
+
+//Part C
+//calculating the pseudo-reduced specific volume and the reduced temperature
+Vr=v/(R*Tcr/Pcr);
+Tr=T/Tcr;
+//from the compressibility chart
+Pr=0.33;
+P=Pr*Pcr;
+disp(P,'from the generalized compressibility chart. in psia')
diff --git a/2870/CH3/EX3.13/Ex3_13.sce b/2870/CH3/EX3.13/Ex3_13.sce
new file mode 100755
index 000000000..b2ea5d7a9
--- /dev/null
+++ b/2870/CH3/EX3.13/Ex3_13.sce
@@ -0,0 +1,58 @@
+clc;clear;
+//Example 3.13
+//Answer of part c-d are having slight difference due to approximation in molar volumne in the textbook which here is caluculated to the approximation of 7 decimal digits
+
+//given values
+T=175;
+v=0.00375;
+Pex=10000;//experimentaion determination
+
+//from Table A-1
+R=0.2968// in kPa m^3/kg K
+
+//calculating
+
+//Part-a
+P=R*T/v;
+disp(round(P),'using the ideal-gas equation of state in kPa')
+e=(P-Pex)/Pex*100;
+disp(e,'error is');
+
+
+//Part-b
+//van der Waals constants from Eq. 3-23
+a=0.175;
+b=0.00138;
+//from van der waal eq.
+P=R*T/(v-b)-a/v^2;
+disp(round(P),'using the van der Waals equation of state,');
+e=(P-Pex)/Pex*100;
+disp(e,'error is');
+
+//Part-c
+//constants in the Beattie-Bridgeman equation from Table 3–4
+A=102.29;
+B=0.05378;
+c=4.2*10^4;
+Ru=8.314;//in kPa m^3/kmol K
+M=28.013;//molecular weight in kg/mol
+vb=M*v;//molar vol.
+P=(Ru*T)/(vb^2)*(1-((c)/(vb*T^3)))*(vb+B)-(A/vb^2);
+disp(round(P),'using the Beattie-Bridgeman equation');
+e=(P-Pex)/Pex*100;
+disp(e,'error is');
+
+//Part-d
+//constants of Benedict-Webb-Rubin equation from Table 3–4
+a=2.54;
+b=0.002328;
+c=7.379*10^4;
+alp=1.272*10^-4;
+Ao=106.73;
+Bo=0.040704;
+Co=8.164*10^5;
+gam=0.0053;
+P= ((Ru*T)/vb) + ( (Bo*Ru*T) - Ao - Co/T^2 )/ vb^2 + (b*Ru*T-a)/vb^3 +( a*alp/vb^6) + (c/(vb^3*T^2)) * (1 + (gam/vb^2)) * exp(-gam/vb^2);
+disp(round(P),'using Benedict-Webb-Rubin equation');
+e=(P-Pex)/Pex*100;
+disp(e,'error is')
diff --git a/2870/CH3/EX3.14/Ex3_14.sce b/2870/CH3/EX3.14/Ex3_14.sce
new file mode 100755
index 000000000..4b291d2e4
--- /dev/null
+++ b/2870/CH3/EX3.14/Ex3_14.sce
@@ -0,0 +1,25 @@
+clc;clear;
+//Example 3.14
+
+//given value
+T=25;
+
+//from table 3-1
+Psat=3.17;//on kPa
+
+//calculations
+
+//Relative Humidity 10%
+Pv1=0.1*Psat
+//Relative Humidity 80%
+Pv2=0.8*Psat
+//Relative Humidity 100%
+Pv3=1*Psat
+
+// from table 3-1 Tsat at these Pressures are
+T1=-8;
+T2=21.2;
+T3=25;
+disp(T1,'With relative humidity 10%the water temp in celcius is');
+disp(T2,'With relative humidity 80% the water temp in celcius is');
+disp(T3,'With relative humidity 100% the water temp in celcius is')
diff --git a/2870/CH3/EX3.2/Ex3_2.sce b/2870/CH3/EX3.2/Ex3_2.sce
new file mode 100755
index 000000000..85668eee3
--- /dev/null
+++ b/2870/CH3/EX3.2/Ex3_2.sce
@@ -0,0 +1,15 @@
+clc;clear;
+//Example 3.2
+
+//given values
+V=2;
+P=50;
+
+//Values from Table A-5E
+T=280.99;//in F
+v=8.5175;//in ft^3/lbm
+
+//caluclation
+m=V/v;//dimension analysis
+disp(m,'mass of vapour inside cylinder in lbm');
+disp(T,'temp inside cylinder in F')
diff --git a/2870/CH3/EX3.3/Ex3_3.sce b/2870/CH3/EX3.3/Ex3_3.sce
new file mode 100755
index 000000000..9e444b2bd
--- /dev/null
+++ b/2870/CH3/EX3.3/Ex3_3.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 3.3
+
+// constants used
+Hfg=2257.5;//enthalpy of vaporization in kJ/kg
+
+//given values
+m=200/1000;//converting in kg
+P=100;
+
+//Values from Table A-5
+vg=1.6941;
+vf=0.001043;//specific vol of sat liq and vapor
+
+//caluclation
+vfg=vg-vf;
+V=m*vfg;
+disp(V,'the volume change in m^3');
+E=m*Hfg;
+disp(E,'amount of energy transferred to the water in kJ')
diff --git a/2870/CH3/EX3.4/Ex3_4.sce b/2870/CH3/EX3.4/Ex3_4.sce
new file mode 100755
index 000000000..3887e920c
--- /dev/null
+++ b/2870/CH3/EX3.4/Ex3_4.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 3.4
+
+//given values
+mt=10;
+mf=8;
+T=90;
+
+//Values from Table A-4
+P=70.183;//in kPa
+vf=0.001036;
+vg=2.3593;
+
+//caluclation
+mg=mt-mf;
+V=mf*vf+mg*vg;// V= Vg + Vf
+disp(V,'the volume of the tank in m^3');
+disp(P,'the pressure in the tank in kPa')
diff --git a/2870/CH3/EX3.5/Ex3_5.sce b/2870/CH3/EX3.5/Ex3_5.sce
new file mode 100755
index 000000000..23119f65e
--- /dev/null
+++ b/2870/CH3/EX3.5/Ex3_5.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 3.5
+
+//given values
+m=4;
+V=80/1000;//converting into m^3
+P=160;
+
+//Values from Table A-12
+vf=0.0007437;
+vg=0.12348;
+T=-15.60;
+hf=31.21;
+hfg=209.90;
+
+//caluclation
+v=V/m;
+//vg>v>vf therefore it is a saturated mix
+//hence temp will same as saturation temp
+disp(T,'the temperature in celcius')
+x=(v-vf)/(vg-vf);//x=vg/vfg i.e the dryness fraction
+disp(x,'the quality');
+h=hf+x*hfg;
+disp(h,'the enthalpy of the refrigerant in kJ/kg');
+mg=x*m;
+Vg=mg*vg;
+disp(Vg,'the volume occupied by the vapor phase in m^3')
diff --git a/2870/CH3/EX3.7/Ex3_7.sce b/2870/CH3/EX3.7/Ex3_7.sce
new file mode 100755
index 000000000..5059e61c8
--- /dev/null
+++ b/2870/CH3/EX3.7/Ex3_7.sce
@@ -0,0 +1,21 @@
+clc;clear;
+//Example 3.7
+
+//given values
+P=0.5;
+h=2890;
+
+//from Table A–6
+//at P=0.5 MPa
+T1=200;
+h1=2855.8;
+T2=250;
+h2=2961.0;
+// we need linear interpolation
+
+//calculatiom
+//by interpolation we cab say that
+//h=h1+(T-T1)/(T2-T1)*(h2-h1)
+//we have to find T
+T=(h-h1)/(h2-h1)*(T2-T1)+T1;
+disp(T,'temperature of water in celcius')
diff --git a/2870/CH3/EX3.8/Ex3_8.sce b/2870/CH3/EX3.8/Ex3_8.sce
new file mode 100755
index 000000000..e4a539d6c
--- /dev/null
+++ b/2870/CH3/EX3.8/Ex3_8.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 3.8
+
+//given values
+T=80;
+P=5;
+
+//from Table A–7
+//at compressed liq given conditions
+u=333.82;
+
+//from Tablw A-4
+//at saturation
+usat=334.97;
+
+//calcualtion
+e=(usat-u)/u*100;
+disp(u,'internal energy of compressed liquid water using data from the compressed liquid table in kJ/kg ');
+disp(usat,'internal energy of compressed liquid water using saturated liquid data in kJ/kg ');
+disp(e,'the % error involved in the second case is ')
diff --git a/2870/CH3/EX3.9/Ex3_9.sce b/2870/CH3/EX3.9/Ex3_9.sce
new file mode 100755
index 000000000..3004a3bc9
--- /dev/null
+++ b/2870/CH3/EX3.9/Ex3_9.sce
@@ -0,0 +1,93 @@
+clc;clear;
+//Example 3.9
+
+//part a
+disp('Part a');
+
+//given values
+P=200;
+x=0.6;
+
+//from Table A-5
+T=120.21;
+uf=504.50;
+ufg=2024.6;
+
+//calcualtions
+u=uf+(x*ufg);
+disp(T,'temperature in Celcius ');
+disp(u,'internal energy in kJ/kg');
+disp('saturated liquid–vapor mixture at a pressure of 200 kPa');
+
+
+//part b
+disp('Part b');
+
+//given values
+T=125;
+u=1600;
+
+//from Table A–4
+uf=524.83;
+ug=2534.3;
+//ug>u>ufg so its aturated liquid–vapor mixture
+P=232.23;
+
+//calculation
+ufg=ug-uf;
+x=(u-uf)/ufg;
+disp(P,'Pressure in kPa');
+disp(x,'x is');
+disp('saturated liquid–vapor mixture at a temp of 125 of celcius');
+
+
+//part c
+disp('Part c');
+
+//given values
+P=1000;
+u=2950;
+
+//from Table A–6
+uf=761.39;
+ug=2582.8;
+//u>ug so its superheated steam
+T=395.2;
+
+//calculation
+disp(T,'temperature in Celcius');
+disp('superheated vapor at 1MPa ');
+
+//part d
+disp('Part d');
+
+//given values
+T=75;
+P=100;
+
+//from Table A–5
+Tsat=151.83;
+//T<Tsat so it is a compressed liquid
+//the given pressure is much lower than the lowest pressure value in the compressed liquid table i.e 5 MPa
+//assuming, the compressed liquid as saturated liquid at the given temperature
+
+//from Table A-4
+u=313.99;
+disp(u,'Internal energy in kJ/kg');
+disp('the compressed liquid condition');
+
+
+//Part e
+disp('Part e');
+
+//given values
+P=850;
+x=0;
+
+//x=0 therefore it is a saturateed liquid condition
+//from Table A-5
+T=172.94;
+u=731.00;
+disp(T,'temperature in Celcius');
+disp(u,'Internal energy in kJ/kg');
+disp('saturateed liquid condition')
diff --git a/2870/CH4/EX4.10/Ex4_10.sce b/2870/CH4/EX4.10/Ex4_10.sce
new file mode 100755
index 000000000..04ba1e8cf
--- /dev/null
+++ b/2870/CH4/EX4.10/Ex4_10.sce
@@ -0,0 +1,35 @@
+clc;clear;
+//Example 4.10
+
+//given data
+P1=150;
+P2=350;
+T1=27+273;//in K
+V1=400/1000;// in m^3
+R=0.287;
+
+//from Table A–17
+u1=214.07;
+u2=1113.52;
+
+//calculations
+
+//part a
+V2=2*V1;
+//using ideal gas eqn
+// P1 * V1 / T1 = P2 * T2 /V2
+T2=P2*V2*T1/(P1*V1);
+disp(T2,'the final temperature in K');
+
+//part b
+// Work done is Pdv
+W=P2*(V2-V1);
+disp(W,'the work done by the air im kPa');
+
+//part c
+//Ein - Eout = Esystem
+//Qin - Wout = dU = m(u2 - u1)
+m= P1* V1 /(T1 * R);
+Q= m*(u2 - u1)+ W;
+Q=ceil(Q);
+disp(Q,'the total heat transferred to the air in kJ')
diff --git a/2870/CH4/EX4.11/Ex4_11.sce b/2870/CH4/EX4.11/Ex4_11.sce
new file mode 100755
index 000000000..21b2e3266
--- /dev/null
+++ b/2870/CH4/EX4.11/Ex4_11.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 4.11
+
+//given data
+T=100;
+P=15;
+
+//from Table A–7
+//at P=15 mPa and T = 100 C
+hg=430.39;
+hf=419.17
+vf=0.001;
+Psat=101.42;//in kPa
+
+//calculations
+
+//part a
+h=hg;
+disp(h,'enthalpy of liquid water by using compressed liquid tables in kJ/kg');
+
+//part b
+//Approximating the compressed liquid as a saturated liquid at 100°C
+h=hf;
+disp(h,'enthalpy of liquid water by approximating it as a saturated liquid in kJ/kg');
+
+//part c
+h=hf + vf*(P*1000 - Psat );
+disp(h,'enthalpy of liquid water by using the correction given by Eq. 4–38 in kJ/kg');
diff --git a/2870/CH4/EX4.12/Ex4_12.sce b/2870/CH4/EX4.12/Ex4_12.sce
new file mode 100755
index 000000000..22dce4421
--- /dev/null
+++ b/2870/CH4/EX4.12/Ex4_12.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 4.12
+
+//given dara
+mi=50;
+T1i=80;//suffix i for iron
+Vw=0.5;
+T1w=25;//suffix w for water
+v=0.001;//specific volume of liquid water at or about room temperature
+
+//from Table A–3
+ci=0.45;
+cw=4.18;
+
+//calculations
+mw=Vw/v;
+//Ein - Eout = Esystem
+// du = 0 i.e (mcdT)iron + (mcdT)water = 0
+// mi * ci * (T - T1i) + mw *cw * (T-T1w)
+//on rearranging above equn
+T= (mi*ci*T1i + mw*cw*T1w)/(mi*ci+mw*cw);
+disp(T,'the temperature when thermal equilibrium is reached in C')
diff --git a/2870/CH4/EX4.13/Ex4_13.sce b/2870/CH4/EX4.13/Ex4_13.sce
new file mode 100755
index 000000000..055077204
--- /dev/null
+++ b/2870/CH4/EX4.13/Ex4_13.sce
@@ -0,0 +1,15 @@
+clc;clear;
+//Example 4.13
+
+//given data
+maf=0.15;
+caf=3.8;
+dTaf=1.8;//suffix af for affected tissue
+mh=1.2;///suffix h for hand
+
+//calculations
+//Ein - Eout = Esystem
+//dUaffected tissue - KEhand = 0
+//from above equation we can deduce that
+Vhand= sqrt(2*maf*caf*dTaf*1000/mh);//for conversion factor mutiplying by 1000 to get m^2/s^2
+disp(Vhand,'the velocity of the hand just before impact in m/s');
diff --git a/2870/CH4/EX4.14/Ex4_14.sce b/2870/CH4/EX4.14/Ex4_14.sce
new file mode 100755
index 000000000..eeaba23d5
--- /dev/null
+++ b/2870/CH4/EX4.14/Ex4_14.sce
@@ -0,0 +1,29 @@
+clc;clear;
+//Example 4.14
+
+//given data
+m=90;
+
+//from Tables 4–1 and 4–2
+Ehb=275;//hamburger
+Ef=250;//fries
+Ec=87;//cola
+
+//calculation
+
+//part a
+Ein=2*Ehb+Ef+Ec;
+//The rate of energy output for a 68-kg man watching TV is to be 72 Calories/h
+Eout=m*72/68;
+t=Ein/Eout;
+disp(t,'by watching TV in hours');
+
+//part b
+//The rate of energy output for a 68-kg man watching TV is to be 860 Calories/h
+Eout=m*860/68;
+t=Ein/Eout*60//converting in min
+t=ceil(t);
+disp(t,'by fast swimming in mins');
+
+//for last question
+disp('answers be for a 45-kg man energy takes twice as long in each case');
diff --git a/2870/CH4/EX4.15/Ex4_15.sce b/2870/CH4/EX4.15/Ex4_15.sce
new file mode 100755
index 000000000..d9975d0e4
--- /dev/null
+++ b/2870/CH4/EX4.15/Ex4_15.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 4.15
+
+//given data
+E=75;//in Cal/day
+
+//calculation
+Ereduced=E*365;
+//The metabolizable energy content of 1 kg of body fat is 33,100 kJ
+Ec=33100;
+mfat=Ereduced/Ec*4.1868;
+disp(mfat,'weight this person will lose in one year in kg')
diff --git a/2870/CH4/EX4.2/Ex4_2.sce b/2870/CH4/EX4.2/Ex4_2.sce
new file mode 100755
index 000000000..e1818aaba
--- /dev/null
+++ b/2870/CH4/EX4.2/Ex4_2.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 4.2
+
+//given values
+m=10;
+Po=60;
+T1=320;
+T2=400;
+
+//from Table A–6E
+v1=7.4863;//at 60 psia and 320 F
+v2=8.3548;//at 60 psia and 400 F
+
+//calculations
+//W = P dV which on integrating gives W = m * P * (V2 - V1)
+W=m*Po*(v2-v1)/5.404;//coverting into Btu from psia-ft^3
+disp(W,'work done by the steam during this process in Btu')
diff --git a/2870/CH4/EX4.3/Ex4_3.sce b/2870/CH4/EX4.3/Ex4_3.sce
new file mode 100755
index 000000000..e3ff94cea
--- /dev/null
+++ b/2870/CH4/EX4.3/Ex4_3.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 4.3
+
+//given data
+P1=100;
+V1=0.4;
+V2=0.1;
+
+//calculations
+//for isothermal W = P1*V1* ln(V2/V1)
+W=P1*V1*log(V2/V1);
+disp(W,'the work done during this process in kJ')
diff --git a/2870/CH4/EX4.4/Ex4_4.sce b/2870/CH4/EX4.4/Ex4_4.sce
new file mode 100755
index 000000000..07406eca6
--- /dev/null
+++ b/2870/CH4/EX4.4/Ex4_4.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 4.4
+
+//given data
+V1=0.05;
+P1=200;
+k=150;
+A=0.25;
+
+//calculations
+
+//Part - a
+V2=2*V1;
+x2=(V2-V1)/A;//displacement of spring
+F=k*x2;//compression force
+P2=P1+F/A;//additional pressure is equivalent the compression of spring
+disp(P2,'the final pressure inside the cylinder in kPa');
+
+//Part - b
+//work done is equivalent to the area of the P-V curve of Fig 4-10
+W=(P1+P2)/2*(V2-V1);//area of trapezoid = 1/2 * sum of parallel sides * dist. b/w them
+disp(W,'the total work done by the gas in kJ');
+
+//Part - c
+x1=0;//intial compression of spring
+Wsp=0.5*k*(x2^2-x1^2);
+disp(Wsp,'the fraction of this work done against the spring to compress it in kJ')
diff --git a/2870/CH4/EX4.5/Ex4_5.sce b/2870/CH4/EX4.5/Ex4_5.sce
new file mode 100755
index 000000000..b552a0480
--- /dev/null
+++ b/2870/CH4/EX4.5/Ex4_5.sce
@@ -0,0 +1,31 @@
+clc;clear;
+//Example 4.5
+
+//given values
+m=0.025;
+V=120;
+I=0.2;
+t=300;//total time taken in sec
+P1=300;
+Qout=3.7;
+
+//from Table A–5
+//at P1 the conditon is sat. vap
+h1=2724.9;
+
+//Calculations
+
+//Part - a
+//therotical proving
+
+//Part - b
+We=V*I*t/1000;//electrical work in kJ
+//from eqn 4 -18 i.e derived in earler part
+//it states it Ein - Eout = Esystem
+// it applies as Win - Qout = H = m (h2 - h1)
+h2=(We-Qout)/m+h1;
+////from Table A–5
+//at h2 we get
+P2=300;
+T=200;
+disp(T,'the final temperature of the steam in C')
diff --git a/2870/CH4/EX4.6/Ex4_6.sce b/2870/CH4/EX4.6/Ex4_6.sce
new file mode 100755
index 000000000..5f05ec570
--- /dev/null
+++ b/2870/CH4/EX4.6/Ex4_6.sce
@@ -0,0 +1,40 @@
+clc;clear;
+//Example 4.6
+
+//given data
+m=5;
+P1=200;
+T=25;
+
+//from Table A–4
+//the liq. is in compressed state at 200 kPa and 25 C
+vf=0.001;
+vg=43.340;
+uf=104.83;
+ufg=2304.3;
+v1=vf;
+u1=uf;
+
+//calculations
+
+//Part - a
+V1=m*v1;
+Vtank=2*V1;
+disp(Vtank,'the volume of the tank in m^3');
+
+//Part - b
+V2=Vtank;
+v2=V2/m;
+//from Table A–4
+// at T=25 vf=0.101003 m^3/kg and vg=43.340 m^3/kg
+// vf<v2<vg therefore it is saturated liquid–vapor mixture
+P2=3.1698;
+disp(P2,'the final pressure in kPa');
+
+//Part - c
+//Ein - Eout = Esystem
+//Qin= dU = m(u2 - u1)
+x2=(v2-vf)/(vg-vf);
+u2=uf+x2*ufg;
+Qin=m*(u2 - u1);
+disp(Qin,'the heat transfer for this process in kJ')
diff --git a/2870/CH4/EX4.7/Ex4_7.sce b/2870/CH4/EX4.7/Ex4_7.sce
new file mode 100755
index 000000000..be93dddf1
--- /dev/null
+++ b/2870/CH4/EX4.7/Ex4_7.sce
@@ -0,0 +1,34 @@
+clc;clear;
+//Example 4.7
+
+//given data
+T1=300;
+P=200;
+T2=600;
+M=28.97;
+Ru=8.314;
+
+//Part - a
+//from Table A–17
+u1=214.07;
+u2=434.78;
+du=u2-u1;//change in internal energy
+disp(du,'change in internal energy from data from the air table in kJ/kg');
+
+//Part - b
+//from Table A–2c
+a=28.11;
+b=0.1967*10^-2;
+c=0.4802*10^-5;
+d=-1.966*10^-9;
+// by equation Cp(T)=a+bT+cT^2+dT^3
+dubar=integrate('(a-Ru)+b*T+c*T^2+d*T^3','T',T1,T2);//integrant
+du=dubar/M;
+disp(du,'change in internal energy the functional form of the specific heat in kJ/kg');
+
+//Part - c
+//from Table A–2b
+Cavg=0.733;
+du=Cavg*(T2-T1);
+du=ceil(du);
+disp(du,'change in internal energy the functional form the average specific heat value in kJ/kg');
diff --git a/2870/CH4/EX4.8/Ex4_8.sce b/2870/CH4/EX4.8/Ex4_8.sce
new file mode 100755
index 000000000..896e5c719
--- /dev/null
+++ b/2870/CH4/EX4.8/Ex4_8.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 4.8
+
+//given data
+m=1.5;
+T1=80;
+P1=50;
+W=0.02;
+t=30/60;//convertinginto hrs from min
+
+//from Table A–2Ea
+Cv=0.753;
+
+//calculations
+
+//part a
+Wsh=W*t*2545;//in Btu
+//Ein - Eout = Esystem
+//Wsh = dU = m (u2 - u1) = m * Cv * (T2 - T1)
+T2= Wsh/(m*Cv)+T1;
+disp(T2,'the final temperature in F');
+
+//part b
+//using ideal gas eqn
+// P1 * V1 / T1 = P2 * T2 /V2
+P2= 50 * (T2 +460)/ (T1+460);
+// temp should in R therefore + 460
+disp(P2,'the final pressure in psia')
diff --git a/2870/CH4/EX4.9/Ex4_9.sce b/2870/CH4/EX4.9/Ex4_9.sce
new file mode 100755
index 000000000..a7855cc96
--- /dev/null
+++ b/2870/CH4/EX4.9/Ex4_9.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 4.9
+
+//given data
+V1=0.5;
+P=400;
+T1=27;
+I=2;
+t=5*60;//converting into s from min
+V=120;
+Qout=2800/1000;//in kJ
+R=0.297;
+
+//from Table A–2a
+Cp=1.039;
+
+//calculations
+P1=P;
+We=V*I*t/1000;//in kJ
+m=P1*V1/(R*(T1+273));
+//Ein - Eout = Esystem
+// We,in - Qout = dH = m (h2 - h1) = m * Cp * (T2 - T1)
+T2=(We-Qout)/(m*Cp)+T1;
+disp(T2,'the final temperature of nitrogen in C')
diff --git a/2870/CH5/EX5.1/Ex5_1.sce b/2870/CH5/EX5.1/Ex5_1.sce
new file mode 100755
index 000000000..8770b06e9
--- /dev/null
+++ b/2870/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 5.1
+
+//given data
+V=10;
+t=50;
+p=1;//in kg/L
+re=0.8/2/100;//in m
+
+//calculations
+Vd=V/t*3.7854;//factor 0f 3.7854 for gal to L
+disp(Vd,'volumne flow rate through hose in L/s');
+m=p*Vd;
+disp(m,'mass flow rate through hose in kg/s');
+Ae=%pi*re^2;
+Ve=Vd/Ae/1000;//factor of 1000 for L to m^3
+disp(Ve,'average velocity at the nozzle in m/s');
diff --git a/2870/CH5/EX5.10/Ex5_10.sce b/2870/CH5/EX5.10/Ex5_10.sce
new file mode 100755
index 000000000..aed99a6a0
--- /dev/null
+++ b/2870/CH5/EX5.10/Ex5_10.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 5.10
+
+//given data
+T1=15;
+P1=300;
+T2=25;
+T3=70;
+P3=1000;//in kPa
+T4=35;
+mr=6;
+
+//from Table A-4, A-13 and A-11
+h1=62.982;
+h2=104.83;
+h3=303.85;
+h4=100.87;
+
+//calculations
+//mass balance m1=m2=mw and m3=m4=mr
+//energy balance m1*h1 + m3*h3 = m2*h2 + m4*h4
+//combining them mw*(h1-h2) = mr*(h4-h3)
+mw= mr*(h4-h3)/(h1-h2);
+disp(mw,'mass flow rate of cooling water in kg/min');
+Qin=mw*(h2-h1);
+Qin=round(Qin);
+disp(Qin,'heat transfer rate in kJ/min')
diff --git a/2870/CH5/EX5.11/Ex5_11.sce b/2870/CH5/EX5.11/Ex5_11.sce
new file mode 100755
index 000000000..0961b288a
--- /dev/null
+++ b/2870/CH5/EX5.11/Ex5_11.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 5.11
+
+//giaven data
+T1=17+273;//in K
+P1=100;
+V1=150;
+Win=15;
+Qout=200/1000;//in kJ/s
+
+//constants used
+R=0.287;//in kPa-m^3/kg-K
+cp=1.005;//in kJ/kg C
+
+//calculations
+v1=R*T1/P1;
+m=V1/v1/60;//factor of 6 to convert to s
+// Win - Qout = m*cp*(T2-T1)
+T2= T1 + (Win - Qout)/(m*cp);
+disp((T2-273),'exit temperature in C')
diff --git a/2870/CH5/EX5.12/Ex5_12.sce b/2870/CH5/EX5.12/Ex5_12.sce
new file mode 100755
index 000000000..cd01dc255
--- /dev/null
+++ b/2870/CH5/EX5.12/Ex5_12.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 5.12
+
+//given data
+Pi=1;
+Ti=300;
+P2=1;
+
+//from Table A-6
+hi=3051.6;
+
+//calculations
+//mass balance mi=m2
+//energy balance mi*hi= m2*u2
+//combining them we get,
+u2=hi;
+//from Table A-6
+//we know P2 and u2, so
+T2=456.1;
+disp(T2,'final temperature in tank in C')
diff --git a/2870/CH5/EX5.13/Ex5_13.sce b/2870/CH5/EX5.13/Ex5_13.sce
new file mode 100755
index 000000000..fefeb7f2c
--- /dev/null
+++ b/2870/CH5/EX5.13/Ex5_13.sce
@@ -0,0 +1,38 @@
+clc;clear;
+//Example 5.13
+
+//given data
+V=6/1000;//in m^3
+Pgage=75;
+Patm=100;
+m1=1;
+Qind=0.5;//d stands for .
+t=30*60;//in s
+
+//calculation
+Pabs=Pgage+Patm;
+//from Table A-5, ths saturation temp
+T=116.04;
+disp(T,'the temperature at which cooking takes plac in C');
+//mass balance me=(m1-m2)cv
+//energy balance Qin - mehe = (m2u2 - m1u1)cv
+Qin=Qind*t;
+//from Table A-5
+he=2700.2;
+vf=0.001;
+vg=1.004;
+uf=486.82;
+ufg=2037.7;
+v1=V/m1;
+x1=(v1-vf)/(vg-vf);
+u1=uf+x1*ufg;
+U=m1*u1;
+//Qin = (m1 - V/v2)*he + (V/v2*u2 - m1*u1)
+//v2=vf + x2*(vg-vf)
+//u2=uf + x2*ufg
+//combining these equations we get
+//solved using EES
+x2=0.009;
+v2=vf + x2*(vg-vf);
+m2=V/v2;
+disp(m2,'amount of water left in kg')
diff --git a/2870/CH5/EX5.2/Ex5_2.sce b/2870/CH5/EX5.2/Ex5_2.sce
new file mode 100755
index 000000000..38a484838
--- /dev/null
+++ b/2870/CH5/EX5.2/Ex5_2.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 5.2
+
+//given data
+Dtank=3*12;//in inches
+Djet=0.5;
+h0=2;
+h1=4;
+
+//constants used
+g=32.2;//in ft/s^2
+
+//calculations
+//min - mout = dmCV/dt
+//mout = p*(2*g*h*Ajet)^2
+//mCV = p*Atank*h
+//from these we get dt = Dtank^2/Djet^2 * (dh/(2*g*h)^2)
+t=integrate('Dtank^2/Djet^2*(1/sqrt(2*g*h))','h',h0,h1);
+t=(t/60);//in min
+disp(t,'time taken to drop to 2ft in min')
diff --git a/2870/CH5/EX5.3/Ex5_3.sce b/2870/CH5/EX5.3/Ex5_3.sce
new file mode 100755
index 000000000..c8fefe9bf
--- /dev/null
+++ b/2870/CH5/EX5.3/Ex5_3.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 5.3
+
+//given data
+P=150;
+Vliquid=0.6/1000;//im m^3
+t=40*60;//in sec
+Ac=8*10^-6;
+
+//from Table A-5
+//from P = 150 kPa
+h=2693.1;
+ug=2519.2;
+vf=0.001053;
+vg=1.1594;
+
+//calculations
+m=Vliquid/vf;
+md=m/t;
+disp(md,'mass flow rate in kg/s');
+V=md*vg/(Ac);
+disp(V,'exit velocity in m/s');
+Eflow=h-ug;
+Et=h;
+disp(Eflow,'flow energy in kJ/kg');
+disp(Et,'total energy in kJ/kg');
+Emass=md*Et;
+disp(Emass,'rate at which energy leaves the cooker in kW')
diff --git a/2870/CH5/EX5.4/Ex5_4.sce b/2870/CH5/EX5.4/Ex5_4.sce
new file mode 100755
index 000000000..8c43ea505
--- /dev/null
+++ b/2870/CH5/EX5.4/Ex5_4.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 5.4
+
+//given data
+T1=283;//in K
+P1=80;
+V1=200;
+A1=0.4;
+
+//constants used
+R=0.287;//in kPa-m^3/kg-K
+
+//calulations
+v1=R*T1/P1;
+m=V1*A1/v1;
+disp(m,'mass flow rate of air in kg/s');
+// Ein - Eout = dEsystem / dt
+//from Table A-17
+h1=283.14;
+V2=0;
+h2=h1-(V2^2 - V1^2)/2/1000;//factor of 1000 to convert to kJ/kg
+//from Table A-17 at this value of h2
+T2=303;
+disp(T2,'the temperature in K is');
diff --git a/2870/CH5/EX5.5/Ex5_5.sce b/2870/CH5/EX5.5/Ex5_5.sce
new file mode 100755
index 000000000..eba140162
--- /dev/null
+++ b/2870/CH5/EX5.5/Ex5_5.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 5.5
+
+//given data
+P1=250;
+T1=700;
+A1=0.2;
+qout=1.2;
+m=10;
+P2=200;
+V2=900;
+
+//from Table A-6E
+v1=2.6883;
+h1=1371.4;
+
+//calculations
+V1=m*v1/A1;
+disp(V1,'the inlet velocity in ft/s');
+// Ein - Eout = dEsystem / dt
+h2=h1-qout-(V2^2 - V1^2)/2/25037;//factor of 25037 to convert to Btu/lbm
+//at this value h2, from Tablw A-6E
+T2=662;
+disp(T2,'exit temperature in F')
diff --git a/2870/CH5/EX5.6/Ex5_6.sce b/2870/CH5/EX5.6/Ex5_6.sce
new file mode 100755
index 000000000..1c9435de4
--- /dev/null
+++ b/2870/CH5/EX5.6/Ex5_6.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 5.6
+
+//given data
+T1=280;
+P1=100;
+m=0.02;
+qout=16;
+P2=600;
+T2=400;
+
+//from Table A-17
+h1=280.13;
+h2=400.98;
+
+//calculations
+// Ein - Eout = dEsystem / dt
+Win=m*qout+m*(h2-h1);
+disp(Win,'the input power of compressor in kW')
diff --git a/2870/CH5/EX5.7/Ex5_7.sce b/2870/CH5/EX5.7/Ex5_7.sce
new file mode 100755
index 000000000..8d097c822
--- /dev/null
+++ b/2870/CH5/EX5.7/Ex5_7.sce
@@ -0,0 +1,32 @@
+clc;clear;
+//Example 5.7
+
+//given data
+P1=2;
+T1=400;
+V1=50;
+z1=10;
+P2=15;
+x2=0.9;
+V2=180;
+z2=6;
+Wout=5*1000;//in kJ
+
+//from Table A-6
+h1=3248.4;
+//similarly for P2
+hf=225.94;
+hfg=2372.3;
+
+//constants used
+g=9.8;//in m/s^2
+
+//calcualtions
+h2=hf+x2*hfg;
+disp((h2-h1),'difference in enthalpies in kJ/kg');
+disp((V2^2-V1^2)/2/1000,'difference in kinetic energy in kJ/kg');//factor of 1000 to convert to kJ/kg
+disp(g*(z2-z1)/1000,'difference in potential energy in kJ/kg');//factor of 1000 to convert to kJ/kg
+wout=-((h2-h1)+(V2^2-V1^2)/2/1000+g*(z2-z1)/1000);//factor of 1000 to convert to kJ/kg
+disp(wout,'work done per unit of mass in kJ/kg');
+m=Wout/wout;
+disp(m,'mass flow rate in kg/s')
diff --git a/2870/CH5/EX5.8/Ex5_8.sce b/2870/CH5/EX5.8/Ex5_8.sce
new file mode 100755
index 000000000..f4b2047a3
--- /dev/null
+++ b/2870/CH5/EX5.8/Ex5_8.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 5.8
+
+//given data
+P1=0.8;
+P2=0.12;
+
+//from Table A-12
+//sat. liq at P1
+T1=31.31;
+h1=95.47;
+//since process is insentropic and at P2
+h2=h1;
+hf=22.49;
+hg=236.97;
+T2=-22.32;
+
+//calculations
+x2=(h2-hf)/(hg-hf);
+disp(x2,'the final state is');
+dT=T2-T1;
+disp(dT,'temperature drop in C')
diff --git a/2870/CH5/EX5.9/Ex5_9.sce b/2870/CH5/EX5.9/Ex5_9.sce
new file mode 100755
index 000000000..43aacd0dd
--- /dev/null
+++ b/2870/CH5/EX5.9/Ex5_9.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 5.9
+
+//given data
+T1=140;
+T2=50;
+T3=110;
+P=20;
+
+//for a compressed liq at given temp
+h1=107.99;
+h2=18.07;
+h3=78.02;
+
+//calculations
+//Mass balance min = mout So, m1+m2 = m3
+//Energy balance Ein = Eout So, m1*h1 + m2*h2 = m3*h3
+//combining realations
+//m1*h1 + m2*h2 = (m1+m2)*h3
+//dividing by m2 and y=m1/m2
+//we get, yh1 + h2 = (y+1)*h3
+y=(h3-h2)/(h1-h3);
+y=round(y);
+disp(y,'the ratio of mass flow rates')
diff --git a/2870/CH6/EX6.1/Ex6_1.sce b/2870/CH6/EX6.1/Ex6_1.sce
new file mode 100755
index 000000000..beb135e2c
--- /dev/null
+++ b/2870/CH6/EX6.1/Ex6_1.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 6.1
+
+//givrn data
+QH=80;
+QL=50;
+
+//calculations
+Wnet=QH-QL;
+disp(Wnet,'net power output in MW')
+nth=Wnet/QH;
+disp(nth,'the thermal efficiency')
diff --git a/2870/CH6/EX6.2/Ex6_2.sce b/2870/CH6/EX6.2/Ex6_2.sce
new file mode 100755
index 000000000..c1d668fa1
--- /dev/null
+++ b/2870/CH6/EX6.2/Ex6_2.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 6.2
+
+//given data
+Wnet=65;
+nth=0.24;
+HV=19000;
+
+//calculations
+QH=Wnet/nth*2545;//factor of 2545 to convert to Btu/h
+m=QH/HV;
+disp(m,'the engine must burn at fuel rate in lbm/h')
diff --git a/2870/CH6/EX6.3/Ex6_3.sce b/2870/CH6/EX6.3/Ex6_3.sce
new file mode 100755
index 000000000..8f24b93a5
--- /dev/null
+++ b/2870/CH6/EX6.3/Ex6_3.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 6.3
+
+//given data
+Wnet=2;
+QL=360;
+
+//calculations
+COPR=QL/Wnet/60;//factor of 60 to convert kW to kJ/min
+disp(COPR,'coefficient of performance of refrigerator');
+QH=QL+Wnet*60;//factor of 60 to convert kW to kJ/min
+disp(QH,'heat rejection rate in kJ/min')
diff --git a/2870/CH6/EX6.4/Ex6_4.sce b/2870/CH6/EX6.4/Ex6_4.sce
new file mode 100755
index 000000000..c19b29eb6
--- /dev/null
+++ b/2870/CH6/EX6.4/Ex6_4.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 6.4
+
+//given data
+COP=2.5;
+QH=80000;
+
+//calculations
+Wnet=QH/COP;
+disp(Wnet,'the power consumed in kJ/h')
+QL=QH-Wnet;
+disp(QL,'the rate at which heat is absorbed in kJ/h')
diff --git a/2870/CH6/EX6.5/Ex6_5.sce b/2870/CH6/EX6.5/Ex6_5.sce
new file mode 100755
index 000000000..581d01e60
--- /dev/null
+++ b/2870/CH6/EX6.5/Ex6_5.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 6.5
+
+//given data
+QH=500;
+TL=30+273;//in C
+TH=652+273;//in C
+
+//calculations
+nth=1-TL/TH;
+disp(nth,'the thermal efficiency of carnot engine');
+QL=TL*QH/TH;
+QL=round(QL);
+disp(QL,'the amount of heat rejected to the sink per cycle in kJ')
diff --git a/2870/CH6/EX6.6/Ex6_6.sce b/2870/CH6/EX6.6/Ex6_6.sce
new file mode 100755
index 000000000..2054969e2
--- /dev/null
+++ b/2870/CH6/EX6.6/Ex6_6.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 6.6
+
+//given data
+COP=13.5;
+TH=75+460;//in R
+TL=35+460;//in R
+
+//calculations
+COPR=1/(TH/TL-1);
+if(COPR>=COP)
+ disp('claim is true');
+else
+ disp('claim is false')
diff --git a/2870/CH6/EX6.7/Ex6_7.sce b/2870/CH6/EX6.7/Ex6_7.sce
new file mode 100755
index 000000000..7716dd516
--- /dev/null
+++ b/2870/CH6/EX6.7/Ex6_7.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 6.7
+
+//given data
+TL=-5+273;//in C
+TH=21+273;//in C
+QH=37.5;
+
+//calculations
+COPHP=1/(1-TL/TH);
+Wnet=QH/COPHP;
+disp(Wnet,'minimum power required in kW')
diff --git a/2870/CH6/EX6.8/Ex6_8.sce b/2870/CH6/EX6.8/Ex6_8.sce
new file mode 100755
index 000000000..908e4e16b
--- /dev/null
+++ b/2870/CH6/EX6.8/Ex6_8.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 6.8
+
+//given data
+Qrefrig=40;
+COPR=1.3;
+Wlight=40;
+
+//calculation
+Wrefrig=Qrefrig/COPR;
+Wt=Wrefrig+Wlight;
+AnHr=365*24;//annual hours
+NOH=20*30/3600*365;//normal operating hours
+AOP=AnHr-NOH;//addtional operating hours
+APC=Wt*AOP/1000;//additional power consumption; fator of 1000 to convert to kW
+APC=round(APC);
+disp(APC,'increase in power consumption in kWh/yr');
+disp((APC)*0.08,'increase in cost in Dollar/yr')
diff --git a/2870/CH7/EX7.1/Ex7_1.sce b/2870/CH7/EX7.1/Ex7_1.sce
new file mode 100755
index 000000000..13c15197f
--- /dev/null
+++ b/2870/CH7/EX7.1/Ex7_1.sce
@@ -0,0 +1,10 @@
+clc;clear;
+//Example 7.1
+
+//given data
+Q=750;
+Tsys=300;
+
+//calculations
+dSsys=Q/Tsys;
+disp(dSsys,'Entropy change in the process in kJ/K')
diff --git a/2870/CH7/EX7.10/Ex7_10.sce b/2870/CH7/EX7.10/Ex7_10.sce
new file mode 100755
index 000000000..ebfc60171
--- /dev/null
+++ b/2870/CH7/EX7.10/Ex7_10.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 7.10
+
+//given data
+P1=95;
+T1=295;
+r=8;//ratio of V1/V2
+
+//calculations
+//for closed systems V2/V1 = v2/v1
+//At T1
+vr1=647.9;
+vr2=vr1/r;
+//at vr2
+T2=662.7;
+disp(T2,'the final temperature in K')
diff --git a/2870/CH7/EX7.11/Ex7_11.sce b/2870/CH7/EX7.11/Ex7_11.sce
new file mode 100755
index 000000000..158b5cded
--- /dev/null
+++ b/2870/CH7/EX7.11/Ex7_11.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 7.11
+
+//given data
+P1=14;
+T1=50+460;
+T2=320+460;
+
+//constants used
+k=1.667;
+
+//calculations
+P2=P1*(T2/T1)^(k/(k-1));
+disp(P2,'exit pressure in psia')
diff --git a/2870/CH7/EX7.12/Ex7_12.sce b/2870/CH7/EX7.12/Ex7_12.sce
new file mode 100755
index 000000000..be66fe2ef
--- /dev/null
+++ b/2870/CH7/EX7.12/Ex7_12.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 7.12
+
+//given data
+P2=1000;
+P1=100;
+
+//from Table A-5
+//At P2
+v1=0.001043;
+
+//calculations
+Wrev=v1*(P2-P1);
+disp(Wrev,'compressor work as saturated liquid at inlet in kJ/kg')
+//from Table A-5
+//at P1 as sat. vapour
+h1=2675.0;
+s1=7.3589;
+s2=s1
+//from Table A-6
+//at P2 and s2
+h2=3194.5;
+Wrev=h2-h1;
+disp(Wrev,'compressor work as saturated vapor at inlet in kJ/kg')
diff --git a/2870/CH7/EX7.13/Ex7_13.sce b/2870/CH7/EX7.13/Ex7_13.sce
new file mode 100755
index 000000000..f740091d4
--- /dev/null
+++ b/2870/CH7/EX7.13/Ex7_13.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 7.13
+
+//given data
+P1=100;
+T1=300;
+P2=900;
+
+//constants used
+R=0.287;//in kJ/kg -K
+
+//calculations
+//part - a
+k=1.4;
+Wcomp=k*R*T1/(k-1)*((P2/P1)^((k-1)/k)-1);
+disp(Wcomp,'compression work in case of isentropic compression in kJ/kg');
+//part - b
+n=1.3;
+Wcomp=n*R*T1/(n-1)*((P2/P1)^((n-1)/n)-1);
+disp(Wcomp,'compression work in case of polytropic compression in kJ/kg');
+//part - c
+Wcomp=R*T1*log(P2/P1);
+disp(Wcomp,'compression work in case of isothermal compression in kJ/kg');
+//part - d
+Ps=sqrt(P1*P2);
+Wcomp=2*n*R*T1/(n-1)*((Ps/P1)^((n-1)/n)-1);
+disp(Wcomp,'compression work in case of two-stage compression with intercooling in kJ/kg');
diff --git a/2870/CH7/EX7.14/Ex7_14.sce b/2870/CH7/EX7.14/Ex7_14.sce
new file mode 100755
index 000000000..d4bc6c6b8
--- /dev/null
+++ b/2870/CH7/EX7.14/Ex7_14.sce
@@ -0,0 +1,30 @@
+clc;clear;
+//Example 7.14
+
+//given data
+P1=3000;// in kPa
+T1=400;
+P2=50;
+T2=100;
+Wout=2000;//in kW
+
+//from Table A-6
+//at P1
+h1=3231.7;
+s1=6.9235;
+//at 2a
+h2a=2682.4;
+//from Table A-6
+//at 2s
+s2s=s1;
+sf=1.0912;
+sg=7.5937;
+hf=340.54;
+hfg=2304.7
+x2s=(s2s-sf)/(sg-sf);
+h2s=hf+x2s*hfg;
+nT=(h1-h2a)/(h1-h2s);
+disp(nT,'isentropic efficiency is')
+//Ein = Eout
+m=Wout/(h1-h2a);
+disp(m,'mass flow rate in kg/s')
diff --git a/2870/CH7/EX7.15/Ex7_15.sce b/2870/CH7/EX7.15/Ex7_15.sce
new file mode 100755
index 000000000..dd1db65d2
--- /dev/null
+++ b/2870/CH7/EX7.15/Ex7_15.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 7.15
+
+//given data
+P1=100;
+T1=285;
+P2=800;
+m=0.2;
+nc=0.8;
+
+//from Table A-17
+//at T1
+h1=285.14;
+Pr1=1.1584;
+
+//calcualtions
+Pr2=Pr1*(P2/P1);
+//at Pr2
+h2s=517.05;
+h2a=(h2s-h1)/nc+h1;
+//at h2a
+T2a=569.5;
+disp(T2a,'exit temperature of air in K');
+//Ein = Eout
+Wa=m*(h2a-h1);
+disp(round(Wa),'required power input in kW')
diff --git a/2870/CH7/EX7.16/Ex7_16.sce b/2870/CH7/EX7.16/Ex7_16.sce
new file mode 100755
index 000000000..c98aeb86c
--- /dev/null
+++ b/2870/CH7/EX7.16/Ex7_16.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 7.16
+
+//given data
+P1=200;
+T1=950;
+P2=80;
+nN=0.92;
+
+//from Table A-2b
+cp=1.099;
+k=1.354;
+
+//calculations
+T2s=T1*(P2/P1)^((k-1)/k);
+//ein = eout
+V2s=sqrt(2*cp*(T1-T2s)*1000);//factor of 1000 for conversion to m^2/s^2
+disp(floor(V2s),'maximum possible exit velocity in m/s');
+T2a=T1-nN*(T1-T2s);
+disp(round(T2a),'exit temperature in K');
+V2a=sqrt(nN*V2s^2);
+disp(floor(V2a),'actual exit velocity in m/s')
diff --git a/2870/CH7/EX7.17/Ex7_17.sce b/2870/CH7/EX7.17/Ex7_17.sce
new file mode 100755
index 000000000..9f6f5685d
--- /dev/null
+++ b/2870/CH7/EX7.17/Ex7_17.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 7.17
+
+//given data
+Qin=1035;
+Tin=20+273;//in K
+Qout=Qin;
+Tout=5+273;//in K
+
+//calculations
+// Sin - Sout + Sgen = dSsystem/dt
+Sgen=(Qout/Tout)-(Qin/Tin);
+disp(Sgen,'entropy generation in the wall in W/K');
+Ts1=300;Ts2=273;//Boundary temperatures
+Sgen=(Qout/Ts2)-(Qin/Ts1);
+disp(Sgen,'total entropy generation in W/K');
diff --git a/2870/CH7/EX7.18/Ex7_18.sce b/2870/CH7/EX7.18/Ex7_18.sce
new file mode 100755
index 000000000..824b0f131
--- /dev/null
+++ b/2870/CH7/EX7.18/Ex7_18.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 7.18
+
+//given data
+P1=7;
+T1=450;
+P2=3;
+
+//from steam tables
+//at P1 and T1
+h1=3288.3;
+s1=6.6353;
+//at P2
+h2=h1;
+s2=7.0046;
+
+//calculations
+// Sin - Sout + Sgen = dSsystem/dt
+Sgen=s2-s1;
+disp(Sgen,'the entropy generated in kJ/kg-K')
diff --git a/2870/CH7/EX7.19/Ex7_19.sce b/2870/CH7/EX7.19/Ex7_19.sce
new file mode 100755
index 000000000..24f5ff685
--- /dev/null
+++ b/2870/CH7/EX7.19/Ex7_19.sce
@@ -0,0 +1,21 @@
+clc;clear;
+//Example 7.19
+
+//given data
+m=50;
+T1=500;
+T2=285;
+
+//from Table A-3
+Cavg=0.45;
+
+//calculations
+dSiron=m*Cavg*log(T2/T1);
+disp(dSiron,'entropy change of the iron block in kJ/K');
+// Ein - Eout = dEsystem
+Qout=m*Cavg*(T1-T2);
+dSlake=Qout/T2;
+disp(dSlake,'entropy change of the lake in kJ/K');
+// Sin - Sout + Sgen = dSsystem/dt
+Sgen=(Qout/T2)+dSiron;
+disp(Sgen,'entropy change in the process in kJ/K')
diff --git a/2870/CH7/EX7.2/Ex7_2.sce b/2870/CH7/EX7.2/Ex7_2.sce
new file mode 100755
index 000000000..26ecb40e0
--- /dev/null
+++ b/2870/CH7/EX7.2/Ex7_2.sce
@@ -0,0 +1,28 @@
+clc;clear;
+//Example 7.2
+
+//given data
+Qsink=2000;
+Qsource=-Qsink;
+Tsource=800;
+
+//calculations
+//part - a
+Tsink=500;
+dSsource=Qsource/Tsource;
+dSsink=Qsink/Tsink;
+Sgena=dSsource+dSsink;
+disp(Sgena,'entropy generated in part a in kJ/K is ');
+//part - b
+Tsink=750;
+dSsource=Qsource/Tsource;
+dSsink=Qsink/Tsink;
+Sgenb=dSsource+dSsink;
+disp(Sgenb,'entropy generated in part b in kJ/K is ');
+if(Sgena>Sgenb)
+ disp('part a is more irreversible');
+elseif(Sgena == Sgenb)
+ disp('heat transfer is equally irreversible');
+else
+ disp('part b is more irreversible');
+end,
diff --git a/2870/CH7/EX7.20/Ex7_20.sce b/2870/CH7/EX7.20/Ex7_20.sce
new file mode 100755
index 000000000..90c91b774
--- /dev/null
+++ b/2870/CH7/EX7.20/Ex7_20.sce
@@ -0,0 +1,29 @@
+clc;clear;
+//Example 7.20
+
+//given data
+P=20;
+T1=50+460;//in R
+T2=240;
+T3=130;
+m1=300;
+Qout=180;
+
+//from steam tables
+//at P and T1
+h1=18.07;
+s1=0.03609;
+//at P and T2
+h2=1162.3;
+s2=1.7406;
+//at P and T3
+h3=97.99;
+s3=0.18174;
+
+//calculations
+// Qout = m1*h1 + m2*h2 - (m1+m2)*h3
+m2= (Qout-m1*h1+m1*h3)/(h2-h3);
+m3=m1+m2;
+// Sin - sout + Sgen = dSsystem/dt
+Sgen=m3*s3-m1*s1-m2*s2+Qout/T1;
+disp(Sgen,'the rate of entropy generation in Btu/min R')
diff --git a/2870/CH7/EX7.21/Ex7_21.sce b/2870/CH7/EX7.21/Ex7_21.sce
new file mode 100755
index 000000000..d77693dd3
--- /dev/null
+++ b/2870/CH7/EX7.21/Ex7_21.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 7.21
+
+//given data
+T=100+273;//in K
+Q=-600;
+Tb=25+273;//in K
+
+//calculation
+dSsys=Q/T;
+disp(dSsys,'entropy change of water in kJ/K');
+// Sin - sout + Sgen = dSsystem
+Sgen= -Q/Tb + dSsys;
+disp(Sgen,'total entropy generation in kJ/K')
diff --git a/2870/CH7/EX7.22/Ex7_22.sce b/2870/CH7/EX7.22/Ex7_22.sce
new file mode 100755
index 000000000..23cdc459a
--- /dev/null
+++ b/2870/CH7/EX7.22/Ex7_22.sce
@@ -0,0 +1,29 @@
+clc;clear;
+//Example 7.22
+//difference in answers is arised due the fact the Energy savings have been rounded to the multiple of 100
+
+//given data
+T1=20+273;
+T2=24+273;
+P1=101;
+P2=801;
+D=3/1000;//in m
+Cdischarge=0.65;
+ncomp=0.8;
+nmotor=0.92;
+UC=0.078;//unit cost
+
+//constants used
+R=0.287;//in kJ/kg K
+k=1.4;
+n=1.4;
+
+//calculations
+Win=n*R*T1/(ncomp*(n-1))*((P2/P1)^((n-1)/n)-1);
+A=%pi*D^2/4;
+mair=Cdischarge*(2/(k+1))^(1/(k-1))*P2*A/(R*T2)*sqrt(k*R*1000*2/(k+1)*T2);//factor of 1000 to m^2/s^2
+PW=mair*Win;//Power wasted
+ES=PW*4200/nmotor;//4200 is operating hours ES stands for Energy savings
+disp(ES,'Energy savings in kWh/yr');
+CS=ES*UC;
+disp(ceil(CS),'cost savings in Dollar/yr')
diff --git a/2870/CH7/EX7.23/Ex7_23.sce b/2870/CH7/EX7.23/Ex7_23.sce
new file mode 100755
index 000000000..5fcbaf2c3
--- /dev/null
+++ b/2870/CH7/EX7.23/Ex7_23.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 7.23
+
+//given data
+P1=85.6;
+P2=985.6;
+P2r=885.6;
+CC=12000;//current cost
+
+//constants used
+n=1.4;
+
+//calulation
+freduction=1-(((P2r/P1)^((n-1)/n)-1)/((P2/P1)^((n-1)/n)-1));
+CS=CC*freduction;
+disp(round(CS),'cost savings in Dollar/yr')
diff --git a/2870/CH7/EX7.3/Ex7_3.sce b/2870/CH7/EX7.3/Ex7_3.sce
new file mode 100755
index 000000000..3d1aaae3e
--- /dev/null
+++ b/2870/CH7/EX7.3/Ex7_3.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 7.3
+
+//given data
+m=5;
+P1=140;
+T1=20;
+P2=100;
+
+//from refrigerant-134a data
+//at P1 and T1
+s1=1.0624;
+v1=0.16544;
+//at P2
+v2=v1;
+vf=0.0007529;
+vg=0.19254;
+sf=0.07188;
+sfg=0.87995;
+
+//calculations
+// vf < v2 <vg
+x2=(v2-vf)/(vg-vf);
+s2=sf+x2*sfg;
+dS=m*(s2-s1);
+disp(dS,'entropy change in the process in kJ/k')
diff --git a/2870/CH7/EX7.4/Ex7_4.sce b/2870/CH7/EX7.4/Ex7_4.sce
new file mode 100755
index 000000000..efee2a8cb
--- /dev/null
+++ b/2870/CH7/EX7.4/Ex7_4.sce
@@ -0,0 +1,23 @@
+clc;clear;
+//Example 7.4
+
+//given data
+m=3;
+P1=20;
+T1=70+460;//in R
+Qin=3450;
+
+//from Table A-6E
+//at P1 and T1
+s1=0.07459;
+h1=38.08;
+
+//calculations
+//Ein - Eout = dEsystem
+//Qin = m*(h2 - h1)
+h2=Qin/m+h1;
+//from Table A-6E
+//At P2 and h2
+s2=1.7761;
+dS=m*(s2-s1);
+disp(dS,'entropy change in Btu/R');
diff --git a/2870/CH7/EX7.5/Ex7_5.sce b/2870/CH7/EX7.5/Ex7_5.sce
new file mode 100755
index 000000000..01f1dd4d0
--- /dev/null
+++ b/2870/CH7/EX7.5/Ex7_5.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 7.5
+
+//given data
+P1=5;
+T1=450;
+P2=1.4;
+
+//calculations
+//Ein - Eout = dEsystem/dt
+//Ein = Eout
+//Wout = m*(h1-h2)
+//At P1 and T1
+h1=3317.2;
+s1=6.8210;
+s2=s1;
+//At P2 and s2
+h2=2967.4;
+Wout=h1-h2;
+disp(Wout,'work output per unit mass in kJ/kg')
diff --git a/2870/CH7/EX7.7/Ex7_7.sce b/2870/CH7/EX7.7/Ex7_7.sce
new file mode 100755
index 000000000..f7ae8e9a4
--- /dev/null
+++ b/2870/CH7/EX7.7/Ex7_7.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 7.7
+
+//given data
+P1=1;
+T1=110;
+P2=5;
+T2=120;
+
+//from Table
+//At P1 and T1
+s1=4.875;
+cp1=3.471;
+//at P2 and T2
+s2=5.145;
+cp2=3.486;
+
+//calculations
+//part - a
+dSa=s2-s1;
+disp(dSa,'change in entropy in kJ/kg K using tabulated properties');
+//part - b
+cavg=(cp1+cp2)/2;
+dSb=cavg*log(T2/T1);
+disp(dSb,'change in entropy in kJ/kg K approximating liquid methane as an incompressible substance');
+E=(dSb-dSa)/dSa*100;
+disp(E,'Error % is')
diff --git a/2870/CH7/EX7.8/Ex7_8.sce b/2870/CH7/EX7.8/Ex7_8.sce
new file mode 100755
index 000000000..5e04cc902
--- /dev/null
+++ b/2870/CH7/EX7.8/Ex7_8.sce
@@ -0,0 +1,30 @@
+clc;clear;
+//Example 7.8
+
+//given data
+P1=5;
+V1=0.280;
+T1=115;
+P2=1;
+dt=8760;//time in h/yr
+UC=0.075;//unit cost in dollar
+
+//from Table
+//at P1 and T1
+h1=232.3;
+s1=4.9945;
+p1=422.15;
+s2=s1;
+//at P2 and s2
+h2=222.8;
+
+//calculations
+m=p1*V1;
+//Ein - Eout = dEsystem/dt
+//Ein = Eout
+//Wout = m*(h1-h2)
+Wout = m*(h1-h2);
+disp(round(Wout),'maximum amount of power that can be produced in kW')
+APP=Wout*dt;//annual power production
+APS=APP*UC;//annual power savings
+disp(APS,'Annual power savings in $/year')
diff --git a/2870/CH7/EX7.9/Ex7_9.sce b/2870/CH7/EX7.9/Ex7_9.sce
new file mode 100755
index 000000000..5557b83c6
--- /dev/null
+++ b/2870/CH7/EX7.9/Ex7_9.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 7.9
+
+//given data
+P1=100;
+T1=290;
+P2=600;
+T2=330;
+
+//from Table A-17
+s02=1.79783;
+s01=1.66802;
+//Table A-2b
+cpavg=1.006;
+
+//constants used
+R=0.287;//in kJ/kg -K
+
+//calculations
+//part-a
+s21=s02-s01-R*log(P2/P1);//stands for s2 - s1
+disp(s21,'entropy change using property values from air table in kJ/kg-K');
+s21=cpavg*log(T2/T1)-R*log(P2/P1);//stands for s2 - s1
+disp(s21,'entropy change using average specific heat in kJ/kg-K')
diff --git a/2870/CH8/EX8.1/Ex8_1.sce b/2870/CH8/EX8.1/Ex8_1.sce
new file mode 100755
index 000000000..407bb67b2
--- /dev/null
+++ b/2870/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,15 @@
+clc;clear;
+// Example 8.1
+
+// given data
+D=12;
+V=10;
+
+// density of air at 25C & 1atm
+p=1.18;
+
+//calculations
+ke=(V^2)/2/1000;//factor of 1000 for converting J into kJ
+m=p*%pi*[D ^2]*V/4;
+MP=m*(ke);
+disp(MP,'Maximum power in kW')
diff --git a/2870/CH8/EX8.10/Ex8_10.sce b/2870/CH8/EX8.10/Ex8_10.sce
new file mode 100755
index 000000000..688046f2d
--- /dev/null
+++ b/2870/CH8/EX8.10/Ex8_10.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 8.10
+
+//given values
+Q=1035;
+T0=273;
+Tin=293;
+Tout=278;
+T1=300;
+
+//calculations
+//Xin - Xout - Xdestroyed = dX/dt
+Xdestroyed=Q*(1-T0/Tin)-Q*(1-T0/Tout);
+Xdestroyed=round(Xdestroyed);
+disp(Xdestroyed,'the rate of exergy destroyed in W');
+//the total rate of exergy destroyed
+Xdestroyed=Q*(1-T0/T1)-Q*(1-T0/T0);
+disp(Xdestroyed,'the otal total of exergy destroyed in W');
diff --git a/2870/CH8/EX8.11/Ex8_11.sce b/2870/CH8/EX8.11/Ex8_11.sce
new file mode 100755
index 000000000..7497d0ddc
--- /dev/null
+++ b/2870/CH8/EX8.11/Ex8_11.sce
@@ -0,0 +1,37 @@
+clc;clear;
+//Example 8.11
+
+//given data
+m=0.05;
+P1=1000;
+T1=300+273;//in K
+P2=200;
+T2=150+273;//in K
+P0=100;
+T0=25+273;//in K
+Qout=2;
+
+//from Table A-6 & A-4
+u1=2793.7;
+v1=0.25799;
+s1=7.1246;
+u2=2577.1;
+v2=0.95986;
+s2=7.2810;
+u0=104.83;
+v0=0.00103;
+s0=0.3672;
+
+//calculations
+X1=m*(u1-u0-T0*(s1-s0)+P0*(v1-v0));
+X2=m*(u2-u0-T0*(s2-s0)+P0*(v2-v0));
+disp(X1,'exergy of intial state in kJ');
+disp(X2,'exergy of final state in kJ');
+dX=X2-X1;
+disp(dX,'exergy change in system in kJ');
+Wout=-Qout-m*(u2-u1);
+Wu=Wout-P0*m*(v2-v1);
+Xdestroyed=X1-X2-Wu;
+disp(Xdestroyed,'the exergy destroyed in kJ');
+nII=Wu/(X1-X2);
+disp(nII,'second law efficiency of this process')
diff --git a/2870/CH8/EX8.12/Ex8_12.sce b/2870/CH8/EX8.12/Ex8_12.sce
new file mode 100755
index 000000000..b4feb2437
--- /dev/null
+++ b/2870/CH8/EX8.12/Ex8_12.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 8.12
+
+//given data
+m=2;
+T0=70+460;//in R
+P1=20;
+T1=70+460;//in R
+T2=130+460;//in R
+
+//constants used
+Cv=0.172;//in Btu/lbm - F
+
+//calculations
+Xdestroyed=T0*m*Cv*log(T2/T1);
+disp(Xdestroyed,'exergy destroyed in Btu');
+Wrev=integrate('(1-T0/T)*m*Cv','T',T1,T2);
+Wrev=round(Wrev);
+disp(Wrev,'the reversible work in Btu')
diff --git a/2870/CH8/EX8.13/Ex8_13.sce b/2870/CH8/EX8.13/Ex8_13.sce
new file mode 100755
index 000000000..aca921dd7
--- /dev/null
+++ b/2870/CH8/EX8.13/Ex8_13.sce
@@ -0,0 +1,29 @@
+clc;clear;
+//Example 8.13
+
+//given data
+T0=20+273;//in K
+P0=100;
+Tiw=30+273;//in K
+mw=100;
+Tii=350+273;//in K
+mi=5;
+
+//constants used(Table A-3)
+cw=4.18;//in kJ/kg C
+ci=0.45;//in kJ/kg C
+
+//calculations
+Tfk=(mi*ci*Tii+mw*cw*Tiw)/(mw*cw+mi*ci);
+Tfc=Tfk-273;//in C
+disp(Tfc,'the final equilibrium temperature in C');
+X1i=mi*ci*(Tii-T0-T0*log(Tii/T0));
+X1w=mw*cw*(Tiw-T0-T0*log(Tiw/T0));
+X1t=X1i+X1w;//total exergy
+disp(X1t,'intial exergy of combined systems in kJ');
+X2i=mi*ci*(Tfk-T0-T0*log(Tfk/T0));
+X2w=mw*cw*(Tfk-T0-T0*log(Tfk/T0));
+X2t=X2i+X2w;//total exergy
+disp(X2t,'intial exergy of combined systems in kJ');
+Xdestroyed=X1t-X2t;
+disp(Xdestroyed,'the wasted work in kJ')
diff --git a/2870/CH8/EX8.14/Ex8_14.sce b/2870/CH8/EX8.14/Ex8_14.sce
new file mode 100755
index 000000000..ae2b4079f
--- /dev/null
+++ b/2870/CH8/EX8.14/Ex8_14.sce
@@ -0,0 +1,24 @@
+clc;clear;
+//Example 8.14
+
+//given data
+TR=1200;
+T0=300;
+P0=100;
+Tsys=400;
+P1=350;
+V1=0.01;
+V2=2*V1;
+
+//calculations
+W=P1*V1*log(V2/V1);
+Wsurr=P0*(V2-V1);
+Wu=W-Wsurr;
+disp(Wu,'the useful work output in kJ');
+// Qin - W = m*Cv*dT, Since dt=0
+Q=W;
+Sgen=Q/Tsys-Q/TR;
+Xdestroyed=T0*Sgen;
+disp(Xdestroyed,'the exergy destroyed in kJ/K');
+Wrev=T0*Q/Tsys-Wsurr+(1-T0/TR)*Q;
+disp(Wrev,'the reversible work is done in the process in kJ');
diff --git a/2870/CH8/EX8.15/Ex8_15.sce b/2870/CH8/EX8.15/Ex8_15.sce
new file mode 100755
index 000000000..3be0f9208
--- /dev/null
+++ b/2870/CH8/EX8.15/Ex8_15.sce
@@ -0,0 +1,35 @@
+clc;clear;
+//Example 8.15
+//calculation error in textbook in part - b which changes all the following answers
+
+//given data
+m=8;
+T0=25+273;//in K
+P0=100;
+P1=3000;
+T1=450;
+P2=200;
+T2=150;
+Qout=300;
+
+//from Table A-6 and A-4
+h1=3344.9;
+s1=7.0856;
+h2=2769.1;
+s2=7.2810;
+h0=104.83;
+s0=0.3672;
+
+//calculations
+// Ein = Eout
+Wout=m*(h1-h2)-Qout;
+disp(Wout,'the actual power output in kW');
+// Xin = Xout
+Wrev=m*((h1-h2)-T0*(s1-s2));
+disp(Wrev,'the maximum possible work output in kW');
+nII=Wout/Wrev;
+disp(nII,'second law efficiency');
+Xdestroyed=Wrev-Wout;
+disp(Xdestroyed,'the exergy destroyed in kW');
+X1=h1-h0-T0*(s1-s0);
+disp(X1,'the exergy of the steam at inlet conditions in kJ/kg')
diff --git a/2870/CH8/EX8.16/Ex8_16.sce b/2870/CH8/EX8.16/Ex8_16.sce
new file mode 100755
index 000000000..829869c7f
--- /dev/null
+++ b/2870/CH8/EX8.16/Ex8_16.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 18.16
+
+//given data
+T0=70+460;
+T1=50;
+T2=240;
+T3=130;
+//as dicussed in example 7-20
+m1=300;
+m2=22.7;
+m3=322.7;
+
+//from steam tables
+h1=18.07;
+s1=0.03609;
+h2=1162.3;
+s2=1.7406;
+h3=97.99;
+s3=0.18174;
+
+//calculations
+Wrev=m1*(h1-T0*s1)+m2*(h2-T0*s2)-m3*(h3-T0*s3);
+Wrev=round(Wrev);
+disp(Wrev,'the reversible power in Btu/min')
+Xdestroyed=Wrev;
+disp(Xdestroyed,'the rate of exergy destruction in Btu/min')
diff --git a/2870/CH8/EX8.17/Ex8_17.sce b/2870/CH8/EX8.17/Ex8_17.sce
new file mode 100755
index 000000000..70dcfac15
--- /dev/null
+++ b/2870/CH8/EX8.17/Ex8_17.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 8.17
+
+//given data
+V=200;
+P1=100;
+P2=1000;
+P0=100;
+T=300;
+
+//constants used
+R=0.287;//in kPa m^3/kg K
+
+//calculations
+//Xin - Xout = Xdestroyed = X2 - X1
+m2=P2*V/(R*T);
+X2=R*T*(log(P2/P0)+P0/P2-1);
+Wrev=m2*X2/1000;
+Wrev=round(Wrev);
+disp(Wrev,'Work requirement in MJ')
diff --git a/2870/CH8/EX8.2/Ex8_2.sce b/2870/CH8/EX8.2/Ex8_2.sce
new file mode 100755
index 000000000..b736c74cb
--- /dev/null
+++ b/2870/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,13 @@
+clc;clear;
+//Example 8.2
+
+//given values
+TH=2000;
+T0=77+460;//in R
+Qin=3000;
+
+//calculation
+nth=1-(T0/TH);
+Wmax=nth*Qin;
+Wmax=round(Wmax)
+disp(Wmax,'the rate of energy flow in Btu/s')
diff --git a/2870/CH8/EX8.3/Ex8_3.sce b/2870/CH8/EX8.3/Ex8_3.sce
new file mode 100755
index 000000000..ac37cb14f
--- /dev/null
+++ b/2870/CH8/EX8.3/Ex8_3.sce
@@ -0,0 +1,14 @@
+clc;clear;
+//Example 8.3
+
+//given data
+Tsink=300;
+Tsource=1200;
+Qin=500;
+Wuout=180;
+
+//calculations
+Wrev=(1-Tsink/Tsource)*Qin;
+disp(Wrev,'The reversible power in kW');
+I=Wrev-Wuout;
+disp(I,'the irreversiblity rate in kW')
diff --git a/2870/CH8/EX8.4/Ex8_4.sce b/2870/CH8/EX8.4/Ex8_4.sce
new file mode 100755
index 000000000..6f428e03b
--- /dev/null
+++ b/2870/CH8/EX8.4/Ex8_4.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 8.4
+
+//given data
+m=500;
+T1=473;
+T0=300;
+Wu=0;
+
+//from Table A-3
+cavg=0.45;
+
+//calculations
+Wrev=integrate('(1-T0/T)*(-m*cavg)','T',T1,T0);//intergrant
+Wrev=floor(Wrev);
+disp(Wrev,'The reversible power in kJ');
+I=Wrev-Wu;
+disp(I,'the irreversiblity rate in kJ');
diff --git a/2870/CH8/EX8.5/Ex8_5.sce b/2870/CH8/EX8.5/Ex8_5.sce
new file mode 100755
index 000000000..6efb932ac
--- /dev/null
+++ b/2870/CH8/EX8.5/Ex8_5.sce
@@ -0,0 +1,16 @@
+clc;clear;
+//Example 8.5
+
+//given data
+Wrev=8191;
+Wtotal=38925;
+TL=278;
+TH=300;
+
+//calculations
+Wrm=Wtotal-Wrev;//work remaining
+COPHP=1/(1-TL/TH);
+Wd=COPHP*Wrev;//work delivered
+PS=Wd+Wrm;
+PS=round(PS/1000);//factor of 1000 for converting kJ into MJ
+disp(PS,'Maximum amount of heat in MJ')
diff --git a/2870/CH8/EX8.6/Ex8_6.sce b/2870/CH8/EX8.6/Ex8_6.sce
new file mode 100755
index 000000000..5463ead68
--- /dev/null
+++ b/2870/CH8/EX8.6/Ex8_6.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 8.6
+
+//given data
+COP=1;
+TL=283;//in K
+TH=294;//in K
+
+//calculations
+COPHP=1/(1-TL/TH);
+nII=COP/COPHP;
+disp(nII,'the second law efficiency')
diff --git a/2870/CH8/EX8.7/Ex8_7.sce b/2870/CH8/EX8.7/Ex8_7.sce
new file mode 100755
index 000000000..3b2e0f1ed
--- /dev/null
+++ b/2870/CH8/EX8.7/Ex8_7.sce
@@ -0,0 +1,19 @@
+clc;clear;
+//Example 8.7
+
+//given data
+P1=1000;
+V=200;
+T1=300;
+T0=T1;
+P0=100;
+
+//constants used
+R=0.287;//in kPa m^3/kg K
+
+//calculations
+m1=P1*V/(R*T1);
+O1=R*T0*(P0/P1-1)+R*T0*log(P1/P0);// O refers to exergy
+X1=m1*O1/1000;//factor of 1000 for converting kJ into MJ
+X1=round(X1);
+disp(X1,'work obtained in MJ')
diff --git a/2870/CH8/EX8.8/Ex8_8.sce b/2870/CH8/EX8.8/Ex8_8.sce
new file mode 100755
index 000000000..3a69d0ee7
--- /dev/null
+++ b/2870/CH8/EX8.8/Ex8_8.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 8.8
+
+//given data
+T0=20+273;//in K
+P1=0.14;
+T1=-10;
+P2=0.8;
+T2=50;
+
+//the properties of refrigerant
+//at inlet
+h1=246.36;
+s1=0.9724;
+//at outlet
+h2=286.69;
+s2=0.9802;
+dO=h2-h1-T0*(s2-s1);// O refers to exergy
+dO=round(dO);
+disp(dO,'the exergy change of the refrigerant in kJ/kg')
+wmin=dO;
+disp(wmin,'the minimum work input that needs to be supplied is in kJ/kg')
diff --git a/2870/CH9/EX9.10/Ex9_10.sce b/2870/CH9/EX9.10/Ex9_10.sce
new file mode 100755
index 000000000..d6029c924
--- /dev/null
+++ b/2870/CH9/EX9.10/Ex9_10.sce
@@ -0,0 +1,36 @@
+clc;clear;
+//Example 9.10
+
+//from 9.2
+r=8;
+T0=290;
+T1=290;
+T2=652.4;
+T3=1575.1;
+P2=1.7997;
+P3=4.345;
+qin=800;
+qout=381.83;
+wnet=418.17;
+Tsource=1700;
+
+//constants used
+R=0.287;//in kPa-m^3/kg-K
+
+//calculations
+//s1=s2 ; s3=s4
+s03=3.5045;
+s02=2.4975;
+s32=(s03-s02)-R*log(P3/P2);//s32 stands for s3-s2
+xdest23=T0*(s32-qin/Tsource);
+Tsink=T1;
+xdest41=T0*(-s32+qout/Tsink);
+xdestcycle=xdest23+xdest41;
+disp(xdestcycle,'exergy destrustion associated with Otto cycle inkJ/kg');
+// X4 = (u4 - u0 )- T0*(s4 - s0) + P0(v4 - v0)
+// s4 - s0 = s4 - s1 = s32
+// u4 - u0 = u4 - u1 = qout
+// v4 - v0 = v4 - v1 = 0
+//hence x4 is
+X4=qout-T0*s32;
+disp(X4,'exergy destruction of purge stream in kJ/kg')
diff --git a/2870/CH9/EX9.2/Ex9_2.sce b/2870/CH9/EX9.2/Ex9_2.sce
new file mode 100755
index 000000000..6c3332d9c
--- /dev/null
+++ b/2870/CH9/EX9.2/Ex9_2.sce
@@ -0,0 +1,47 @@
+clc;clear;
+//Example 9.2
+
+//given data
+T1=17+273;//in K
+P1=100;
+r=8;//compression ratio i.e v1/v2
+qin=800;
+
+//constants used
+R=0.287;//in kPa-m^3/kg-K
+
+//from Table A-17
+//at T1
+u1=206.91;
+vr1=676.1;
+
+//calculations
+//Process 1-2
+vr2=vr1/r;
+//at this vr2
+T2=652.4;
+u2=475.11;
+P2=P1*(T2/T1)*(r);
+//Process 2-3
+u3=qin+u2;
+//at this u3
+T3=1575.1;
+vr3=6.108;
+P3=P2*(T3/T2)*1;//factor of 1 as v3=v2
+disp(T3,'maximum temperature in the cycle in K');
+disp(P3/1000,'maximum pressure in MPa');//factor of 1000 to convert into MPa
+//Process 3-4
+vr4=r*vr3;
+//at this vr4
+T4=795.6;
+u4=588.74;
+//Process 4-1
+qout=u4-u1;
+Wnet=qin-qout;
+disp(Wnet,'net work output in kJ/kg');
+nth=Wnet/qin;
+disp(nth,'thermal efficiency');
+v1=R*T1/P1;
+MEP=Wnet/(v1*(1-1/r));
+MEP=round(MEP);
+disp(MEP,'mean effective pressure in kPa')
diff --git a/2870/CH9/EX9.3/Ex9_3.sce b/2870/CH9/EX9.3/Ex9_3.sce
new file mode 100755
index 000000000..dc8d4e9cc
--- /dev/null
+++ b/2870/CH9/EX9.3/Ex9_3.sce
@@ -0,0 +1,56 @@
+clc;clear;
+//Example 9.3
+
+//given data
+V1=117;
+T1=80+460;//in R
+P1=14.7;
+r=18;
+rc=2;
+
+//constants used
+R=0.3704;//in psia ft^3/lbm R
+cp=0.240;//in Btu/lbm R
+cv=0.171;//in Btu/lbm R
+
+//from Table A-2Ea
+k=1.4;
+
+//calculations
+V2=V1/r;
+V3=rc*V2;
+V4=V1;
+//Process 1-2
+T2=T1*(V1/V2)^(k-1);
+P2=P1*(V1/V2)^k;
+T2=round(T2);
+P2=round(P2);
+disp('Process 1-2');
+disp(T2,'temperature in R');
+disp(P2,'pressure in psia');
+//Process 2-3
+P3=P2;
+T3=T2*(V3/V2);
+T3=round(T3);
+P3=round(P3);
+disp('Process 2-3');
+disp(T3,'temperature in R');
+disp(P3,'pressure in psia');
+//Process 3-4
+T4=T3*(V3/V4)^(k-1);
+P4=P3*(V3/V4)^k;
+T4=round(T4);
+P4=round(P4);
+disp('Process 3-4');
+disp(T4,'temperature in R');
+disp(P4,'pressure in psia');
+m=P1*V1/(R*T1)/1728;//factor of 1728 to covert to ft^3 from in^3
+Qin=m*cp*(T3-T2);
+Qout=m*cv*(T4-T1);
+Wnet=Qin-Qout ;
+disp(Wnet,'work output in Btu');
+nth=Wnet/Qin;
+disp(nth,'thermal efficiency');
+MEP=Wnet/(V1-V2)*778.17*12;//factor of 778.17 and 12 to convert to lbf ft and in from Btu and ft respectively
+MEP=round(MEP);
+disp(MEP,'mean effective pressure in psia')
diff --git a/2870/CH9/EX9.5/Ex9_5.sce b/2870/CH9/EX9.5/Ex9_5.sce
new file mode 100755
index 000000000..b4e388335
--- /dev/null
+++ b/2870/CH9/EX9.5/Ex9_5.sce
@@ -0,0 +1,35 @@
+clc;clear;
+//Example 9.5
+
+//given data
+T1=300;
+r=8;
+T3=1300;
+
+//calcualtions
+//Process 1-2
+//at T1
+h1=300.19;
+Pr1=1.386;
+Pr2=r*Pr1;
+//at Pr2
+T2=540;
+h2=544.35;
+disp(T2,'temperature at exit of compressor in K');
+//Process 3-4
+//at T3
+h3=1395.97;
+Pr3=330.9;
+Pr4=Pr3/r;
+//at Pr4
+T4=770;
+h4=789.37;
+disp(T4,'temperature at turbine exit in K');
+Win=h2-h1;
+Wout=h3-h4;
+rbw=Win/Wout;
+disp(rbw,'back work ratio');
+qin=h3-h2;
+Wnet=Wout-Win;
+nth=Wnet/qin;
+disp(nth,'thermal efficeincy')
diff --git a/2870/CH9/EX9.6/Ex9_6.sce b/2870/CH9/EX9.6/Ex9_6.sce
new file mode 100755
index 000000000..a520763e9
--- /dev/null
+++ b/2870/CH9/EX9.6/Ex9_6.sce
@@ -0,0 +1,27 @@
+clc;clear;
+//Example 9.6
+
+//from 9.5
+Wsc=244.16;//compressor
+Wst=606.60;//turbine
+h1=300.19;
+h3=1395.17;
+
+//given data
+nC=0.8;
+nT=0.85;
+
+//calculations
+Win=Wsc/nC;
+Wout=nT*Wst;
+rbw=Win/Wout;
+disp(rbw,'back work ratio is');
+h2a=h1+Win;
+qin=h3-h2a;
+Wnet=Wout-Win;
+nth=Wnet/qin;
+disp(nth,'thermal efficency is');
+h4a=h3-Wout;
+//from A-17 at h4a
+T4a=853;
+disp(T4a,'turbine exit temperature in K is')
diff --git a/2870/CH9/EX9.7/Ex9_7.sce b/2870/CH9/EX9.7/Ex9_7.sce
new file mode 100755
index 000000000..e04eac5cd
--- /dev/null
+++ b/2870/CH9/EX9.7/Ex9_7.sce
@@ -0,0 +1,18 @@
+clc;clear;
+//Example 9.7
+
+//from 9.6
+h2a=605.39;
+h4a=880.36;
+h3=1395.97;
+Wnet=210.41;
+
+//given data
+n=0.80;
+
+//calculations
+// n = (h5 - h2a) / (h4a - h2a)
+h5=(h4a - h2a)*n+h2a;
+qin=h3-h5;
+nth=Wnet/qin;
+disp(nth,'thermal efficiency is')
diff --git a/2870/CH9/EX9.8/Ex9_8.sce b/2870/CH9/EX9.8/Ex9_8.sce
new file mode 100755
index 000000000..a6429a115
--- /dev/null
+++ b/2870/CH9/EX9.8/Ex9_8.sce
@@ -0,0 +1,42 @@
+clc;clear;
+//Example 9.8
+
+//given data
+T1=300;
+T6=1300;
+r=8;//overall compression ratio
+
+//calculations
+//as it is case of intercoolimg
+ri=sqrt(r);//ri stands for P2/P1 = P4/P3 = P6/P7 = P8/P9
+//from A-17 at T1
+h1=300.19;
+Pr1=1.386;
+Pr2=ri*Pr1;
+//from A-17 at Pr2
+T2=403.3;
+h2=403.31;
+//from A-17 at T6
+h6=1395.97;
+Pr6=330.9;
+Pr7=Pr6/ri;
+//from A-17 at Pr7
+T7=1006.4;
+h7=1053.33;
+//at inlets
+T3=T1;h3=h1;T8=T6;h8=h6;
+//et exits
+T4=T2;h4=h2;T9=T7;h9=h7;h5=h7;
+Win=2*(h2-h1);
+Wout=2*(h6-h7);
+Wnet=Wout-Win;
+qin=(h6-h4)+(h8-h7);
+rbw=Win/Wout;
+disp(rbw,'back work ratio');
+nth=Wnet/qin;
+disp(nth,'thermal efficiency is')
+//part - b
+disp('part - b');
+qin=(h6-h5)+(h8-h7);
+nth=Wnet/qin;
+disp(nth,'thermal efficiency is')
diff --git a/2870/CH9/EX9.9/Ex9_9.sce b/2870/CH9/EX9.9/Ex9_9.sce
new file mode 100755
index 000000000..19afda678
--- /dev/null
+++ b/2870/CH9/EX9.9/Ex9_9.sce
@@ -0,0 +1,39 @@
+clc;clear;
+//Example 9.9
+
+//given data
+m=100;
+P1=5;
+T1=-40+460;//in R
+T4=2000+460;//in R
+V1=850;
+rp=10;
+
+//constants used
+cp=0.240;//in Btu/lbm F
+k=1.4;
+
+//calculations
+//Process 1-2
+T2=T1+V1^2/(2*cp)/25037;//factor of 25037 to covert to Btu/lbm
+P2=P1*(T2/T1)^(k/(k-1));
+//Process 2-3
+P3=rp*P2;
+P4=P3;
+T3=T2*(P3/P2)^((k-1)/k);
+//Win=Wout
+T5=T4-T3+T2;
+P5=P4*(T5/T4)^(k/(k-1));
+T5=round(T5);
+disp(T5,'temperature at turbine exit in R');
+disp(P5,'pressure at turbine exit in psia');
+//Process 5-6
+P6=P1;
+T6=T5*(P6/P5)^((k-1)/k);
+T6=floor(T6);//round off
+V6=sqrt(2*cp*(T5-T6)*25037);//factor of 25037 to covert to (ft/s)^2
+disp(round(V6),'the velocity of nozzle exit in ft/s');
+Wp=m*(V6-V1)*V1/25037;//factor of 25037 to covert to Btu/lbm
+Qin=m*cp*(T4-T3);
+nP=Wp/Qin;
+disp(nP*100,'propulsive efficiency % is')