When freshwater and seawater are mixed together, like when a freshwater river flows into the ocean, enormous amounts of energy are released. If the freshwater and seawater are then separated via a semi-permeable membrane, then the freshwater will pass through the membrane and dilute the saltwater due to the chemical potential difference. This process is called osmosis.
If the salt ions are captured completely by the membrane, the passing of water through the membrane will create a pressure known as osmotic pressure. This pressure can be converted into energy.  This technology has existed since the 1970s, but the membranes that have been developed are not effective enough for the process to be cost effective. Companies like Statkraft, though, are making breakthroughs in technology and hope to bring osmotic power for consumer use in the near future.
Two practical methods for osmotic power generation are reverse electro dialysis (RED) and pressure-retarded osmosis. (PRO).
Reversed electro dialysis
A method being developed and studied is reversed electro dialysis or reverse dialysis, which is essentially the creation of a salt battery. This method was described by Weinstein and Leitz as “an array of alternating anion and cation exchange membranes can be used to generate electric power from the free energy of river and sea water.”
The technology related to this type of power is still in its infant stages, even though the principle was discovered in the 1950s. Standards and a complete understanding of all the ways salinity gradients can be utilized are important goals to strive for in order make this clean energy source more viable in the future
One method to utilize salinity gradient energy is called pressure-retarded osmosis. In this method, seawater is pumped into a pressure chamber that is at a pressure lower than the difference between the pressures of saline water and fresh water. Freshwater is also pumped into the pressure chamber through a membrane, which increase both the volume and pressure of the chamber. As the pressure differences are compensated, a turbine is spun creating energy.
This method is being specifically studied by the Norwegian utility Statkraft, which has calculated that up to 25 TWh/yr would be available from this process in Norway. Statkraft has built the world’s first prototype osmotic power plant on the Oslo fiord which was opened by Her Royal Highness Crown Princess Mette-Marit of Norway on November 24, 2009. It aims to produce enough electricity to light and heat a small town within five years by osmosis. At first it will produce a minuscule 4 kilowatts – enough to heat a large electric kettle, but by 2015 the target is 25 megawatts – the same as a small wind farm.