loading...
running...
How to use
Pick a preset or press Shake! (Space or Enter). Raise the magnitude, change the ground and the number of floors, then watch the colour of each storey and the roof graph. Random quake draws a magnitude from a Gutenberg-Richter catalogue; Aftershock shakes again one magnitude lower without repairing; Repair (R) restores the damage.
What to try. (1) Row of five on soft clay, then on hard rock: which building suffers? (2) Sweep the frequency of a steady sine toward 1/T1 and watch the roof grow tenfold. (3) Tick open ground floor and see all the damage land in one storey. (4) Tick base isolation or the tuned mass damper and compare roof displacement and drift. (5) Increase the period factor to move a building away from a pulse's period.
The science
Building as a stack of masses and springs. Each floor has mass m and each storey a lateral stiffness k. With relative displacements x_i (floor i against the ground) and ground acceleration a_g(t):
m x’’_i = -s_i + s_(i+1) - m a_g(t) s_i = restoring storey shear + viscous term + P-Delta term
The ground does not push the building directly, it moves the foundation, so the floors feel an inertial force -m a_g. For a uniform N-storey shear building the modes are known in closed form, which the page uses for its first check:
w_r = 2 sqrt(k/m) sin( (2r-1) pi / (2(2N+1)) ) phi_i = sin( i (2r-1) pi / (2N+1) ) T1 = 0.1 N s (code rule of thumb)
Resonance. For one degree of freedom with damping ratio ζ the steady response to harmonic ground acceleration at the natural frequency is x = a0 / (2 ζ w0^2): 10 times the static value at ζ = 5 %. That is why a moderate quake whose dominant period matches the building can do more harm than a bigger one that does not. The pseudo-acceleration response spectrum PSA(T) = w^2 max|x| shows this for every period at once; the vertical lines mark the natural periods of the buildings.
Damage. Storey springs are elastic-plastic with a small hardening ratio (play operator): force = k(d - p) with |d - p| ≤ d_y. Yield drift d_y/h and collapse drift are material numbers (masonry 0.08 % / 0.4 %, timber 1.2 % / 5 %, and so on). Past the collapse drift a storey loses its strength and gravity (the P-Delta term -W d/h) lets it crush onto the floor below. The damage colours follow the ductility demand peak drift / yield drift. Base isolation inserts a soft bearing layer (period 1.5 to 4 s, 15 % damping): the long period moves the building away from the ground's energetic periods. The tuned mass damper uses the Den Hartog optimum f = 1/(1+μ), ζ_t = sqrt(3μ/(8(1+μ)^3)).
The ground motion. A random record is a sum of sinusoids with random phases whose amplitude follows the Kanai-Tajimi soil filter S(w) = (w_g^4 + 4 ζ_g^2 w_g^2 w^2) / ((w_g^2 - w^2)^2 + 4 ζ_g^2 w_g^2 w^2), shaped by a rise-sustain-decay envelope and scaled to the peak ground acceleration from a simple magnitude-distance law (about 0.37 g for M7 at 10 km on stiff soil). The S wave follows the P precursor after the S-P lag R(1/Vs - 1/Vp), which is also the warning time. Moment M0 = 10^(1.5 Mw + 9.1) N m, radiated energy 10^(1.5 Mw + 4.8) J, rupture length from Wells and Coppersmith, and random magnitudes from a Gutenberg-Richter law with b = 1.
Honest simplifications. This is a 1-D shear-building model: no torsion, no walls, no vertical shaking, a uniform floor mass and stiffness (except the optional soft storey), a symmetric hysteresis without stiffness or strength degradation, and a toy attenuation law, not a published ground-motion model. Real buildings fail in far more ways. It is for building intuition about period, damping, ductility and isolation, not for designing anything. Only inanimate structures are shown.