The model. A building is idealised as a shear frame: N floor masses mi (the stiff slabs) joined by massless storey springs ki (the columns, which can only shear). With u the floor displacements relative to the ground, Newton's second law is M u'' + C u' + K u = −M r ag(t), where r is a vector of ones (a rigid ground translation), M is diagonal and K is tridiagonal (ki + ki+1 on the diagonal, −ki next to it). Only the horizontal motion in the shaking direction is modelled: no torsion, no vertical shaking, no soil-structure interaction, and the springs are linear (no cracking, yielding or collapse).
Modal analysis. Free undamped vibration u = φ sin ωt gives the eigenproblem Kφ = ω2Mφ. The page solves it with a Jacobi rotation method on M−1/2KM−1/2. Each mode n has a frequency fn = ωn/2π, a shape φn, a participation factor Γn = φnTMr / φnTMφn and an effective modal mass Γn2φnTMφn; the effective masses add up to the total mass, and for ordinary frames the first mode carries 80 to 90 percent of it, which is why the roof moves mostly in the first-mode shape. For a uniform building (all m, k equal) the eigenvalues are known exactly: ωn = 2√(k/m) sin[(2n−1)π / (2(2N+1))]. The Checks button compares this closed form with the eigen-solver and with the frequencies found by integrating the equations of motion and taking an FFT.
Rule of thumb. The widely quoted approximation T1 ≈ 0.1 N seconds (N = number of storeys) is a rough guide for moment-resisting frames; real buildings range from about 0.05 N to 0.15 N depending on the structural system, stiffness of cladding and foundation. The default stiffness of this page is chosen so that T1 = 0.1 N, and Experiment 2 shows how a uniform frame compares.
Damping. Rayleigh damping C = a0M + a1K is used, with a0 = 2ζω1ω3/(ω1+ω3) and a1 = 2ζ/(ω1+ω3), so that modes 1 and 3 have exactly the chosen ratio ζ (typical values: about 2 to 3 percent for steel, 5 percent for reinforced concrete) and the others a little more or less. With base isolation only the stiffness-proportional term is kept, because the mass-proportional term would damp the rigid-body motion of the whole building on its bearings.
Time integration. The Newmark average-acceleration method (β = 1/4, γ = 1/2) is unconditionally stable for linear systems and conserves energy for the undamped case; the step is 2 ms and the effective stiffness matrix is factorised once (LU). Its period elongation (about 0.03 percent for the third mode of the checked frame) is shown in Check 1.
Resonance. For harmonic ground acceleration a0 sin ωt at a mode frequency, the steady-state modal amplitude is the static value Γa0/ωn2 multiplied by the dynamic amplification factor 1/(2ζ): 10 for 5 percent damping, 25 for 2 percent. Shaking at a period far from T1 (much shorter or longer) hardly excites the building. Check 2 and Experiment 1 verify the factor by simulation; real earthquakes are not sine waves but broadband noise, so the building picks out the part of the spectrum near its own periods.
Synthetic ground motions. The earthquake-like input is white noise passed through the Kanai-Tajimi soil filter (a damped oscillator of period Tg and damping 0.6 that models the soil layer) and multiplied by a Jennings-style envelope (build-up, strong phase, decay); the whole record is then scaled to the chosen peak ground acceleration. The magnitude slider uses an illustrative rule (PGA = 0.04 g × 100.4(M−5), capped at 1 g, and a longer strong phase for larger events). It is not a ground-motion prediction equation and ignores distance, fault type and site amplification. The near-fault input is a single velocity pulse of period Tp (a cosine-tapered cosine, in the spirit of the Mavroeidis-Papageorgiou pulse model) and the sine sweep glides linearly between two frequencies. None of these is a real recording, and none represents a particular earthquake. The table displacement drawn is a baseline-corrected double integral of the acceleration.
Response spectrum. For one ground record the page computes the peak response of a family of single-degree-of-freedom oscillators with periods from 0.1 to 3 s (same damping ratio) and plots the pseudo-spectral acceleration Sa = (2π/T)2 Sd/g. A building with first period T1 responds roughly as the spectrum at T1 says: if T1 sits on a peak of the spectrum the building is shaken hard (resonance with the ground), if it sits in the trough it is spared. Soft soil moves the peak to longer periods, so it is the taller buildings that suffer there (Story 3). Mode 1 markers are drawn on the graph.
Inter-storey drift. Damage to partitions, cladding and columns follows the relative displacement between two floors, divided by the storey height: the drift ratio (ui − ui−1)/h. The coloured bands (below 0.2 %, to 0.5 %, to 1 %, to 2 %, above) are illustrative orders of magnitude in the spirit of published fragility studies and codes (for example HAZUS-style damage states and the 2 percent limits often seen in design); they are not a prediction for any real building. Above roughly 1 to 2 percent a real frame is yielding and the linear model of this page no longer applies, so a red band means "stop trusting the numbers", not "this much displacement will happen".
Soft storey. If one storey (often an open ground floor) is much more flexible than the rest, the drift concentrates in it: all the displacement of the building above is taken by that single level, and its columns see far more demand than the others. The slider reduces the stiffness of the chosen storey to a fraction of the others. This weakness has contributed to collapses in many past earthquakes; here it only shows up as a larger drift.
Base isolation. The building sits on a raft with bearings of horizontal stiffness kb = (2π/Tiso)2 Mtotal and equivalent viscous damping ζiso. The isolated period (2 to 4 s) is far above the ground's dominant periods, so most of the motion is taken up by the bearings and the storey drifts shrink. The cost is a large bearing displacement (readout) and, as Story 5 versus 6 hints, long-period near-fault pulses are the hard case for isolation: with a pulse period close to Tiso the benefit shrinks. Real isolators are nonlinear (lead-rubber and friction-pendulum bearings); here the bearing is a linear spring and dashpot.
Tuned mass damper. A mass mt on a spring and damper at the roof, tuned with the Den Hartog rules ft = f1/(1+μ) and ζt = √(3μ/(8(1+μ)3)), where μ is the mass ratio relative to the first modal mass, takes energy out of the first mode: it splits the resonance peak into two lower ones. It is most effective for narrow-band excitation (wind, Story 7) and much less so for short, broadband earthquake pulses, which end before the damper has built up its motion; the page shows both cases honestly. The damper stroke is shown in the readouts.
What the 3D model shows. The Blender-built building is drawn from the model's floor displacements, exaggerated by the factor on the slider (stated on the stage), relative to the shake table; the table itself is drawn at a smaller factor (maximum 5x, clipped to its pit). Columns and facade are sheared between neighbouring floors, which is exactly the shear-frame kinematics. Storeys glow orange to red when their peak drift reaches the upper bands.
Sources. Chopra, Dynamics of Structures (Prentice Hall); Clough and Penzien, Dynamics of Structures; Newmark, A method of computation for structural dynamics (1959); Kanai (1957) and Tajimi (1960) on the soil-filter ground-motion model; Den Hartog, Mechanical Vibrations (1956); Naeim and Kelly, Design of Seismic Isolated Structures (1999); Mavroeidis and Papageorgiou (2003) for near-fault pulses.
Educational structural-dynamics model with a generic building; it is not a design or safety assessment tool and says nothing about the safety of any real structure. Do not use it to judge a real building.