Newton-Krylov methods in power flow and contingency analysis door