-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #644 from PowerGridModel/feature/source-calculatio…
…n-using-ybus Use YBus to calculate source injection in power flow
- Loading branch information
Showing
10 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
tests/data/power_flow/source-big-sk/asym_output_batch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"version": "1.0", | ||
"type": "asym_output", | ||
"is_batch": true, | ||
"attributes": {}, | ||
"data": [ | ||
{ | ||
"node": [ | ||
{"id": 1, "energized": 1, "u_pu": [1, 1, 1]}, | ||
{"id": 2, "energized": 1, "u_pu": [0.9, 0.9, 0.9]} | ||
], | ||
"line": [ | ||
{"id": 4, "energized": 1, "q_from": [10, 10, 10], "q_to": [-9, -9, -9]} | ||
], | ||
"source": [ | ||
{"id": 6, "energized": 0, "q": [0, 0, 0]}, | ||
{"id": 7, "energized": 1, "q": [10, 10, 10]} | ||
], | ||
"sym_load": [ | ||
{"id": 8, "energized": 1, "q": [9, 9, 9]} | ||
] | ||
}, | ||
{ | ||
"node": [ | ||
{"id": 1, "energized": 1, "u_pu": [1, 1, 1]}, | ||
{"id": 2, "energized": 1, "u_pu": [0.9, 0.9, 0.9]} | ||
], | ||
"line": [ | ||
{"id": 4, "energized": 1, "q_from": [10, 10, 10], "q_to": [-9, -9, -9]} | ||
], | ||
"source": [ | ||
{"id": 6, "energized": 1, "q": [10, 10, 10]}, | ||
{"id": 7, "energized": 0, "q": [0, 0, 0]} | ||
], | ||
"sym_load": [ | ||
{"id": 8, "energized": 1, "q": [9, 9, 9]} | ||
] | ||
}, | ||
{ | ||
"node": [ | ||
{"id": 1, "energized": 1, "u_pu": [1, 1, 1]}, | ||
{"id": 2, "energized": 1, "u_pu": [0.9, 0.9, 0.9]} | ||
], | ||
"line": [ | ||
{"id": 4, "energized": 1, "q_from": [10, 10, 10], "q_to": [-9, -9, -9]} | ||
], | ||
"source": [ | ||
{"id": 6, "energized": 1, "q": [4, 4, 4]}, | ||
{"id": 7, "energized": 1, "q": [6, 6, 6]} | ||
], | ||
"sym_load": [ | ||
{"id": 8, "energized": 1, "q": [9, 9, 9]} | ||
] | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/data/power_flow/source-big-sk/asym_output_batch.json.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
||
SPDX-License-Identifier: MPL-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"version": "1.0", | ||
"type": "input", | ||
"is_batch": false, | ||
"attributes": {}, | ||
"data": { | ||
"node": [ | ||
{ | ||
"id": 1, | ||
"u_rated": 30.0 | ||
}, | ||
{ | ||
"id": 2, | ||
"u_rated": 30.0 | ||
} | ||
], | ||
"line": [ | ||
{ | ||
"id": 4, | ||
"from_node": 1, | ||
"to_node": 2, | ||
"from_status": 1, | ||
"to_status": 1, | ||
"r1": 0.0, | ||
"x1": 3.0, | ||
"c1": 0.0, | ||
"tan1": 0.0, | ||
"r0": 2.0, | ||
"x0": 5.0, | ||
"c0": 0.0, | ||
"tan0": 0.0, | ||
"i_n": 1e3 | ||
} | ||
], | ||
"source": [ | ||
{ | ||
"id": 6, | ||
"node": 1, | ||
"status": 0, | ||
"u_ref": 1.0, | ||
"sk": 2e50, | ||
"rx_ratio": 0.1 | ||
}, | ||
{ | ||
"id": 7, | ||
"node": 1, | ||
"status": 0, | ||
"u_ref": 1.0, | ||
"sk": 3e50, | ||
"rx_ratio": 0.1 | ||
} | ||
], | ||
"sym_load": [ | ||
{ | ||
"id": 8, | ||
"node": 2, | ||
"status": 1, | ||
"type": 0, | ||
"p_specified": 0.0, | ||
"q_specified": 27.0 | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
||
SPDX-License-Identifier: MPL-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"calculation_method": ["newton_raphson", "iterative_current"], | ||
"rtol": 1e-6, | ||
"atol": 1e-6, | ||
"fail": { | ||
"reason": "Source injection calculation #458" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
||
SPDX-License-Identifier: MPL-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"version": "1.0", | ||
"type": "sym_output", | ||
"is_batch": true, | ||
"attributes": {}, | ||
"data": [ | ||
{ | ||
"node": [ | ||
{"id": 1, "energized": 1, "u_pu": 1, "u": 30}, | ||
{"id": 2, "energized": 1, "u_pu": 0.9, "u": 27} | ||
], | ||
"line": [ | ||
{"id": 4, "energized": 1, "q_from": 30, "q_to": -27} | ||
], | ||
"source": [ | ||
{"id": 6, "energized": 0, "q": 0}, | ||
{"id": 7, "energized": 1, "q": 30} | ||
], | ||
"sym_load": [ | ||
{"id": 8, "energized": 1, "q": 27} | ||
] | ||
}, | ||
{ | ||
"node": [ | ||
{"id": 1, "energized": 1, "u_pu": 1, "u": 30}, | ||
{"id": 2, "energized": 1, "u_pu": 0.9, "u": 27} | ||
], | ||
"line": [ | ||
{"id": 4, "energized": 1, "q_from": 30, "q_to": -27} | ||
], | ||
"source": [ | ||
{"id": 6, "energized": 1, "q": 30}, | ||
{"id": 7, "energized": 0, "q": 0} | ||
], | ||
"sym_load": [ | ||
{"id": 8, "energized": 1, "q": 27} | ||
] | ||
}, | ||
{ | ||
"node": [ | ||
{"id": 1, "energized": 1, "u_pu": 1, "u": 30}, | ||
{"id": 2, "energized": 1, "u_pu": 0.9, "u": 27} | ||
], | ||
"line": [ | ||
{"id": 4, "energized": 1, "q_from": 30, "q_to": -27} | ||
], | ||
"source": [ | ||
{"id": 6, "energized": 1, "q": 12}, | ||
{"id": 7, "energized": 1, "q": 18} | ||
], | ||
"sym_load": [ | ||
{"id": 8, "energized": 1, "q": 27} | ||
] | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/data/power_flow/source-big-sk/sym_output_batch.json.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
||
SPDX-License-Identifier: MPL-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"version": "1.0", | ||
"type": "update", | ||
"is_batch": true, | ||
"attributes": {}, | ||
"data": [ | ||
{ | ||
"source": [ | ||
{ | ||
"id": 6, | ||
"status": 0 | ||
}, | ||
{ | ||
"id": 7, | ||
"status": 1 | ||
} | ||
] | ||
}, | ||
{ | ||
"source": [ | ||
{ | ||
"id": 6, | ||
"status": 1 | ||
}, | ||
{ | ||
"id": 7, | ||
"status": 0 | ||
} | ||
] | ||
}, | ||
{ | ||
"source": [ | ||
{ | ||
"id": 6, | ||
"status": 1 | ||
}, | ||
{ | ||
"id": 7, | ||
"status": 1 | ||
} | ||
] | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/data/power_flow/source-big-sk/update_batch.json.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
||
SPDX-License-Identifier: MPL-2.0 |