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 --- 647/CH2/EX2.17/Example2_17.sce | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 647/CH2/EX2.17/Example2_17.sce (limited to '647/CH2/EX2.17') 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 -- cgit