Semipermeable membrane devices