In reply to Ksharp.

Yes. Here is a previous article about using a simulation to estimate the power of a statistical test.