How can I calculate base shear of a linear MDOF building ?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
I have running code for 3-degre of fredoom builidng model. I was just wondeering how to clacute the base shear of the model. A simple code is given below. Can you please help me with that ? Thanks for your consideration.
x0=[zeros(6,1)];
[y,t,x]=lsim(sys_s,u,t,x0);
댓글 수: 0
채택된 답변
Manikanta Aditya
2025년 3월 15일
To calculate the base shear of a linear Multi-Degree-of-Freedom (MDOF) building, you can check the following code:
clear all
clc
% Define mass, stiffness, and damping matrices
m1 = 3; m2 = 2; m3 = 1;
k1 = 2; k2 = 2; k3 = 2;
c1 = 1; c2 = 1; c3 = 1;
M = [m1 0 0; 0 m2 0; 0 0 m3];
K = [k1+k2 -k2 0; -k2 k2+k3 -k3; 0 -k3 k3];
C = [c1+c2 -c2 0; -c2 c2+c3 -c3; 0 -c3 c3];
% State space model matrices
F = [-m1 -m2 -m3]';
inv_M = inv(M);
A = [zeros(3,3) eye(3); -inv_M*K -inv_M*C];
B = [zeros(3,1); inv_M*F];
Cc = eye(6);
D = zeros(6,1);
sys_s = ss(A,B,Cc,D);
% Define input motion
acc = [1; 2; 3; 4; 5];
u = acc;
dt = 0.01;
t = (0:length(acc)-1)*dt;
x0 = zeros(6,1);
[y,t,x] = lsim(sys_s,u,t,x0);
% Calculate base shear
base_shear = sum(M * x(:, 1:3)', 2);
% Display base shear
disp('Base Shear:');
disp(base_shear);
This code calculates the base shear by summing the contributions of the mass matrix and the displacements at each degree of freedom. You can adjust the input motion and other parameters as needed for your specific analysis.
Hope this helps.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Stress and Strain에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!