This Monte Carlo simulation program evaluates the partition function
for a d-dimensional O(N) spin model, where
with
The Swendsen–Wang and Wolff algorithms are employed for efficient configuration updates, particularly near critical points. A Metropolis version is also included.
-
Clone the repository:
git clone https://github.com/Tensofermi/Zoo_of_Classical_ON_Spin_Model cd Zoo_of_Classical_ON_Spin_Model -
The file named
input.txtcontains all tunable parameters, so you can modify them as needed. Its basic structure is as follows://----- Model_Parameters N 1 D 2 beta 0.44 L 16 h 1 //----- Simulation_Parameters Seed 987654321 N_Measure 1 N_Each 1000 N_Therm 10 N_Total 200 NBlock 1000 MaxNBin 1000000 NperBin 1 -
Once you've determined which parameters you want to use, you can run the program simply by executing:
./run.shTo clear the generated data, use:
./clear.shTo clear everything including compiled files, use:
./clear_all.sh -
For more advanced simulations:
- Use
\lsubto run local simulations on your PC. - Use
\qsubto submit jobs to a server using the PBS system. - The output data will be stored in the
\datadirectory. - You can then visualize the results using the
\plotscript.
- Use
- Simulates O(N) spin models in arbitrary spatial dimensions d and spin components N.
- Employs cluster algorithms to reduce critical slowing down.
- Measures various observables: energy-like, magnetic-like, correlation length, and cluster-related quantities.
Below is a summary of notable properties for specific values of
| Phase Transition? | Type | Universality Class | ||
|---|---|---|---|---|
| 1 | Any | No | — | — |
| 2 | 1 | Yes | Continuous | 2D Ising |
| 2 | 2 | Yes | BKT transition | 2D XY |
| 2 | ≥3 | No | — | — |
| 3 | 1 | Yes | Continuous | 3D Ising |
| 3 | 2 | Yes | Continuous | 3D XY |
| 3 | 3 | Yes | Continuous | 3D Heisenberg |
| ≥4 | Any | Yes | Continuous | Mean-field |
Notes:
-
BKT transition: A topological phase transition occurring in 2D XY models (
$N = 2$ ). -
Mermin–Wagner theorem: Prohibits spontaneous symmetry breaking for
$N \geq 2$ in$d = 2$ .
Bilayer XY: Two coupled 2D O(2) models, exhibiting a new emergent phase.
Loop-Ising: High-dimensional O(1) model in the loop representation.
LR-O(n): O(n) model with a
LR-RW: Lévy flights with a step-length distribution