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

Support of asymmetrical transformer #806

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open

Support of asymmetrical transformer #806

wants to merge 86 commits into from

Conversation

JB-H
Copy link
Contributor

@JB-H JB-H commented Jun 27, 2023

Please check if the PR fulfills these requirements

  • 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?

What kind of change does this PR introduce?

New feature

What is the current behavior?

What is the new behavior (if this is a feature change)?
Takes into account transformers and missing phases in asym load flow

Does this PR introduce a breaking change or deprecate an API?

  • 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:

@JB-H JB-H requested review from geofjamg and annetill June 27, 2023 20:23
JB-H added 27 commits June 28, 2023 00:03
implementation of 34 node feeder grid test

Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
test

Signed-off-by: JB-H <[email protected]>
test

Signed-off-by: JB-H <[email protected]>
test

Signed-off-by: JB-H <[email protected]>
test

Signed-off-by: JB-H <[email protected]>
test

Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
Signed-off-by: JB-H <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

89.7% 89.7% Coverage
0.5% 0.5% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

# Conflicts:
#	src/main/java/com/powsybl/openloadflow/ac/equations/asym/AbstractAsymmetricalClosedBranchCoupledFlowEquationTerm.java
#	src/main/java/com/powsybl/openloadflow/ac/equations/asym/AsymmetricalAcEquationSystemCreator.java
#	src/main/java/com/powsybl/openloadflow/ac/equations/asym/AsymmetricalClosedBranchCoupledCurrentEquationTerm.java
#	src/main/java/com/powsybl/openloadflow/ac/equations/asym/AsymmetricalClosedBranchCoupledPowerEquationTerm.java
#	src/main/java/com/powsybl/openloadflow/ac/solver/NewtonRaphson.java
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
# Conflicts:
#	src/main/java/com/powsybl/openloadflow/ac/equations/asym/AsymmetricalAcEquationSystemCreator.java
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Copy link

sonarcloud bot commented Dec 9, 2023

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 48 Code Smells

90.0% 90.0% Coverage
0.2% 0.2% Duplication

/**
* @author Jean-Baptiste Heyberger <jbheyberger at gmail.com>
*/
public class ComplexMatrix {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we imagine having this class in powsybl-core? There is a lot of small code parts using complex all over Powsybl. @zamarrenolm could be interested here.

Copy link
Member

@annetill annetill May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with powsybl/powsybl-core#2835, be careful about -1 indexing change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is merged, rework needed later.

@@ -9,6 +9,8 @@
package com.powsybl.openloadflow.util;

import com.powsybl.math.matrix.DenseMatrix;
import net.jafama.FastMath;
import org.apache.commons.math3.complex.Complex;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark, I wonder if it is the good place for this class.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: use FortescueUtil in core.

* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package com.powsybl.openloadflow.network.extensions;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use WindingConnectionType from powsybl-core instead.

/**
* @author Jean-Baptiste Heyberger <jbheyberger at gmail.com>
*/
public class AsymTransfo2W {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this new extension compared to existing TwoWindingsTransformerFortescue? I see that you prefer using z here than r and x already present in the extension.

/**
* @author Jean-Baptiste Heyberger <jbheyberger at gmail.com>
*/
public enum LoadType {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to use the load model zip instead.

/**
* @author Jean-Baptiste Heyberger <jbheyberger at gmail.com>
*/
public class AsymmetricalBranchConnector {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this object is not mature enough to go in powsybl-core. The extension LineAsymmetrical should stay here too because it depends on this connector.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you know the type of a bus "wye" or "delta?
Then, it is unexpected that isPositiveSequenceAsCurrent is an input data. Same remark for isFortescueRepresentation.

# Conflicts:
#	src/main/java/com/powsybl/openloadflow/ac/equations/AbstractClosedBranchAcFlowEquationTerm.java
#	src/main/java/com/powsybl/openloadflow/ac/equations/asym/AsymmetricalAcEquationSystemCreator.java
#	src/main/java/com/powsybl/openloadflow/ac/solver/NewtonRaphson.java
#	src/main/java/com/powsybl/openloadflow/network/impl/LfBusImpl.java
Signed-off-by: Anne Tilloy <[email protected]>
@annetill annetill changed the title asymTfo Implementation 13 nodes Test Support of asymmetrical transformer May 7, 2024
Signed-off-by: Anne Tilloy <[email protected]>
Copy link

sonarcloud bot commented May 7, 2024

private Boolean isOpenPhaseC2;

// in case of a Delta-Wye or Wye-Delta connexion,
// this attribute informs if this is a forward (step-up) or backward (step-down) connexion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have some documentation about this attribute? I know what is a step-up transformer and a step-down transformer, but I am not sure it is what we mean here.


public static final String NAME = "lineAsymmetrical";

private ComplexMatrix yabc; // a three phase admittance matrix can be provided in input and will be used as first option if not null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what is the second option?

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.

None yet

3 participants