Performance analysis of a red-med salinity gradient heat engine