diff options
Diffstat (limited to '647/CH2')
-rwxr-xr-x | 647/CH2/EX2.1/Example2_1.sce | 22 | ||||
-rwxr-xr-x | 647/CH2/EX2.10/Example2_10.sce | 24 | ||||
-rwxr-xr-x | 647/CH2/EX2.11/Example2_11.sce | 37 | ||||
-rwxr-xr-x | 647/CH2/EX2.12/Example2_12.sce | 44 | ||||
-rwxr-xr-x | 647/CH2/EX2.13/Example2_13.sce | 56 | ||||
-rwxr-xr-x | 647/CH2/EX2.14/Example2_14.sce | 84 | ||||
-rwxr-xr-x | 647/CH2/EX2.15/Example2_15.sce | 13 | ||||
-rwxr-xr-x | 647/CH2/EX2.16/Example2_16.sce | 66 | ||||
-rwxr-xr-x | 647/CH2/EX2.17/Example2_17.sce | 26 | ||||
-rwxr-xr-x | 647/CH2/EX2.18/Example2_18.sce | 44 | ||||
-rwxr-xr-x | 647/CH2/EX2.19/Example2_19.sce | 34 | ||||
-rwxr-xr-x | 647/CH2/EX2.2/Example2_2.sce | 27 | ||||
-rwxr-xr-x | 647/CH2/EX2.3/Example2_3.sce | 23 | ||||
-rwxr-xr-x | 647/CH2/EX2.4/Example2_4.sce | 30 | ||||
-rwxr-xr-x | 647/CH2/EX2.5/Example2_5.sce | 38 | ||||
-rwxr-xr-x | 647/CH2/EX2.6/Example2_6.sce | 26 | ||||
-rwxr-xr-x | 647/CH2/EX2.7/Example2_7.sce | 31 | ||||
-rwxr-xr-x | 647/CH2/EX2.8/Example2_8.sce | 21 | ||||
-rwxr-xr-x | 647/CH2/EX2.9/Example2_9.sce | 26 |
19 files changed, 672 insertions, 0 deletions
diff --git a/647/CH2/EX2.1/Example2_1.sce b/647/CH2/EX2.1/Example2_1.sce new file mode 100755 index 000000000..aaff9dbb9 --- /dev/null +++ b/647/CH2/EX2.1/Example2_1.sce @@ -0,0 +1,22 @@ +clear;
+clc;
+
+// Example: 2.1
+// Page: 39
+
+printf("Example: 2.1 - Page: 39\n\n");
+
+// Solution
+
+//*****Data*****//
+deff('[E] = f1(T)','E = 50 + 25*T + 0.05*T^2');// [J]
+deff('[Q] = f2(T)','Q = 4000 + 10*T');// [J]
+Ti = 400;// [K]
+Tf = 800;// [K]
+//*************//
+
+// From the first law of thermodynamics:
+// W = Q - delta_E
+// W = f2 -f1
+W = integrate('(4000 + 10*T) - (50 + (25*T) + (0.05*T^2))','T',Ti,Tf);
+printf("The work done during the process is %.2f kJ\n",W/1000);
\ No newline at end of file diff --git a/647/CH2/EX2.10/Example2_10.sce b/647/CH2/EX2.10/Example2_10.sce new file mode 100755 index 000000000..c533cb897 --- /dev/null +++ b/647/CH2/EX2.10/Example2_10.sce @@ -0,0 +1,24 @@ +clear;
+clc;
+
+// Example: 2.10
+// Page: 53
+
+printf("Example: 2.10 - Page: 53\n\n");
+
+// Solution
+
+//*****Data*****//
+T1 = 300;// [K]
+V1 = 30;// [L]
+V2 = 3;// [L]
+Cv = 5;// [cal/mol]
+R = 2;// [cal/K mol]
+//*************//
+
+Cp = Cv + R;// [cal/mol]
+gama = Cp/Cv;
+// The relation between temperature and volume of ideal gas undergoing adiabatic change is given by:
+// (T2/T1) = (V1/V2)^(gama - 1)
+T2 = T1 * (V1/V2)^(gama - 1);// [K]
+printf("The final temperature is %.1f K\n",T2);
\ No newline at end of file diff --git a/647/CH2/EX2.11/Example2_11.sce b/647/CH2/EX2.11/Example2_11.sce new file mode 100755 index 000000000..b86aef6f4 --- /dev/null +++ b/647/CH2/EX2.11/Example2_11.sce @@ -0,0 +1,37 @@ +clear;
+clc;
+
+// Example: 2.11
+// Page: 53
+
+printf("Example: 2.11 - Page: 53\n\n");
+
+// Solution
+
+//*****Data*****//
+n = 2;// [mol]
+T1 = 293;// [K]
+P1 = 15;//[atm]
+P2 = 5;// [atm]
+Cp = 8.58;// [cal/degree mol]
+//**************//
+
+R = 2;// [cal/degree mol]
+Cv = Cp - R;// [cal /degree mol]
+gama = Cp/Cv;
+R = 0.082;// [L atm/degree K]
+// Since the gas is ideal:
+V1 = n*R*T1/P1;// [L]
+// Under adiabatic conditions:
+// (V2/V1) = (P1/P2)^(1/gama)
+V2 = V1*(P1/P2)^(1/gama);// [L]
+printf("The final volme is %.2f L\n",V2);
+
+// To determine the final temperature:
+// (T2/T1) = (V1/V2)^(gama - 1);
+T2 = T1*(V1/V2)^(gama - 1);// [K]
+printf("The final temperature is %.2f K\n",T2);
+
+// Adiabatic Work done can be calculated as:
+W = (P1*V1 - P2*V2)/(gama - 1);
+printf("Adiabatic work done is %.2f L-atm\n",W);
\ No newline at end of file diff --git a/647/CH2/EX2.12/Example2_12.sce b/647/CH2/EX2.12/Example2_12.sce new file mode 100755 index 000000000..7b3e2ee39 --- /dev/null +++ b/647/CH2/EX2.12/Example2_12.sce @@ -0,0 +1,44 @@ +clear;
+clc;
+
+// Example: 2.12
+// Page: 57
+
+printf("Example: 2.12 - Page: 57\n\n");
+
+// Solution
+
+//*****Data*****//
+m = 1;// [kg]
+P1 = 8;// [atm]
+T1 = 50 + 273;// [K]
+// V1 = V;// [L]
+// V2 = 5V;// [L]
+V1_by_V2 = 1/5;
+gama = 1.4;
+R = 0.082;// [L-atm]
+//***************//
+
+// Adiabatic process:
+printf("Adiabatic Process \n");
+P2 = P1*V1_by_V2^gama;// [atm]
+printf("Final Pressure is %.2f atm\n",P2);
+T2 = T1*V1_by_V2^(gama - 1);// [K]
+printf("Final Temperature is %f K\n",T2);
+Wad = R*(T2 - T1)/(1 - gama);// [L-atm]
+printf("Adiabatic Work done is %.3f L-atm\n",Wad);
+printf("\n")
+
+// Isothermal Process:
+printf("Isothermal Process\n")
+// In an isothermal Process, the temperature remans constant:
+T2 = T1;// [K]
+printf("Final temperature is %d K\n",T2);
+// From the ideal gas:
+// (P2*V2/T2) = (P1*V1/T1)
+// Since T2 = T1
+// P2*V2 = P1*V1
+P2 = P1*V1_by_V2;// [atm]
+printf("Final pressure is %.1f atm\n",P2);
+W = R*T1*log(1/V1_by_V2);// [L-atm]
+printf("Work done during the isothermal process is %.2f L-atm\n",W);
\ No newline at end of file diff --git a/647/CH2/EX2.13/Example2_13.sce b/647/CH2/EX2.13/Example2_13.sce new file mode 100755 index 000000000..9ff7a7e20 --- /dev/null +++ b/647/CH2/EX2.13/Example2_13.sce @@ -0,0 +1,56 @@ +clear;
+clc;
+
+// Example: 2.13
+// Page: 58
+
+printf("Example: 2.13 - Page: 58\n\n");
+
+// Solution
+
+//*****Data*****//
+m = 5;// [kg]
+M = 29;// [kg/mol]
+T1 = 37 + 273;// [K]
+P1 = 101.33;// [kPa]
+T2 = 237 + 273;// [K]
+Cp = 29.1;// [J/mol K]
+Cv = 20.78;// [J/mol K]
+R = 8.314;// [J/K mol]
+//*****************//
+
+n = m/M;
+// From ideal gas equation:
+V1 = n*R*T1/P1;// [cubic m]
+
+// Isochoric Process:
+printf("Isochoric Process\n");
+// Volume = constant
+V2 = V1;// [cubic m]
+deltaU = n*Cv*(T2 - T1);// [kJ]
+// Since Volume is constant
+W = 0;
+Q = deltaU + W;// [kJ]
+// deltaH = deltaU + P*deltaV
+// deltaH = deltaU + n*R*deltaT
+deltaH = deltaU + n*R*(T2 - T1);// [kJ]
+printf("Change in Internal Energy is %.2f kJ\n",deltaU);
+printf("Heat Supplied is %.2f kJ\n",Q);
+printf("Work done is %d kJ\n",W);
+printf("Change in Enthalpy is %.2f kJ\n",deltaH);
+printf("\n");
+
+// Isobaric Process
+printf("Isobaric Process\n");
+// Since Pressure is constant.
+P2 = P1;// [kPa]
+deltaH = n*Cp*(T2 - T1);// [kJ]
+Qp = deltaH;// [kJ]
+// deltaU = deltaH - P*deltaV
+// From ideal gas equation:
+deltaU = deltaH - n*R*(T2 - T1);// [kJ]
+W = Qp - deltaU;// [kJ]
+printf("Change in Internal Energy is %.2f kJ\n",deltaU);
+printf("Heat Supplied is %.2f kJ\n",Qp);
+printf("Work done is %.2f kJ\n",W);
+printf("Change in Enthalpy is %.2f kJ\n",deltaH);
\ No newline at end of file diff --git a/647/CH2/EX2.14/Example2_14.sce b/647/CH2/EX2.14/Example2_14.sce new file mode 100755 index 000000000..e41d92d5c --- /dev/null +++ b/647/CH2/EX2.14/Example2_14.sce @@ -0,0 +1,84 @@ +clear;
+clc;
+
+// Example: 2.14
+// Page: 60
+
+printf("Example: 2.14 - Page: 60\n\n");
+
+// Solution
+
+//*****Data*****//
+n = 1;// [mol]
+T1 = 610;// [K]
+P1 = 10^6;// [N/square m]
+T2 = 310;// [K]
+P2 = 10^5;// [N/square m]
+Cv = 20.78;// [J/mol K]
+//*************//
+
+R = 8.314;// [J/K mol]
+
+// Step 1: Isothermal Expansion Of Ideal Gas:
+printf("Step 1: Isothermal Expansion Of Ideal Gas\n")
+T1 = 610;// [K]
+P1 = 10^6;// [N/square m]
+P2 = 10^5;// [N/square m]
+// Work done:
+W1 = 2.303*n*R*T1*log10(P1/P2);// [J/mol]
+// For isothermal expansion:
+delta_E1 = 0;// [J/mol]
+// From first law of thermodynamics:
+Q1 = delta_E1 + W1;// [J/mol]
+printf("delta_E for Step 1 is %d J/mol\n",delta_E1);
+printf("Q for step 1 is %.2f J/mol\n",Q1);
+printf("W for step 1 is %.2f J/mol\n",W1);
+printf("\n");
+
+// Step 2: Adiabatic Expansion of ideal gas:
+printf("Step 2: Adiabatic Expansion of ideal gas\n")
+Q2 = 0;// [J/mol]
+delta_E2 = Cv*(T2 - T1);// [J/mol]
+// From first law of thermodynamics:
+W2 = Q2 - delta_E2;// [J/mol]
+printf("delta_E for Step 2 is %d J/mol\n",delta_E2);
+printf("Q for step 2 is %.2f J/mol\n",Q2);
+printf("W for step 2 is %.2f J/mol\n",W2);
+printf("\n");
+
+// Step 3: Isothermal Compression Of Ideal Gas:
+printf("Step 3: Isothermal Compression Of Ideal Gas\n")
+T2 = 310;// [K]
+P1 = 10^5;// [N/square m]
+P2 = 10^6;// [N/square m]
+// Work done:
+W3 = 2.303*n*R*T2*log10(P1/P2);// [J/mol]
+// For isothermal expansion:
+delta_E3 = 0;// [J/mol]
+// From first law of thermodynamics:
+Q3 = delta_E3 + W3;// [J/mol]
+printf("delta_E for Step 3 is %d J/mol\n",delta_E3);
+printf("Q for step 3 is %.2f J/mol\n",Q3);
+printf("W for step 3 is %.2f J/mol\n",W3);
+printf("\n");
+
+// Step 4: Adiabatic Compression of ideal gas:
+printf("Step 4: Adiabatic Compression of ideal gas\n")
+T1 = 310;// [K]
+T2 = 610;// [K]
+Q4 = 0;// [J/mol]
+delta_E4 = Cv*(T2 - T1);// [J/mol]
+// From first law of thermodynamics:
+W4 = Q4 - delta_E4;// [J/mol]
+printf("delta_E for Step 4 is %d J/mol\n",delta_E4);
+printf("Q for step 4 is %.2f J/mol\n",Q4);
+printf("W for step 4 is %.2f J/mol\n",W4);
+printf("\n");
+
+// Net work done for the complete cycle:
+W = W1 + W2 + W3 + W4;// [J/mol]
+printf("Net Work done for the complete cycle is %.2f J/mol\n",W);
+
+// The efficiency of the cycle is given by:
+eta = 1- T1/T2;
+printf("The efficiency of the cycle is %.2f\n",eta);
\ No newline at end of file diff --git a/647/CH2/EX2.15/Example2_15.sce b/647/CH2/EX2.15/Example2_15.sce new file mode 100755 index 000000000..561a573ac --- /dev/null +++ b/647/CH2/EX2.15/Example2_15.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+
+// Example: 2.15
+// Page: 61
+
+printf("Example: 2.15 - Page: 61\n\n");
+
+// Mathematics is involved in proving but just that no numerical computations are involved.
+// For prove refer to this example 2.15 on page number 61 of the book.
+
+printf(" Mathematics is involved in proving but just that no numerical computations are involved.\n\n");
+printf(" For prove refer to this example 2.15 on page 61 of the book.")
\ No newline at end of file diff --git a/647/CH2/EX2.16/Example2_16.sce b/647/CH2/EX2.16/Example2_16.sce new file mode 100755 index 000000000..55e48cfd5 --- /dev/null +++ b/647/CH2/EX2.16/Example2_16.sce @@ -0,0 +1,66 @@ +clear;
+clc;
+
+// Example: 2.16
+// Page: 62
+
+printf("Example: 2.16 - Page: 62\n\n");
+
+// Solution
+
+//*****Data*****//
+P1 = 1;// [bar]
+T1 = 300;//[K]
+V1 = 24.92;// [cubic m/kmol]
+P2 = 10;// [bar]
+T2 = 300;// [K]
+Cp = 29.10;// [kJ/kmol K]
+Cv = 20.78;// [kJ/kmol K]
+R = 8.314;// [J/mol K]
+//**************//
+
+// Basis: 1 kmol of ideal gas:
+n = 1;
+V2 = P1*V1/P2;// [cubic m]
+
+// First Process:
+printf("First Process\n");
+// In the first step of the first process, the cooling of ga takes place at constant pressure.
+// Here the volume is reduced appreciably and consequently the temperature decreases.
+T_prime = T1*V2/V1;// [K]
+// Heat Requirement:
+Q1 = n*Cp*(T_prime - T1);// [kJ]
+deltaH1 = Q1;// [kJ]
+deltaU1 = deltaH1 - P1*(V2 - V1);// [kJ]
+// In the second step, the gas is heated at constant Volume:
+// V = constant
+Q2 = n*Cv*(T2 - T_prime);// [kJ]
+deltaU2 = Q2;// [kJ]
+deltaH2 = n*R*(T2 - T_prime);// [kJ]
+deltaU = deltaU1 + deltaU2;// [kJ]
+deltaH = deltaH1 + deltaH2;// [kJ]
+Q = Q1 + Q2;// [kJ]
+printf("Change in Internal Energy is %.2f kJ\n",deltaU);
+printf("Change in Enthalpy is %.2f kJ\n",deltaH);
+printf("Heat Requirement is %.2f kJ\n",Q);
+printf("\n");
+
+// Second Process:
+printf("Second Process\n");
+// In the first step of the second process, the gas is heated at constant volume.
+T_prime = T1*P2/P1;// [K]
+// Heat Requirement:
+Q1 = n*Cv*(T_prime - T1);// [kJ]
+deltaU1 = Q1;// [kJ]
+deltaH1 = n*R*(T_prime - T1);// [kJ]
+// In the second step, the gas is cooled at constant presure:
+// V = constant
+Q2 = n*Cp*(T2 - T_prime);// [kJ]
+deltaH2 = Q2;// [kJ]
+deltaU2 = deltaH2 - P1*(V2 - V1);// [kJ]
+deltaU = deltaU1 + deltaU2;// [kJ]
+deltaH = deltaH1 + deltaH2;// [kJ]
+Q = Q1 + Q2;// [kJ]
+printf("Change in Internal Energy is %.2f kJ\n",deltaU);
+printf("Change in Enthalpy is %.2f kJ\n",deltaH);
+printf("Heat Requirement is %.2f kJ\n",Q);
\ No newline at end of file diff --git a/647/CH2/EX2.17/Example2_17.sce b/647/CH2/EX2.17/Example2_17.sce new file mode 100755 index 000000000..21e84bbc0 --- /dev/null +++ b/647/CH2/EX2.17/Example2_17.sce @@ -0,0 +1,26 @@ +clear;
+clc;
+
+// Example: 2.17
+// Page: 62
+
+printf("Example: 2.17 - Page: 64\n\n");
+
+// Solution
+
+//*****Data*****//
+D1 = 1;// [m]
+P1 = 120;// [kPa]
+P2 = 360;// [kPa]
+// P = k*D^3
+//***************//
+
+k = P1/D1^3;// [proportionality constant]
+D2 = (P2/k)^(1/3);// [m]
+// Work done by the gas inside the balloon can be estimated as:
+// W = integral(P*dV);
+// W = integral((k*D^3)*d((4/3)*%pi*r^3);
+// W = (%pi*k/6)*integral((D^3)*d(D^3));
+// W = (%pi*k/12)*(D2^6 - D1^6);
+W = (%pi*k/12)*(D2^6 - D1^6);// [kJ]
+printf("Workdone by the gas is %.2f kJ\n",W);
\ No newline at end of file diff --git a/647/CH2/EX2.18/Example2_18.sce b/647/CH2/EX2.18/Example2_18.sce new file mode 100755 index 000000000..38c14b6af --- /dev/null +++ b/647/CH2/EX2.18/Example2_18.sce @@ -0,0 +1,44 @@ +clear;
+clc;
+
+// Example: 2.18
+// Page: 65
+
+printf("Example: 2.18 - Page: 65\n\n");
+
+// Solution
+
+//*****Data*****//
+P1 = 10*100;// [kPa]
+T1 = 250;// [K]
+P2 = 1*100;// [kPa]
+T2 = 300;// [K]
+R = 8.314;// [J/mol K]
+Cv = 20.78;// [kJ/kmol K]
+Cp = 29.10;// [kJ/kmol K]
+//**********//
+
+V1 = R*T1/P1;// [cubic m]
+V2 = R*T2/P2;// [cubic m]
+
+// Calculation based on First Process:
+// In this constant-volume process, the initial pressure of 10 bar is reduced to a final pressure of 1 bar and consequently the temperature decreases.
+T_prime = P2*V1/R;// [K]
+deltaU1 = Cv*(T_prime - T1);// [kJ]
+deltaH1 = deltaU1 + V1*(P2 -P1);// [kJ]
+// Since V = constant
+W1 = 0;//[kJ]
+// By first law of thermodynamics:
+Q = W1 + deltaU1;// [kJ]
+
+// Calculation based on second process:
+// In this process, the gas is heated at constant pressure to the final temperature of T2.
+deltaH2 = Cp*(T2 - T_prime);// [kJ]
+deltaU2 = deltaH2 - P2*(V2 - V1);// [kJ]
+Q = deltaH2;// [kJ]
+W2 = Q - deltaU2;// [kJ]
+
+deltaU = deltaU1 + deltaU2;// [kJ]
+deltaH = deltaH1 + deltaH2;// [kJ]
+printf("Change in Inernal Enrgy is %.2f kJ\n",deltaU);
+printf("Change in Enthalpy is %.2f kJ\n",deltaH);
\ No newline at end of file diff --git a/647/CH2/EX2.19/Example2_19.sce b/647/CH2/EX2.19/Example2_19.sce new file mode 100755 index 000000000..188314831 --- /dev/null +++ b/647/CH2/EX2.19/Example2_19.sce @@ -0,0 +1,34 @@ +clear;
+clc;
+
+// Example: 2.19
+// Page: 69
+
+printf("Example: 2.19 - Page: 69\n\n");
+
+// Solution
+
+//*****Data*****//
+T1 = 273;// [K]
+T2 = 273 + 67;// [K]
+m_dot = 20000;// [kg/h]
+Ws = -1.5;// [hp]
+Q = -38000;// [kJ/min]
+Z = 20;// [m]
+Cp = 4.2;// [kJ/kg K]
+g = 9.81;// [m/second square]
+//***************//
+
+Q = Q*60/m_dot;// [kJ/kg]
+Ws = Ws*0.7457*3600/m_dot;// [kJ/kg]
+PE = g*Z*10^(-3);// [kJ/kg]
+// KE is assumed to be negligible.
+// For Steady Flow process: dE/dt = 0
+// From Eqn. 2.47:
+deltaH = Q - Ws - PE;// [kJ/kg]
+H1 = Cp*(T2 - T1);// [kJ/kg]
+H2 = H1 + deltaH;// [kJ/kg]
+
+// Now, the temperature of the tank can be determined as:
+T = (H2/Cp) + T1;// [K]
+printf("Tempertaure of water in the second tank is %.2f K\n",T);
\ No newline at end of file diff --git a/647/CH2/EX2.2/Example2_2.sce b/647/CH2/EX2.2/Example2_2.sce new file mode 100755 index 000000000..2304e0ae2 --- /dev/null +++ b/647/CH2/EX2.2/Example2_2.sce @@ -0,0 +1,27 @@ +clear;
+clc;
+
+// Example: 2.2
+// Page: 40
+
+printf("Example: 2.2 - Page: 40\n\n");
+
+// Solution
+
+//*****Data*****//
+U1 = 1000;// [kJ]
+Q = -600; // [kJ]
+W = -100;// [kJ]
+//************//
+
+// The system is considered to be a closed system. No mass transfer takes place across the system. The tank is rigid.
+// So, the kinetic and the potential energies is zero.
+// Therefore:
+// delta_E = delta_U + delta_PE + delta_KE
+// delta_E = delta_U
+// From the first law of thermodynamics:
+// Q = delta_U + W
+// delta_U = Q - W
+// U2 - U1 = Q - W
+U2 = U1 + Q - W;// [kJ]
+printf("The final internal energy of the fluid is %d kJ\n",U2);
\ No newline at end of file diff --git a/647/CH2/EX2.3/Example2_3.sce b/647/CH2/EX2.3/Example2_3.sce new file mode 100755 index 000000000..61495e31d --- /dev/null +++ b/647/CH2/EX2.3/Example2_3.sce @@ -0,0 +1,23 @@ +clear;
+clc;
+
+// Example: 2.3
+// Page: 40
+
+printf("Example: 2.3 - Page: 40\n\n");
+
+// Solution
+
+//*****Data*****//
+W = -3;// [hp]
+Q = -4000;// [kJ/h]
+//**************//
+
+// The work done by the stirrer on the system is given by
+W = W*745.7;// [W]
+// The amount of heat transferred to the suroundings can be expressed in terms of J/s:
+Q = Q*1000/3600;// [J/s]
+// From the first law of thermodynamics:
+// Q = delta_U - W
+delta_U = Q - W;// [J/s]
+printf("The change in the internal energy of the system would be %.2f J/s\n",delta_U);
\ No newline at end of file diff --git a/647/CH2/EX2.4/Example2_4.sce b/647/CH2/EX2.4/Example2_4.sce new file mode 100755 index 000000000..d72b423e0 --- /dev/null +++ b/647/CH2/EX2.4/Example2_4.sce @@ -0,0 +1,30 @@ +clear;
+clc;
+
+// Example: 2.4
+// Page: 41
+
+printf("Example: 2.4 - Page: 41\n\n");
+
+// Solution
+
+//*****Data*****//
+// From Fig. 2.4 (Page: 41)
+// For process A-1-B:
+Q1 = 60;// [kJ]
+W1 = 35;// [kJ]
+// For process A-2-B:
+W2 = 50;// [kJ]
+// For process B-3-A:
+W3 = -70;// [kJ]
+//************//
+
+// For process A-1-B:
+// The internal energy of the process A-1-B can be estimated as:
+// Q = delta_U + W
+delta_U = Q1 - W1;// [kJ]
+// For process A-2-B:
+Q2 = delta_U + W2;// [kJ]
+// For process B-3-A:
+Q3 = -delta_U + W3;// [kJ]
+printf("The amount of heat transferred from the system to the surroundings during process B-3-A is %d kJ\n",-Q3);
\ No newline at end of file diff --git a/647/CH2/EX2.5/Example2_5.sce b/647/CH2/EX2.5/Example2_5.sce new file mode 100755 index 000000000..727412cd3 --- /dev/null +++ b/647/CH2/EX2.5/Example2_5.sce @@ -0,0 +1,38 @@ +clear;
+clc;
+
+// Example: 2.5
+// Page: 41
+
+printf("Example: 2.5 - Page: 41\n\n");
+
+// Solution
+
+//*****Data*****//
+// For constant pressure process 1-2:
+W12 = -100;// [kJ]
+Q12 = -50;// [kJ]
+// For constant volume process 2-3:
+Q23 = 80;// [kJ]
+// process 3-1: Adiabatic process
+//**************//
+
+// The internal energy of process 1-2 can be calculated as:
+delta_U12 = Q12 - W12;// [kJ]
+printf("Change in Internal Energy for process 1-2 is %d kJ\n",delta_U12);
+// For the process 2-3:
+// As the process is constant volume process:
+W23 = 0;// [kJ]
+delta_U23 = Q23 - W23;// [kJ]
+printf("Change in Internal Energy for process 2-3 is %d kJ\n",delta_U23);
+
+// For process 3-1:
+// Since the process is adiabatic, ther is no heat transfer between the system and the surrounding.
+Q31 = 0;// [kJ]
+// For a cyclic process, the internal energy change is zero.
+// delta_U12 + delta_U23 + delta_U31 = 0
+delta_U31 = -(delta_U12 + delta_U23);// [kJ]
+// Putting the value of delta_U31:
+W31 = Q31 - delta_U31;// [kJ]
+printf("Change in Internal Energy for process 3-1 is %d kJ\n",delta_U31);
+printf("The work done during the adiabatic process is %d kJ\n",W31);
\ No newline at end of file diff --git a/647/CH2/EX2.6/Example2_6.sce b/647/CH2/EX2.6/Example2_6.sce new file mode 100755 index 000000000..2b39429ad --- /dev/null +++ b/647/CH2/EX2.6/Example2_6.sce @@ -0,0 +1,26 @@ +clear;
+clc;
+
+// Example: 2.6
+// Page: 44
+
+printf("Example: 2.6 - Page: 44\n\n");
+
+// Solution
+
+//*****Data*****//
+m = 1;// [kg]
+Temp = 373;// [K]
+P = 101325;// [N/square m]
+V_Liquid = 1.04*10^(-3);// [cubic m/kg]
+V_Vapour = 1.673;// [cubic m/kg]
+Q = 2257;// [kJ]
+//**************//
+
+// Work done due to expansion:
+Wexpansion = P*(V_Vapour - V_Liquid);// [N-m]
+deltaU = Q - Wexpansion/1000;// [kJ]
+deltaH = deltaU + Wexpansion/1000;// [kJ]
+
+printf("Change in Internal Energy is %.2f kJ\n",deltaU);
+printf("Change in enthalpy is %d kJ\n",deltaH);
\ No newline at end of file diff --git a/647/CH2/EX2.7/Example2_7.sce b/647/CH2/EX2.7/Example2_7.sce new file mode 100755 index 000000000..003950ff8 --- /dev/null +++ b/647/CH2/EX2.7/Example2_7.sce @@ -0,0 +1,31 @@ +clear;
+clc;
+
+// Example: 2.7
+// Page: 45
+
+printf("Example: 2.7 - Page: 45\n\n");
+
+// Solution
+
+//*****Data*****//
+n = 1;// [mol]
+Temp = 353;// [K]
+P = 1;// [atm]
+Hv = 380;// [J/g]
+Mwt = 78;// [g/mol]
+R = 8.314;// [J/K mol]
+//*************//
+
+Q = Hv*Mwt;// [J/mol]
+// Since Vv >> Vl:
+// P*(Vv - Vl) = P*Vv =n*R*Temp
+Wexpansion = n*R*Temp;// [J]
+// By first law of thermodynamics:
+deltaU = Q - Wexpansion;// [J]
+deltaH = deltaU + Wexpansion;// [J]
+
+printf("Change in Internal Energy is %.2f J\n",deltaU);
+printf("Change in Enthalpy is %d J\n",deltaH);
+printf("Amount of Heat supplied is %d J\n",Q);
+printf("Work done is %.2f J\n",Wexpansion);
\ No newline at end of file diff --git a/647/CH2/EX2.8/Example2_8.sce b/647/CH2/EX2.8/Example2_8.sce new file mode 100755 index 000000000..ba049a1df --- /dev/null +++ b/647/CH2/EX2.8/Example2_8.sce @@ -0,0 +1,21 @@ +clear;
+clc;
+
+// Example: 2.8
+// Page: 45
+
+printf("Example: 2.8 - Page: 45\n\n");
+
+// Solution
+
+//*****Data*****//
+deltaU = 200;// [cal]
+Vinit = 10;// [L]
+Vfinal = 50;// [L]
+deff('[P] = f(V)','P = 10/V');
+//**************//
+
+// By definition of enthalpy:
+// deltaQ = deltaU + PdV
+deltaQ = deltaU + integrate('f(V)','V',Vinit,Vfinal)*24.2;// [cal]
+printf("Change in enthalpy is %f cal\n",deltaQ);
\ No newline at end of file diff --git a/647/CH2/EX2.9/Example2_9.sce b/647/CH2/EX2.9/Example2_9.sce new file mode 100755 index 000000000..83d22b566 --- /dev/null +++ b/647/CH2/EX2.9/Example2_9.sce @@ -0,0 +1,26 @@ +clear;
+clc;
+
+// Example: 2.9
+// Page: 48
+
+printf("Example: 2.9 - Page: 48\n\n");
+
+// Solution
+
+//*****Data*****//
+m_water = 1;// [kg]
+Cv = 4.18;// [kJ/kg K]
+m_stirrer = 40;// [kg]
+h = 25;// [m]
+g = 9.81;// [m/square s]
+//***************//
+
+// Since the system is thermally insulated:
+// Q = 0
+// From the first law of thermodynamics:
+// dQ = dE + dW
+// As E = U + Ek +Ep and Ek = Ep = 0
+// dQ = dU + dW
+dT = g*h/Cv;// [K]
+printf("Rise in Temperature is %.2f K\n",dT);
\ No newline at end of file |