Waves of two different frequencies crossing a randomized square lattice

Sdílet
Vložit
  • čas přidán 7. 07. 2024
  • This simulation is similar to the one shown in the video • Waves of two different... , but instead of being on a regular square lattice, the position of the scatterers has been slightly randomized. The radius of the scatterers is also random. This has a dramatic effect on the waves, which have much more trouble crossing the lattice, a phenomenon related to Anderson localization.
    The frequency of the lower source is three times the frequency of the upper one. The resulting wavelengths are such that the open intervals in the grating are roughly between both wavelengths. As a result, waves of the lower source pass the grating a bit more easily, as can be best seen on the energy plot.
    This video has two parts, showing the same evolution with two different color gradients:
    Wave height: 0:00
    Averaged wave energy: 1:27
    In the first part, the color hue depends on the height of the wave. In the second part, it depends on the energy of the wave, averaged over a sliding time window. The contrast has been enhanced by a shading procedure, similar to the one I have used on videos of reaction-diffusion equations. The process is to compute the normal vector to a surface in 3D that would be obtained by using the third dimension to represent the field, and then to make the luminosity depend on the angle between the normal vector and a fixed direction.
    There are absorbing boundary conditions on the borders of the simulated rectangle. The display at the right shows a time-averaged version of the signal near the right boundary of the simulated rectangular area. More precisely, it shows the square root of an average of squares of the respective field value (wave height or energy).
    Render time: 34 minutes 25 seconds
    Compression: crf 23
    Color scheme: Part 1 - Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric Firing
    Part 2 - Inferno by Nathaniel J. Smith and Stefan van der Walt
    github.com/BIDS/colormap
    Music: "Where She Walks" by Everet Almond
    See also 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 hplgit.github.io/fdm-book/doc...
    C code: github.com/nilsberglund-orlea...
    www.idpoisson.fr/berglund/sof...
    Many thanks to Marco Mancini and Julian Kauth for helping me to accelerate my code!
    #wave #diffraction #grating
  • Věda a technologie

Komentáře • 17

  • @NeutroniummAlchemist
    @NeutroniummAlchemist Před 6 dny +1

    Very cool, but I can't look at it for very long, because the experience of looking at it is very similar to the experience of seeing a migraine aura.

  • @rusalkin
    @rusalkin Před 14 dny +7

    are those standing waves? blinking spots upper left lattice
    probably because of the rez though? if you "zoom" in they would disappear?

    • @NilsBerglund
      @NilsBerglund  Před 14 dny +3

      No, I think they are real, I also see them at max resolution. I would call them "leaky" standing waves, as they are not perfect and interact with the surroundings, but they are still pretty stable.

  • @sensebio
    @sensebio Před 6 dny

    beautiful, and the music!!!

  • @unvergebeneid
    @unvergebeneid Před 14 dny +9

    Is a randomised square lattice the poor man's Poisson disk or is there a deeper reason behind this sampling algorithm?

    • @NilsBerglund
      @NilsBerglund  Před 14 dny +6

      I would say that is a fair description, yes. This is a random point distribution I thought of before learning about Poisson disc processes.

  • @haakonah
    @haakonah Před 9 dny +1

    It looks very nice! The link to the French blog with further descriptions on implementations is not working. I'm curious why you have implemented it using finite differences as I'd imagine that's quite hard work. Have you tried to implement this e.g. in Fenics using finite elements, or do you think it would be difficult to make that run sufficiently fast?

    • @NilsBerglund
      @NilsBerglund  Před 9 dny +1

      Thanks, the link should work now. Finite differences seemed the easiest way to implement the simulation, and I have not tried other algorithms. How fast it runs will mainly depend on whether the code is compiled or not, and on the hardware you run it on. And also on how efficient the code is, of course, here I have benefited from advice to make the original code much faster.

  • @Grateful.For.Everything

    Quite enjoyable!!!! 🙏🏼

  • @MDNQ-ud1ty
    @MDNQ-ud1ty Před 14 dny +3

    Is there a lattice that can be designed that is as sparse as possible yet nearly completely block a specific frequency?

    • @cubertmiso
      @cubertmiso Před 13 dny

      why not? (i have no idea really)

    • @BoojumFed
      @BoojumFed Před 13 dny +1

      In general the closer to random the obstructions get the less energy makes it through (Natural mangroves for the win!); but if you're going for sparse you'd need to make up for the low overlap with sheer width of area/ number of "rows", wouldn't you?

    • @MDNQ-ud1ty
      @MDNQ-ud1ty Před 13 dny

      @@BoojumFed I don't know, that is why I ask.
      If, say, we are thinking about a particle, then it is very easy. You just have to place a "barrier" in it's direction and one would be good enough(unless it is much larger then it can "bend around" but that is a wave effect and gets into the issue at hand).
      So the question is if one can intelligent pick "barriers"(shapes, sizes, etc) and lay them out in such a way that one can nearly completely block an incoming fixed frequency wave with "least cost". I assume that one can ignore "edge conditions".
      E.g., with a wave there will be reflections and bends off each "lattice point". Can one intelligently design(say how AI designs some things that are very different than how we would imagine) such thing that is in some sense "optimal". Obviously a straight up solid barrier solves the problem transmission criteria as technically nothing can get through. Can we do better for specific frequencies or even more general waveforms?

  • @Advance493
    @Advance493 Před 14 dny

    Liked and subscribed

  • @danamulter
    @danamulter Před 13 dny

    Nils, do you have a pattern of scatterers that will make the end measurement peak go up and down the bar? Like, steadily oscillate the peak position? Can you make the emission peaks push the scatterers a little, and a scatterer that touches another scatterer double-strong and double-responsive (pushed more), and they stick together until a certain amount of energy in at once, then they break apart again and spread?
    I HAVE SO MANY QUESTIONS lmao

  • @osevenninefiver
    @osevenninefiver Před 14 dny

    sand?

  • @MoisesCaster
    @MoisesCaster Před 14 dny

    now do it with small convex structures. 😁