# Differences

This shows you the differences between two versions of the page.

 cs190c:project3c_09 [2009/04/14 20:22]seh cs190c:project3c_09 [2009/04/19 21:45] (current)seh Both sides previous revision Previous revision 2009/04/19 21:45 seh 2009/04/14 20:22 seh 2009/04/14 20:01 seh 2009/04/14 16:46 seh 2009/04/14 16:45 seh 2009/04/14 16:31 seh 2009/04/14 15:29 seh 2009/04/14 14:49 seh 2009/04/04 10:35 seh 2009/04/04 10:32 seh 2009/04/04 10:32 seh 2009/04/04 10:27 seh created 2009/04/19 21:45 seh 2009/04/14 20:22 seh 2009/04/14 20:01 seh 2009/04/14 16:46 seh 2009/04/14 16:45 seh 2009/04/14 16:31 seh 2009/04/14 15:29 seh 2009/04/14 14:49 seh 2009/04/04 10:35 seh 2009/04/04 10:32 seh 2009/04/04 10:32 seh 2009/04/04 10:27 seh created Line 26: Line 26: - visuals: Whether or not to draw visuals for the simulation. Similar to the corresponding parameter in ideal_gas. - visuals: Whether or not to draw visuals for the simulation. Similar to the corresponding parameter in ideal_gas. - Function ising_model runs the simulation on a grid of size ''​N×N'',​ performing //steps// iterations, with each iteration performing ''​N²''​ trials (through flips). ​ One trial corresponds to perturbing the energy of the system by flipping the magnetization of a random particle. Calculating the change in energy after a flip needs to consider the interactions with particle'​s four neighbors (the torus gives //every// particle four neighbors). ​ For one flip, the energy could increase or decrease by at most 4.  The change in energy is to be "​absorbed"​ by the demon particle. ​ A proposed change is rejected if it would make the demon'​s energy negative. + Function ising_model runs the simulation on a grid of size ''​N×N'',​ performing //steps// iterations, with each iteration performing ''​N²''​ trials (through flips). ​ One trial corresponds to perturbing the energy of the system by flipping the magnetization of a random particle. Calculating the change in energy after a flip needs to consider the interactions with particle'​s four neighbors (the torus gives //every// particle four neighbors). ​ For one flip, the energy could increase or decrease by at most 8 (when changing from -4 to +4, or vice versa).  The change in energy is to be "​absorbed"​ by the demon particle. ​ A proposed change is rejected if it would make the demon'​s energy negative. For the Ising simulations,​ choose as the initial state the state with the lowest energy (i.e., all spins are in the same direction). This state has a system energy of -2N². The total energy will vary from -2N² to 0. Note that when the total energy is -2N², the demon energy is 0. For this particular state, the system cannot change from its initial state, because there is no energy for the transition. However, it is an easy state to start the simulation in.  Once the system energy -2N² + C, the demon has an energy of C, and now the system can move out from its initial state by taking energy from the demon. ​ Your experimental results will show that the system will quickly reach an equilibrium independent of the initial state. ​ For the Ising simulations,​ choose as the initial state the state with the lowest energy (i.e., all spins are in the same direction). This state has a system energy of -2N². The total energy will vary from -2N² to 0. Note that when the total energy is -2N², the demon energy is 0. For this particular state, the system cannot change from its initial state, because there is no energy for the transition. However, it is an easy state to start the simulation in.  Once the system energy -2N² + C, the demon has an energy of C, and now the system can move out from its initial state by taking energy from the demon. ​ Your experimental results will show that the system will quickly reach an equilibrium independent of the initial state. ​