diff --git a/pandapower/auxiliary.py b/pandapower/auxiliary.py index d3f1347aa..c35c8c29b 100644 --- a/pandapower/auxiliary.py +++ b/pandapower/auxiliary.py @@ -1242,8 +1242,8 @@ def SVabc_from_SV012(S012, V012, n_res=None, idx=None): idx = np.ones(n_res, dtype="bool") I012 = np.array(np.zeros((3, n_res)), dtype=np.complex128) I012[:, idx] = I_from_SV_elementwise(S012[:, idx], V012[:, idx]) - Vabc = sequence_to_phase(V012[:, idx]) - Iabc = sequence_to_phase(I012[:, idx]) + Vabc = sequence_to_phase(V012) + Iabc = sequence_to_phase(I012) Sabc = S_from_VI_elementwise(Vabc, Iabc) return Sabc, Vabc diff --git a/pandapower/results_gen.py b/pandapower/results_gen.py index ac7b64e6a..9db33288d 100644 --- a/pandapower/results_gen.py +++ b/pandapower/results_gen.py @@ -102,6 +102,7 @@ def _get_ext_grid_results(net, ppc): return b, p, q + def _get_ext_grid_results_3ph(net, ppc0, ppc1, ppc2): # get results for external grids eg_is_mask = net["_is_elements"]['ext_grid'] @@ -124,7 +125,7 @@ def _get_ext_grid_results_3ph(net, ppc0, ppc1, ppc2): * ppc["gen"][eg_idx_ppc, QG]) \ for ppc in [ppc0, ppc1, ppc2]]) - Sabc, Vabc = SVabc_from_SV012(S012, V012/ np.sqrt(3), n_res=n_res_eg, idx=eg_idx_ppc) + Sabc, Vabc = SVabc_from_SV012(S012, V012 / np.sqrt(3), n_res=n_res_eg, idx=eg_idx_ppc) pA, pB, pC = map(lambda x: x.flatten(), np.real(Sabc)) qA, qB, qC = map(lambda x: x.flatten(), np.imag(Sabc))