Simulation of Osmosis with Moveable Membrane (Osmotic Swelling and Shrinking of Cells)

by Johannes Kottonau, PhD

created with NetLogo, based on Wilensky, U. (2005): NetLogo GasLab Circular Particles model. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

How To Use It

Step 1: Choosing the initial osmolarities and setting up the compartments

The black square area opens the view to a three-dimensional space separated by a semipermeable membrane (red dashed line). The two separated subspaces can be thought of as two adjacent biological cells, thus affording an extremely large view of their cytoplasms. These subspaces are also referred to below as compartments that contain a specified number of water molecules (blue) and solute molecules (brown).

The plasma osmolarities can be selected using the sliders. The default values are 6.0 osmol for the left compartment and 2.0 osmol for the right compartment.

To make the simulated processes as conspicuous as possible, these default presets are rather high but are still realistic considering the high solubility of glucose. At simulation setup, the characteristics of the initial solutions are calculated with respect to the slider values. The osmolarities directly translate into the grams of glucose that will be contained in 1 l of each solution (based on the molecular weight of glucose of 180 g/mol). Then, an algorithm calculates the amount of water that would have to be added to the glucose to achieve exactly 1 l of solution. This algorithm incorporates empirical data from available density tables published in the CRC Handbook of Chemistry and Physics, for example. Next, starting from the mass of glucose and the mass of water contained in 1 l of each solution, the respective numbers of glucose and water molecules are calculated in moles per litre for each solution. Finally, the ratio of the number of solute to solvent molecules is calculated for each solution. These ratios are now graphically implemented by displaying the solutions in the compartments. Initially, each compartment is filled by five times the corresponding osmolarity value (e.g., 30 particles if the osmolarity to display is 6.0). A number of five is selected to correspond to the current computational power of most personal computers (PCs). A larger factor would result in the simulation of more particles and more collisions, which would slow down the simulation speed and diminish the conspicuousness of the simulated dynamics. In the final step, depending on the calculated ratio of glucose to water molecules in each compartment, water molecules are added on each side. This procedure results in the display of the two glucose solutions with their preset osmolarities.

The spatial effect of different osmolarities is now immediately visible. It is important to note that for a realistic setup of the compartments, the only relevant criteria are that the ratio of the displayed solute particles meets the ratio of the preset osmolarities and that a corresponding number of water molecules is calculated by the algorithm in each compartment. The actual volume of the simulated compartments is not important. In an educational setting, this correspondence to reality is one of the most valuable characteristics of this simulation model. Teachers or students can first perform the real experiment and then switch to the simulation using the osmolarities from the experiment.

Step 2: Pressing the start/stop button to initiate particle movements

As long as the simulation is running, water molecules will randomly move and bounce within the total volume defined by the two compartments, thus exhibiting their characteristic Brownian motion, and the larger, solvated solute particles will move less rapidly than water molecules alone.

Water molecules will cross the membrane coming from both the left and right compartments, but as the initial water concentration in the left compartment is lower than that in the right compartment (using the default settings), more water molecules will move from the right to the left than from the left to the right compartment per unit time. Thus, there is a net movement of water molecules from the right to the left compartment by simple diffusion.

Note that only water molecules and not solute molecules can pass (diffuse) through the “semipermeable” membrane between the two compartments. Because they produce the initial difference in the water concentrations on both sides of the membrane, it is, however, the solute molecules along with random particle motion that cause the net movement of water.

As soon as the number of water molecules starts increasing in the left compartment (and decreasing in the right compartment), the total kinetic energy will increase in the left compartment and correspondingly decrease in the right compartment.

Given that the compartment volumes are identical at start-up, any change in the number of water molecules from the start-up conditions will result in a pressure difference between the two compartments. But because the membrane is moveable, the pressure difference will move the membrane until it comes to rest at the equal-pressure position. The new membrane position is supposed to release fully the pressure difference in each simulation cycle. To be clear, the pressure difference that causes the advancement of the membrane is neither explicitly calculated nor monitored in the simulation cockpit. Rather, to keep the simulation fast, the movements of the membrane are directly calculated from the actual water concentration difference. Students will not be aware of this implementational workaround, but it is still correct to instruct them that the movements of the membrane release the pressure differences in each simulation cycle. During the entire simulation run, the position of the membrane establishes the volumes of each compartment. In the long run, after hundreds of simulation cycles, the left compartment (“cell”) will “swell”, and the right compartment (“cell”) will “shrink” (which is reminiscent of the mechanism by which leaf stomata open and close). In the end, water concentrations will be balanced, and the process of osmosis stops. The concentrations of all particles in both compartments will have reached the state of dynamic equilibrium, and the membrane will forever vacillate around its expected position.


Kottonau, J (2011): An Interactive Computer Model for Improved Student Understanding of Random Particle Motion and Osmosis. J. Chem. Educ., 2011, 88 (6), pp 772–775.