summaryrefslogtreecommitdiff
path: root/3843/CH3/EX3.3/Ex3_7.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3843/CH3/EX3.3/Ex3_7.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3843/CH3/EX3.3/Ex3_7.sce')
-rw-r--r--3843/CH3/EX3.3/Ex3_7.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3843/CH3/EX3.3/Ex3_7.sce b/3843/CH3/EX3.3/Ex3_7.sce
new file mode 100644
index 000000000..db644a72e
--- /dev/null
+++ b/3843/CH3/EX3.3/Ex3_7.sce
@@ -0,0 +1,20 @@
+// Example 3_7
+clc;funcprot(0);
+// Given data
+d=50*10^-3;// The distance in m
+K=2500;// N/m
+m=50;// kg
+d_p=10/100;// m
+P_atm=100;// The atmospheric pressure in kPa
+g=9.81;// m/s^2
+
+// Calculation
+W=m*g;// The weight in N
+A=(%pi*d_p^2)/4;// m^2
+P_1=((P_atm*10^3*A)+W)/A;// The pressure in the cylinder in Pa
+W_1=(P_1*A)*d;// J
+x_1=0;// m
+x_2=d;// m
+W_2=(1/2)*K*((x_2^2)-(x_1^2));// The work required to compress in J
+W_total=W_1+W_2;// The total work in J
+printf("\nThe total work,W_total=%2.2f J",W_total);