Physics simulation - forming solids, liquids and gases from particles

  Рет қаралды 73,749

Kristjan Kongas

Kristjan Kongas

Күн бұрын

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/kon...
Music: Ladybug - Quincas Moreira

Пікірлер: 40
@kkongas
@kkongas 10 ай бұрын
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 5 жыл бұрын
Super cool! Nice job.
@absolute___zero
@absolute___zero 2 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 3 жыл бұрын
It looks like the Space Simulation Toolkit project. Beautiful stuff!
@GAMEDATA1010
@GAMEDATA1010 4 жыл бұрын
Can you show us more videos I’m genuinely interested
@duality4y
@duality4y 4 жыл бұрын
More please this is just to good
@riadhalrabeh3783
@riadhalrabeh3783 5 жыл бұрын
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.
@nix3l_
@nix3l_ 3 жыл бұрын
Ok this is so impressive
@denyraw
@denyraw 3 жыл бұрын
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 3 жыл бұрын
However you have inspired me to try again, maybe it will work this time.
@kkongas
@kkongas 3 жыл бұрын
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 3 жыл бұрын
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.
@Omwekiatl
@Omwekiatl 3 жыл бұрын
great! incredible!
@walknotes
@walknotes 4 жыл бұрын
Great video! I like it
@iladdiewhiskynerd4924
@iladdiewhiskynerd4924 2 жыл бұрын
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?
@HugoHabicht12
@HugoHabicht12 3 жыл бұрын
Love it 👌
@ythewoodpeckerfan5286
@ythewoodpeckerfan5286 3 жыл бұрын
Where can i download this on my play store (if i can?)
@samira1584
@samira1584 4 жыл бұрын
Thank u so much!
@MrGN-yy6op
@MrGN-yy6op Жыл бұрын
wow that's insane bro
@jaykay1332
@jaykay1332 5 жыл бұрын
Damn nice nice microscope m8!
@F100cTomas
@F100cTomas 4 жыл бұрын
meight?
@jmsequeira
@jmsequeira 3 жыл бұрын
Great. Thank you.
@snickle1980
@snickle1980 4 жыл бұрын
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 3 жыл бұрын
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 11 ай бұрын
try SST
@blablablablablablblablabla
@blablablablablablblablabla 5 жыл бұрын
Very nice, can you do it in 3d?
@kkongas
@kkongas 4 жыл бұрын
Probably too CPU intense. I already optimized everything I could but the larger simulations still don't work in real time.
@archbirdplus
@archbirdplus 4 жыл бұрын
@@kkongas try on gpu
@BjerkeRobin
@BjerkeRobin 3 жыл бұрын
Ok... that was epic.
@fusar9567
@fusar9567 4 жыл бұрын
Nice
@gaurangagarwal3243
@gaurangagarwal3243 5 жыл бұрын
Coooool
@MrGN-yy6op
@MrGN-yy6op Жыл бұрын
bro I get alot of ideas but then discover someone gott them first
@numero7mojeangering
@numero7mojeangering 4 жыл бұрын
Looks like the magma in the sun
@trentconley4374
@trentconley4374 3 жыл бұрын
where could I find the code?
@kkongas
@kkongas 3 жыл бұрын
Link in the description: github.com/kongaskristjan/PhaseTransition
@trentconley4374
@trentconley4374 3 жыл бұрын
@@kkongas Thank you so much!
@zoryoto5496
@zoryoto5496 Жыл бұрын
Gg for you script , pleas give sourc code
I Made an Entire Game from Particle Physics
9:01
Gonkee
Рет қаралды 456 М.
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 6 МЛН
Minecraft Creeper Family is back! #minecraft #funny #memes
00:26
Simulating Particle Life
18:18
Digital Genius
Рет қаралды 247 М.
How Particle Life emerges from simplicity
10:16
Tom Mohr
Рет қаралды 351 М.
Soft Body Physics Explained
10:47
Gonkee
Рет қаралды 535 М.
AI Learns to Run Faster than Usain Bolt | World Record
10:22
cozmouz
Рет қаралды 859 М.
ALL OF PHYSICS explained in 14 Minutes
14:20
Wacky Science
Рет қаралды 2,6 МЛН
A 1,000,000,000 Particle Simulation! 🌊
6:36
Two Minute Papers
Рет қаралды 692 М.
Particle Lenia
4:15
Programmable Artificial Life
Рет қаралды 45 М.
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,8 МЛН
The Most Mind-Blowing Aspect of Circular Motion
18:35
All Things Physics
Рет қаралды 704 М.
Real time Fire Simulation
7:23
Pezzza's Work
Рет қаралды 156 М.