A wake model for free streamline flow theory. Part 2: Cavity flows past obstacles of arbitrary profile