powsybl-core icon indicating copy to clipboard operation
powsybl-core copied to clipboard

LoadflowResultsCompletion: Fix danglingLine.

Open marqueslanauja opened this issue 2 years ago • 6 comments

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)

  • [x] The commit message follows our guidelines
  • [x] 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)

Only P0 and Q0 is considered at the boundary node. Generation is not considered.

What is the new behavior (if this is a feature change)?

Generation is also considered. All the regulating control configurations (voltage regulation and reactive power regulation) are supported.

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)

marqueslanauja avatar Mar 30 '22 17:03 marqueslanauja

In OLF we use directly Z0FlowsCompletionto fill flow of non impedant lines (see https://github.com/powsybl/powsybl-open-loadflow/blob/main/src/main/java/com/powsybl/openloadflow/OpenLoadFlowProvider.java). So we do not run a full LoadFlowResultCompletion because we are only interested by non impedant branches. How will we be able to reuse non impedant dangling lines flow completion without running LoadFlowResultCompletion?

In the open-loadflow, we do:

        // zero or low impedance branch flows computation
        if (ok) {
            new Z0FlowsCompletion(network, line -> {
                // to be consistent with low impedance criteria used in DcEquationSystem and AcEquationSystem
                double nominalV = line.getTerminal1().getVoltageLevel().getNominalV();
                double zb = nominalV * nominalV / PerUnit.SB;
                double z = FastMath.hypot(line.getR(), line.getX());
                return z / zb <= LfBranch.LOW_IMPEDANCE_THRESHOLD;
            }).complete();
        }

We want to do something similar for the other equipments (transformers and dangling lines).

geofjamg avatar Mar 30 '22 18:03 geofjamg

We have found a solution for the open-loadflow, see https://github.com/powsybl/powsybl-open-loadflow/commit/a6ef87b1508b923e208e083e4999b8a22b58a845. For our private loadflow engine, we have also provide a quick and efficient solution. What do we do with this PR then?

annetill avatar Apr 05 '22 07:04 annetill

We have found a solution for the open-loadflow, see powsybl/powsybl-open-loadflow@a6ef87b. For our private loadflow engine, we have also provide a quick and efficient solution. What do we do with this PR then?

Preparing this PR we have found some inconsistencies using the load and generation components of the dangling lines. We can use this PR to solve these inconsistencies. We are preparing some slides to show you the inconsistencies and how we want to solve them. We want to know your opinion before we implement them.

marqueslanauja avatar Apr 05 '22 11:04 marqueslanauja

We have decided to simplify the calculations related to dangling lines when completing load flow results. We will consider only the situation where we have both voltages (network and boundary) and we have to calculate the flows or we have both flow and voltage at network and we have to calculate these magnitudes to the boundary. This is done in PR #2459.

zamarrenolm avatar Jan 31 '23 15:01 zamarrenolm