Good question. Ophelia doesn't take revenge on Hamlet for killing her father for a number of reasons. Before Hamlet's troubles, she loved him, so we can assume some affection lingers. He is still prince, and taking revenge on a prince takes guts. Hamlet did not intend to kill Polonius; he stabs him by accident, not knowing it was him. Finally, Ophelia is a good and loyal daughter, and the loss of her father unbalances her.