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.1 | |
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.1')
-rwxr-xr-x | 647/CH2/EX2.1/Example2_1.sce | 22 |
1 files changed, 22 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 |