From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 779/CH7/EX7.1/7_1.sce | 6 ++++++ 779/CH7/EX7.10/7_10.sce | 14 ++++++++++++++ 779/CH7/EX7.11/7_11.sce | 8 ++++++++ 779/CH7/EX7.12/7_12.sce | 8 ++++++++ 779/CH7/EX7.13/7_13.sce | 13 +++++++++++++ 779/CH7/EX7.2/7_2.sce | 18 ++++++++++++++++++ 779/CH7/EX7.3/7_3.sce | 20 ++++++++++++++++++++ 779/CH7/EX7.5/7_5.sce | 8 ++++++++ 779/CH7/EX7.8/7_8.sce | 40 ++++++++++++++++++++++++++++++++++++++++ 779/CH7/EX7.9/7_9.sce | 44 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 179 insertions(+) create mode 100755 779/CH7/EX7.1/7_1.sce create mode 100755 779/CH7/EX7.10/7_10.sce create mode 100755 779/CH7/EX7.11/7_11.sce create mode 100755 779/CH7/EX7.12/7_12.sce create mode 100755 779/CH7/EX7.13/7_13.sce create mode 100755 779/CH7/EX7.2/7_2.sce create mode 100755 779/CH7/EX7.3/7_3.sce create mode 100755 779/CH7/EX7.5/7_5.sce create mode 100755 779/CH7/EX7.8/7_8.sce create mode 100755 779/CH7/EX7.9/7_9.sce (limited to '779/CH7') 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))0) + c = (a+b)/2 + if(abs(f(c))0) then + error('no root possible f(a)*f(b)>0'); + abort; + end; + if(abs(f(a))0) + c = (a+b)/2 + if(abs(f(c))