Skip to content

DP_Ph3_PiLine, EMT_Ph1_PiLine and Ph3 diakoptics functionality#436

Merged
leonardocarreras merged 1 commit into
sogno-platform:masterfrom
FGH-wirtz:Additional_Pi_Line_and_3phDiakoptics
Dec 16, 2025
Merged

DP_Ph3_PiLine, EMT_Ph1_PiLine and Ph3 diakoptics functionality#436
leonardocarreras merged 1 commit into
sogno-platform:masterfrom
FGH-wirtz:Additional_Pi_Line_and_3phDiakoptics

Conversation

@FGH-wirtz
Copy link
Copy Markdown
Contributor

Added missing PiLine Models:

  • DP_Ph3_PiLine
  • EMT_Ph1_PiLine

Extended Examples DP_PiLine.cpp and EMT_PiLine.cpp to test new Components.
To provide Diakoptics equivalent to the DP 1Ph example, minor extension of diakoptics solver to provide 3ph capability was necessary.

  • tearing Matrix needs to differ between 1ph and 3ph case
  • added mnaTearing capabilities where missing, equivalent to 1ph DP implementation

This is loosly connected to issue #431 (adds 3ph Diakoptics functionality).

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 6.82261% with 478 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.52%. Comparing base (b57703f) to head (75ae179).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
dpsim-models/src/DP/DP_Ph3_PiLine.cpp 0.00% 141 Missing ⚠️
dpsim/src/DiakopticsSolver.cpp 20.75% 126 Missing ⚠️
dpsim-models/src/EMT/EMT_Ph1_PiLine.cpp 0.00% 113 Missing ⚠️
dpsim-models/src/EMT/EMT_Ph3_Inductor.cpp 0.00% 22 Missing ⚠️
dpsim-models/src/EMT/EMT_Ph3_PiLine.cpp 0.00% 21 Missing ⚠️
dpsim-models/src/DP/DP_Ph3_Inductor.cpp 0.00% 18 Missing ⚠️
dpsim-models/src/EMT/EMT_Ph1_Inductor.cpp 0.00% 12 Missing ⚠️
dpsim-models/src/DP/DP_Ph3_Resistor.cpp 0.00% 9 Missing ⚠️
dpsim-models/src/EMT/EMT_Ph3_Resistor.cpp 0.00% 9 Missing ⚠️
...sim-models/include/dpsim-models/DP/DP_Ph3_PiLine.h 0.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #436      +/-   ##
==========================================
- Coverage   65.78%   64.52%   -1.26%     
==========================================
  Files         381      385       +4     
  Lines       23445    23925     +480     
  Branches    11698    11811     +113     
==========================================
+ Hits        15423    15438      +15     
- Misses       7960     8486     +526     
+ Partials       62        1      -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leonardocarreras leonardocarreras added the enhancement New feature or request label Dec 2, 2025
@leonardocarreras leonardocarreras moved this to In Progress in DPsim Dec 2, 2025
@leonardocarreras leonardocarreras added this to the Release: Next version milestone Dec 2, 2025
@FGH-wirtz FGH-wirtz force-pushed the Additional_Pi_Line_and_3phDiakoptics branch 3 times, most recently from d882f5e to 30da025 Compare December 5, 2025 16:29
@FGH-wirtz FGH-wirtz force-pushed the Additional_Pi_Line_and_3phDiakoptics branch from 30da025 to e9d284e Compare December 10, 2025 14:34
@leonardocarreras
Copy link
Copy Markdown
Contributor

Hi @cwirtz-fgh, sorry for the short delay.... I will ask you to rebase the PR into the current master... I think many of the shown changes are unrelated to your PR at the moment, it will surely will be easier to check that way...

@FGH-wirtz FGH-wirtz force-pushed the Additional_Pi_Line_and_3phDiakoptics branch 3 times, most recently from 2bcbd24 to f8cac2f Compare December 12, 2025 14:46
Copy link
Copy Markdown
Contributor

@leonardocarreras leonardocarreras left a comment

Choose a reason for hiding this comment

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

Hi @cwirtz-fgh ! Thanks for the PR... Some minor comments from my side...

(and maybe one consideration without a very strong opinion, for simple components like resistor/inductor/capacitor, would final be more appropriate than override for some of the functions? I would expect no inheritance from them)

Comment thread dpsim-models/include/dpsim-models/DP/DP_Ph3_PiLine.h Outdated
Comment thread dpsim-models/include/dpsim-models/EMT/EMT_Ph1_PiLine.h Outdated
Comment thread dpsim-models/src/DP/DP_Ph3_PiLine.cpp Outdated
Comment thread dpsim-models/src/EMT/EMT_Ph1_PiLine.cpp Outdated
Comment thread dpsim-models/src/EMT/EMT_Ph3_PiLine.cpp Outdated
Comment thread dpsim/src/DiakopticsSolver.cpp Outdated
Comment thread dpsim/src/DiakopticsSolver.cpp Outdated
Comment thread dpsim/examples/cxx/Circuits/DP_PiLine.cpp Outdated
Comment thread dpsim/examples/cxx/Circuits/DP_PiLine.cpp Outdated
@FGH-wirtz
Copy link
Copy Markdown
Contributor Author

(and maybe one consideration without a very strong opinion, for simple components like resistor/inductor/capacitor, would final be more appropriate than override for some of the functions? I would expect no inheritance from them)

In my opinion yes, but as components like EMT_Ph1_Resistor already use override i would see this as a more fundamental decision and seperate commit / refactoring.

@FGH-wirtz FGH-wirtz force-pushed the Additional_Pi_Line_and_3phDiakoptics branch from f8cac2f to 302fe21 Compare December 15, 2025 11:59
 - DP_Ph3_PiLine
 - EMT_Ph1_PiLine

Extended Examples DP_PiLine.cpp and EMT_PiLine.cpp to test new Components.
To provide Diakoptics equivalent to the DP 1Ph example, minor extension of diakoptics solver to provide 3ph capability was necessary.
 - tearing Matrix needs to differ between 1ph and 3ph case
 - added mnaTearing capabilities where missing, equivalent to 1ph DP implementation

Signed-off-by: cwirtz <christoph.wirtz@fgh-ma.de>
@FGH-wirtz FGH-wirtz force-pushed the Additional_Pi_Line_and_3phDiakoptics branch from 302fe21 to 75ae179 Compare December 15, 2025 12:08
Copy link
Copy Markdown
Contributor

@leonardocarreras leonardocarreras left a comment

Choose a reason for hiding this comment

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

Looks good, lets see if someone else has an opinion in the next few days.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

@georgii-tishenin georgii-tishenin left a comment

Choose a reason for hiding this comment

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

Hi @cwirtz-fgh! Thanks for reviving the work on Diakoptics. this PR looks good to me. I have a few suggestions for potential follow-up PRs that could further improve DPsim:

  1. Add the new components to the pybind (see EMTComponents and DPComponents.) This will allow to use them in dpsimpy.
  2. Add Jupyter notebook(s) with assertions using dpsimpy. While we currently do not have formal testing guidelines, Python-based Jupyter notebooks are executed during CI. This helps track code coverage through examples and automatically detect changes in simulation results.
  3. Consider adding content on Diakoptics to documentation (e.g., may be Diakoptics can be added to the concepts)

@leonardocarreras leonardocarreras moved this from In Progress to Ready for Review in DPsim Dec 16, 2025
@leonardocarreras leonardocarreras merged commit 15b0ca1 into sogno-platform:master Dec 16, 2025
33 of 35 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in DPsim Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants