# 3D Potts/Ising model. How to identify boundaries of clusters?

1. Jul 11, 2012

### vassvik

I am currently working on the 3D potts model in a temperature gradient to identify the critical temperature and critical exponent. I use the Swendsen-Wang algorithm to simulate the dynamics of the system, and I use the Hoshen-Kopelman algorithm to identify the clusters of spins.

The problem is: The method I am currently using to identifying the front between the ordered and disordered region is too naive, I think, because I get a slight error in the critical temperature for Q = 2, whose value is known from series expansion.

What I have done: The temperature gradient is along the z-axis, and I use a regular cubic lattice of size (NX x NY x NZ). I have currently used the highest z-value (for each x and y) that corresponds to the cluster spanning most of the ordered region to define the front.

With this method, I get J/(k_b T) ~ 0.226, while the correct value is closer to 0.2216.

What I want to do is the following: Find a way to identify the boundary/contour of the spanning cluster in the ordered region, and use that to define the interface between the ordered and the disordered regions.

I currently have a way to identify these, but I think it is very inefficient and complicated, and it may not be entirely correct. So my question is this: Are there any known algorithms to identify the boundary of a given (generally convex) structure/set of points?

2. Jul 11, 2012

### Mute

Are you sure your error in the critical temperature is due to your boundary-finding routine and not system size effects? This paper, perhaps the one you are referring to when you say the critical temperature should be 0.2216, uses a 256x256x256 sized system. Is yours also that large?

(I'm afraid I don't know any good boundary finding algorithms if it's not a system size effect that's causing your discrepancy.)

3. Jul 11, 2012

### vassvik

My reference have been this paper. But they use a different method to identify the diffusion front (damage spreading), so I am not 100% sure I have done everything correctly. I used different sizes and temperature ranges to extrapolate the effective critical temperature due to finite size scaling, like the second to last plot of that paper.

I was thinking of doing something similar to what they are doing this paper, but extended to 3 dimensions. It's a shot in the dark, I guess, and it may not work, but I also find the problem of identifying boundaries to be particularly interesting, so I'll try it anyway. :D

There are so many other things that could be wrong, but I am not sure where to start, or what to check on most things. I may have a subtle mistake in my cluster identification algorithm, or in the Swendsen-Wang algorithm, or anywhere else. :/