rajeshrinet / compPhy

Assortment of code for model systems in computational physics. github.com/rajeshrinet/compPhy
https://github.com/rajeshrinet/compPhy
MIT License
74 stars 43 forks source link

calculating the Susceptibility in the ising model #2

Closed guozihuaa closed 6 years ago

guozihuaa commented 6 years ago

I think Susceptibility should be calculated as: X[tt] = (n1*M2 - n1^2*M1^2)*iT

because X = (<M^2> - <M>^2)/T

rajeshrinet commented 6 years ago

Dear Zihu

You are right in saying that: X = ( < M^2 > - < M >^2 )/T

Note <M^2> is defined per monte carlo move. So <M^2> = M2/(mcSteps).

<M> = M1/mcsteps, so <M>^2 = (M1/(mcSteps)) * (M1/(mcSteps))

In the end, you make it per site by dividing by N*N.

So n1 = 1.0/(mcSteps * N * N); and n2 = 1.0/( mcSteps * mcSteps * N * N),

Hope that helps for your comment on https://rajeshrinet.github.io/blog/2014/ising-model/.