The Mathematical Modeling Process

Mathematical modeling turns a real engineering question into equations, solves them, and checks the answer against reality. Learn the modeling cycle (problem → assumptions → variables → equations → solution → validation → refinement), conservation-law thinking, choosing model complexity, non-dimensionalisation, analytic versus numerical solution, and validation — worked through on a draining tank.

Every engineering calculation is a model: a beam formula assumes small deflections, a circuit diagram assumes ideal wires, a traffic simulation assumes drivers follow rules. Modeling is the skill of choosing what to keep and what to ignore so the mathematics is solvable yet still answers the question.

Good models are as simple as possible but no simpler. They are built from conservation laws (mass, momentum, energy, charge) plus constitutive relations (Hooke's law, Ohm's law, Fourier's law), then tested against measurements.

An analogy

A model is a map: a road map ignores trees and buildings because you need routes, not scenery. The right map depends on the journey — and a map is only trusted after someone has driven the roads.

The modeling cycle

Modeling is iterative — expect to go round the loop several times.

Types of models

Pick the type that matches the question and the data available.

Verification and validation

Verification: are we solving the equations right? (code checks, convergence, comparing with analytic cases like the drain time above). Validation: are we solving the right equations? (comparing with experiments). A perfectly verified model can still be invalid if the assumptions are wrong.

Complexity, identifiability and sensitivity

Adding detail is not free: more parameters need more data and can make the model non-identifiable (different parameter sets fit equally well). Sensitivity analysis shows which parameters matter; non-dimensionalisation reveals the few groups that control behaviour. Digital twins keep models continuously calibrated with live sensor data.

Formulas

Worked example: Drain time

Given: A = 1 m², a = 10 cm², C_d = 0.62, h₀ = 2 m

Find: Time to empty.

Answer: T ≈ 1030 s (17 min)

Worked example: Equilibrium with inflow

Given: Q_in = 2 L/s, same tank

Find: Steady level h*.

Answer: h* ≈ 0.530 m

Worked example: Checking assumptions

Given: Model ignores the pipe friction downstream of the orifice

Find: How to validate?

Answer: Linearity of √h vs t validates the form; slope calibrates C_d.

Tank-draining model: simulate and compare with theory

import numpy as np

# Model: A dh/dt = -Cd * a * sqrt(2 g h)   (Torricelli draining)
A, a, Cd, g, h0 = 1.0, 0.001, 0.62, 9.81, 2.0

def f(h):
    return -Cd * a * np.sqrt(2 * g * max(h, 0.0)) / A

# Simulate with RK4 until the tank is (nearly) empty
dt, t, h = 1.0, 0.0, h0
while h > 1e-4:
    k1 = f(h); k2 = f(h + dt*k1/2); k3 = f(h + dt*k2/2); k4 = f(h + dt*k3)
    h += dt * (k1 + 2*k2 + 2*k3 + k4) / 6
    t += dt
T_exact = (A / (Cd * a)) * np.sqrt(2 * h0 / g)
print(f"simulated drain time = {t:.0f} s")
print(f"analytic  drain time = {T_exact:.0f} s")
print(f"h after 300 s (analytic) = {(np.sqrt(h0) - Cd*a*np.sqrt(2*g)/(2*A)*300)**2:.3f} m")
# simulated drain time = 1023 s
# analytic  drain time = 1030 s
# h after 300 s (analytic) = 1.005 m

The simulation stops at h = 0.1 mm; the last 0.1 mm takes about 7 s because outflow slows as √h — a nice reminder to understand a model's behaviour near its limits. The same code structure works for any tank shape A(h), where no analytic answer exists.

Common mistakes

Applications

Key takeaways

Going further