Probably kindah like a Snowflake simulation
Made for a christmas card kindah thing.
hum / temp
(click for shitty simulation printouts)
Step cnt: Total ice:
; hum / temp
It has a whole bunch of "crystal forms". As with the turtles, the query string can mess with a bunch of parameters. This is mode=grid, ordering somewhat by interest, there is hex, tri, cross. (And block, tri2, badhex, broadhex, hibroadhex, hihex, flathex, and asymhex) These are just little lists of relative positions new ice can form. Given symmetry and that they need to ultimately adjoin on the simulation grid, there are limits.
Description of simulation
It simulates freezing-on and heat conduction on a grid. Each square on the grid has two values, temperature(T) and ice thickness(d).
The heat transferred between two squares is proportional to heat_transferred∝ΔT⋅d⋅dt/s with s the square size and dt the timestep. In the code, the timestep and square size are effectively in the constants. I didn't really go to much length with regard to accuracy at all. The ice thickness is estimated to be the average thickness between the two
The temperature goes up ∝heat_transferred/d (if thickness is uniform, it ultimately does not matter.
Air conducts heat too, to a lesser degree. Also vertical and horizontal to-air heat conduction is different. The temperature of the air is taken to be constant. (as the snowflake falls through air) The air temperature and humidity vary randomly, which is why it grows at varying rates.
Ice can only form at 1) where there is already ice and 2) if one of the nearby squares has more than some amount of ice. The different crystal forms are about which nearby squares.
Freezing adds heat, the amount it freezes is proportional to -humidity⋅Temperature. Limited by the temperature change due to added heat never sending the temperature above zero.
Realism of simulation
I do not know, really, i would suspect very low. I think the -humidity⋅Temperature is probably wrong. Not quite sure what it should be.
In many crystal formation cases, it might be kindah close, different directions of growth could have different affinities. Instead of heat conduction you could consider diffusion of the particles that are crystalizing.(or both)
One might even consider a local thermal equilibrium model. Possibly accurate in some cases.
One thing i have wondered for a time now, is how much you could control crystal growth. For instance when voltage controls crystal growth on the cathode. (a time-dependent voltage at the cathode might be able to have more control over the voltages across the crystal)