Osmosis drives the development of a pressure difference of many atmospheres between a dilute solution and pure solvent with which it is in contact through a semi-permeable membrane. The educational importance of this paper is that it presents a novel treatment in terms of fluid mechanics that is quantitative and exact. It is also simple and intuitive, showing vividly how osmotic pressures are generated and maintained in equilibrium, driven by differential solvent pressures. The present rigorous analysis using the virial theorem seems unknown and can be easily understood-and taught-at various different levels. It should be valuable to undergraduates, graduate students and indeed to the general physicist.