Modeling Case Studies
Worked engineering models across disciplines: Newton cooling fitted to data, the mass–spring–damper (the universal second-order system), lumped building thermal models, logistic growth and sustainable yield, and predator–prey dynamics. Each case shows the assumptions, the equations, the solution and how parameters are identified from measurements.
The same handful of equations reappear everywhere. Exponential decay describes cooling coffee, discharging capacitors and radioactive tracers. The second-order damped oscillator describes car suspensions, RLC circuits, building sway and control loops. Learning them as reusable templates is a modeling superpower.
Real modeling also means fitting parameters to data and deciding whether residuals are acceptable. The case studies below walk through that full workflow.
An analogy
These models are like standard recipes: once you know how to make a basic sauce, you adapt it to many dishes. The spring–mass–damper is the 'white sauce' of engineering dynamics.
Case 1 — Exponential decay
Whenever the rate of change is proportional to the distance from equilibrium, the solution is exponential with time constant τ = 1/k. After τ the gap shrinks to 37%, after 3τ to 5%, after 5τ to under 1%. RC circuits (τ = RC), tank mixing (τ = V/Q) and first-order sensors all follow this template.
Case 2 — The damped oscillator
Newton's law for a mass on a spring with a damper gives mẍ + cẋ + kx = F. The damping ratio ζ classifies behaviour: ζ < 1 oscillates (underdamped), ζ = 1 returns fastest without overshoot (critical), ζ > 1 is sluggish. Car suspensions aim for ζ ≈ 0.2–0.4; door closers for ζ ≈ 1.
Its electrical twin is the series RLC circuit (L ↔ m, R ↔ c, 1/C ↔ k) — the same maths, different physics.
Case 3 — Lumped building thermal model
Treat a building as one heat capacity C losing heat through conductance UA. Steady heating power is UA·ΔT; the time constant C/UA (often 10–50 h) tells how long a building stays warm after the heating stops — the basis for night set-back and demand-response strategies.
Case 4 — Nonlinear population dynamics
Logistic growth adds a crowding limit K. Harvesting at rate H gives dN/dt = rN(1 − N/K) − H; the largest sustainable H is rK/4, and harvesting more causes collapse — a bifurcation. Lotka–Volterra predator–prey models produce closed orbits (cycles) in the phase plane; adding realism (saturation, crowding) yields limit cycles or stable equilibria.
Formulas
- Newton cooling:
dT/dt = −k(T − Tₐ) → T = Tₐ + (T₀ − Tₐ)e^(−kt) - Mass–spring–damper:
m ẍ + c ẋ + k x = F(t) - Oscillator parameters:
ωₙ = √(k/m), ζ = c / (2√(km)), ω_d = ωₙ√(1 − ζ²) - Lumped building thermal:
C dT/dt = Q_heat − UA (T − T_out); τ = C/UA - Logistic growth:
dN/dt = rN(1 − N/K); max sustainable yield = rK/4 at N = K/2 - Lotka–Volterra:
ẋ = αx − βxy, ẏ = δxy − γy
Worked example: Suspension parameters
Given: m = 10 kg, k = 1000 N/m, c = 40 N·s/m
Find: ωₙ, ζ, ω_d.
- ωₙ = √(1000/10) = 10 rad/s
- ζ = 40/(2√(10·1000)) = 40/200
- ω_d = 10√(1 − 0.04)
Answer: ωₙ = 10 rad/s, ζ = 0.2, ω_d = 9.80 rad/s
Worked example: Building heating load
Given: UA = 250 W/K; Inside 20 °C, outside 0 °C; C = 1×10⁷ J/K
Find: Steady heat demand and time constant.
- Q = UA ΔT = 250 × 20
- τ = C/UA = 10⁷/250 = 40 000 s
Answer: Q = 5 kW; τ ≈ 11.1 h
Worked example: Sustainable fishing
Given: r = 0.4 /yr, K = 10 000 fish
Find: Maximum sustainable yield.
- MSY = rK/4 at N = K/2
Answer: 1000 fish/yr at a stock of 5000
Identifying a cooling constant from measurements
import numpy as np
# Measured coffee temperatures (C) -- room at 20 C
t = np.array([0, 5, 10, 15, 20, 30]) # min
T = np.array([90.0, 74.6, 62.5, 53.2, 45.8, 35.6])
Ta = 20.0
# Newton's law: T = Ta + (T0 - Ta) e^(-k t) -> ln(T - Ta) is linear in t
slope, intercept = np.polyfit(t, np.log(T - Ta), 1)
k, T0 = -slope, Ta + np.exp(intercept)
print(f"k = {k:.4f} 1/min, fitted T0 = {T0:.1f} C")
pred = Ta + (T0 - Ta) * np.exp(-k * t)
print("max residual =", np.round(np.max(np.abs(pred - T)), 2), "C")
t60 = np.log((T0 - Ta) / (60 - Ta)) / k
print(f"drinkable (60 C) after {t60:.1f} min")
# k = 0.0500 1/min, fitted T0 = 90.1 C
# max residual = 0.11 C
# drinkable (60 C) after 11.2 minLinearising (taking a log) turns an exponential fit into straight-line regression. Small, patternless residuals validate the model; a curved residual pattern would signal missing physics (e.g. evaporation or radiation).
Common mistakes
- Wrong: Fitting exponentials with linear regression on raw data. — Right: Linearise with logs or use nonlinear least squares.
- Wrong: Using ζ from c/k. — Right: ζ = c/(2√(km)).
- Wrong: Extrapolating a fitted model far outside the data. — Right: Models are validated only over the tested range.
Applications
- Vehicle dynamics: Quarter-car suspension models for ride comfort.
- Building services: Lumped RC thermal models for HVAC control.
- Resource management: Fisheries and forestry harvest limits.
- Epidemiology: SIR models for disease spread (same ODE toolkit).
Key takeaways
- Exponential decay and damped oscillators recur everywhere.
- ζ and ωₙ classify second-order behaviour.
- Linearise to fit; check residuals to validate.
- Nonlinear models reveal thresholds and collapse.
Going further
- System identification: ARX / state-space fitting from input–output data.
- Bifurcations: Harvesting collapse, flutter onset, buckling.
- Stochastic models: Random vibration, noisy population models.