Skip to content
Tactiverge

School/✦ Research Engineer/Week 9

Convergence and sensitivity studies

Your simulated frequency is 1.0007 rad/s. Is the 7 from the physics, the step size or a parameter you guessed?

About 55 min · 3 goals · Checked by automated tests

1.Why should I care?

Two questions every computational result must answer: is the number converged (numerical error small), and how much would it change if the inputs were slightly different (sensitivity)? Without both, the result cannot be trusted or compared.

  • ◇ Run a step-refinement convergence study on the two-mass simulation and report the observed order.
  • ◇ Run a sensitivity study: how much do ω₁, ω₂ and the beat period change with each parameter?
  • ◇ Separate numerical error from parameter uncertainty in a result.

2.Predict

For two equal masses, ω₂ = √((k + 2k_c)/m). If the coupling stiffness k_c is 10% uncertain and k_c is small compared with k, how uncertain is ω₂?

Guess first. Being wrong here is how the surprise works.

3.Understand

Convergence first

Run the simulation at several steps and compute the metric each time. Check that the differences shrink by about 2ᵖ per halving. Choose a step where the numerical error is at least ten times smaller than any effect you want to report. Record that choice and the evidence in the report.

Then sensitivity

Change one parameter at a time by a stated amount (for example ±10%) and record the change in each output: a one-at-a-time study. Report relative sensitivities (percentage change in output per percentage change in input). Compare with analytic derivatives where you have them, as in the derivation above.

Separating error sources

A result has numerical error (step size, round-off), parameter uncertainty (k_c known to ±10%) and model error (are springs really linear?). Convergence studies bound the first, sensitivity studies the second; only experiments address the third. Say clearly which you have quantified.

Explain it another way

Before saying 'the bridge sways at 1.0 Hz', check the answer does not move when you sharpen the pencil (convergence) or when the steel is a bit stiffer (sensitivity).

Derivation: Sensitivity of the frequencies to the coupling spring
  1. Equal masses m, outer springs k, coupling k_c: ω₁ = √(k/m), ω₂ = √((k + 2k_c)/m).

  2. ∂ω₁/∂k_c = 0: the in-phase mode never stretches the coupling spring.

  3. ∂ω₂/∂k_c = (1/2)(k + 2k_c)^{−1/2} · 2/√m = 1/(m ω₂).

  4. Relative sensitivity: (k_c/ω₂)(∂ω₂/∂k_c) = k_c/(m ω₂²) = k_c/(k + 2k_c), which is small when k_c ≪ k.

  5. Beat period T_b = 2π/(ω₂ − ω₁). For small k_c, ω₂ − ω₁ ≈ k_c/(m ω₁), so T_b ≈ 2π m ω₁ / k_c: a 10% change in k_c gives about a 10% change in T_b.

Worked example 1

m = 1 kg, k = 1 N/m, k_c = 0.1 N/m. Compute ω₁, ω₂ and T_b, then T_b with k_c = 0.11.

ω₁ = 1, ω₂ = √1.2 ≈ 1.0954, T_b = 2π/0.0954 ≈ 65.8 s. With k_c = 0.11: ω₂ = √1.22 ≈ 1.1045, T_b ≈ 2π/0.1045 ≈ 60.1 s: about 9% shorter for a 10% stiffer coupling, while ω₂ changed by only 0.8%.

Common mix-ups

  • A converged simulation is a validated one.
    ✓ Converged means the equations are solved accurately; validation asks whether they are the right equations.
  • Sensitivities can be read straight from the formula's exponents.
    ✓ Only for simple power laws; derived quantities like the beat period can be far more sensitive than the frequencies themselves.

4.Discover

Open the Code Lab. Simulate the two-mass system with RK4 at h = 0.4, 0.2, 0.1, 0.05 s. Measure the beat period (time between energy-transfer peaks) and compare with 2π/(ω₂ − ω₁). Then vary k_c by ±10% and record how the beat period moves.

Can't use the interactive? Read a description instead

This activity is code-based: simulate the two-mass system at four step sizes, measure the beat period and compare with the analytic value, then repeat with the coupling stiffness changed by plus and minus 10 percent and tabulate the results.

5.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1 · a fresh version every time

With step h, the midpoint method (global order 2) gives a global error of 0.0032. Predict the error with step h/2.

6.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 2

Equal masses m = 1 kg, k = 1 N/m, k_c = 0.1 N/m. What is the relative sensitivity k_c/(k + 2k_c) of ω₂ to k_c? (3 d.p.)

Practice 3 · a fresh version every time

Two equal masses m = 1 kg sit between walls: wall–k–m–k_c–m–k–wall with k = 8 N/m and coupling k_c = 4 N/m. What is the lower natural frequency ω, in rad/s?

rad/s

Practice 4

Which should you do first?

Practice 5

A convergence study shows the frequency is converged to 0.01%. What does that NOT tell you?

7.Apply it

For your project parameters, produce (1) a convergence table for the beat period with both integrators and (2) a one-at-a-time sensitivity table for ±10% in m₂, k₂ and k₁. Highlight which parameter dominates the uncertainty.

8.Reflect

Concepts: Numerical integration of ODEs: Euler, RK4 and stiffness · Modal analysis of vibrating systems · Reproducibility and documentation