Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

User Comments on STP XY Model Program (2)

Return to Item Detail Page
Login to comment

Possible error in the program.

Author: Fernando Falo
Posted: March 14, 2013 at 7:06AM

Hi, I am doing the questions of the STP XY model program and I have problems with the susceptibility calculation. I think that this magnitude is not properly calculated. As usual it should be calculated using the fluctuations of magnetization  susc =( - **2)/T. From my test, I think the code is dividing by T**2 instead of T and not substracting **2.  Although theory says that = 0 for any temperature this is not true for simulations in a finite system. I think one can get better results substracting <|M|>**2.

thanks for your attention and best regards

Fernando Falo
Associate professor of condensed matter physics
University of Zaragoza (spain)

» reply

Re: Possible error in the program.

Author: Wolfgang
Posted: Mar 20, 2013 at 8:50PM

Dear Fernando --

You are correct.  The getSusceptibility was not correct and has been changed to divide by T and to subtract **2.   Thank you for pointing out the error.

Wolfgang

» reply

The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics