summaryrefslogtreecommitdiff
path: root/779/CH7
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /779/CH7
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 '779/CH7')
-rwxr-xr-x779/CH7/EX7.1/7_1.sce6
-rwxr-xr-x779/CH7/EX7.10/7_10.sce14
-rwxr-xr-x779/CH7/EX7.11/7_11.sce8
-rwxr-xr-x779/CH7/EX7.12/7_12.sce8
-rwxr-xr-x779/CH7/EX7.13/7_13.sce13
-rwxr-xr-x779/CH7/EX7.2/7_2.sce18
-rwxr-xr-x779/CH7/EX7.3/7_3.sce20
-rwxr-xr-x779/CH7/EX7.5/7_5.sce8
-rwxr-xr-x779/CH7/EX7.8/7_8.sce40
-rwxr-xr-x779/CH7/EX7.9/7_9.sce44
10 files changed, 179 insertions, 0 deletions
diff --git a/779/CH7/EX7.1/7_1.sce b/779/CH7/EX7.1/7_1.sce
new file mode 100755
index 000000000..ffd4660f0
--- /dev/null
+++ b/779/CH7/EX7.1/7_1.sce
@@ -0,0 +1,6 @@
+T1 = 37+273;
+T2 = 35+273;
+m = 1 ;
+cv = 4.187;
+S = m*cv*log(T2/T1); // S = S2-S1
+disp("KJ/K",S,"Change in the entropy of the water is") \ No newline at end of file
diff --git a/779/CH7/EX7.10/7_10.sce b/779/CH7/EX7.10/7_10.sce
new file mode 100755
index 000000000..3e13e010d
--- /dev/null
+++ b/779/CH7/EX7.10/7_10.sce
@@ -0,0 +1,14 @@
+P1 = 0.5e06;
+V1 = 0.2; V2 = 0.05;
+n = 1.3
+P2 = P1*(V1/V2)^n;
+function y = H(p)
+ y = ((P1*V1^n)/p)^(1/n);
+endfunction
+H = integrate('H','p',P1,P2); // H = H2-H1
+U = H-(P2*V2-P1*V1);
+W12 = -U;
+disp("kJ",H/1000,"Change in enthalpy is")
+disp("kJ",U/1000,"Change in internal energy is")
+disp("kJ",0,"and",0,"The change in entropy and heat transfer are")
+disp("kJ",W12/1000,"The work transfer during the process is ") \ No newline at end of file
diff --git a/779/CH7/EX7.11/7_11.sce b/779/CH7/EX7.11/7_11.sce
new file mode 100755
index 000000000..73e72a972
--- /dev/null
+++ b/779/CH7/EX7.11/7_11.sce
@@ -0,0 +1,8 @@
+Pa = 130e03; Pb = 100e03;
+Ta = 50+273; Tb = 13+273;
+cp = 1.005;
+Ss = integrate('cp/T','T',Ta,Tb)-integrate('0.287/p','p',Pa,Pb);
+Ssy = 0;
+Su = Ss+Ssy;
+disp("kJ/Kg K",Su,"Change in the entropy of the universe is")
+disp("As the change in entropy of the universe in the process A-B is negative so the flow must be from B-A") \ No newline at end of file
diff --git a/779/CH7/EX7.12/7_12.sce b/779/CH7/EX7.12/7_12.sce
new file mode 100755
index 000000000..2a08d5b56
--- /dev/null
+++ b/779/CH7/EX7.12/7_12.sce
@@ -0,0 +1,8 @@
+T1 = 300; T2 = 330; T3 = 270;
+P1 = 4; P2 =1 ; P3 =1 ;
+cp = 1.0005; R = 0.287;
+S21 = cp*log(T2/T1)-R*log(P2/P1); // S21 = S2-S1
+S31 = cp*log(T3/T1)-R*log(P3/P1); // S31 = S3-S1
+Sgen = 1*S21 + 1*S31;
+disp("kW/K",Sgen,"The entropy generated during the process is")
+disp("As the entropy generated is positive so such device is possible") \ No newline at end of file
diff --git a/779/CH7/EX7.13/7_13.sce b/779/CH7/EX7.13/7_13.sce
new file mode 100755
index 000000000..2a3a02d14
--- /dev/null
+++ b/779/CH7/EX7.13/7_13.sce
@@ -0,0 +1,13 @@
+A = 5*7;
+k = 0.71;
+L = 0.32;
+Ti = 21+273;
+To = 6+273;
+Q = k*A*(Ti-To)/L ;
+disp("W",Q,"The rate of heat transfer through the wall is")
+Sgen_wall = Q/To - Q/Ti;
+disp("W/K",Sgen_wall,"The rate of entropy through the wall is")
+Tr = 27+273;
+Ts = 2+273;
+Sgen_total = Q/Ts-Q/Tr;
+disp("W/K",Sgen_total,"The rate of total entropy generation with this heat transfer process is")
diff --git a/779/CH7/EX7.2/7_2.sce b/779/CH7/EX7.2/7_2.sce
new file mode 100755
index 000000000..720d2e198
--- /dev/null
+++ b/779/CH7/EX7.2/7_2.sce
@@ -0,0 +1,18 @@
+// Part (a)
+T1 = 273;
+T2 = 373;
+m = 1 ;
+cv = 4.187;
+Ss = m*cv*log(T2/T1); // S = S2-S1
+Q = m*cv*(T2-T1);
+Sr = -(Q/T2);
+S = Ss+Sr;
+disp("kJ/K",S,"The entropy change of the universe is")
+// Part (b)
+T3 = 323;
+Sw = m*cv*(log(T3/T1)+log(T2/T3));
+Sr1 = -m*cv*(T3-T1)/T3;
+Sr2 = -m*cv*(T2-T3)/T2;
+Su = Sw+Sr1+Sr2;
+disp("kJ/K",Su,"The entropy change of the universe is")
+
diff --git a/779/CH7/EX7.3/7_3.sce b/779/CH7/EX7.3/7_3.sce
new file mode 100755
index 000000000..aba8d0f15
--- /dev/null
+++ b/779/CH7/EX7.3/7_3.sce
@@ -0,0 +1,20 @@
+// Part (a)
+m = 1;
+T1 = -5+273;
+T2 = 20+273;
+T0 = 0+273;
+cp = 2.093;
+cv = 4.187;
+lf = 333.3;
+Q = m*cp*(T0-T1)+1*333.3+m*cv*(T2-T0);
+Sa = -Q/T2;
+Ss1 = m*cp*log(T0/T1);
+Ss2 = lf/T0;
+Ss3 = m*cv*log(T2/T0);
+St = Ss1+Ss2+Ss3;
+Su = St+Sa;
+disp("kJ/K",Su,"The entropy change of the universe is")
+// Part (b)
+S = 1.5549; // S = S4-S1
+Wmin = T2*(S)-Q;
+disp("kJ",Wmin,"The minimum risk required is") \ No newline at end of file
diff --git a/779/CH7/EX7.5/7_5.sce b/779/CH7/EX7.5/7_5.sce
new file mode 100755
index 000000000..65ec0c54a
--- /dev/null
+++ b/779/CH7/EX7.5/7_5.sce
@@ -0,0 +1,8 @@
+Vo = 8.4;
+Vh = 14;
+n1 = Vo/22.4; n2 = Vh/22.4;
+R = 8.31;
+x1 = n1/(n1+n2);
+x2 = n2/(n1+n2);
+S = -R*(n1*log(x1)+n2*log(x2));
+disp("J/K",S,"Entropy change for the process is") \ No newline at end of file
diff --git a/779/CH7/EX7.8/7_8.sce b/779/CH7/EX7.8/7_8.sce
new file mode 100755
index 000000000..365bdfa31
--- /dev/null
+++ b/779/CH7/EX7.8/7_8.sce
@@ -0,0 +1,40 @@
+T = poly(0,'T'); // T = Tf
+Tf_ = 700-2*T; // Tf_ = Tf'
+// Bisection method to solve for the polynomial
+function [x] = Temperature(a,b,f)
+ N = 100;
+ eps = 1e-5;
+ if((f(a)*f(b))>0) then
+ error('no root possible f(a)*f(b)>0');
+ abort;
+ end;
+ if(abs(f(a))<eps) then
+ error('solution at a');
+ abort;
+ end
+ if(abs(f(b))<eps) then
+ error('solution at b');
+ abort;
+ end
+ while(N>0)
+ c = (a+b)/2
+ if(abs(f(c))<eps) then
+ x = c ;
+ x;
+ return;
+ end;
+ if((f(a)*f(c))<0 ) then
+ b = c ;
+ else
+ a = c ;
+ end
+ N = N-1;
+ end
+ error('no convergence');
+ abort;
+endfunction
+deff('[y]=p(T)',['y = 2*T^3-700*T^2+9000000 '])
+T = Temperature(100,200,p);
+
+Tf_ = horner(Tf_,T);
+disp("K",Tf_,"The final temperature of the body C is") \ No newline at end of file
diff --git a/779/CH7/EX7.9/7_9.sce b/779/CH7/EX7.9/7_9.sce
new file mode 100755
index 000000000..40b8e122f
--- /dev/null
+++ b/779/CH7/EX7.9/7_9.sce
@@ -0,0 +1,44 @@
+T1 = 200;
+T2 = 100;
+A = 0.042;
+Q1 = integrate('A*T^2','T',T1,T2);
+S = integrate('A*T^2/T','T',T1,T2);
+W = poly(0,'W');
+Z = (-Q1-W)/T2 + S; // Polynomial to be solved for W
+// Bisection method to solve for the Work
+function [x] = Work(a,b,f)
+ N = 100;
+ eps = 1e-5;
+ if((f(a)*f(b))>0) then
+ error('no root possible f(a)*f(b)>0');
+ abort;
+ end;
+ if(abs(f(a))<eps) then
+ error('solution at a');
+ abort;
+ end
+ if(abs(f(b))<eps) then
+ error('solution at b');
+ abort;
+ end
+ while(N>0)
+ c = (a+b)/2
+ if(abs(f(c))<eps) then
+ x = c ;
+ x;
+ return;
+ end;
+ if((f(a)*f(c))<0 ) then
+ b = c ;
+ else
+ a = c ;
+ end
+ N = N-1;
+ end
+ error('no convergence');
+ abort;
+endfunction
+deff('[y]=p(W)',['y = 350-0.01*W '])
+W = Work(34000,36000,p);
+
+disp("kJ",W/1000,"The maximum work that can be recovered is") \ No newline at end of file