diff options
Diffstat (limited to '2870/CH4/EX4.4/Ex4_4.sce')
-rwxr-xr-x | 2870/CH4/EX4.4/Ex4_4.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/2870/CH4/EX4.4/Ex4_4.sce b/2870/CH4/EX4.4/Ex4_4.sce new file mode 100755 index 000000000..07406eca6 --- /dev/null +++ b/2870/CH4/EX4.4/Ex4_4.sce @@ -0,0 +1,27 @@ +clc;clear;
+//Example 4.4
+
+//given data
+V1=0.05;
+P1=200;
+k=150;
+A=0.25;
+
+//calculations
+
+//Part - a
+V2=2*V1;
+x2=(V2-V1)/A;//displacement of spring
+F=k*x2;//compression force
+P2=P1+F/A;//additional pressure is equivalent the compression of spring
+disp(P2,'the final pressure inside the cylinder in kPa');
+
+//Part - b
+//work done is equivalent to the area of the P-V curve of Fig 4-10
+W=(P1+P2)/2*(V2-V1);//area of trapezoid = 1/2 * sum of parallel sides * dist. b/w them
+disp(W,'the total work done by the gas in kJ');
+
+//Part - c
+x1=0;//intial compression of spring
+Wsp=0.5*k*(x2^2-x1^2);
+disp(Wsp,'the fraction of this work done against the spring to compress it in kJ')
|