When we have discussed the relation of the Ising model with lattice gases, we have included the interactions between spins (or equivalently particles), so in the end the Ising model could be used to describe non-ideal fluids.
What we now want to show is that the Ising model in the non interacting case (which could seem not really interesting at first) is equivalent to the ideal gas.

We start of course from what we have seen in the case of a generic lattice gas:

${\mathcal {Z}}_{\text{l.g.}}=e^{-\beta E_{0}}{\mathcal {Z}}_{\text{I.m.}}$

where (in the case of a square lattice, for which we know that

$z=2d$):

$-E_{0}=\left({\frac {2}{\mu }}-{\frac {U_{2}d}{4}}\right)N$

and we have renamed

$N_{\text{s}}$ with

$N$. From the definitions of

$E_{0}$,

$H$ and

$U_{2}$ we can rewrite

$E_{0}$ as:

$E_{0}=-N\left(H+{\frac {U_{2}}{4}}d\right)$

Since we are working in the grand canonical ensemble, we have

^{[1]}${\textstyle {\mathcal {Z}}_{\text{l.g.}}=e^{-\beta \Phi }=e^{\beta PN}}$ and so:

$P=-{\frac {E_{0}}{N}}+{\frac {1}{\beta N}}\ln {\mathcal {Z}}_{\text{I.m.}}=H+{\frac {U_{2}}{4}}d+{\frac {1}{\beta N}}\ln {\mathcal {Z}}_{\text{I.m.}}$

which, in the non interacting case (

$U_{2}=0$), reduces to:

$P=H+{\frac {1}{\beta N}}\ln {\mathcal {Z}}_{\text{I.m.}}$

The partition function of a non interacting Ising model is:

${\mathcal {Z}}_{\text{I.m.}}=\sum _{\lbrace S_{i}=\pm 1\rbrace }e^{h\sum _{i}S_{i}}$

where as usual

$h=\beta H$. This can be computed easily:

${\mathcal {Z}}_{\text{I.m.}}=\sum _{S_{1}=\pm 1}\cdots \sum _{S_{N}=\pm 1}e^{hS_{1}}\cdots e^{hS_{N}}=\prod _{i=1}^{N}\left(\sum _{S=\pm 1}e^{hS}\right)=\left(2\cosh h\right)^{N}$

and thus:

${\frac {\ln {\mathcal {Z}}_{\text{I.m.}}}{N}}=\ln \left(2\cosh h\right)$

If we now call

$\left\langle N\right\rangle$ the mean number of spins of the system, what we want to do is to relate

$P$ with the density

$\left\langle N\right\rangle /N$.
Similarly to what we have done for the lattice gas, we define

$n_{i}=(1+S_{i})/2$ to be the occupation number of the

$i$-th cell of the system. This way, the mean number of particles is:

$\left\langle N\right\rangle =\left\langle \sum _{i}{\frac {1+S_{i}}{2}}\right\rangle ={\frac {N}{2}}+{\frac {1}{2}}\left\langle \sum _{i}S_{i}\right\rangle$

but:

$\left\langle \sum _{i}S_{i}\right\rangle ={\frac {\sum _{\lbrace S\rbrace }e^{h\sum _{i}S_{i}}\sum _{j}S_{j}}{\sum _{\lbrace S\rbrace }e^{h\sum _{i}S_{i}}}}={\frac {1}{{\mathcal {Z}}_{\text{I.m.}}}}{\frac {\partial {\mathcal {Z}}_{\text{I.m.}}}{\partial h}}={\frac {\partial \ln {\mathcal {Z}}_{\text{I.m.}}}{\partial h}}$

Therefore:

$v^{-1}:={\frac {\left\langle N\right\rangle }{N}}={\frac {1}{2}}\left(1+{\frac {1}{N}}{\frac {\partial \ln {\mathcal {Z}}_{\text{I.m.}}}{\partial h}}\right)={\frac {1}{2}}(1+\tanh h)$

However, we can also define the mean "magnetization" per spin of the system as:

$m:=\left\langle {\frac {1}{N}}\sum _{i}S_{i}\right\rangle ={\frac {1}{N}}{\frac {\partial \ln {\mathcal {Z}}_{\text{I.m.}}}{\partial h}}$

We therefore have

$v^{-1}=(1+m)/2$, and we can also rewrite:

${\frac {1}{N}}\ln {\mathcal {Z}}_{\text{I.m.}}=\ln 2+{\frac {1}{2}}\ln \cosh ^{2}h=\ln 2+{\frac {1}{2}}\ln {\frac {\cosh ^{2}h}{\cosh ^{2}h-\sinh ^{2}h}}=\ln 2-{\frac {1}{2}}\ln(1-m^{2})$

where we have used two "tricks": first, we have written

$\cosh h={\sqrt {\cosh ^{2}h}}$ and then divided by

$\cosh ^{2}h-\sinh ^{2}h=1$. This way:

$P={\frac {h}{\beta }}+{\frac {1}{\beta }}\left[\ln 2-{\frac {1}{2}}\ln(1-m^{2})\right]$

and since

$h=\tanh ^{-1}m={\frac {1}{2}}\ln {\frac {1+m}{1-m}}$, this can be rewritten as:

$P=-{\frac {1}{\beta }}\ln {\frac {1-m}{2}}=-{\frac {1}{\beta }}\ln(1-v^{-1})$

If our gas is dilute, i.e.

$v^{-1}\approx 0$, we can expand the logarithm and get:

$P\sim {\frac {v^{-1}}{\beta }}={\frac {\left\langle N\right\rangle }{N}}k_{B}T$

which is the ideal gas law (since

$N$ is the volume of our system)!

- ↑ The "volume" of our system is now the number of spins $N$.