Physics simulation - forming solids, liquids and gases from particles

Sdílet
Vložit
  • čas přidán 15. 12. 2018
  • This is a demonstration of a particle simulator I recently developed. In this simulation, two forces counteract between particles - short range repulsion and slightly longer range attraction. In real physics, attraction is caused for example by dipole forces between particles, while repulsion can be explained with the Pauli exclusion principle. Despite not an accurate model of physics, these made up forces obey natural conservation laws - conservation of energy, momentum and angular momentum. Several physical phenomena arise naturally and are clearly visible: solid, liquid and gaseous states of matter, surface tension, diffusion, buoyancy (with the help of a third force, gravity).
    Particle types:
    1) white particles - small, low attraction force, low repelling force
    2) cyan particles - large, high attraction force, high repelling force
    3) yellow particles - large, no attraction force, high repelling force
    Source code available at github.com/kongaskristjan/Pha...
    Music: Ladybug - Quincas Moreira
  • Věda a technologie

Komentáře • 40

  • @kkongas
    @kkongas  Před 8 měsíci +2

    Code is available here: github.com/kongaskristjan/PhaseTransition
    In case any machine learning engineers/researchers are reading this, you might be interested in this project too: github.com/kongaskristjan/pytest-visual
    My github profile: github.com/kongaskristjan

  • @BaKerSk815
    @BaKerSk815 Před 5 lety +76

    Super cool! Nice job.

  • @absolute___zero
    @absolute___zero Před 2 lety +118

    I have a question, are all the laws of physics discovered enough to make a simulator that fully simulates real world? Or is it just to simulate approximately covering only small part of the reality?

    • @LEGOBULDER123
      @LEGOBULDER123 Před 10 měsíci +8

      Having just completed a degree in physics, I can answer with a bit certainty that we do not know enough to fully simulate the world.
      As an example, both quantum mechanics, general relativity, and their intersection are not completely understood. Pretty much all fields of physics are in a constant flux of new information changing small portions of the study.
      As such, we can only simulate a small portion of reality, generally within the human scope of living, in well enough detail to be accurate. We are centuries, if not millenniums, away form being able to create a theoretical perfect simulation.

    • @DescendDab
      @DescendDab Před 10 měsíci +2

      I don't think it can fully simulate the real world (depending on how big your simulation is, maybe very specific simulations can be realistic, but i don't think 100% realistic as for example gravity on Earth is slightly different everywhere)

    • @alverpo9935
      @alverpo9935 Před 10 měsíci +5

      In the case of a gas we fully know the laws that the sistem follows, but the problem is not theorical but computacional. Simulating a sistem of billions and billions of particles is imposible. To study this kind of sistems we use stadistical mechanics. So yes, we know the laws that a gas follows but we cant recreate it because the limitations of ours computers (the simulation would be longer than the age of the universe and only for a common gas). Anyway in the case of a gas whit less particules you could do a perfect realistic simulation.

  • @busy_beaver
    @busy_beaver Před 3 lety +23

    It looks like the Space Simulation Toolkit project. Beautiful stuff!

  • @GAMEDATA1010
    @GAMEDATA1010 Před 4 lety +37

    Can you show us more videos I’m genuinely interested

  • @duality4y
    @duality4y Před 4 lety +3

    More please this is just to good

  • @walknotes
    @walknotes Před 4 lety +1

    Great video! I like it

  • @Omwekiatl
    @Omwekiatl Před 3 lety +1

    great! incredible!

  • @nix3l_
    @nix3l_ Před 3 lety +2

    Ok this is so impressive

  • @HugoHabicht12
    @HugoHabicht12 Před 3 lety +2

    Love it 👌

  • @riadhalrabeh3783
    @riadhalrabeh3783 Před 4 lety +8

    Very very nice. I looked at the link given above, but would like to find out if this is published anywhere. Also the computer language, the force law formula, and the computer time and storage. Thanks.

  • @jmsequeira
    @jmsequeira Před 2 lety

    Great. Thank you.

  • @samira1584
    @samira1584 Před 3 lety +1

    Thank u so much!

  • @BjerkeRobin
    @BjerkeRobin Před 2 lety

    Ok... that was epic.

  • @MrGN-yy6op
    @MrGN-yy6op Před 9 měsíci

    wow that's insane bro

  • @iladdiewhiskynerd4924
    @iladdiewhiskynerd4924 Před 2 lety +1

    I came upon your video since I am looking for software that could model the shape of a “could of gas” which is evaporating from the surface of an “alcoholic beverage” and is bouncing of the internal faces of a 3D glass. What I want to find out is if, in the model, the concentration of aroma is different at the opening of the glass, depending in the curvature of the glassware. Do you know any software or models that could work for such a case?

  • @fusar9567
    @fusar9567 Před 4 lety +1

    Nice

  • @gaurangagarwal3243
    @gaurangagarwal3243 Před 4 lety +1

    Coooool

  • @denyraw
    @denyraw Před 3 lety +11

    I once tried to program such a simulation but the particles never formed those crystalline solid patterns and moved around like crazy most of the time. What am I doing wrong? What formula should I use for repulsion of particles?

    • @denyraw
      @denyraw Před 3 lety +1

      However you have inspired me to try again, maybe it will work this time.

    • @kkongas
      @kkongas  Před 3 lety +19

      1) Integration step must be reasonably accurate - energy must be conserved pretty well. If simulation blows easily up, you either need a better integrator (I use RK4 instead of the intuitive Euler), smaller step size (eg. I do 5 steps per frame display), or smoother forces (I avoid infinite forces for zero distance particles).
      2) Particles must attract at longer distances and repel at shorter distances.
      3) Randomly creating new particles tends to add too much energy, and most/all particles are forced into gaseous state. I actually slow down particles while they are created.
      Solid state shouldn't actually be too hard to achieve if you simply cool particles down enough. Liquid-like state tends to be flimsy though, requiring much more accurate integration, correct parameters and careful temperature adjustment.

    • @denyraw
      @denyraw Před 3 lety +1

      I have managed to create solids before you replied but they are so soft that gravity melts them. Thank you for your advice it will greatly improve my simulation.

  • @ythewoodpeckerfan5286
    @ythewoodpeckerfan5286 Před 3 lety +2

    Where can i download this on my play store (if i can?)

  • @jaykay1332
    @jaykay1332 Před 4 lety +7

    Damn nice nice microscope m8!

  • @MrGN-yy6op
    @MrGN-yy6op Před 9 měsíci

    bro I get alot of ideas but then discover someone gott them first

  • @blablablablablablblablabla

    Very nice, can you do it in 3d?

    • @kkongas
      @kkongas  Před 4 lety +8

      Probably too CPU intense. I already optimized everything I could but the larger simulations still don't work in real time.

    • @archbirdplus
      @archbirdplus Před 4 lety +5

      @@kkongas try on gpu

  • @numero7mojeangering
    @numero7mojeangering Před 4 lety +1

    Looks like the magma in the sun

  • @snickle1980
    @snickle1980 Před 3 lety +2

    I'm looking for a simulation/game that replicates gravity and gas...gas forming into stars, planet formation etc...Universe sandbox2 comes close, but its just not there yet.
    Does anyone know of similar simulations and games like this?
    (disclaimer. i dont currently own a NASA supercomputer)

    • @latentspace
      @latentspace Před 3 lety +1

      Softology’s “Visions of Chaos” contains a number of GOL and gravity sims that might be what you’re looking for. The software is free to download, check it out!

    • @dylanherrera5395
      @dylanherrera5395 Před 8 měsíci

      try SST

  • @trentconley4374
    @trentconley4374 Před 2 lety +1

    where could I find the code?

    • @kkongas
      @kkongas  Před 2 lety +1

      Link in the description: github.com/kongaskristjan/PhaseTransition

    • @trentconley4374
      @trentconley4374 Před 2 lety

      @@kkongas Thank you so much!

  • @zoryoto5496
    @zoryoto5496 Před 9 měsíci

    Gg for you script , pleas give sourc code