Baltic-RCC / EMF

Repository for Open Source EMF implementation
Mozilla Public License 2.0
9 stars 3 forks source link

KirchhoffsFirstLaw #125

Open VeikoAunapuu opened 4 months ago

Haigutus commented 4 months ago

Possible way to identify where the issue is


# Fix SV - Sum flow into Topological node != 0
SV_INJECTION_LIMIT = 0.1
power_flow = sv_data.type_tableview('SvPowerFlow')
flow_sum_at_topological_node = power_flow.merge(terminals, left_on='SvPowerFlow.Terminal', right_on='ID', how='left').groupby('Terminal.TopologicalNode')[['SvPowerFlow.p', 'SvPowerFlow.q']].sum()
mismatch_at_topological_node = flow_sum_at_topological_node[(abs(flow_sum_at_topological_node['SvPowerFlow.p']) > SV_INJECTION_LIMIT) | (abs(flow_sum_at_topological_node['SvPowerFlow.q']) > SV_INJECTION_LIMIT)]
mismatch_at_equipment = data.query('KEY == "Type"')[['ID', 'VALUE']].drop_duplicates().merge(mismatch_at_topological_node.merge(terminals.reset_index(), on='Terminal.TopologicalNode'), left_on="ID", right_on="Terminal.ConductingEquipment")
gpoderys commented 3 months ago

Error has been caused by diverging power flow solution, by using relaxed loadflow setting the model converges and Kirchofs law error dissapear.

Haigutus commented 2 months ago
  1. Update of load sv data from ssh for not solved islands - fix it in post processing, long term solution by powsybl (issue link: https://github.com/powsybl/powsybl-open-loadflow/pull/1075)
  2. Parallel busbar connections of non retained switches and lines, causes one TP node, while in original TP two TP nodes - fix: exclude given model
  3. If no slack in German area, then PF fails - fix: Testing solution with multiple slacks
  4. TODO: Investigate Spain, Portugal, Italy, and everything South from Hungary