Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero impedance flows. Specific solution for open Loadflow #573

Merged
merged 9 commits into from
Jul 18, 2022

Conversation

marqueslanauja
Copy link
Contributor

@marqueslanauja marqueslanauja commented Jul 1, 2022

Signed-off-by: José Antonio Marqués [email protected]

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
The LoadflowResultsCompletion method is used. This method is only valid for lines.

What is the new behavior (if this is a feature change)?
A general method has been coded for the openLoadflow. This method is able to compute flows for all zero impedance equipment, lines, twoWindingsTransformers, threeWindingsTransformers (including all configurations, one , two or all three legs with zero impedance), danglingLines and switches (the flow of the switches can not be recorded in iidm).
The method works with both loadflows, Ac and Dc.

In the openLoadflow the algorithm to compute zero impedance flows is easier and more general than in LoadflowResultsCompletion since the LfNetwork model includes the star bus of the threeWindings transformers and the boundary bus of the danglingLines.

At the threeWindingsTransformers, to compute the zero impedance flow we have to compute the flow of the legs with impedance at the star bus side. To do that I modified the AbstractFictitiousLfBranch class to allow the evaluation of the flow at both ends. The flow can always be evaluated at the lfNetwork level since the star bus is defined (also valid for danglingLines).

Since the method works for danglingLines, I have undone a previous fix for calculating the danglingLIne zero impedance flow (LfDanglingLineBranch class). Better only a way to compute all the zero impedance flow for all equipment.

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

Signed-off-by: José Antonio Marqués <[email protected]>
@marqueslanauja marqueslanauja marked this pull request as ready for review July 1, 2022 11:03
annetill added 2 commits July 5, 2022 18:11
Signed-off-by: Anne Tilloy <[email protected]>
Signed-off-by: Anne Tilloy <[email protected]>
@marqueslanauja
Copy link
Contributor Author

marqueslanauja commented Jul 6, 2022

The flow of the lines outside the tree must be zero. As the lines have zero impedance we take the agreement that the flow goes only through the lines in the tree, and there is no flow in the lines outside the tree. In the easiest case, two zero impedance parallel lines one of the lines will carry all the flow and the other zero.

Signed-off-by: Anne Tilloy <[email protected]>
@annetill
Copy link
Member

annetill commented Jul 6, 2022

The flow of the lines outside the tree must be zero. As the lines have zero impedance we take the agreement that the flow goes only through the lines in the tree, and there is no flow in the lines outside the tree. In the easiest case, two zero impedance parallel lines one of the lines will carry all the flow and the other zero.

Can you review my small changes?

@marqueslanauja
Copy link
Contributor Author

The flow of the lines outside the tree must be zero. As the lines have zero impedance we take the agreement that the flow goes only through the lines in the tree, and there is no flow in the lines outside the tree. In the easiest case, two zero impedance parallel lines one of the lines will carry all the flow and the other zero.

Can you review my small changes?

I reviewed your commits (Small refactorings and clean) and all changes are ok.

geofjamg added 2 commits July 17, 2022 23:31
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

99.4% 99.4% Coverage
0.0% 0.0% Duplication

@geofjamg
Copy link
Member

@annetill by trying to fix the code duplication issue, I changed a unit test. I think it was a mistake because for dangling lines and leg branches, we didn't store side 2 current (why ????, it seems to me a valid infos).

@annetill
Copy link
Member

@annetill by trying to fix the code duplication issue, I changed a unit test. I think it was a mistake because for dangling lines and leg branches, we didn't store side 2 current (why ????, it seems to me a valid infos).

Just because we thought that we don't need it, but it was before we notice that zero impedance lines were not handled.

@annetill annetill merged commit ecd225c into main Jul 18, 2022
@annetill annetill deleted the zeroImpedanceFlows branch July 18, 2022 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants