2018-12-14
[public] 6.54K views, 188 likes, dislikes audio only
For those who are more curious, this video is the complete (20 minute long) simulation of the 3D crystalization demo. (like I expect anybody to watch it front to back...)
The simulation is based off of the "Energy Verlet" molecular dynamics method. I wrote it in Matlab to run on a 1060 6GB GPU. By the time all the particles are in the simulation, the program makes multiple trips to the graphics card for every timestep or else runs out of graphics memory. massively parallel computation requires a LOT of memory, apparently... There is no sub-binning of the simulation. Every pair of particles has its forces calculated in every timestep. Although far-apart particles don't apply a lot of force on each other, I couldn't make a more efficient system to only solve for adjacent particles that was better than calculating all the inter-pair distances in one line of code... For 16000 particles, that's something like 250 million square roots that need to be calculated every timestep, let alone the actual force vectors after you figure out how far apart everything is...
The particles obey a sum of the Lennard Jones potential (so that particles don't go through each other) and the Coulomb potential (so that red and blue attract and like colors repel). Even with these two perfectly "spherical" potentials, an ordered 3D structure forms, with both a crystal lattice and habit.
Since a couple comments were asking for it, I cleaned up my code a bit and have it posted here. If you have any questions, let me know in the comments so that anybody can read the answers!
https://github.com/BrianHaidet/AlphaPhoenix/tree/master/CsCl_Molecular_Dynamics_3D
This Video Series:
Crystals (The main video): /youtube/video/06TscuHNvGQ
The entire CsCl crystal simulation, growing a crystalline "nanoparticle" from 2 to 16384 particles: /youtube/video/6DlRsPo-dxY
Extra footage of the water-bath 2D demo: /youtube/video/aO-u6fJDwIs
Epilogue - Why cubic crystals don't always make cubic shapes: coming soon
GIFs in this series:
2D crystal water bath:
3D Simulated nanoparticle:
Music Credits:
I Dunno by grapes is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/3.0/)
http://ccmixter.org/files/grapes/16626
Operatic 3 by Vibe Mountain is licensed under a Creative Commons license
Brighton Lights by Noir Et Blanc Vie is licensed under a Creative Commons license
Move Ya by Max Surla/Media Right Productions is licensed under a Creative Commons license
Birth Noir by Noir Et Blanc Vie is licensed under a Creative Commons license
Space Walk by Silent Partner is licensed under a Creative Commons license
Flickering by VYEN
New Land by ALBIS is licensed under a Creative Commons license
Arcadia - Wonders by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/)
Source: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100326
Artist: http://incompetech.com/