After having tried several set-up of circular phased arrays, with various degrees of directionality in the emitted beam, here is a first version succeeding in emitting mostly in one direction. It is based on a principle pointed out in a comment, saying that the sources should oscillate in the same way as a planar wave crossing the array in the desired direction.
Phased arrays are computer-controlled antennas, whose phase is altered in such a way that the emitted signal propagates only in certain directions, without moving the antennas. Antennas sending multiple beams are used in wireless communication to send several signals at once. If the antenna is well-designed, one can assign a different signal to each beam.
The array consists in 25 emitters, which oscillate with the same amplitude and frequency, but with a phase that depends on their x-position. The phase matches that of a planar wave crossing the array from left to right, at about the same speed as the wave speed in the medium.
The video has two parts, showing the same simulation with two different color schemes:
Wave height: 0:00
Averaged energy: 1:25
In the first part, the color hue shows the wave height. In the second part, it shows the energy, averaged from the beginning of the simulation. There are absorbing boundary conditions on the outer boundaries of the simulation. Here the direction-dependence of the beams is more visible in the energy representation. In the wave height representation, it appears as slight phase shifts between the wave fronts along certain directions, which is however somewhat obscured by unwanted reflections on the simulation boundary.
Render time: 39 minutes 6 seconds
Color scheme: Part 1 - Twilight by Bastian Bechtold
https://github.com/bastibe/twilight
Part 2 - Inferno by Nathaniel J. Smith and Stefan van der Walt
https://github.com/BIDS/colormap
Music: "Secret Conversations" by The 126ers@hutchinw
See also https://images.math.cnrs.fr/Des-ondes... for more explanations (in French) on a few previous simulations of wave equations.
The simulation solves the wave equation by discretization. The algorithm is adapted from the paper https://hplgit.github.io/fdm-book/doc...
C code: https://github.com/nilsberglund-orlea...
https://www.idpoisson.fr/berglund/sof...
Many thanks to Marco Mancini and Julian Kauth for helping me to accelerate my code!