LeoCrystal.  
 
Introduction.
LeoCrystal is a software program that performs numerical Monte Carlo modeling of reaction on the
surface of the growing crystal for illustrative educational and research purposes
in area of crystallization phenomena. With the help of this program you can estimate influence of effective geometrical sizes of structure elements of the crystal and thermodynamic parameters of the process on the topology and kinetic of the crystallization. As soon a process of crystal growth is presented itself in practically all major technology processes an in depth understanding of complexity of it is essential for professional research in different area of applied science. The creative presentation of the surface includes a threedimensional perspective projection and stereo view. It makes this software a great illustrative toll for teaching of the concept of phase transition for the students of very broad ranges of initial background.  
Theoretical background. Very moderate scientific background is needed to understand a material in this section. Preliminary runs of the program will make a great help to easy accommodate basic concepts. The crystal growth is a phase transition process with sharp border between it and initial feeding phase like a liquid, gas or plasma. The structure element (molecule) of the crystal could be determined as a minimum part of it when a reaction of incorporating its in the crystal will effect with changing energy of the whole system that will be equivalent to the condensation energy of the corresponding mass of crystal. In simple words the molecule is the minimum part of the crystal that behaves as a whole crystal. The principal difference of behavior of molecules in liquids is based on the principle of the long order in the crystals structure. Each molecule has exact position relatively to the other in crystal. In the every moment of time one molecule on the surface of a crystal have two options (taking diffusion out from consideration): to get out to initial matter or stay incorporated as a part of crystal. The same choice is true for the molecule outside of crystal in direct closeness to its surface. It can be incorporated into body of crystal or stay outside. The model implemented here is based on calculating these probabilities for each position on the surface of the crystal and comparing with the random number to decide what one of three possible events will happen: stepping ahead or back or just staying on its place. Probabilities of transition of molecule from and in crystal is calculated on the base of model of thermal activation reaction. It presumes that molecules perform thermal vibrations and could sometimes occasionally with cooperation of neighboring molecules accept enough energy E_{a}  (activation barrier), to overcome energy barrier to transform into another phase. Backward transition will demand to overcome activation barrier with a different tall. The difference between these barriers is indeed a movement force of the reaction that determined its direction from state with higher energy to the deeper down along the energy scale. The crystallization is such kind of process and it cause the exposition of the energy in form of heat that also named as changing of enthalpy ΔH. When the temperature is constant during the process (heat is conducting away) the difference between activation energies can be calculated by the formula: E_{a out}  E_{a in }= ΔG = ΔH*ΔT/To, (1) where E_{a out}  E_{a in} are activation energies to get molecule outside of the crystal and incorporate in its body correspondingly, ΔG  is so named changing of so named Gibbs potential, ΔH  changing enthalpy per one molecule, <>ΔT = ToT, To  temperature of equilibrium for given conditions, T  temperature. The frequency of passing through activation barrier can by calculated with help of Arrenius equation: γ = γ_{o} exp(E_{a}/kT), (2) where γ_{o}  thermal frequency of molecule vibration, k = 1.38* 10^{23 }J/grad (Boltzmann constant). In case if all position on the surface of the crystal is energy equivalent the rate of growth can be calculated from Turnbull formula: V_{c} = a C_{o }(γ_{in}γ_{out})= a C_{o }γo exp(E_{a in}/kT)*(1  exp( ΔG/kT), (3) where γ_{in}andγ_{out} frequencies to go in or out of crystal for any given molecule on the surface , a  height of the molecule in the growth direction, C_{o} concentration of the molecules in direct distance from the surface. The probabilities of these events to occur at the small period of time τ can be expressed with p_{in} = γ_{in} * τ and p_{out} = γ_{out}* τ. (4) The problem with the crystal growth is that position of molecules on the surface is not equivalent. They have different number of neighbors on various energy states. One of the formal way to deal with this situation that implemented in this model is to consider that at the elementary process of coming out off the crystal for one molecule is accompanied with changing of effective value of surface square in contact with initial matter. And as soon the surface has special exceed of energy surface one can add corresponding additive to the expression for the activation energy for jumping out of crystal. Using formula (1) we can write: E_{a out} = E_{a in} + ΔG' + ΔS*σ, (5) where ΔS  is changing surface as a result of one molecule going out of a crystal. It can be calculated on the base of formula ΔS = S_{m}  2* S_{n}, (6) where S_{m}  full surface of molecule and S_{n}  surface in direct contact with neighbors. Now we have all the necessary initial parameters to present basic formulas for modeling crystal growth behavior: p_{out} = p_{in}* exp( ΔG/kT +(S_{m}σ/kT)(12*S_{n}/S_{m})) (7) τ = p_{in} / (γ_{o} exp(E_{a}/kT)). (8) Most interesting conclusion from these equations is that there are only two initial parameters ΔG` = ΔG/kT, (9) and Δσ` = S_{m}σ/kT, (10) these along with sizes molecule in the three dimensions are determined all properties of the crystal growth behavior. More about fitting of experimental curves for temperature dependence of linear crystal growth with theoretical formulas can be read at the page describing usage of LeoStatistic for this goal.
 
Input of initial parameters of the crystal growth. In the introduction chapter we presented the initial parameters that are necessary to perform crystal growth simulation. They can be set up with help of tab control. That control could be also used independently as a calculator of the major thermodynamic parameters. Just print out new value in corresponding edit box and press ENTER (recommended) or come to other tab or begin new simulation process for updating it and all others related. Note that program permits to change calculated parameters forcing a resetting some of the initial ones as result of updating. Major idea is that after successful updating all other values need to correspond each others. The program will not permit to enter unreasonable values, setting it to minimum or maximum number from allowed range in a case. Note also that for calculation of the Δσ` surface of the molecule is calculated by formula: S_{m} = 2 K_{s} *(ab+bc+ac), (11) where a ,b ,c are sizes of the molecule along three dimensions (a in growth direction), and K_{s} expresses not 100% effective filling with molecules accessible volume around it. In the program it set up as 0.9.
The same tab control contains also theoretical values for rate of crystal growth calculated on the base presumption of realization of different mechanisms of surface reaction. Continues mechanism based on presumption on in average equivalent of all positions on the surface of crystal for incorporating molecules. For this case Turnbull formula (3) is valid. For case of mechanism on the base of fluctuation appearance of two dimensional nuclei on the smooth layer with later on filling out one layer there are used two formulas: for calculation of radius of critical two dimensional nuclei (that has minimum size that a able to future growth) r_{n} =ΔG/σ, (12) and for rate by this mechanism: V_{n} = exp(ΔG_{n}/kT)*V_{c}, (13) where ΔG_{n}  changing energy of critical two dimensional nuclei that could be calculated by formula: ΔG_{n} = πaσ2/ ΔG (14) There is one more broad discussed mechanism of the crystal growth  so named spiral dislocation growth in which one presumes that on surface there is always presented same step that cause a permanent existence on its place a peak of the two dimensional spiral with radius at its center equal to radius of critical nuclei. Velocity of crystallization by this mechanism is V_{n} = 2*(a/ r_{n} )*V_{c}, (15) These theoretical models represent major issues of the crystal growth at same specific sets of conditions. In fact there are numerous cases that not fit these models and need to run simulation model to realize all complexity of the process. Most critical point that compromised mentioned above theories is here the fact that time for appearance of new two dimensional nuclei is comparable with time of filling up one layer of the crystal in contradict of basis presumption of the theories. The modeling process is solving this problem.
 
Results of simulation process.
... Results of simulation process are presenting on the main screen that displayed simulation field with the several option of presentation and results.
There are two main way of presentation of the result of simulation:
 
A presentation of the surface. There are four ways of presentation of the surface of the crystal: The point of view menu
The difference in heights of the surface is represented with different colors of corresponding rectangles. The deeper the darker. The specific simulation area can be chosen for detailed look with selecting it with mouse at right button down till release. Zoom out/in is available with double click in area of simulation. This way of presentation is recommended. It permits fastest performance of the program. If running long term simulation fastest result could be reached if only several molecules are displayed.
The natural view of the surface. The point of view could be changed with the keyboard arrows buttons alone and together Ctrl/Alt: The same as previous except that with blue/red glasses its possible to resolute two images for left and right eyes observing stereo image.  
Main menu options: New.
Run.
Stop.
Save.
Load.
Quit.
 
Recommendations and troubleshooting.
 
Additional literature. There are number of the books and articles devoted to the crystal growth including the international journal with the same name. The list presenting bellow is not complete in any sense and could be consider only as source of inspiration for the developing the program and as an initial point for further research for the user.
