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 --- 2066/CH2/EX2.8/2_8.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 2066/CH2/EX2.8/2_8.sce (limited to '2066/CH2/EX2.8/2_8.sce') diff --git a/2066/CH2/EX2.8/2_8.sce b/2066/CH2/EX2.8/2_8.sce new file mode 100755 index 000000000..70e231f3c --- /dev/null +++ b/2066/CH2/EX2.8/2_8.sce @@ -0,0 +1,22 @@ +clc +clear +//Initialization of variables +gam=0.0765 //lb/ft^3 +l=40 //ft +w=16 //ft +d=8 //ft +z=6 //ft +BG=1 //ft +//calculations +I=1/12 *l*w^3 +V=l*w*z +IVG=I/V - BG +MB=I/V +//results +printf("I/V -BG = %.2f ft ",IVG) +if IVG >0 then + printf("\n Barge is stable") +else + printf("\n The barge is unstable") +end +printf("\n Location of metacenter = %.2f ft above the center of buoyancy ",MB) -- cgit