added boundary conditions for closed flap