An interactive educational tool for exploring single-degree-of-freedom (SDOF) dynamics — the fundamental building block of structural vibration analysis in wind energy engineering.
Built with Rust + egui. Runs natively on Windows (with rendered LaTeX equations) and in the browser via WebAssembly.
Developed at the Institut für Windenergiesysteme (IWES), Leibniz Universität Hannover.
Download Latest Release → — native desktop binaries for Windows, Linux, and macOS with full LaTeX-rendered equations.
Note — equation rendering inside the app: the web build of the app displays equations using Unicode characters (e.g.
ω_n = √(k/m)) rather than typeset LaTeX. This is a limitation of the Rust → WebAssembly compilation pipeline: the MathJax rendering engine depends on a V8 JavaScript runtime, which cannot itself be compiled to WASM. The desktop app renders all equations as proper LaTeX via an embedded MathJax/SVG pipeline. (This README, rendered by GitHub via MathJax, shows full LaTeX below.)
A single-degree-of-freedom system is the simplest mechanical model of a vibrating structure: a mass
Despite its simplicity, the SDOF model captures the essential dynamics of nearly every real structure near one of its natural frequencies. The governing equation of motion is:
From this single equation, three dimensionless parameters control all behaviour:
| Parameter | Formula | Physical meaning |
|---|---|---|
| Natural frequency | Frequency at which the system oscillates freely | |
| Damping ratio | Fraction of critical damping; governs decay rate | |
| Frequency ratio | Ratio of excitation to natural frequency |
The steady-state amplitude amplification (dynamic magnification factor) is:
and the phase lag between force and response is:
Using atan2 (not plain arctan) is essential: for
Wind turbines are large, flexible structures operating in a broadband dynamic environment — wind turbulence, wave loading, and rotor excitation all produce vibrations that must be understood and controlled. The SDOF model is the entry point for all of this analysis.
The wind turbine tower is the most critical structural component from a dynamics perspective. Its first fore-aft (FA) bending mode governs the structural design.
-
Typical
$f_n \approx 0.25$ –$0.35$ Hz for onshore turbines (5 MW class, hub height ~100 m) - The rotor produces periodic excitation at the 1P frequency (once per revolution) and 3P frequency (blade-passing, three blades × rotational speed)
- At 12 rpm: 1P = 0.2 Hz, 3P = 0.6 Hz
- Tower designs target a natural frequency in the "1P–3P gap" (between 0.2 and 0.6 Hz) — the so-called soft-stiff design. Landing in either exclusion zone causes resonance-driven fatigue damage
- Structural damping is very low (
$\zeta \approx 1$ –$2%$), so even$r$ values slightly off resonance can produce meaningful dynamic amplification
Blades have multiple structural modes, of which two are most critical:
Flapwise (out-of-plane):
- Responds to aerodynamic thrust fluctuations
-
$f_n \approx 1.0$ Hz for a 61 m blade (5 MW class) - Aerodynamic damping is positive and substantial (
$\zeta_\mathrm{eff} \approx 1$ –$3%$), aiding stability
Edgewise (in-plane):
- Responds to gravity loading (1P) and drag fluctuations
-
$f_n \approx 1.6$ Hz for the same blade — stiffer due to structural design requirements - Aerodynamic damping is negative in edgewise — the blade's own motion can feed energy back into vibration
- Net
$\zeta$ can be very small ($< 0.5%$ ), making edgewise flutter a critical design constraint for large blades
The drivetrain (rotor hub → main shaft → gearbox → generator) has a first torsional resonance at
Offshore turbines on monopile foundations face an additional loading environment:
- Larger structural mass (rotor + nacelle + tower + pile
$\approx 800$ t) lowers$f_n$ to$\approx 0.25$ Hz - Soil and hydrodynamic damping raise total
$\zeta$ to$\approx 2$ –$3%$ - First-order wave loading at typical periods of 8–12 s (0.08–0.12 Hz) excites the structure in the quasi-static regime (
$r \approx 0.3$ –$0.4$), giving moderate amplification$H \approx 1.1$ –$1.3$ - Second-order wave forces and nonlinear effects can excite the natural frequency directly (ringing), making time-domain simulation essential for fatigue assessment
A zoomable, pannable mass-spring-damper schematic updates in real time:
- The mass block moves with the numerically integrated displacement
$x(t)$ - The spring stretches and compresses dynamically
- The damper piston tracks the motion
- A force arrow shows the instantaneous excitation
$F(t)$ when$F_0 > 0$ - Scroll to zoom · drag to pan · double-click to reset
RK4-integrated displacement
- Exponential decay envelope for underdamped free vibration
- Animated playhead tracking the current simulation time
- Transport controls (Run / Pause / Reset / time scrubber)
Side-by-side plots of
- Five reference curves for
$\zeta = 0.05, 0.1, 0.2, 0.5, 1.0$ - Current system highlighted; operating point marked in red
- Instantly shows whether the system is in the sub-resonant, resonant, or isolation regime
Live-updating equations with current numerical values substituted for all parameters:
-
$\omega_n$ ,$\zeta$ ,$r$ ,$H(r)$ ,$\varphi$ computed from current parameters - Dynamic case label: Undamped Free / Underdamped / Critically Damped / Overdamped / Forced Vibration / Resonance
- Desktop: equations rendered as typeset LaTeX via MathJax → SVG
-
Browser: equations displayed as Unicode text (e.g.
ζ = c / (2·√(m·k)) = 0.050) — see the rendering note at the top of the README
Sixteen one-click presets spanning generic dynamics and real wind energy components:
| Category | Preset | What it demonstrates |
|---|---|---|
| Generic | Free undamped | Simple harmonic oscillator, eternal oscillation |
| Generic | Underdamped | Exponential amplitude decay, envelope visible |
| Generic | Critical | Fastest return to rest without oscillation |
| Generic | Overdamped | Pure exponential decay, sluggish return |
| Generic | Forced r = 0.5 | Sub-resonant forced response |
| Generic | Resonance |
|
| Generic | Forced r = 2 | Isolation regime, 180° phase flip |
| Generic | Car suspension | Quarter-car model, |
| Wind | Tower FA (free) | Onshore tower free vibration, |
| Wind | Tower FA (1P) | 1P rotor excitation, soft-stiff operating point |
| Wind | Tower 3P resonance | Resonance at blade-passing frequency — to be avoided |
| Wind | Blade flapwise | 1st flapwise mode, aerodynamic damping included |
| Wind | Blade edgewise | Low-damping mode, edgewise flutter risk |
| Wind | Drivetrain | 1st torsional mode, |
| Wind | Monopile (OWT) | Offshore monopile, soil+hydro damping |
| Wind | Monopile + waves | Quasi-static wave loading on monopile |
Open the live web app in any modern browser. All controls and plots work identically to the desktop version. Equations are rendered as Unicode text rather than LaTeX due to WebAssembly runtime constraints (see note above).
Download from the latest release — no installer needed, single executable per platform. The Windows build requires a Vulkan-capable GPU driver (any modern GPU). All builds include typeset LaTeX equations in the theory panel via MathJax.
- Rust toolchain (stable)
- For WASM:
rustup target add wasm32-unknown-unknown
cargo build --releaseOr build and launch in one step:
cargo run --releaseOutput: target/release/sdof_dynamics.exe
build\BUILD_WEB.batOutput in dist/web/: index.html, sdof_dynamics_web.js, sdof_dynamics_web_bg.wasm
Serve with python -m http.server 8000 from dist/web/.
build\release.batBuilds both targets and copies all distributable files to docs/, ready to commit and push to GitHub Pages.
sdof_dynamics/
├── apps/
│ └── sdof_dynamics.rs # Full application (single source, dual-target)
├── shared/
│ ├── template.rs # Reusable egui app framework (IWES theme, toolbar)
│ └── viewport3d.rs # 3D camera controls (for future extensions)
├── web/
│ └── index.html # Minimal WASM bootstrap page
├── build/
│ ├── release.bat # Full release build → docs/ (Windows)
│ ├── release.sh # Full release build → docs/ (Linux/macOS)
│ ├── BUILD_WEB.bat # WASM-only build → dist/web/ (Windows)
│ └── build_web.sh # WASM-only build → dist/web/ (Linux/macOS)
├── docs/ # GitHub Pages root (committed build output)
│ ├── index.html
│ ├── sdof_dynamics_web.js
│ ├── sdof_dynamics_web_bg.wasm
│ └── sdof_dynamics.exe
└── Cargo.toml
With no external force (
-
$\zeta = 0$ (undamped):$x(t) = x_0\cos(\omega_n t) + \frac{v_0}{\omega_n}\sin(\omega_n t)$ — eternal oscillation -
$0 < \zeta < 1$ (underdamped):$x(t) = A e^{-\zeta\omega_n t}\cos(\omega_d t - \theta)$ , where$\omega_d = \omega_n\sqrt{1-\zeta^2}$ -
$\zeta = 1$ (critically damped): fastest possible non-oscillatory return to rest -
$\zeta > 1$ (overdamped): two real exponential decay modes, slower than critical
With harmonic forcing
| Regime |
|
Behaviour |
|---|---|---|
| Quasi-static |
|
|
| Resonance |
|
|
| Isolation |
|
At resonance (
The time response uses a 4th-order Runge-Kutta (RK4) scheme with adaptive step count (up to 3000 points over
- DTU Wind Turbine Stability Analysis — comprehensive resource on wind turbine aeroelastic stability, control systems, and dynamic interactions
This project is released under the MIT License — © 2026 Institut für Windenergiesysteme (IWES), Leibniz Universität Hannover. See LICENSE for details.
| Library | Version | License |
|---|---|---|
| egui / eframe / egui_plot | 0.29.x | MIT OR Apache-2.0 |
| image | 0.25.9 | MIT OR Apache-2.0 |
| wasm-bindgen / web-sys | 0.2.114 | MIT OR Apache-2.0 |
| mathjax_svg (+ MathJax) | 3.2.0 | Apache-2.0 |
| resvg | 0.44.0 | MPL-2.0 |
resvg is used under the Mozilla Public License 2.0. It is used here as an unmodified library dependency; no modifications have been made to any MPL-licensed files. The full MPL-2.0 text is at https://www.mozilla.org/en-US/MPL/2.0/.
See THIRD_PARTY_LICENSES.md for full details.