summaryrefslogtreecommitdiff
path: root/2774/CH1/EX1.5
diff options
context:
space:
mode:
Diffstat (limited to '2774/CH1/EX1.5')
-rwxr-xr-x2774/CH1/EX1.5/Ex1_5.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/2774/CH1/EX1.5/Ex1_5.sce b/2774/CH1/EX1.5/Ex1_5.sce
new file mode 100755
index 000000000..e3c092edb
--- /dev/null
+++ b/2774/CH1/EX1.5/Ex1_5.sce
@@ -0,0 +1,11 @@
+clc
+// solution
+
+// initialization of variables
+d=10/100 // diameter of cylinder in 'm'
+P=600 // pressure in KPa
+Patm=100 // atmospheric pressure in Kpa
+K=4.8*1000 // spring constant in N/m
+
+deltax=(P-Patm)*(%pi*1000*d**2)/(4*K) // by balancing forces on piston
+printf("The Compression in spring is %.3f m",deltax)