Membranes for energy conversion