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.17/Example2_17.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.17/Example2_17.sce')
-rwxr-xr-x | 647/CH2/EX2.17/Example2_17.sce | 26 |
1 files changed, 26 insertions, 0 deletions
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 |