Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Exercise 2: Forces on a Bridge Consider the bridge truss shown below F11 F12 Fia

ID: 3168435 • Letter: E

Question

Exercise 2: Forces on a Bridge Consider the bridge truss shown below F11 F12 Fia Given a vector of external forces b at any of the positions 1-13, we can compute the forces x [FI, F2....Fi3]^ by solving the system Ax = b where A is given by -s1 0 0 0 0 0 00 00 0 -s 00 0 00 0 0 -1 -s 0 0 0 0 -1 1 0 00 0 0 0 0 0 0 0 0 00 00 0 0 0 0 - 0 0 0 -1 s 00 0 0 0 0 0 -s 0 0 0 0-s00 0 00 0 0--1 A0 00-- 0 0 00 0 0 0 0 0 00 0-1 0 00 0 0 0 0 0 0 00 0 0 0 0 0 0 0 01 0 00 0 0-1 00- 0 0 0 0 00 00 0 0 0s 0 0 00 0 0 1 -1 0 0 0 0 0 00 0 00 0 01 0 0 0 0 and /2/2. We will solve for the vector of forces x assuming that there are 5 ton vehicles sitting at nodes 6, 7 and 8. This means that b [0,0,0,0,0,0,0,0,5,0,5,0,5]7. (a) Solve for x using the LU-decomposition. (Use the lu command.) Save the intermediate answer y as A4.dat and the final answer x as A5.dat (b) Solve for x using the backslash command. Save your answer as A6.dat (c) Now suppose that we add weight to the middle truck (which corresponds to the 11th entry of b) in increments of 0.01 tons until the bridge collapses. Each bridge member is rated for no more than 30 tons of compression or

Explanation / Answer

code

close all
clear
clc

N = 13;
A = zeros(13);
s = 1/sqrt(2);
A(1,1) = -s; A(1,2) = 1; A(1,10) = s;
A(2,1) = -s; A(2,9) = -1; A(2,10) = -s;
A(3,2) = -1; A(3,3) = 1;
A(4,11) = -1;
A(5,3) = -1; A(5,4) = s; A(5,12) = -s;
A(6,4) = -s; A(6,12) = -s; A(6,13) = -1;
A(7,4) = -s; A(7,5) = -1;
A(8,5) = 1; A(8,6) = -1;
A(9,13) = 1;
A(10,6) = 1; A(10,7) = -1; A(10,10) = -s; A(10,12) = s;
A(11,10) = s; A(11,11) = 1; A(11,12) = s;
A(12,7) = 1; A(12,8) = -1;
A(13,9) = 1;

b = [0,0,0,0,0,0,0,0,5,0,5,0,5]';

% Part (a)
[L,U,P] = lu(A);
save('A4.dat','L','U','P','-ascii');

x = inv(U)*inv(L)*P*b;
disp 'Part (a)'
x
save('A5.dat','x','-ascii');

% Part (b)
x = A;
disp 'Part (b)'
x
save('A6.dat','x','-ascii');

% Part (c)
x = inv(U)*inv(L)*P*b;
while true
prev_b = b(11);
b(11) = b(11) + 0.01;
x = inv(U)*inv(L)*P*b;
if norm(x,Inf) > 30
break
end
end
b_11 = b(11);
disp 'Part (c)'
b_11
save('A7.dat','b_11','-ascii');

output

Part (a)
x =
-10.6066
-10.0000
-10.0000
-10.6066
7.5000
7.5000
7.5000
7.5000
5.0000
3.5355
0
3.5355
5.0000
Part (b)
x =
-10.6066
-10.0000
-10.0000
-10.6066
7.5000
7.5000
7.5000
7.5000
5.0000
3.5355
0
3.5355
5.0000
Part (c)
b_11 =
25.0000

Note: You can directly open the *.dat files in MATLAB.