Coder Social home page Coder Social logo

willpugs / stat-mech-monte-carlo Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3.87 MB

Computer simulation of the Ising model.

Jupyter Notebook 90.73% Python 9.27%
ising-model xy-model n-vector-model physics-simulation statistical-mechanics thermodynamics

stat-mech-monte-carlo's People

Contributors

willpugs avatar

stat-mech-monte-carlo's Issues

Metropolis Rule

Implement the Metropolis rule and include the option to use this rule in the simulations.

1D Energies

The full_sim_1d function when asked to simulate for energies returns a ufunctypeerror for addition in the energy_change_1d function.

I think this is because at some point the names of two variables get mixed up but I cannot find which variables or where this happens (I think it is most likely the grid/strip or idx variable that gets mixed up somehow).

Energy and Heat Capacity

Need to define a function to find the average energy of a system at various temperatures then use this relation to find Cv vs T.

To-do in 1D and 2D.

2D Critical Exponents

We have two possible values for the H=0 critical exponents of the 2D Ising model.

Exact results from Onsager:

  • $\alpha=0(log)$
  • $\beta=1/8$
  • $\gamma=7/4$
  • $\delta=15$
  • $\eta=1/4$
  • $\nu=1$

Mean field results (applies to our simulation):

  • $\alpha=0(disc.)$
  • $\beta=1/2$
  • $\gamma=1$
  • $\delta=3$
  • $\eta=0$
  • $\nu=1/2$

<m> Sign

Do we take the absolute value of when running full_sim functions?

The functions for the expectation values of in 1D and 2D assume that >= 0 always.

Correlations

Correlations between spins in the 1D H=/=0 case are not what we would expect, there is too little correlation.

In-Text Citations

More in-text citations are need throughout the written report in the .ipynb files.

2D <m> H=0

Having problems fitting the <m> function to the data points.

  • <m> uses conditional statements to return the proper value, the curve_fit function does not work with this sort of function.
  • There is a runtime error when raising certain values to a fractional power. Numpy does not allow raising negative numbers to a fractional power but all the numbers in our array should be positive.
  • There is a runtime/zero-division error when we give sigma values as input to curve_fit.

Correlation Sign

Should the correlation function <Si*Si+r> be strictly positive? If so where do we take the absolute value; before or after taking the average?

Sequential Iteration

Sequential iteration through an Ising model grid may not satisfy detailed balance. A better implementation would be to test the flip at each spin site in a random order.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.