Stick, slip, and opening of wavy frictional faults: A numerical approach in two dimensions