## When is the fundamental thermodynamic relation true?

dE=TdS-PdV is only applicable to closed systems.

To apply to open systems it must be amended to

$$dE = TdS - PdV + \sum {{\mu _i}} d{n_i}$$

Where the chemical potential $\mu$i is

$${\mu _i} = {\left( {\frac{{\partial E}}{{\partial {n_i}}}} \right)_{S,V,{n_{j\left( {j \ne i} \right)}}}}$$

This accounts for the energy interchanges brought about by the matter (mass) interchanges.