## Ensemble
Here we discuss some of the most common ensembles. The concept of *ensemble* itself is an idealization of system consisting of a huge number (infinite) of copies, and being studied at once. A more intuitive way to imagine an ensemble is a system consisting of huge amount of particles, and we are interested in only the statistical behaviors of these particles, instead of individuals of them.
### Microcanonical ensemble
$N,V,E$ constant. The strict definition is
$
\begin{equation}
\rho(p,q)=
\begin{cases}
\text{constant}, &E<H<E+\Delta\\
0, &\text{otherwise}
\end{cases}
\end{equation}
$
>[!note]
>$\rho$ being constant means, system having any microstates gets the same probability.
For microcanonical ensemble, many thermodynamical relations could be obtained, like
$S (E,V)=k\log \Gamma (E)$
$\frac{1}{T}=\frac{\partial S(E,V)}{\partial E}$
and Virial theorem,
$\biggl \langle \sum_{i=1}^{3N} q_i\dot{p_i} \biggr \rangle = -3NkT$
This gives the ideal gas relation, $pV=NkT$.
Also, Hamiltonian $\langle H \rangle = \frac{1}{2} f kT$, $f$ is the harmonic terms in the Hamiltonian. This relates to specific heat capacity.
$C_V \propto \left( \frac{\partial \langle H\rangle}{\partial T} \right)_V$
>[!notice]
>Since this is specific (volume) heat capacity, the constant $V$ always holds. And one typical way to calculate such $C_V$ is
>$\frac{\partial \langle E \rangle }{\partial T} = \frac{\beta^2}{N} \bigl(\langle E^2 \rangle - \langle E \rangle ^2 \bigr)$
### Canonical ensemble
Constant $N, V,T$, connected with thermal bath, energy exchange exist.
![[Drawing 2023-07-27 13.34.09.excalidraw.svg]]
The inner system (with energy $E_1$) follows canonical ensemble, but the entire system is a microcanonical ensemble.
For canonical ensemble, we have properties as partition function, $Q_N(V,T)$
$Q_N(V, T) = \int \frac{\mathrm{d}^{3N}p \mathrm{d}^{3N}q}{N!h^{3N}} e^{-\beta H(p,q)} = e^{-\beta A(V,T)}$
>[!note]
>In this expression, $A = \langle H \rangle -TS = U-TS$, Helmholtz free energy.
>The partition function $Q$ actually gives the probability distribution among microstates.
$Q_N$ is the summation of the Boltzmann factor of all possible states. Here the Boltzmann factor is $e^{-\beta H(p,q)}$, $\beta = \frac{1}{kT}$, the Boltzmann factor shows the statistical weight of a specific microscopic configuration, which is dictated by the energy $H(p,q)$. ^boltzmann-factor
### Grand canonical ensemble
$V, T$ constant, but free move/exchange of particles. $T$ is given by thermal bath, $V$ is just tan area with no barrier.
![[Drawing 2023-07-27 14.15.27.excalidraw.svg]]
Similarly we have grand partition function $Z$, given as
$Z(z, V, T) = \sum_{N=0}^\infty z^N Q_N(V,T)$
$z$ is fugacity, and $z = e^{\beta \mu}$, $\mu$ is chemical potential.
So the probability of number of particles being $N_1$ would be
$z^{N_1} Q_{N_1}(V,T) = e^{\beta(\mu N_1-A(N_1, V, T))}$
>[!info]
>Read more at https://en.wikipedia.org/wiki/Ensemble_(mathematical_physics)