Energy recovery from solutions with different salinities based on swelling and shrinking of hydrogels