String Resonance & Standing Wave Simulator Back
Structural Vibration / Wave Physics

String Resonance & Standing Wave Simulator

Pluck a string and visualize eigenmodes in real time. Compute fundamental frequency and harmonics from tension, linear density, and length. Play actual audio.

String Resonance

Standing Wave & Harmonic Series Simulator

String Parameters
Pluck Presets
Mode Filter
All
n=1
n=2
n=3
n=4
n=5
n=6
n=7
Display Options
Audio
---
f₁ (Hz)
---
Wave Speed (m/s)
---
Total Energy
---
Active Modes
Click or tap the canvas to pluck the string
Harmonic Spectrum (amplitude per mode)
Theory Notes

Wave Equation and Fundamental Frequency

Natural frequencies of a fixed-fixed string:

$$f_n = \frac{n}{2L}\sqrt{\frac{T}{\mu}}, \quad n = 1, 2, 3, \ldots$$

Wave speed $v = \sqrt{T/\mu}$. For a pluck at position $x_0$, the initial amplitude of the n-th mode is:

$$A_n = \frac{2}{L}\int_0^L y_0(x)\sin\!\left(\frac{n\pi x}{L}\right)dx$$

CAE Connection: The natural frequencies and mode shapes obtained from FEM eigenvalue analysis are the high-dimensional counterpart of this model. They underpin automotive NVH, earthquake-resistant structural design, and spacecraft structural analysis alike.

🧑‍🎓 Student × 🎓 Professor — Dialogue

🧑‍🎓 "Does it actually matter where on the string you pluck it? Does the sound change?"

🎓 "Absolutely. Pluck the center and the even harmonics (n=2, 4, 6, ...) theoretically vanish. Why? Because the 2nd mode has a node right at the center — it's as if you're pinching it there while plucking, so that component just doesn't show up."

🧑‍🎓 "So the guitar harmonics technique where you lightly touch the string at the midpoint — is that the same idea?"

🎓 "Exactly. Touching the center kills modes 1, 3, 5, leaving the 2nd harmonic dominant — one octave higher. Try it in this tool: set the Mode Filter to n=2 and see what stays."

🧑‍🎓 "But what does any of this have to do with CAE? This feels like music theory."

🎓 "This is actually the most fundamental model in structural dynamics. When FEM computes the natural frequencies of a bridge or a skyscraper, it's doing the exact same math in higher dimensions. The Mode Shape 1, Mode Shape 2 outputs in Ansys modal analysis are precisely the n=1 and n=2 patterns you see here. If earthquake frequencies match a mode, resonance occurs — and structures fail."

What is String Resonance?

🧑‍🎓
What exactly is a "standing wave" on a string? I see the simulator shows a wavy line that just vibrates in place.
🎓
Basically, it's a wave pattern that doesn't travel. It's formed when two identical waves, traveling in opposite directions, interfere with each other. The string in this simulator is fixed at both ends, so waves reflect back and forth. At specific frequencies, these reflections perfectly reinforce each other, creating the stationary pattern you see. Try moving the "Mode (n)" slider above from 1 to 2 to see the first harmonic appear.
🧑‍🎓
Wait, really? So the "fundamental frequency" is just the simplest standing wave? What determines its pitch?
🎓
Exactly. The fundamental (n=1) is the lowest possible frequency at which a standing wave can form. Its pitch depends on three things you can control here: the string's length (L), its tension (T), and its linear density (μ, or mass per unit length). For instance, a guitar string sounds higher when you fret it (shorten L) or when you tighten the tuning peg (increase T). Play with those three sliders and watch how the calculated frequency changes.
🧑‍🎓
Okay, I see the nodes and anti-nodes. But what's the deal with the "Initial Pluck Position"? It seems to change the wave shape but not the frequency.
🎓
Great observation! The pluck position determines *how much* of each possible harmonic (n=1,2,3...) is excited when you release the string. The *frequency* of each harmonic is fixed by L, T, and μ, but its *amplitude* depends on where you pluck. For example, if you pluck exactly at the middle (L/2), you'll strongly excite the 1st, 3rd, 5th... harmonics (odd n), but cancel out the 2nd, 4th... (even n). Move the pluck slider to the middle and then cycle through the modes to see which ones have a node or anti-node there.

Physical Model & Key Equations

The natural frequencies (or eigenfrequencies) of a string fixed at both ends are quantized. Only frequencies that fit an integer number of half-wavelengths on the string are allowed. This leads to the harmonic series.

$$f_n = \frac{n}{2L}\sqrt{\frac{T}{\mu}}, \quad n = 1, 2, 3, \ldots$$

$f_n$: Frequency of the n-th mode (Hz)
$n$: Mode number (1 = fundamental)
$L$: Length of the string (m)
$T$: Tension in the string (N)
$\mu$: Linear mass density (kg/m)
The term $\sqrt{T/\mu}$ is the wave speed $v$ along the string.

The shape of the string for a pure mode is a sine wave. When plucked, the initial shape is a superposition of all possible modes. The amplitude of each mode in that superposition is found by a Fourier sine series expansion.

$$A_n = \frac{2}{L}\int_0^L y_0(x)\sin\!\left(\frac{n\pi x}{L}\right)dx$$

$A_n$: Amplitude coefficient for the n-th harmonic.
$y_0(x)$: The initial shape of the string (e.g., a triangle from a pluck).
This equation mathematically explains why changing the pluck point in the simulator changes the mixture of harmonics you hear.

Real-World Applications

Musical Instrument Design: The principles in this simulator are fundamental to designing all stringed instruments. Luthiers adjust scale length (L), string gauge (μ), and tension (T) to achieve the desired pitch range, tonal quality (harmonic content), and playability of a guitar, violin, or piano.

Non-Destructive Testing (NDT): Engineers use the relationship between tension, frequency, and density to diagnose issues. For instance, by measuring the fundamental frequency of a suspended cable or bridge stay, they can calculate its tension and check for anomalies or fatigue without taking it apart.

Electrical Transmission Lines: Overhead power lines can vibrate due to wind, creating standing waves called "aeolian vibration." Understanding these resonant modes is critical to design dampers that prevent the metal from fatiguing and breaking, which could cause power outages.

Microelectromechanical Systems (MEMS): Tiny, fixed-fixed silicon beams act like microscopic guitar strings. Their resonant frequency, highly sensitive to mass, is used in sensors to detect the presence of a single molecule or to measure minute forces, forming the basis of advanced chemical and biological sensors.

Common Misconceptions and Points to Note

First, there is a common tendency to confuse the magnitude of influence between "tension" and "linear density". Looking at the formula $f_n = \frac{n}{2L}\sqrt{\frac{T}{\mu}}$, you'll see that tension $T$ is inside the square root. This means that to double the frequency (raise it by one octave), you must quadruple the tension. On the other hand, quadrupling the linear density $\mu$ halves the frequency. This is why thicker strings (higher linear density) are the bass strings on a guitar. It's important to understand that relying on tension alone for adjustment becomes physically impractical.

Next, consider the difference between simulated "damping" and reality. While you can set damping in this tool, the vibrational damping of a real string is far more complex. It's not just damping from air resistance; energy loss from internal friction within the string and at the supports (nut and bridge) is significant. This affects the "sustain" and the "warmth of the timbre." When performing modal analysis with CAE, configuring this "damping" is a critical and challenging step that greatly influences the reliability of the results.

Finally, beware of the misconception that "only the fundamental frequency matters". While the pitch of a sound is indeed determined by the fundamental frequency, the composition of overtones (higher-order modes) is essential when considering an instrument's timbre or a structure's vibration characteristics. For example, even with the same fundamental frequency, a sound rich in even-numbered harmonics and one dominated by odd-numbered harmonics create completely different impressions on the human ear. In structures, failure can sometimes occur in higher-order modes rather than the fundamental mode, making comprehensive modal investigation essential.

Related Engineering Fields

The theory behind this string simulation is supported by two main pillars: "wave phenomena" and "eigenvalue analysis", and it finds application in a wide array of engineering fields.

First, consider Acoustical Engineering and NVH (Noise, Vibration, and Harshness). In designing "quietness" for automobiles and appliances, vibrations of plates and shell structures travel through the air to become sound. An engine hood or door panel can be thought of as a "plate fixed around its perimeter"—a 2D analogue of a fixed string—and its vibration modes are calculated to avoid resonances that cause noise.

Furthermore, there are applications in Electronic and Optical Engineering. The propagation of light in optical fibers or the standing waves of electromagnetic waves within a semiconductor laser resonator are described by differential equations mathematically identical to the wave equation for a string. Here, parameters like "tension" correspond to "refractive index distribution," and "fixed ends" correspond to "mirrors." While the physical interpretation of the parameters changes, the core mathematical model remains the same.

And above all, Structural Mechanics in general. Flutter in aircraft wings, wind-induced vibration in skyscrapers, chatter vibration during machining—all are resonance phenomena occurring when a structure's natural frequency matches the frequency of an external force. Modal analysis performed with CAE software is a standard method for preemptively discovering these dangerous resonance points and eliminating them during the design phase.

For Further Learning

Once you are comfortable with this simulator, we recommend broadening your perspective to the vibration of continuous media as a next step. Start by extending from strings (1D) to membranes (2D). In membrane vibration, like that of a drumhead, nodes form in both the longitudinal and transverse directions, and modes are classified by two indices, $(m, n)$. For example, the $(1,1)$ mode is the fundamental, and the $(1,2)$ mode has one nodal line in one direction.

If you wish to deepen the mathematical background, study the "separation of variables" method for partial differential equations. This is the technique for solving the wave equation $\frac{\partial^2 u}{\partial t^2} = c^2 \frac{\partial^2 u}{\partial x^2}$, which describes string vibration, by assuming a solution as the product of a spatial part and a temporal part: $u(x,t)=X(x)T(t)$. This very solution process mathematically derives the physical concept of a "standing wave" (vibration with a fixed spatial shape). You will understand how the boundary conditions (fixed ends) give rise to the discrete series of natural frequencies.

A practical next topic is the "Mode Superposition Method". This is a powerful technique for calculating the vibration from an arbitrary initial state (e.g., releasing a string pulled into a complex shape) or under an applied force, as the sum (linear combination) of the responses of each natural mode. The waveforms you see in the simulator are calculated precisely using this method. This concept underlies CAE transient response and frequency response analyses. Start by imagining in the simulator what kind of waveform results from simply adding or subtracting the fundamental mode and the third mode.