This is the behaviour of charged particles in solutions separated by a semipermeable membrane, which doesn't allow some of the particles to pass.
The equilibrium that results is a balance between the electrostatic forces and the osmotic forces affecting these ions.
The equation to explain this for sodium and chloride is as follows:
These are charged particles, and so there is both a concentration gradient and an electrostatic gradient.
Its better to illustrate this in the Gibbs-Donnan equilibrium set up between the interstitial and the intravascular compartments, where there are no irritating ion pumps upsetting the balance.
All the ions are staying put. There are no forces shifting them around. Now lets add some anionic protein.
Now, there is an electrostatic force repelling chloride out of the intravascular compartment. Consequently, more chloride collects in the interstitial fluid. The same force is attracting sodium back into the intravascular compartment. This competes with the electrostatic gradient.
I tried to represent gradients with these coloured slopes. One can almost imagine little ions sliding down them.
The attractive force of anionic protein for sodium competes with the concentration gradient sucking it back into the interstitial compartment. At a certain concentration, the equilibrium is reached.
Is this an equilibrium? Of course its not.
There is still unequal particle concentration on both sides of the membrane. An equilibrium between the concentration gradient and the electrostatic gradient is reached. However, there is still water to consider.
Water is osmotically attracted into the vascular compartment. The movement of water would then dilute the concentration of the ions, and there would be a change in their concentration gradients. So there is no stable steady state.
There is movement of some ions out of the intravascular space, but at Gibbs-Donnan equilibrium there are still more particles in the vascular compartment, exerting an oncotic pressure.
The oncotic force sucking water into the capillaries is opposed by the capillary hydrostatic pressure, which is applied by the pumping action of the heart. If this pressure becomes too great (eg. if the heart fails and the capillary venous pressure rises) the capillary hydrostatic pressure overcomes the plasma oncotic pressure and forces the water out of the vascular compartment.
The Gibbs-Donnan Factor for monovalent cations is 0.95. (i.e. the sodium concentration in the interstitial fluid is 0.95 x the concentration in plasma). For monovalent anions, its 1.05. Divalent cations like calcium are partially protein bound, and the Gibbs – Donnan effect only applies to the ionized forms. For them, the factor is 0.90 (and conversely 1.10 for the anions).
Everyone should have one.