Does non-conservation of number of particles imply zero chemical potential? In the systems like photon gas in a cavity and phonon gas in a solid number of particles is not conserved and chamical potential is zero. Is this a general rule? If yes, how zero chemical potential is obtained from number non-conservation? 
 A: As an alternative to vnb's answer, recall that $\mu$ is in general nothing but a Lagrange multiplier that constraints the number of particles to a fixed value $N$:
$$
\Lambda=\cdots+\lambda_1\left[N-\sum_i n_i\right]
$$
where $\Lambda$ is a certain theormodynamic potential that we want to minimise.  The equation for $\lambda_1$ fixes
$$
N=\sum_i n_i
$$
By comparing $\Lambda$ to the standard thermodynamic potentails (e.g., the internal energy) we can conclude that $\lambda_1$ is proportional to $\mu$.
Now comes the key point: if we do not want to fix $N$, then there is no need to introduce $\lambda_1$ at all, or equivalently, we can freely set $\lambda_1=0$, that is, $\mu=0$. In other words, if the number of particles is not fixed, there is no reason to introduce the chemical potential. No formula can depend on $\mu$, which is equivalent to setting $\mu=0$.
Reference: The physical meaning of Lagrange multipliers.
A: If in your system the number of of photons is non conserved, the Gibbs free energy cannot depend on the number of photons. So you will have 
$$\mu_{\gamma}=\left(\frac{\partial G}{\partial N_{\gamma}}\right)_{T,P}=0$$ 
This also implies that $\mu_{matter}+\mu_{\gamma}=\mu_{matter}$. However, in systems that conserve the number of photons, you return to the Bose-Einstein distribution, and have a non zero chemical potential.
A: The question can be answered most easily by considering a grand canonical ensemble, where the density operator has the form $\rho=Z^{-1}e^{-\beta(H-\mu N)}$, with $\beta=1/kT$ where $k$ is Boltzmann's constant and $Z$ is determined such that the trace is 1. 
In equilibrium, the density operator commutes with the Hamiltonian. This is the case iff the exponent commutes with $H$. If the chemical potential $\mu$ is nonzero, this only holds if the number operator $N$ commutes with the Hamiltonian $H$, and hence is conserved. 
Therefore non-conservation implies a zero chemical potential.
A: 
Particle number is not fixed(conserved)

think about this picture:
You have a closed equilibrium system: if it is an electron gas, as long as temperature $k_BT \ll m_e c^2 $ , the number of electron is fixed.
However, if $k_BT \gg m_e c^2$, the electrons number is not fixed either, even for a closed fermionic system!  This really contradict with the statement of thie question. But only the other hand, we know, the question statement is correct.
So, the essential thing is not conservation law. It is a matter of energy scale.

When $\mu\ll k_BT$, I call the particle number is an irrelevant thermodynamic parameter
$$dF=-SdT+PdV-\mu dN-MdH$$
For example: 
If a material is very weak in magnetization, $0 \approx M\ll k_BT$, the magnetic field $H$ is called irrelevant. 
Then we can set $M=0$, the physics becomes:
$$dF=-SdT+PdV-\mu dN$$
Similarly, 
those collective modes excitation like photon, phonon, magnon are not ''real'' particles, which require higher energy scale to create.
The particle number is irrelevant  for them.

