Power flow calculation in power system analysis