Up to this point, with minor exceptions, we have discussed only closed systems, that is, systems having a fixed composition, and have for the most part not bothered to consider whether the system was homogeneous (one phase) or heterogeneous (more than one phase). We must now explicitly consider the implications of having more than one phase, and of the transfer of matter between phases and into and out of the system. There are two kinds of open systems that concern us, illustrated in Figure 14.1. In the first kind, the open system is simply a separate phase in a system that is closed overall, illustrated in Figure 14.la. The phases are free to change composition by exchange of components in response to changes in the conditions (say P and T) of the closed system. The phases in a crystallizing magrna are examples of open systems in this sense. In the second kind we distinguish the system from an environment, joined by means of a membrane permeable only to certain components (Figure 14. Ib). This enables the system to change composition in response to conditions in the environment, which may be quite different from those in the system. The membrane may be real, as in the case of experimental systems in which hydrogen, having an externally controlled fugacity, diffuses into the system through the platinum walls of the system, or it may be imaginary, as when it is used to help clarify our thinking about metasomatic processes. Of course, if you think carefully about it, the difference between the two cases is not always very clear-cut. For example in the crystallizing magma, quartz and the melt in which it is crystallizing could be considered as the "environment" for the other crystallizing phases, controlling their chemical potential of SiO2. Nevertheless, the distinction is usually clear enough for our purposes. We will first consider open systems in the first sense in the derivation of the phase rule, and then consider cases of "membrane" or "osmotic" equilibria, which is the kind that the term "open system" has generally come to mean in geochemistry.