waves
Mathematical Programming with Python
https://people.sc.fsu.edu/~jburkardt/classes/...
python_2025/waves/waves.html
waves:
we consider the wave equation, a partial differential equation
in 1 or 2 space dimensions and time. For simplicity, we use
periodic or zero boundary conditions. We also try to make
animations of the 1D and 2D problems.
The wave equation has the form
d^2 u d^2 u
----- = c -----
dt^2 dx^2
where c represents the wave speed.
Lecture notes:
-
waves.pdf,
notes by Christian Hill about the 2D wave equation codes,
mostly about how to discretize the equation, and to treat
the boundary conditions.
1D wave equation
-
wave_pde.py,
simulates a solution of the 1D wave equation,
with periodic boundary conditions. It generates a surface
plot of all the solutions, as well as individual frames from
which an animation can be made.
-
wave_pde.png,
a surface plot of all the solutions.
-
wave_pde.gif,
a GIF animation of the solutions.
-
absorbing.py,
the 2D wave equation, with an absorbing boundary condition,
and animation.
-
raindrops.py,
the 2D wave equation, with random raindrops, and
an absorbing boundary condition, and animation.
-
reflecting.py,
the 2D wave equation, with a reflecting boundary condition,
and animation.
-
wave_2d_pde.py,
defines the WaveEqn2D class needed for the 2D wave equation
computations.
Last revised on 01 April 2025.