How can I calculate base shear of a linear MDOF building ?

8 visualizaciones (últimos 30 días)
Adnan
Adnan el 14 de Mzo. de 2025
Editada: Adnan el 15 de Mzo. de 2025
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);

Respuesta aceptada

Manikanta Aditya
Manikanta Aditya el 15 de Mzo. de 2025
Hi @Adnan,
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:');
Base Shear:
disp(base_shear);
-0.0095 -0.0063 -0.0032
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.

Más respuestas (0)

Categorías

Más información sobre Stress and Strain en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by