diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /647/CH2/EX2.16/Example2_16.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '647/CH2/EX2.16/Example2_16.sce')
-rwxr-xr-x | 647/CH2/EX2.16/Example2_16.sce | 66 |
1 files changed, 66 insertions, 0 deletions
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 |