summaryrefslogtreecommitdiff
path: root/32/CH5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /32/CH5
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '32/CH5')
-rwxr-xr-x32/CH5/EX5.01/5_01.sce19
-rwxr-xr-x32/CH5/EX5.02/5_02.sce31
-rwxr-xr-x32/CH5/EX5.03/5_03.sce15
-rwxr-xr-x32/CH5/EX5.04/5_04.sce22
-rwxr-xr-x32/CH5/EX5.05/5_05.sce21
-rwxr-xr-x32/CH5/EX5.06/5_06.sce27
-rwxr-xr-x32/CH5/EX5.08/5_08.sce19
-rwxr-xr-x32/CH5/EX5.09/5_09.sce17
-rwxr-xr-x32/CH5/EX5.10/5_10.sce20
-rwxr-xr-x32/CH5/EX5.11/5_11.sce21
-rwxr-xr-x32/CH5/EX5.12/5_12.sce23
-rwxr-xr-x32/CH5/EX5.15/5_15.sce21
-rwxr-xr-x32/CH5/EX5.17/5_17.sce30
-rwxr-xr-x32/CH5/EX5.18/5_18.sce25
-rwxr-xr-x32/CH5/EX5.19/5_19.sce27
-rwxr-xr-x32/CH5/EX5.20/5_20.sce31
-rwxr-xr-x32/CH5/EX5.21/5_21.sce68
17 files changed, 437 insertions, 0 deletions
diff --git a/32/CH5/EX5.01/5_01.sce b/32/CH5/EX5.01/5_01.sce
new file mode 100755
index 000000000..1cd45c788
--- /dev/null
+++ b/32/CH5/EX5.01/5_01.sce
@@ -0,0 +1,19 @@
+//pathname=get_absolute_file_path('5.01.sce')
+//filename=pathname+filesep()+'5.01-data.sci'
+//exec(filename)
+//Initial pressure(in bar):
+p1=5
+//Initial temperature(in K):
+T1=300
+//Final pressure(in bar):
+p2=2
+//Cp for air(in kJ/kg.K):
+Cp=1.004
+//Gas constant for air(in kJ/kg.K):
+R=0.287
+//As it is a throttling process:
+T2=T1
+//Change in entropy(in kJ/kg.K):
+dS=Cp*log(T2/T1)-R*log(p2/p1)
+printf("\nRESULT\n")
+printf("\nChange in entropy = %f kJ/kg.K",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.02/5_02.sce b/32/CH5/EX5.02/5_02.sce
new file mode 100755
index 000000000..c780c2e45
--- /dev/null
+++ b/32/CH5/EX5.02/5_02.sce
@@ -0,0 +1,31 @@
+//pathname=get_absolute_file_path('5.02.sce')
+//filename=pathname+filesep()+'5.02-data.sci'
+//exec(filename)
+//Mass of water(in kg):
+m=5
+//Atmospheric temperature(in K):
+T1=27+273.15
+//Temperature of evaporation(in K):
+T2=100+273.15
+//Temperature at which steam is generated(in K):
+T3=400+273
+//Specific heat of water(in kJ/kg.K):
+Cp=4.2
+//Heat of vaporisation(in kJ/kg):
+q2=2260
+//For steam, Cp is given by:
+//Cps=R(3.5+1.2*T+0.14*T^2)
+//Heat added for increasing water temperature from 27ºC to 100ºC(in kJ):
+Q1=m*Cp*(T2-T1)
+//Entropy change during water temperature rise(in kJ/K):
+dS1=Q1/T1
+//Heat of vaporization(in kJ):
+Q2=m*q2
+//Entropy change during water to steam change(in kJ/K):
+dS2=Q2/T2
+//Entropy change during steam temperature rise(in kJ/K):
+dS3=m*10^(-3)*(1.617*log(T3/T2)+0.5544*(T3-T2)+0.065*(T3^2-T2^2)/2)
+//Total entropy change(in kJ/K):
+dS=dS1+dS2+dS3
+printf("\nRESULT\n")
+printf("\nTotal change in entropy of universe = %f kJ/K",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.03/5_03.sce b/32/CH5/EX5.03/5_03.sce
new file mode 100755
index 000000000..821828d59
--- /dev/null
+++ b/32/CH5/EX5.03/5_03.sce
@@ -0,0 +1,15 @@
+//pathname=get_absolute_file_path('5.03.sce')
+//filename=pathname+filesep()+'5.03-data.sci'
+//exec(filename)
+//Initial pressure(in kPa):
+p1=125
+//Final pressure(in kPa):
+p2=375
+//Intial temperature(in K):
+T1=27+273
+//Gas constant for oxygen(in kJ/kg.K):
+R=8.314/32
+//Change in entropy(in kJ/kg.K):
+dS=-R*log(p2/p1)
+printf("\nRESULT\n")
+printf("\nChange in entropy = %f kJ/kg.K",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.04/5_04.sce b/32/CH5/EX5.04/5_04.sce
new file mode 100755
index 000000000..0ae775e5e
--- /dev/null
+++ b/32/CH5/EX5.04/5_04.sce
@@ -0,0 +1,22 @@
+//pathname=get_absolute_file_path('5.04.sce')
+//filename=pathname+filesep()+'5.04-data.sci'
+//exec(filename)
+//Mass of the block(in kg):
+m=1
+//Temperature of the block(in K):
+T1=150+273.15
+//Temperature of the sea(in K):
+T2=25+273.15
+//Heat capacity of copper(in kJ/kg.K):
+C=0.393
+//Change in entropy of block(in kJ/K):
+dSb=m*C*log(T2/T1)
+//Heat lost by the block will be equal to heat gained by the water
+//Heat lost by water(in kJ):
+Q=m*C*(T1-T2)
+//Change in entropy of water(in kJ/K):
+dSw=Q/T2
+//Entropy change of universe(in kJ/K):
+dSu=dSb+dSw
+printf("\nRESULT\n")
+printf("\nChange in entropy of universe = %f J/K",dSu*10^3) \ No newline at end of file
diff --git a/32/CH5/EX5.05/5_05.sce b/32/CH5/EX5.05/5_05.sce
new file mode 100755
index 000000000..1ace4a6e2
--- /dev/null
+++ b/32/CH5/EX5.05/5_05.sce
@@ -0,0 +1,21 @@
+//pathname=get_absolute_file_path('5.05.sce')
+//filename=pathname+filesep()+'5.05-data.sci'
+//exec(filename)
+//Mass of the block(in kg):
+m=1
+//Temperature of the block(in K):
+T=27+273
+//Height(in m):
+h=200
+//Heat capacity for copper(in kJ/kg.K):
+s=0.393
+//Acceleration due to gravity(in m/s^2):
+g=9.81
+//Change in potential energy(in J):
+PE=m*g*h
+//In this case:
+Q=PE
+//Change in entropy of universe(in J/kg.K):
+dSu=Q/T
+printf("\nRESULT\n")
+printf("\nChange in entropy of universe = %f J/kg.K",dSu) \ No newline at end of file
diff --git a/32/CH5/EX5.06/5_06.sce b/32/CH5/EX5.06/5_06.sce
new file mode 100755
index 000000000..f8e90654d
--- /dev/null
+++ b/32/CH5/EX5.06/5_06.sce
@@ -0,0 +1,27 @@
+//pathname=get_absolute_file_path('5.06.sce')
+//filename=pathname+filesep()+'5.06-data.sci'
+//exec(filename)
+//Block 1:
+//Mass(in kg):
+m1=1
+//Temperature(in K):
+T1=150+273
+//Specific heat(in kJ/kg.K):
+C1=0.393
+//Block 2:
+//Mass(in kg):
+m2=0.5
+//Temperature(in K):
+T2=0+273
+//Specific heat(in kJ/kg.K):
+C2=0.381
+//Final temperature(in K):
+Tf=(m1*C1*T1+m2*C2*T2)/(m1*C1+m2*C2)
+//Entropy change in block 1(in kJ/K):
+dS1=m1*C1*log(Tf/T1)
+//Entropy change in block 2(in kJ/K):
+dS2=m2*C2*log(Tf/T2)
+//Total entropy change(in kJ/K):
+dS=dS1+dS2
+printf("\nRESULT\n")
+printf("\nChange in entropy of universe = %f J/K",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.08/5_08.sce b/32/CH5/EX5.08/5_08.sce
new file mode 100755
index 000000000..1c970c731
--- /dev/null
+++ b/32/CH5/EX5.08/5_08.sce
@@ -0,0 +1,19 @@
+//pathname=get_absolute_file_path('5.08.sce')
+//filename=pathname+filesep()+'5.08-data.sci'
+//exec(filename)
+//Maximum temperature(in K):
+T1=1800
+//Minimum temperature(in K):
+T2=300
+//Rate at which heat is added(in MW):
+Q1=5
+//Work output(in MW):
+W=2
+//Heat rejected(in MW):
+Q2=Q1-W
+//Entropy generated(in MW/K):
+dSg=(-Q1/T1+Q2/T2)
+//Work lost(in MW):
+w=T2*dSg
+printf("\nRESULT\n")
+printf("\nWork lost = %f MW",w) \ No newline at end of file
diff --git a/32/CH5/EX5.09/5_09.sce b/32/CH5/EX5.09/5_09.sce
new file mode 100755
index 000000000..ef68787c7
--- /dev/null
+++ b/32/CH5/EX5.09/5_09.sce
@@ -0,0 +1,17 @@
+//pathname=get_absolute_file_path('5.09.sce')
+//filename=pathname+filesep()+'5.09-data.sci'
+//exec(filename)
+//Temperature of the system(in K):
+T1=500
+//Temperature of the reservoir(in K):
+T2=300
+//Heat capacity of the system(in J/K):
+//C=0.05*T^2+0.10*T+0.085
+//Maximum heat(in J):
+Q1=-(0.05*(T2^3-T1^3)/3+0.10*(T2^2-T1^2)/2+0.085*(T2-T1))
+//Entropy change of the system(in J/K):
+dSs=0.05*(T2^2-T1^2)/2+0.10*(T2-T1)+0.085*log(T2/T1)
+//Maximum work available(in kJ):
+W=(Q1/T2+dSs)*T2
+printf("\nRESULT\n")
+printf("\nMaximum work = %f kJ",W/(10^3)) \ No newline at end of file
diff --git a/32/CH5/EX5.10/5_10.sce b/32/CH5/EX5.10/5_10.sce
new file mode 100755
index 000000000..d49470663
--- /dev/null
+++ b/32/CH5/EX5.10/5_10.sce
@@ -0,0 +1,20 @@
+//pathname=get_absolute_file_path('5.10.sce')
+//filename=pathname+filesep()+'5.10-data.sci'
+//exec(filename)
+//Initial pressure(in kPa):
+p1=3000
+//Initial volume(in m^3):
+v1=0.05
+//Final volume(in m^3):
+v2=0.3
+//Value of n:
+n=1.4
+//Final pressure(in MPa):
+p2=p1*((v1/v2)^n)
+//Entropy change:
+dS=0
+//Change in enthalpy(in kJ):
+dH=((p1*(v1^n))^(1/n))*(p1^((n-1)/n)-p2^((n-1)/n))/((n-1)/n)
+printf("\nRESULT\n")
+printf("\nEnthalpy change = %f kJ",dH)
+printf("\nEntropy change = %d",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.11/5_11.sce b/32/CH5/EX5.11/5_11.sce
new file mode 100755
index 000000000..a71669a22
--- /dev/null
+++ b/32/CH5/EX5.11/5_11.sce
@@ -0,0 +1,21 @@
+//pathname=get_absolute_file_path('5.11.sce')
+//filename=pathname+filesep()+'5.11-data.sci'
+//exec(filename)
+//Mass of air(in kg):
+m=2
+//Initial volume(in m^3):
+v1=1
+//Final volume(in m^3):
+v2=10
+//Gas const(in J/kg.K):
+R=287
+//Change in entropy of air(in J/K):
+dSa=m*R*log(v2/v1)
+//During free expansion, entropy change of surroundings(in J/K):
+dSs=0
+//Entropy change of universe(in J/K):
+dSu=dSa+dSs
+printf("\nRESULT\n")
+printf("\nEntropy change of air = %f J/K",dSa)
+printf("\nEntropy change of surroundings = %d J/K",dSs)
+printf("\nEntropy change of universe = %f J/K",dSu) \ No newline at end of file
diff --git a/32/CH5/EX5.12/5_12.sce b/32/CH5/EX5.12/5_12.sce
new file mode 100755
index 000000000..e70979e32
--- /dev/null
+++ b/32/CH5/EX5.12/5_12.sce
@@ -0,0 +1,23 @@
+//pathname=get_absolute_file_path('5.12.sce')
+//filename=pathname+filesep()+'5.12-data.sci'
+//exec(filename)
+//Mass of air(in kg):
+m=0.5
+//Initial pressure(in Pa):
+p1=1.013*10^5
+//Final pressure(in Pa):
+p2=0.8*10^6
+//Initial temperature(in K):
+T1=800
+//Index of compression:
+n=1.2
+//Adiabatic index of compression:
+r=1.4
+//Value of Cv(in kJ/kg.K):
+Cv=0.71
+//Final temperature(in K):
+T2=T1*((p2/p1)^((n-1)/n))
+//Total entropy change(in J/K):
+dS=m*Cv*((n-r)/(n-1))*log(T2/T1)
+printf("\nRESULT\n")
+printf("\nEntropy change = %f J/K",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.15/5_15.sce b/32/CH5/EX5.15/5_15.sce
new file mode 100755
index 000000000..bdb893055
--- /dev/null
+++ b/32/CH5/EX5.15/5_15.sce
@@ -0,0 +1,21 @@
+//pathname=get_absolute_file_path('5.15.sce')
+//filename=pathname+filesep()+'5.15-data.sci'
+//exec(filename)
+//Pressure at point 1(in MPa):
+p1=0.5
+//Temperature at point 1(in K):
+T1=400
+//Pressure at point 2(in MPa):
+p2=0.3
+//Temperature at point 2(in K):
+T2=350
+//Gas constant(in kJ/kg.K):
+R=0.287
+//Value of Cp(in kJ/kg.K):
+Cp=1.004
+//Entropy change(in kJ/kg.K):
+ds=Cp*log(T1/T2)-R*log(p1/p2)
+printf("\nRESULT\n")
+printf("\nChange in entropy = %f kJ/kg.K",ds)
+//As the calculated change is positive, s2>s1
+printf("\nHence flow occurs from 1 to 2 i.e. from 0.5 MPa, 400 K to 0.3 MPa & 350 K") \ No newline at end of file
diff --git a/32/CH5/EX5.17/5_17.sce b/32/CH5/EX5.17/5_17.sce
new file mode 100755
index 000000000..29fe24508
--- /dev/null
+++ b/32/CH5/EX5.17/5_17.sce
@@ -0,0 +1,30 @@
+//pathname=get_absolute_file_path('5.17.sce')
+//filename=pathname+filesep()+'5.17-data.sci'
+//exec(filename)
+//Heat added in process 1-2(in kJ):
+Q12=1000
+//Heat added in process 3-4(in kJ):
+Q34=800
+//Temperature at point 1(in K):
+T1=500
+//Temperature at point 3(in K):
+T3=400
+//Temperature at point 5(in K):
+T5=300
+//Total heat added(in kJ):
+Qt=Q12+Q34
+//Entropy change from state 1-2(in kJ/K):
+S12=Q12/T1
+//Entropy change from state 3-4(in kJ/K):
+S34=Q34/T3
+//Entropy change from state 5-6(in kJ/K):
+S56=S12+S34
+//Heat rejected in process 5-6(in kJ):
+Q56=T5*S56
+//Net work done(in kJ):
+W=Q12+Q34-Q56
+//Thermal efficiency of the cycle:
+n=W/Qt
+printf("\nRESULT\n")
+printf("\nWork done = %d kJ",W)
+printf("\nThermal efficiency = %f percent",n*100) \ No newline at end of file
diff --git a/32/CH5/EX5.18/5_18.sce b/32/CH5/EX5.18/5_18.sce
new file mode 100755
index 000000000..2be454dc1
--- /dev/null
+++ b/32/CH5/EX5.18/5_18.sce
@@ -0,0 +1,25 @@
+//pathname=get_absolute_file_path('5.18.sce')
+//filename=pathname+filesep()+'5.18-data.sci'
+//exec(filename)
+//Temperature of the reservoirs(in K):
+T1=800
+T2=700
+T3=600
+//Temperature of the sink(in K):
+T4=320
+//Total heat rejected to the heat sink(in kJ/s):
+Q2=10
+//Work done(in kW):
+W=20
+//Total heat added(in kJ/s):
+Q1=Q2+W
+//Heat from reservoir 2(in kJ/s):
+Q12=(Q2/T4-Q1/T3)/(0.7/T1+1/T2-1.7/T3)
+//Heat from reservoir 1(in kJ/s):
+Q11=0.7*Q12
+//Heat from reservoir 3(in kJ/s):
+Q13=Q1-1.7*Q12
+printf("\nRESULT\n")
+printf("\nHeat supplied by reservoir at 800 K = %f kJ/s",Q11)
+printf("\nHeat supplied by reservoir at 700 K = %f kJ/s",Q12)
+printf("\nHeat supplied by reservoir at 600 K = %f kJ/s",Q13) \ No newline at end of file
diff --git a/32/CH5/EX5.19/5_19.sce b/32/CH5/EX5.19/5_19.sce
new file mode 100755
index 000000000..0d51843f2
--- /dev/null
+++ b/32/CH5/EX5.19/5_19.sce
@@ -0,0 +1,27 @@
+//pathname=get_absolute_file_path('5.19.sce')
+//filename=pathname+filesep()+'5.19-data.sci'
+//exec(filename)
+//Volume of the chamber(in m^3):
+v1=0.04
+//Initial pressure(in bar):
+p1=10
+//Initial temperature(in K):
+T1=25+273
+//Gas constant(in kJ/kg.K):
+R=0.287
+//Value of Cv(in kJ/kg.K):
+Cv=0.71
+//Final temperature(in K):
+T2=T1
+//Final volume(in m^3):
+v2=2*v1
+//Final pressure(in bar):
+p2=p1*v1/v2
+//Initial mass(in kg):
+m=p1*10^2*v1/(R*T1)
+//Change in entropy(in kJ/K):
+dS=m*R/log(v2/v1)+m*Cv*log(T2/T1)
+printf("\nRESULT\n")
+printf("\nEntropy change = %f kJ/K",dS)
+//Entropy change is non zero but ∫dQ/T is zero, hence:
+printf("\nAs dS>∫dQ/T, process is irreversible") \ No newline at end of file
diff --git a/32/CH5/EX5.20/5_20.sce b/32/CH5/EX5.20/5_20.sce
new file mode 100755
index 000000000..aa0b2b963
--- /dev/null
+++ b/32/CH5/EX5.20/5_20.sce
@@ -0,0 +1,31 @@
+//pathname=get_absolute_file_path('5.20.sce')
+//filename=pathname+filesep()+'5.20-data.sci'
+//exec(filename)
+//Mass in tank A(in kg):
+ma=0.6
+//Mass in tank B(in kg):
+mb=1
+//Temperature in tank A(in K):
+Ta=90+273
+//Temperature in tank B(in K):
+Tb=45+273
+//Pressure in tank A(in bar):
+pa=1
+//Pressure in tank B(in bar):
+pb=2
+//Gas constant(in kJ/kg.K):
+R=0.287
+//Value of Cp(in kJ/kg.K):
+Cp=1.005
+//Final temperature(in K):
+Tf=(ma*Ta+mb*Tb)/(ma+mb)
+//Volume of tank A(in m^3):
+va=ma*R*Ta/pa
+//Volume of tank B(in m^3):
+vb=mb*R*Tb/pb
+//Final pressure(in kPa):
+pf=(ma+mb)*R*Tf/(va+vb)
+//Entropy change(in kJ/K):
+dS=ma*(Cp*log(Tf/Ta)-R*log(pf/pa))+mb*(Cp*log(Tf/Tb)-R*log(pf/pb))
+printf("\nRESULT\n")
+printf("\nEntropy produced = %f kJ/K",dS) \ No newline at end of file
diff --git a/32/CH5/EX5.21/5_21.sce b/32/CH5/EX5.21/5_21.sce
new file mode 100755
index 000000000..4684aff71
--- /dev/null
+++ b/32/CH5/EX5.21/5_21.sce
@@ -0,0 +1,68 @@
+//pathname=get_absolute_file_path('5.21.sce')
+//filename=pathname+filesep()+'5.21-data.sci'
+//exec(filename)
+//Volume of the tanks(in m^3):
+va=4
+vb=4
+vc=4
+//Pressure in tank A(in bar):
+pa=6
+//Temperature in tank A(in K):
+Ta=90+273
+//Pressure in tank B(in bar):
+pb=3
+//Temperature in tank B(in K):
+Tb=300+273
+//Pressure in tank C(in bar):
+pc=12
+//Temperature in tank C(in K):
+Tc=50+273
+//Gas constant for air(in kJ/kg.K):
+Ra=0.287
+//Gas constant for nitrogen(in kJ/kg.K):
+Rn=0.297
+//Adiabatic index of compression for air:
+ra=1.4
+//Adiabatic index of compression for nitrogen:
+rn=1.4
+//Value of Cp(in kJ/kg.K):
+Cp=1.005
+//Value of Cv(in kJ/kg.K):
+Cv=0.718
+//Part (i)
+//Mass in tank A(in kg):
+ma=pa*10^2*va/(Ra*Ta)
+//Mass in tank A(in kg):
+mb=pb*10^2*vb/(Ra*Tb)
+//Final temperature(in K):
+Td=(ma*Ta+mb*Tb)/(ma+mb)
+//Final pressure(in bar):
+pd=Ra*Td*(ma+mb)/((va+vb)*10^2)
+//Entropy change(in kJ/K):
+dS1=ma*Cp*log(Td/Ta)-ma*Ra*log(pd/pa)+mb*Cp*log(Td/Tb)-mb*Ra*log(pd/pb)
+printf("\nRESULT\n")
+printf("\nEntropy change in case 1 = %f kJ/K",dS1)
+//Part (ii)
+//Mass in tank C(in kg):
+mc=pc*10^2*vc/(Rn*Tc)
+//Mass in tank D(in kg):
+md=ma+mb
+//Value of Cv for nitrogen(in kJ/kg.K):
+Cvn=Rn/(rn-1)
+//Value of Cp for nitrogen(in kJ/kg.K):
+Cpn=rn*Cvn
+//Total mass(in kg):
+mf=md+mc
+//Final Cv(in kJ/kg.K):
+CvF=(md*Cv+mc*Cvn)/mf
+//Final gas constant(in kJ/kg.K):
+RF=(md*Ra+mc*Rn)/mf
+//Final temperature(in K):
+TF=(md*Cv*Td+mc*Cvn*Tc)/(mf*CvF)
+//Final volume(in m^3):
+VF=va+vb+vc
+//Final pressure(in kPa):
+pF=mf*RF*TF/VF
+//Change in entropy(in kJ/K):
+dS2=md*(Cp*log(TF/Td)-Ra*log(pF/(pd*10^2)))+mc*(Cpn*log(TF/Tc)-Rn*log(pF/(pc*10^2)))
+printf("\nEntropy change in case 2 = %f kJ/K",dS2) \ No newline at end of file