home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 16 / 016.d81 / t.crystals < prev    next >
Text File  |  2022-08-26  |  2KB  |  150 lines

  1.  
  2.        RANDOM CRYSTALLIZATION
  3.  
  4.  
  5. Written by: Mark Zimmerman
  6.  
  7. Random Thoughts: Programming,
  8.   Philosphy, and Crystals
  9. Commodore Microcomputers, October 1985
  10. Page 110
  11.  
  12.  
  13.   A crystal has a regular arrangement
  14.  
  15. of atoms or molecules, yet it forms
  16.  
  17. from a chaotic melt or solution,
  18.  
  19. where the atoms move around randomly
  20.  
  21. relative to each other.  Perfect
  22.  
  23. crystals form slowly.  If you try to
  24.  
  25. grow a crystal too fast, defects or
  26.  
  27. dislocations develop.  Annealing, a
  28.  
  29. process of slow heating and cooling,
  30.  
  31. can get rid of some defects without
  32.  
  33. having to melt the crystal and start
  34.  
  35. over.
  36.  
  37.   To experiment with this little
  38.  
  39. phenomena, you can use the CRYSTALS
  40.  
  41. program on this issue.
  42.  
  43.   The program CRYSTALS is a short
  44.  
  45. BASIC program that simulates the
  46.  
  47. motion of atoms in a two-dimensional
  48.  
  49. world.  The atoms move in a limited
  50.  
  51. area, surrounded by a solid wall of
  52.  
  53. "frozen" atoms to keep them confined.
  54.  
  55.   Atoms tend to stick to each other.
  56.  
  57. They have lower energy if they have
  58.  
  59. neighbors.  This stickiness accounts
  60.  
  61. for crystallization.  The chance of
  62.  
  63. an atom moving depends on the
  64.  
  65. temperature and the difference of
  66.  
  67. energy before and after the move.
  68.  
  69. Specifically, atoms obey the
  70.  
  71. Boltzmann Law, which says that the
  72.  
  73. chance of an atom moving is
  74.  
  75. proportional to:
  76.  
  77.       -(change in energy)/temperature
  78.      e
  79.  
  80. This means that things tend to move
  81.  
  82. "downhill", toward lower energy, with
  83.  
  84. random fluctuations from time to
  85.  
  86. time.
  87.  
  88.   CRYSTALS defines the area as a
  89.  
  90. 10x10 grid.  The energy of an atom is
  91.  
  92. defined to be -1 for each neighbor it
  93.  
  94. has.  An atom with no neighbors has
  95.  
  96. zero energy.  One with four neighbors
  97.  
  98. has energy of -4.  The user supplies
  99.  
  100. the temperature and the number of
  101.  
  102. atoms (1-99).  Once the model is
  103.  
  104. running, an atom is represented by a
  105.  
  106. small dot in the grid.  The program
  107.  
  108. will then find a random atom and
  109.  
  110. check its energy for movement.  The
  111.  
  112. program will then update the display
  113.  
  114. and continue.  If you want to exit to
  115.  
  116. try again or to return to LOADSTAR,
  117.  
  118. simply press a key.
  119.  
  120.  
  121. *** NOTE ***
  122.   The screen display is not the same
  123. as that in the magazine.  It was
  124. enhanced by Alan Gardner.
  125.  
  126.  
  127.   This program is copyrighted by
  128.  
  129. Commodore magazine.  All rights to it
  130.  
  131. are reserved.  LOADSTAR has relieved
  132.  
  133. you from the burden of keying in this
  134.  
  135.     program.  For more complete
  136.  
  137. information about this program, refer
  138.  
  139.     to the October 1985 issue of
  140.  
  141.  Commodore Microcomputers magazine.
  142.  
  143.  
  144.  
  145. >Files used:  CRYSTALS
  146.  
  147.  
  148. ----------< end of article >----------
  149.  
  150.