Natural frequencies of a shear frame
A shear frame is the simplest model of a building swaying sideways: rigid floors, each with its mass, joined by storeys that each have a lateral stiffness. Its natural frequencies and mode shapes come from the generalised eigenvalue problem K phi = omega^2 M phi. This sheet solves it for a two storey frame in one function call, with the masses in tonnes and the stiffnesses in kN/m, and checks that the modes are orthogonal.
Open this sheet in Calcs Open a blank sheet
The model
The first floor has a mass of 30 t and the roof 20 t. The lower storey has a lateral stiffness of 40,000 kN/m and the upper one 30,000 kN/m. The stiffness matrix is K = [k1 + k2, -k2; -k2, k2] and the mass matrix is diagonal. With two arguments, eigenvals(K, M) solves the generalised problem directly: K must be symmetric and M symmetric positive definite. Each eigenvalue is omega^2 in the units of K over M, so kN/m divided by tonnes comes out per second squared without any conversion by hand.
Try it
Frequencies
The natural frequency is f = omega / (2 pi) and the period is its inverse. Results from the engine:
| Quantity | Result |
|---|---|
| First natural frequency | 3.97 Hz |
| Second natural frequency | 9.02 Hz |
| Fundamental period | 0.252 s |
Mode shapes
eigenvecs(K, M) returns one mode per row, in the order of the frequencies, each scaled so that phi^T M phi = 1. The sheet scales them again so the roof moves 1. In the first mode the first floor then moves 0.585 in the same direction: the whole frame sways one way. In the second it moves -1.14: the floors move against each other.
The modes are orthogonal through the mass matrix, so the product phi_1^T M phi_2 is zero; the sheet prints 0 t. That is a useful check that the matrices were entered correctly.
More storeys
Each extra floor adds a row and a column to K and M: K stays tridiagonal, with k_i + k_(i+1) on the diagonal and -k_(i+1) beside it, and M stays diagonal. The same two calls then give all the frequencies and modes. For many storeys, build the matrices in a loop rather than by hand.
What this is, and is not
This is a generic textbook calculation, not a design-code check. The floors are rigid, the masses are lumped at the floors, there is no damping, and the storey stiffness is a number you supply (for example 12 E I / h^3 for each column fixed at both ends). There is no response spectrum, time history or seismic load calculation. It does not apply load factors, resistance factors or any limit from a design standard. If you need a code check, use the formulas your standard requires, and treat this sheet as a way to see the mechanics and to check hand calculations.
The sheet source
The sample as it ships (this page adds two lines that pick out the first floor of each mode):
# Shear frame natural frequencies
A two storey shear frame has a lumped mass at each floor and a lateral stiffness per storey.
Free vibration needs K φ = ω² M φ. Given both matrices, `eigenvals(K, M)` solves this
generalized eigenvalue problem directly: K must be symmetric and M symmetric positive definite,
and each eigenvalue is ω² in the units of K/M.
m_1: 30 t
m_2: 20 t
k_1: 40000 kN/m
k_2: 30000 kN/m
K: [k_1 + k_2, -k_2; -k_2, k_2]
M: [m_1, 0 t; 0 t, m_2]
## Frequencies
lambda: eigenvals(K, M)
omega_1: sqrt(lambda.1)
omega_2: sqrt(lambda.2)
f_1: omega_1/(2*π) -> Hz
f_2: omega_2/(2*π) -> Hz
T_1: 1/f_1 -> s
## Mode shapes
Each row of `eigenvecs(K, M)` is one mode, in the order of the frequencies, scaled so that
φᵀ M φ = 1 (its units are t^-0.5). Scaled again so the roof moves 1:
Phi: eigenvecs(K, M)
phi_1: row(Phi, 1)/Phi.(1, 2)
phi_2: row(Phi, 2)/Phi.(2, 2)
The modes are orthogonal through the mass matrix, so this product is zero:
check: dot(phi_1, M*phi_2)
r_1: phi_1.1 | first floor, mode 1
r_2: phi_2.1 | first floor, mode 2
Questions
What is a shear frame?
A frame model in which the floors are rigid and the columns bend in double curvature, so each storey acts as a lateral spring between two masses.
Why are there as many frequencies as storeys?
Each floor has one degree of freedom, its sideways movement, so a two storey frame has two modes.
What units does it need?
Any consistent ones, because the engine converts. Masses in tonnes and stiffnesses in kN/m give eigenvalues per second squared, and frequencies in Hz after dividing omega by 2 pi.
Can it include damping or a time history?
Not this sheet. It finds frequencies and mode shapes only.