Asked by Matteo Cacciola
on 29 Jun 2012

Dear all first of all, thanks for your previous helps. Now I am facing the problem of modelling Ising, so the issue is to find the Heisenberg neighbours in a 3D matrix. Loosely speaking, I have a 3D matrix which values are all null except the nodes where I locate atoms randomly. The matrix can be seen as a lattice, where cubic (lattice) units are superimposed. Let's suppose to have NL cubic units per dimension of the lattice.

A simple cubic lattice is a NxNxN matrix, with N=NL+1, where each one of the node can be a possible location for atoms. A face-centered cubic lattice is a NxNxN 3D matrix, with N=2*NL+1, where possible locations of atoms are vertices of cubic units and the centers of the faces of each cube.

Now, let me suppose that I would analyse 3D Ising model, with periodic boundaries in the xy-plane and free boundaries in the z-axis. I found suitable code made by Dr. Tobin Fricke, but for 2D case (<http://www.physics.ohio-state.edu/~braaten/statphys/Ising_MatLab.pdf)>. He exploited circshift Matlab function. How could I extend that code for 3D simple cubic and face-centered cubic lattices, please?

Best regards Matteo

*No products are associated with this question.*

Opportunities for recent engineering grads.

## 2 Comments

## Sean de Wolski (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/42385#comment_86906

Sample inputs, sample code, etc help...

Also:

circshiftworks in 3d too.## 4 X 4 (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/42385#comment_270958

Dear Matteo,

Hope you are fine.... Do you have matlab code for ising model ore heisenberg model for hysteresis loop and traiing effect.............. I want to verify my data of exchange bias, training effect etc................I will be grateful.........