Skip to content

Commit

Permalink
Merge pull request #172 from alliander-opensource/feature/example-not…
Browse files Browse the repository at this point in the history
…ebook

Add notebook for pp asym calculation, fix its warning
  • Loading branch information
nitbharambe authored Mar 7, 2023
2 parents d4bb730 + 85523ac commit 1050018
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 51 deletions.
30 changes: 15 additions & 15 deletions docs/examples/data/pandapower/example_simple_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,47 @@
],
"line":
[
{"id": 6, "from_node": 2, "to_node": 1, "from_status": 1, "to_status": 1, "r1": 0.12792, "x1": 0.0492, "c1": 6.4206e-07, "tan1": 0.0, "i_n": 108.0, "id_reference": {"table": "line", "index": 101}}
{"id": 6, "from_node": 2, "to_node": 1, "from_status": 1, "to_status": 1, "r1": 0.12792, "x1": 0.0492, "c1": 6.4206e-07, "tan1": 0.0, "i_n": 108.0, "id_reference": {"table": "line", "index": 101}, "pgm_input": {"from_node": 2, "to_node": 1, "i_n": 108.0}}
],
"source":
[
{"id": 7, "node": 0, "status": 1, "u_ref": 1.0, "u_ref_angle": 0.0, "sk": 1e+16, "rx_ratio": 0.0, "id_reference": {"table": "ext_grid", "index": 1}}
{"id": 7, "node": 0, "status": 1, "u_ref": 1.0, "u_ref_angle": 0.0, "sk": 1e+16, "rx_ratio": 0.0, "id_reference": {"table": "ext_grid", "index": 1}, "pgm_input": {"node": 0}}
],
"sym_load":
[
{"id": 8, "node": 2, "status": 1, "type": 0, "p_specified": 575000.0, "q_specified": 55200.0, "id_reference": {"table": "load", "name": "const_power", "index": 101}},
{"id": 9, "node": 2, "status": 1, "type": 1, "p_specified": 1275000.0, "q_specified": 122400.0, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}},
{"id": 10, "node": 2, "status": 1, "type": 2, "p_specified": 650000.0, "q_specified": 62400.0, "id_reference": {"table": "load", "name": "const_current", "index": 101}},
{"id": 18, "node": 4, "status": 1, "type": 0, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}},
{"id": 19, "node": 4, "status": 1, "type": 1, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}},
{"id": 20, "node": 4, "status": 1, "type": 0, "p_specified": 71111.11111111111, "q_specified": 34440.68301069173, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}}
{"id": 8, "node": 2, "status": 1, "type": 0, "p_specified": 575000.0, "q_specified": 55200.0, "id_reference": {"table": "load", "name": "const_power", "index": 101}, "pgm_input": {"node": 2}},
{"id": 9, "node": 2, "status": 1, "type": 1, "p_specified": 1275000.0, "q_specified": 122400.0, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}, "pgm_input": {"node": 2}},
{"id": 10, "node": 2, "status": 1, "type": 2, "p_specified": 650000.0, "q_specified": 62400.0, "id_reference": {"table": "load", "name": "const_current", "index": 101}, "pgm_input": {"node": 2}},
{"id": 18, "node": 4, "status": 1, "type": 0, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}, "pgm_input": {"node": 4}},
{"id": 19, "node": 4, "status": 1, "type": 1, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}, "pgm_input": {"node": 4}},
{"id": 20, "node": 4, "status": 1, "type": 0, "p_specified": 71111.11111111111, "q_specified": 34440.68301069173, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}, "pgm_input": {"node": 4}}
],
"shunt":
[
{"id": 11, "node": 3, "status": 1, "g1": 0.00033112217304444763, "b1": -0.001821171951744462, "id_reference": {"table": "shunt", "index": 1201}}
{"id": 11, "node": 3, "status": 1, "g1": 0.00033112217304444763, "b1": -0.001821171951744462, "g0": 0.00033112217304444763, "b0": -0.001821171951744462, "id_reference": {"table": "shunt", "index": 1201}, "pgm_input": {"node": 3}}
],
"transformer":
[
{"id": 12, "from_node": 0, "to_node": 1, "from_status": 1, "to_status": 1, "u1": 110000.0, "u2": 20000.0, "sn": 80000000.0, "uk": 0.17800000000000002, "pk": 8176000.0, "i0": 0.03, "p0": 23200.0, "winding_from": 2, "winding_to": 1, "clock": 1, "tap_side": 0, "tap_pos": 2, "tap_min": -1, "tap_max": 3, "tap_nom": 1, "tap_size": 2200.0, "id_reference": {"table": "trafo", "index": 101}}
{"id": 12, "from_node": 0, "to_node": 1, "from_status": 1, "to_status": 1, "u1": 110000.0, "u2": 20000.0, "sn": 80000000.0, "uk": 0.17800000000000002, "pk": 8176000.0, "i0": 0.03, "p0": 23200.0, "winding_from": 2, "winding_to": 1, "clock": 1, "tap_side": 0, "tap_pos": 2, "tap_min": -1, "tap_max": 3, "tap_nom": 1, "tap_size": 2200.0, "id_reference": {"table": "trafo", "index": 101}, "pgm_input": {"from_node": 0, "to_node": 1}, "pp_input": {"df": 1.0}}
],
"sym_gen":
[
{"id": 13, "node": 4, "status": 1, "type": 0, "p_specified": 1210000.0, "q_specified": 810000.0, "id_reference": {"table": "sgen", "index": 31}}
{"id": 13, "node": 4, "status": 1, "type": 0, "p_specified": 1210000.0, "q_specified": 810000.0, "id_reference": {"table": "sgen", "index": 31}, "pgm_input": {"node": 4}}
],
"three_winding_transformer":
[
{"id": 14, "node_1": 2, "node_2": 4, "node_3": 3, "status_1": 1, "status_2": 1, "status_3": 1, "u1": 20000.0, "u2": 60000.0, "u3": 30100.0, "sn_1": 40000000.0, "sn_2": 100000000.0, "sn_3": 50000000.0, "uk_12": 0.1, "uk_13": 0.12, "uk_23": 0.11, "pk_12": 400000.0, "pk_13": 1600000.0, "pk_23": 1000000.0, "i0": 0.001, "p0": 10000.0, "winding_1": 2, "winding_2": 1, "winding_3": 0, "clock_12": 1, "clock_13": 1, "tap_side": 2, "tap_pos": 2, "tap_min": 1, "tap_max": 3, "tap_nom": 2, "tap_size": 903.0, "id_reference": {"table": "trafo3w", "index": 102}}
{"id": 14, "node_1": 2, "node_2": 4, "node_3": 3, "status_1": 1, "status_2": 1, "status_3": 1, "u1": 20000.0, "u2": 60000.0, "u3": 30100.0, "sn_1": 40000000.0, "sn_2": 100000000.0, "sn_3": 50000000.0, "uk_12": 0.1, "uk_13": 0.12, "uk_23": 0.11, "pk_12": 400000.0, "pk_13": 1600000.0, "pk_23": 1000000.0, "i0": 0.001, "p0": 10000.0, "winding_1": 2, "winding_2": 1, "winding_3": 0, "clock_12": 1, "clock_13": 1, "tap_side": 2, "tap_pos": 2, "tap_min": 1, "tap_max": 3, "tap_nom": 2, "tap_size": 903.0, "id_reference": {"table": "trafo3w", "index": 102}, "pgm_input": {"node_1": 2, "node_2": 4, "node_3": 3}}
],
"link":
[
{"id": 15, "from_node": 0, "to_node": 5, "from_status": 1, "to_status": 1, "id_reference": {"table": "switch", "name": "bus_to_bus", "index": 3021}}
{"id": 15, "from_node": 0, "to_node": 5, "from_status": 1, "to_status": 1, "id_reference": {"table": "switch", "name": "b2b_switches", "index": 3021}, "pgm_input": {"from_node": 0, "to_node": 5}}
],
"asym_load":
[
{"id": 16, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_load", "index": 33}}
{"id": 16, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_load", "index": 33}, "pgm_input": {"node": 4}}
],
"asym_gen":
[
{"id": 17, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_sgen", "index": 32}}
{"id": 17, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_sgen", "index": 32}, "pgm_input": {"node": 4}}
]
}
62 changes: 31 additions & 31 deletions docs/examples/data/pandapower/example_simple_output.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
{
"asym_gen":
[
{"id": 17, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_sgen", "index": 32}, "node": 4}
],
"asym_load":
[
{"id": 16, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_load", "index": 33}, "node": 4}
],
"line":
[
{"id": 6, "energized": 1, "loading": 0.5930290459172566, "p_from": -1763554.1135053905, "q_from": -1245081.6865976173, "i_from": 64.0471369590637, "s_from": 2158784.7316401307, "p_to": 1765096.6771171533, "q_to": 1169229.7700732222, "i_to": 62.767063741949805, "s_to": 2117230.39246925, "id_reference": {"table": "line", "index": 101}, "from_node": 2, "to_node": 1}
],
"link":
[
{"id": 15, "energized": 1, "loading": 0.0, "p_from": 0.0, "q_from": -0.0, "i_from": 0.0, "s_from": 0.0, "p_to": 0.0, "q_to": -0.0, "i_to": 0.0, "s_to": 0.0, "id_reference": {"table": "switch", "name": "bus_to_bus", "index": 3021}, "from_node": 0, "to_node": 5}
],
"node":
[
{"id": 0, "energized": 1, "u_pu": 0.9999999996523372, "u": 109999.99996175709, "u_angle": -1.798666001063812e-10, "id_reference": {"table": "bus", "index": 101}},
Expand All @@ -24,33 +8,49 @@
{"id": 4, "energized": 1, "u_pu": 0.9719979160849105, "u": 58319.87496509463, "u_angle": -1.044828700708015, "id_reference": {"table": "bus", "index": 105}},
{"id": 5, "energized": 1, "u_pu": 0.9999999996523372, "u": 109999.99996175709, "u_angle": -1.798666001063812e-10, "id_reference": {"table": "bus", "index": 106}}
],
"shunt":
"line":
[
{"id": 11, "energized": 1, "p": 282008.0001416396, "q": 1551044.0007790178, "i": 31.188122375690188, "s": 1576472.6462886913, "pf": 0.17888543819998318, "id_reference": {"table": "shunt", "index": 1201}, "node": 3}
{"id": 6, "energized": 1, "loading": 0.5930290459172566, "p_from": -1763554.1135053905, "q_from": -1245081.6865976173, "i_from": 64.0471369590637, "s_from": 2158784.7316401307, "p_to": 1765096.6771171533, "q_to": 1169229.7700732222, "i_to": 62.767063741949805, "s_to": 2117230.39246925, "id_reference": {"table": "line", "index": 101}, "pgm_input": {"from_node": 2, "to_node": 1, "i_n": 108.0}}
],
"source":
[
{"id": 7, "energized": 1, "p": 1798666.0004384827, "q": 3476627.872944676, "i": 20.545012571488463, "s": 3914350.6163946516, "pf": 0.4595055928063901, "id_reference": {"table": "ext_grid", "index": 1}, "node": 0}
{"id": 7, "energized": 1, "p": 1798666.0004384827, "q": 3476627.872944676, "i": 20.545012571488463, "s": 3914350.6163946516, "pf": 0.4595055928063901, "id_reference": {"table": "ext_grid", "index": 1}, "pgm_input": {"node": 0}}
],
"sym_gen":
"sym_load":
[
{"id": 13, "energized": 1, "p": 1210000.0, "q": 810000.0, "i": 14.414885714493, "s": 1456090.6565183362, "pf": 0.8309922150680065, "id_reference": {"table": "sgen", "index": 31}, "node": 4}
{"id": 8, "energized": 1, "p": 575000.0, "q": 55200.0, "i": 17.13761141048308, "s": 577643.5232909652, "pf": 0.9954236078405164, "id_reference": {"table": "load", "name": "const_power", "index": 101}, "pgm_input": {"node": 2}},
{"id": 9, "energized": 1, "p": 1207113.6835430216, "q": 115882.91362013007, "i": 35.977469977108086, "s": 1212663.3063904808, "pf": 0.9954236078405161, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}, "pgm_input": {"node": 2}},
{"id": 10, "energized": 1, "p": 632458.9617296124, "q": 60716.06032604279, "i": 18.850149424695108, "s": 635366.6486790245, "pf": 0.9954236078405163, "id_reference": {"table": "load", "name": "const_current", "index": 101}, "pgm_input": {"node": 2}},
{"id": 18, "energized": 1, "p": 99999.99999999999, "q": 99999.99999999999, "i": 1.4000314325372134, "s": 141421.3562373095, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}, "pgm_input": {"node": 4}},
{"id": 19, "energized": 1, "p": 94477.99488734086, "q": 94477.99488734086, "i": 1.3227216252536735, "s": 133612.0617154934, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}, "pgm_input": {"node": 4}},
{"id": 20, "energized": 1, "p": 71111.11111111111, "q": 34440.68301069173, "i": 0.7821998773897324, "s": 79012.34567901235, "pf": 0.9, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}, "pgm_input": {"node": 4}}
],
"sym_load":
"shunt":
[
{"id": 11, "energized": 1, "p": 282008.0001416396, "q": 1551044.0007790178, "i": 31.188122375690188, "s": 1576472.6462886913, "pf": 0.17888543819998318, "id_reference": {"table": "shunt", "index": 1201}, "pgm_input": {"node": 3}}
],
"transformer":
[
{"id": 12, "energized": 1, "loading": 0.04892939318768632, "p_from": 1798665.9834270997, "q_from": 3476628.8259518775, "i_from": 20.545016973103277, "s_from": 3914351.4550149054, "p_to": -1765096.6771171836, "q_to": -1169229.7700735242, "i_to": 62.76706374195551, "s_to": 2117230.3924694424, "id_reference": {"table": "trafo", "index": 101}, "pgm_input": {"from_node": 0, "to_node": 1}, "pp_input": {"df": 1.0}}
],
"sym_gen":
[
{"id": 8, "energized": 1, "p": 575000.0, "q": 55200.0, "i": 17.13761141048308, "s": 577643.5232909652, "pf": 0.9954236078405164, "id_reference": {"table": "load", "name": "const_power", "index": 101}, "node": 2},
{"id": 9, "energized": 1, "p": 1207113.6835430216, "q": 115882.91362013007, "i": 35.977469977108086, "s": 1212663.3063904808, "pf": 0.9954236078405161, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}, "node": 2},
{"id": 10, "energized": 1, "p": 632458.9617296124, "q": 60716.06032604279, "i": 18.850149424695108, "s": 635366.6486790245, "pf": 0.9954236078405163, "id_reference": {"table": "load", "name": "const_current", "index": 101}, "node": 2},
{"id": 18, "energized": 1, "p": 99999.99999999999, "q": 99999.99999999999, "i": 1.4000314325372134, "s": 141421.3562373095, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}, "node": 4},
{"id": 19, "energized": 1, "p": 94477.99488734086, "q": 94477.99488734086, "i": 1.3227216252536735, "s": 133612.0617154934, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}, "node": 4},
{"id": 20, "energized": 1, "p": 71111.11111111111, "q": 34440.68301069173, "i": 0.7821998773897324, "s": 79012.34567901235, "pf": 0.9, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}, "node": 4}
{"id": 13, "energized": 1, "p": 1210000.0, "q": 810000.0, "i": 14.414885714493, "s": 1456090.6565183362, "pf": 0.8309922150680065, "id_reference": {"table": "sgen", "index": 31}, "pgm_input": {"node": 4}}
],
"three_winding_transformer":
[
{"id": 14, "energized": 1, "loading": 0.03152945292576947, "p_1": -651018.5317680555, "q_1": 1013282.7126517809, "i_1": 35.73216058618558, "s_1": 1204394.8623538653, "p_2": 944410.894001629, "q_2": 581081.3221020879, "i_2": 10.977386752839678, "s_2": 1108858.6202058704, "p_3": -282008.00014178595, "q_3": -1551044.0007787698, "i_3": 31.18812237568588, "s_3": 1576472.6462884734, "id_reference": {"table": "trafo3w", "index": 102}, "node_1": 2, "node_2": 4, "node_3": 3}
{"id": 14, "energized": 1, "loading": 0.03152945292576947, "p_1": -651018.5317680555, "q_1": 1013282.7126517809, "i_1": 35.73216058618558, "s_1": 1204394.8623538653, "p_2": 944410.894001629, "q_2": 581081.3221020879, "i_2": 10.977386752839678, "s_2": 1108858.6202058704, "p_3": -282008.00014178595, "q_3": -1551044.0007787698, "i_3": 31.18812237568588, "s_3": 1576472.6462884734, "id_reference": {"table": "trafo3w", "index": 102}, "pgm_input": {"node_1": 2, "node_2": 4, "node_3": 3}}
],
"transformer":
"link":
[
{"id": 15, "energized": 1, "loading": 0.0, "p_from": 0.0, "q_from": -0.0, "i_from": 0.0, "s_from": 0.0, "p_to": 0.0, "q_to": -0.0, "i_to": 0.0, "s_to": 0.0, "id_reference": {"table": "switch", "name": "b2b_switches", "index": 3021}, "pgm_input": {"from_node": 0, "to_node": 5}}
],
"asym_load":
[
{"id": 16, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_load", "index": 33}, "pgm_input": {"node": 4}}
],
"asym_gen":
[
{"id": 12, "energized": 1, "loading": 0.04892939318768632, "p_from": 1798665.9834270997, "q_from": 3476628.8259518775, "i_from": 20.545016973103277, "s_from": 3914351.4550149054, "p_to": -1765096.6771171836, "q_to": -1169229.7700735242, "i_to": 62.76706374195551, "s_to": 2117230.3924694424, "id_reference": {"table": "trafo", "index": 101}, "from_node": 0, "to_node": 1}
{"id": 17, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_sgen", "index": 32}, "pgm_input": {"node": 4}}
]
}
Loading

0 comments on commit 1050018

Please sign in to comment.