A Free Energy Model for Confined Diblock Copolymers