Snowflake model
Simple rulesA single snowflake has over a quintillion (1018) water molecules! How do molecules arrange themselves into such beautiful and intricate shapes? Is it possible to model snowflakes in computer code, on a pretty basic laptop?
From a few simple rules emerges the complexity of a snowflake. Two 'forces' are at work on the molecules of water vapour: the pulling strength at the surface of the snowflake, and pushing pressure of the vapour around the snowflake. If the surface is rough and bumpy, as opposed to smooth, there is a stronger attractive force to pull molecules into the nooks and crannies, to smooth it out. And if there is more vapour pushing, then more molecules bump up against the surface.
The 6 points of a snowflake will grow faster - and in unison - because they stick further out into the space around the snowflake where the vapour has higher saturation. And the spaces in between the points will fill in to smooth out the bumps.
My aim is to faithfully emulate the natural physics as much as I can. I want to generate the hexagonal symmetry naturally, not by coying one point to the 5 others. I want to generate a unique snowflake every time. But I've had to cut a few corners ... because a full model would be too computationally complex on my PC.
My second aim is to explore how different conditions reliably grow different types of crystal, based on the scientify models. At this stage, I have a working model that can generate different shapes of snow crystal, very reminiscent of real snow crystal, however I haven't been able to model real-world conditions like temperature and humidity. That is for future work.
My starting point is the science of snow crystals, developed by Ken Libbrecht and others. Crystallization is actually an extremely complex physical process that involves chaotic - but statistical - molecular reactions at the interface between a frozen surface and a vapour surface (some of which are not well understood yet). Despite this, there's a simple formula for growth. >
How a snow crystal forms (simplified)
(Summarized from Libbrecht's page on Snowflake Science)
A note on terminology: 'Snowflake' is the everyday name for just about anything that falls from the sky in the winter, whereas 'snow crystal' is the more specific technical name for an individual crystal of ice, what we normally call a snowflake.
A snow crystal forms as the water vapour around a seed ice crystal high in the clouds freezes onto the seed.
Snow crystals can form as plates, dendrites, prisms, needles, and columns, but always with hexagonal symmetry. Variations in temperature and humidity causes different types of snow crystals in the wild.
The temperature and humidity surrounding the crystal determine if molecules will freeze onto it. As a snow crystal falls through the clouds, the conditions change unpredictably, making the arms grow differently. But at any one instant the conditions around all six arms are the same, so each arm grows the same. Since every path through the clouds is different, every snow crystal is unique.
Snow crystals have a hexagonal, or six-fold, symmetry because of the angular 3D geometry of water molecules (H2O). This means new water molecules can only attach in certain way .
Two factors determine how water molecules freeze and attach to the growing crystal:
How the code does itBelow is a basic description of the algorithm. See the code on github for full details.
Setup
Growth phase
velocity = alpha x sigmawhere alpha is the Condensation Coefficient and sigma is the Vapour Saturation, at that potential attachment point.
Diffusion phase
Changing conditions