Docsity

Calculating Sensitivities of Performance Measures in Truss Structure with Adjoint Method, Assignments of Engineering

Toggle sidebar
bg1
EGM6365 Homework #7
A three-element truss structure is under the constant force. The cross sectional area of
each element is considered as design variables b = [1.0, 1.2, 1.4]. The stress of each
element is considered as performance measures ψ = [σ1, σ2, σ3]. Calculate the
sensitivities of performance measures with respect to design variables using the adjoint
variable method.
f = 10
1 234
%MATLAB script to solve the three truss elements problem
% Element number
Nelem = 3;
% Cross-sectional area
b = [1. 1.2 1.4];
% Length of each element
l = [0.5 0.75 1.0];
% Young's modulus
E = 1E4;
% Global stiffness matrix
K = zeros(4,4);
% Assemble the stiffness matrix
for i = 1:Nelem
coef = E*b(i)/l(i);
K(i,i) = K(i,i) + coef;
K(i,i+1) = K(i,i+1) - coef;
K(i+1,i) = K(i+1,i) - coef;
K(i+1,i+1) = K(i+1,i+1) + coef;
end
% Applied force vector
F = [ 0 0 0 10]';
% Apply displacement boundary condition at node 1
for i = 1:Nelem+1
K(1,i) = 0;
end
K(1,1) = 1;
% Solve the problem for displacement z
z = K \ F
% Calculate stress
sigma = zeros(3,1);
for i = 1:Nelem
coef = E/l(i);
sigma(i) = coef * (z(i+1) - z(i));
end
sigma

Partial preview of the text

Download Calculating Sensitivities of Performance Measures in Truss Structure with Adjoint Method and more Assignments Engineering in PDF only on Docsity!

EGM6365 Homework

A three-element truss structure is under the constant force. The cross sectional area of

each element is considered as design variables b = [1.0, 1.2, 1.4]. The stress of each

element is considered as performance measures ψ = [σ 1 , σ 2 , σ 3 ]. Calculate the

sensitivities of performance measures with respect to design variables using the adjoint

variable method.

f = 10

%MATLAB script to solve the three truss elements problem % Element number Nelem = 3; % Cross-sectional area b = [1. 1.2 1.4]; % Length of each element l = [0.5 0.75 1.0]; % Young's modulus E = 1E4; % Global stiffness matrix K = zeros(4,4); % Assemble the stiffness matrix for i = 1:Nelem coef = E*b(i)/l(i); K(i,i) = K(i,i) + coef; K(i,i+1) = K(i,i+1) - coef; K(i+1,i) = K(i+1,i) - coef; K(i+1,i+1) = K(i+1,i+1) + coef; end % Applied force vector F = [ 0 0 0 10]'; % Apply displacement boundary condition at node 1 for i = 1:Nelem+ K(1,i) = 0; end K(1,1) = 1; % Solve the problem for displacement z z = K \ F % Calculate stress sigma = zeros(3,1); for i = 1:Nelem coef = E/l(i); sigma(i) = coef * (z(i+1) - z(i)); end sigma