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

Clean up per-uniting #330

Merged
merged 4 commits into from
Jul 8, 2021
Merged

Clean up per-uniting #330

merged 4 commits into from
Jul 8, 2021

Conversation

sylvlecl
Copy link
Contributor

@sylvlecl sylvlecl commented Jul 7, 2021

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)

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

Refactoring

What is the current behavior? (You can also link to an open issue here)

Per uniting is hard to follow in a few places :

  • current values are not per-united with the correct base current value. In consequence, per-united values are not close at all to 1, and some "normalization factor" has been introduced in equations, which has nothing to do there.
  • in sensitivity analysis, per-uniting is also mixed in equations, whereas it should only be applied in pre/post processing

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

Current values are per-united using base current value = (Sb * 1000)/(nominalV * sqrt(3)).
Perunit-related factors are remove from equations systems.

sylvlecl added 4 commits July 7, 2021 13:41
 - "fix" per-uniting of currents
 - move per-uniting from equations to post-processing

Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2021

Kudos, SonarCloud Quality Gate passed!

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

95.3% 95.3% Coverage
0.0% 0.0% Duplication

@sylvlecl sylvlecl requested a review from annetill July 7, 2021 14:26
return new ThreeWindingsTransformerResult(threeWindingsTransformerId, leg1.getP1().eval(), leg1.getQ1().eval(), leg1.getI1().eval(),
leg2.getP1().eval(), leg2.getQ1().eval(), leg2.getI1().eval(),
leg3.getP1().eval(), leg3.getQ1().eval(), leg3.getI1().eval());
double i1Base = PerUnit.ib(leg1.getBus1().getNominalV());
Copy link
Member

Choose a reason for hiding this comment

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

Oups...

@annetill annetill merged commit eb5d1d4 into master Jul 8, 2021
@annetill annetill deleted the cleanup-perunit branch July 8, 2021 08:32
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.

2 participants