summaryrefslogtreecommitdiff
path: root/1898/CH14/EX14.12/Ex14_12.sce
blob: 3ac25a7cb34badf50021571483e43159e31328a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
clear all; clc;

disp("Scilab Code Ex 14.12 : ")

//Given:
A = 300*10^-6; //m^2
E = 210*10^6; //kN/m^2
P = 60; //kN
F_ac = 1.25; //kN

//Part a:

//Virtual Work Equation:

n = [0 1.25 0 -0.75];
N = [0 75 -60 -45];
L = [1.5 2.5 2 1.5];
del_ch = 0;

for i=1:4
    del_ch = del_ch + (n(i)*N(i)*L(i))/(A*E);
end

del_chA = del_ch*1000;

//Part b:

del_L = -6; //mm
del_chB = F_ac*del_L;

if(del_chB<0)
    

//Display:
   
    printf('\n\nThe horizontal displacement of joint C if a force is applied to B   = %1.3f mm',del_chA);
    printf('\nThe horizontal displacement of joint C if AC is fabricated short    = %1.1f mm',del_chB);
end

    

//---------------------------------------------------------------------------END------------------------------------------------------------------------------