Instagram .ill < 10:42 PM Screenshot 2024-08-25 180207.jpg 28% Each of the following problems involve two-dimensional trusses to be modeled using the bar element (in some analysis software this may be called a bar, link, spar, or truss element). In each problem, determine: - the magnitude and location of the maximum deflection, the stress in each member, and the reaction forces. Note: Node numbers, where included, are for reference only and can be changed at the analyst's discretion. Problem 1: E3.1 Each member is steel having E=30(10) psi and the cross-sectional area is 1.2 in.² 1000 lb 1000 lb 1000 lb 1000 lb 31 500 lb 1000 lb 6 ft 11 500 lb 1 3 ft 3ft--3 ft- 3123 10 12 -3 ft 3 ft 3ft
i want a displacement and stress equations from the global matrix that you can find it from the code and make a calculation
% Define node coordinates (x, y)
nodes = [0, 0; 3, 6; 6, 0; 3, 12; 6, 12; 9, 6; 12, 0; 9, 12; 12, 12];
% Define the connectivity of the elements (start_node, end_node)
elements = [
1, 2;
1, 3;
2, 4;
2, 5;
3, 5;
4, 6;
5, 6;
5, 7;
6, 8;
7, 8;
7, 9;
8, 9
];
% Define material properties and cross-sectional area
E = 30e6; % Young's Modulus in psi
A = 1.2; % Cross-sectional area in in^2
% External forces applied at nodes (fx, fy) in pounds
forces = zeros(2*9, 1);
forces(4*2-1) = -1000; % Fx at node 4
forces(5*2-1) = -1000; % Fx at node 5
forces(6*2-1) = -500; % Fx at node 6
forces(7*2-1) = -500; % Fx at node 7
% Initialize global stiffness matrix
K = zeros(2*9, 2*9);
% Assembly of global stiffness matrix
for i = 1:size(elements, 1)
node1 = elements(i, 1);
node2 = elements(i, 2);
x1 = nodes(node1, 1);
y1 = nodes(node1, 2);
x2 = nodes(node2, 1);
y2 = nodes(node2, 2);
L = sqrt((x2 - x1)^2 + (y2 - y1)^2);
c = (x2 - x1) / L;
s = (y2 - y1) / L;
k = (E A / L) [c^2, c*s, -c^2, -c*s; c*s, s^2, -c*s, -s^2; -c^2, -c*s, c^2, c*s; -c*s, -s^2, c*s, s^2];
dof = [2*node1-1, 2*node1, 2*node2-1, 2*node2];
K(dof, dof) = K(dof, dof) + k;
end
% Apply boundary conditions (fixing node 1 and node 7)
fixed_dofs = [1, 2, 13, 14]; % Node 1 and node 7 fixed
free_dofs = setdiff(1:2*9, fixed_dofs);
Kff = K(free_dofs, free_dofs);
Kfc = K(free_dofs, fixed_dofs);
Kcf = K(fixed_dofs, free_dofs);
Kcc = K(fixed_dofs, fixed_dofs);
% Solve for displacements
uf = Kff \ forces(free_dofs);
% Total displacements
displacements = zeros(2*9, 1);
displacements(free_dofs) = uf;
% Reactions
reactions = Kcf * uf;
% Print results
fprintf('Displacements:\n');
disp(reshape(displacements, 2, []).');
fprintf('Reactions:\n');
disp(reshape(reactions, 2, []).');
Unlock instant AI solutions
Tap the button
to generate a solution