Simulating door physics: bounce after hitting max rotation?

anyone? can’t figure this out