Osmotic power generation based on nanoconfined materials