Visualize the reflection and refraction of elastic waves in a 1D heterogeneous elastic medium, building upon the program constructed in the lab meeting.
The simulation models a heterogeneous elastic medium consisting of 100 coupled oscillators with different material properties in two distinct regions.
-
Medium Structure: 100 oscillators total
- First 50 oscillators: Mass
m1, connected by springs with constantk1 - Next 50 oscillators: Mass
m2, connected by springs with constantk2
- First 50 oscillators: Mass
-
Boundary Conditions:
- Right-hand end: Fixed boundary (
eta_d = 0) - Left-hand end: Driven by sinusoidal pulse input
- Right-hand end: Fixed boundary (
-
Input Signal:
- Single "semi-wave" pulse of sinusoidal type
eta_sgrows sinusoidally fromt = 0to maximum amplitude- Then it decreases to zero and remains zero for the rest of the simulation
- Represents one half-period of harmonic oscillation
-
Wave Propagation Visualization:
- Pulse propagation toward the medium interface
- Formation and propagation of reflected pulse
- Formation and propagation of refracted (transmitted) pulse
-
Analysis Requirements:
- Understand the relationship between wave velocity and material properties (
mandk) - Observe wave behavior at the material interface
- Analyze reflection and transmission coefficients
- Understand the relationship between wave velocity and material properties (
- Create a 100-oscillator array with heterogeneous properties
- Define the material interface at oscillator 50
- Set appropriate initial conditions (all oscillators at rest)
- Left boundary: Implement sinusoidal pulse driver
- Right boundary: Fix displacement (
eta_d = 0)
- Generate a single semi-wave sinusoidal pulse
- Control pulse duration and amplitude
- Ensure smooth pulse injection
- Implement equations of motion for coupled oscillators
- Account for different masses and spring constants
- Use an appropriate numerical integration method
- Handle interface conditions properly
- Real-time animation of oscillator displacements
- Track pulse propagation, reflection, and refraction
- Plot displacement vs. position over time
- Include material property indicators
- Calculate wave velocities in each medium
- Determine reflection and transmission coefficients
- Verify theoretical relationships:
v = √(k/m)
The wave velocity in each medium is given by:
v₁ = √(k₁/m₁) (first medium)
v₂ = √(k₂/m₂) (second medium)
- Reflection: Portion of the wave bounces back into the first medium
- Refraction: Portion of the wave transmits into a second medium
- Impedance matching: Determines reflection/transmission ratios
- Reflection coefficient:
R = (Z₂ - Z₁)/(Z₂ + Z₁) - Transmission coefficient:
T = 2Z₂/(Z₂ + Z₁) - Where
Z = √(mk)is the mechanical impedance
- Initial pulse propagation in the first medium
- Partial reflection at the interface (pulse traveling leftward)
- Partial transmission into a second medium (possibly different velocity)
- Multiple reflections from the fixed right boundary
- Measure wave velocities in both media
- Compare with theoretical predictions
- Analyze amplitude ratios of reflected/transmitted waves
- Choose an appropriate time step for stability
- Handle discontinuity at the material interface
- Ensure energy conservation (within numerical limits)
- Color coding for different media regions
- Real-time displacement plotting
- Optional: Energy density visualization
- Interface position marking
- Choose
m₁,m₂,k₁,k₂for clear wave behavior demonstration - Pulse frequency should be appropriate for the system response
- Simulation duration should capture multiple reflections
- Clear visualization of incident, reflected, and transmitted pulses
- Quantitative agreement with theoretical wave velocities
- Demonstration of wave impedance effects at the interface
- Understanding of the relationship between material properties and wave behavior