I'm doing some simulations with phase separations and I have a field $\phi(\mathbf{r},t)$ that takes values in $\phi\in \mathbb{R}$.

What I'd like to do is to obtain the number of separated domains $N(t)$. Let's define a separated domain a connected region for which $\phi_0\leq\phi$.

So I'm looking for an expression $f_N(\phi(\mathbf{r},t),\phi_0,\mathbf{r})$ such that :

$$\int_{\Omega} f_N(\phi(\mathbf{r},t),\phi_0,\mathbf{r}) d\Omega=N(t) $$

With $\Omega$ the space.

To give an example, if my simulation is in a square $[-1,1]\times[-1,1]$ and I observe $\phi(x,y,t)=2\phi_0\exp(-(x^2+y^2))$, I will just have $N=1$.

But I'm mostly interested in the cases where like in Cahn-Hilliard phase separation, there are 2 types of domains like $\phi=-1$ and $\phi=1$ with an interface between them that has a well defined average value.

**"Very" mean field approach : **

What I started to think in a "very mean field" approach is :

I assume the "volume" occupied by the phase $\phi\geq\phi_0$ is given by :

$$\int_{\Omega} \Big(\int_{\phi_0}^{+\infty}\delta(\phi-\psi)d\psi\Big) d\Omega=V(t) $$

so we can define $f_V(\phi(\mathbf{r},t),\phi_0,\mathbf{r}))=\int_{\phi_0}^{+\infty}\delta(\phi-\psi)d\psi$

so that $\int_{\Omega} f_V(\phi(\mathbf{r},t),\phi_0,\mathbf{r}) d\Omega=V(t)$.

If we can divide the space in two phase $\phi>\phi_0$ and $\phi<\phi_1$ and that the interface between the 2 phases is well defined and has a specific width so that the distance between two points at each side of the interface is well defined $\lambda$, one can get the total area between the different domains (for example in a Cahn-Hilliard type phase separation):

$$\int_{\Omega} \Big(\int_{\phi_1}^{\phi_0}\delta(\phi-\psi)d\psi\Big) d\Omega=\lambda A(t) $$

Then we can have an approximation $\tilde{N}$ for $N$, assuming radially symmetric domains (if we have surface tension for instance). Since $V(t)/A(t)=R/n$, with $R$ the mean radius of the domains and $n$ the space dimension ($n=2,3$), and in 3d for example, $\tilde{N}(t)=\frac{V(t)}{4\pi(3V(t)/A(t))^3/3}$, if we assume $V(t)=N 4\pi R(t)^3/3$.

But I'd like to know if there is a more elaborate formula.

**EDIT : Structure function and typical length-scale :**

The inverse of the typical length scale of the domains can be derived using a Fourier approach with correlation functions :

$$\delta \phi_{\mathbf{k}} (t)= \int d\mathbf{r} \Big(\phi(\mathbf{r},t)-\frac{\int_{\Omega}\phi(\mathbf{r},t)d\mathbf{r}}{\Omega}\Big)e^{-i \mathbf{k}\mathbf {r}}$$

We then define a structure factor, with a first average over the ensemble of systems and a second one over the $\mathbf{k}$ so that $|\mathbf{k}|=k$ :

$$ S(k,t)=<(<\delta \phi_{\mathbf{k}} (t)\delta \phi_{\mathbf{-k}} (t)>)>_{|\mathbf{k}|=k}$$

And then we get the inverse of the typical length-scale :

$$<k(t)>=\frac{\int k^{-1}S(k,t)dk}{\int k^{-2}S(k,t)dk} $$

So this gives a more refined computation of the typical length-scale of the domains, meaning of what was defined as $1/R$ above.