I've taken the scientific background primarily from Ken Libbrecht,
who studies the science of snow
crystals. He developed a scientific model of snow crystal
formation.
What I'm working on here is a computational model for the formation and
growth of snow crystals. My aim is to emulate the natural physics as much
as I can. The model is much-simplified, as you would expect, since
crystallization at the molecular level is complex and not yet well understood, not
to mention the computational complexity of emulating the process faithfully.
Snow crystals form as plates, stellar plates, dendrites, prisms,
needles, and columns. Scientists have worked out how the variation
in temperature and humidity will form different types of snow
crystals in the wild. The varying conditions affect the growth in
3D, including the growth of facets and branches.
My aim with the computational model is to explore how different
conditions reliably grow different types of crystal, and thus learn more
about snow crystal growth. 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.
How a snow crystal forms (simplified)
This section is 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
freezes onto the seed, as it falls through the clouds.
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 patterns.
As a snow crystal falls through the clouds, the temperature and
humidity change unpredictably, and these changes make 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.
Two properties determine how water molecules freeze and attach to the growing crystal:
The surface physics of the crystal itself, including the surface structure, temperature, and humidity
The vapour saturation near the surface of the crystal.
How the code does it
My model is a huge simplification, but it is nonetheless based on physics principles:
Setup
I simplify to 2D (flat) crystals, rather than 3D
A hexagonal lattice is hard-coded (like hex graph paper), which
simulates the hex structure of real ice crystals
The 'molecules' are cells on the lattice, much much larger than
real molecules would be
You can think of each cell in the lattice as a large volume of
water molecules that has a saturation, which condenses altogether
as a single 'modecule' onto the growing crystal
There are two hex arrays:
The vapour saturation at each cell; this models the 'world'
The crystal itself (1 = ice, 0 = vapour), surrounded by vapour
The crystal starts as a small hexagon seed crystal
The algorithm them iterates over two phases: crystal growth and
vapour diffusion
Growth phase
During the growth phase, the algorithm checks every vapour cell
on the crystal surface (ie next to already crystallized cells).
Each potential attachment point will have a growth velocity,
dependent on the surface physics and the vapour saturation. If the
velocity is high enough, then the vapour cell freezes onto the crystal
The algorithm calculates the velocity using a simplified version
of Libbrecht's key formula:
velocity = alpha x sigma
where alpha is
the Condensation Coefficient and sigma is the Vapour Saturation, at
that potential attachment point
The Condensation Coefficient (alpha) is based on the number of
surrounding already condensed cells (more ice means higher alpha and
higher chance to condense nearby cell)
Initially, the Vapour Saturation (sigma) of every cell in the
vapour is set to a uniform initial value. When a cell condenses, it
captures the vapour from the cell and adjoining cells, ie taking
water out of the air and into the ice, thus reducing the
saturation. If the saturation is too low, because it's all been
captured in the snow crystal, then a cell cannot condense (because
the velocity will be low)
Diffusion phase
In the diffusion phase, the algorithm moves vapour saturation
from highly saturated cells to lower saturated cells over the whole
vapour array, simulating how the vapour pressure drives to
equalize saturation.
Changing conditions
To model changing conditions, a single variable representing the
conditions is factored into the sigma calculation of the velocity
formula. After each iteration, the conditions variable is modified
by a random walk, up or down, simulating unpredicable temperature
and humidity changes. The snowflake keeps its symmetry because
conditions change only after a complete iteration of growth and
diffusion condensation. If conditions were to change continuously,
then the snowflake would become degenerate.
There are several user-specified parameters:
Attachment_Power: A constant factor that affects the
contribution of the Condensation Coefficient (alpha) to the
velocity
Velocity_Limit: A minimum threshold on velocity (expressed
as a percentage of the maximum velocity in the iteration) for a
cell to condense into ice
Vapour_Reduction_Factor: The vapour saturation left in the surroundings cells, after a cell condenses into ice, capturing some of the vapour.