APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

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

Computer Program Detail Page

Item Picture
STP XY Model Program
written by Harvey Gould, Jan Tobochnik, Wolfgang Christian, and Anne Cox
The STP XY Model program implements a Monte Carlo simulation of the planar ferromagnet or XY Model of spins on a lattice. The simulation returns the configuration of spins with the option of showing the vortices. The default system is a lattice of linear dimension L = 20 at temperature T = 0.89.

STP XYModel is part of a suite of Open Source Physics programs that model aspects of Statistical and Thermal Physics (STP). The program is distributed as a ready-to-run (compiled) Java archive. Double-clicking the stp_XYModel.jar file will run the program if Java is installed on your computer. Additional programs can be found by searching ComPADRE for Open Source Physics, STP, or Statistical and Thermal Physics.

Please note that this resource requires at least version 1.5 of Java.
2 supplemental documents are available
Subjects Levels Resource Types
Electricity & Magnetism
- Magnetic Materials
= Temperature and Magnetism
General Physics
- Computational Physics
Thermo & Stat Mech
- Models
- Phase Transitions
- Graduate/Professional
- Upper Undergraduate
- Instructional Material
= Interactive Simulation
= Lecture/Presentation
Intended Users Formats Ratings
- Educators
- Learners
- application/java
  • Currently 0.0/5

Want to rate this material?
Login here!

Access Rights:
Free access
© 2009 Wolfgang Christian
Additional information is available.
Monte Carlo, osp
Record Cloner:
Metadata instance created March 7, 2009 by Anne Cox
Record Updated:
March 20, 2013 by Wolfgang Christian
Last Update
when Cataloged:
March 6, 2009
Other Collections:

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

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.


» reply

Post a new comment on this item
ComPADRE is beta testing Citation Styles!

Record Link
AIP Format
H. Gould, J. Tobochnik, W. Christian, and A. Cox, Computer Program STP XY MODEL PROGRAM (2009), WWW Document, (https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047).
H. Gould, J. Tobochnik, W. Christian, and A. Cox, Computer Program STP XY MODEL PROGRAM (2009), <https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047>.
APA Format
Gould, H., Tobochnik, J., Christian, W., & Cox, A. (2009). STP XY Model Program [Computer software]. Retrieved July 12, 2024, from https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047
Chicago Format
Gould, H, J. Tobochnik, W. Christian, and A. Cox. "STP XY Model Program." https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047 (accessed 12 July 2024).
MLA Format
Gould, Harvey, Jan Tobochnik, Wolfgang Christian, and Anne Cox. STP XY Model Program. Computer software. 2009. Java 1.5. 12 July 2024 <https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047>.
BibTeX Export Format
@misc{ Author = "Harvey Gould and Jan Tobochnik and Wolfgang Christian and Anne Cox", Title = {STP XY Model Program}, Month = {March}, Year = {2009} }
Refer Export Format

%A Harvey Gould %A Jan Tobochnik %A Wolfgang Christian %A Anne Cox %T STP XY Model Program %D March 6, 2009 %U https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047 %O application/java

EndNote Export Format

%0 Computer Program %A Gould, Harvey %A Tobochnik, Jan %A Christian, Wolfgang %A Cox, Anne %D March 6, 2009 %T STP XY Model Program %8 March 6, 2009 %U https://www.compadre.org/Repository/document/ServeFile.cfm?ID=8642&DocID=1047

Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.

Citation Source Information

The AIP Style presented is based on information from the AIP Style Manual.

The APA Style presented is based on information from APA Style.org: Electronic References.

The Chicago Style presented is based on information from Examples of Chicago-Style Documentation.

The MLA Style presented is based on information from the MLA FAQ.

This resource is stored in 4 shared folders.

You must login to access shared folders.

STP XY Model Program:

Is Part Of Statistical and Thermal Physics 2nd Ed. Programs

STP XY Model Program is a part of STP Application package that contains curricular materials for the teaching of Statistical and Thermal Physics.

relation by Anne Cox
References STP Textbook Chapter 9: Critical Phenomena

Chapter 9 of Gould and Tobochnik's Statistical and Thermal Physics provides additional underpinnings for the STP XY Model Program.

relation by Anne Cox

Know of another related resource? Login to relate this resource to it.
Save to my folders



Related Materials

Similar Materials

OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book