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

Examples Folder #136

Merged
merged 9 commits into from Apr 22, 2021
Merged

Examples Folder #136

merged 9 commits into from Apr 22, 2021

Conversation

antonplietzsch
Copy link
Member

  1. I added an examples folder to the PowerDynamics repo as discussed in examples folder in PowerDynamics.jl #119.
  2. As a first example i added the IEEE 14-bus system with 4th order generators.
  3. I also added tests for this example to check that the fault simulations run through successfully.

@codecov
Copy link

codecov bot commented Nov 23, 2020

Codecov Report

Merging #136 (911c7d5) into master (53815c7) will increase coverage by 0.66%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   89.59%   90.25%   +0.66%     
==========================================
  Files          40       40              
  Lines         903      872      -31     
==========================================
- Hits          809      787      -22     
+ Misses         94       85       -9     
Impacted Files Coverage Δ
...des/experimental/PVInverterWithFrequencyControl.jl 94.11% <0.00%> (-5.89%) ⬇️
src/operationpoint/operationpoint.jl 91.83% <0.00%> (-4.09%) ⬇️
src/common/PowerGridSolutions.jl 50.00% <0.00%> (-3.92%) ⬇️
src/common/States.jl 92.45% <0.00%> (-1.05%) ⬇️
src/lines/RLLine.jl 100.00% <0.00%> (ø)
src/faults/ChangeInitialConditions.jl 100.00% <0.00%> (+6.66%) ⬆️
src/parsers/JsonParser.jl 97.18% <0.00%> (+14.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53815c7...21f14cc. Read the comment docs.


solution3 = simulate(fault3, pg_build, operationpoint, timespan)
@test solution3.dqsol.retcode == :Success
end
Copy link
Member

Choose a reason for hiding this comment

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

@antonplietzsch @luap-pik I think it would also be nice to check if the solution is reproduced

using PowerDynamics
using OrderedCollections: OrderedDict

buses=OrderedDict(
Copy link
Member

Choose a reason for hiding this comment

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

@antonplietzsch It would be handy to include the code from examples/ieee14bus/buildexample.jl here simply instead of defining the IEEE14 bus system two times in the repo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good point. I'll do that.

"bus1"=> FourthOrderEq(T_d_dash=7.4, D=2, X_d=0.8979, X_q=0.646, Ω=50, X_d_dash=0.2995, T_q_dash=0.1, X_q_dash=0.646, P=2.32, H=5.148, E_f=1),
"bus2"=> SlackAlgebraic(U=1),
"bus3"=> FourthOrderEq(T_d_dash=6.1, D=2, X_d=1.05, X_q=0.98, Ω=50, X_d_dash=0.185, T_q_dash=0.4, X_q_dash=0.36, P=-0.942, H=6.54, E_f= 1),
"bus4"=> VoltageDependentLoad(P=-0.478, Q=-0.0, U=1.0, A=0.0, B=0.0),
Copy link
Contributor

Choose a reason for hiding this comment

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

You are using VoltageDependentLoad's here but the factors are all 0. Is that for a reason?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really. I thought it might be easier for users to play around with different load models by just changing parameters instead of replacing node models. But you're right, it is a bit confusing right now. I think I will either go back to the PQAlgebraic or change the parameters in the VoltageDependentLoad to make it actually voltage dependent.

@SabineAuer
Copy link
Member

@antonplietzsch : was there anything else you wanted to add here with Paul? @luap-pik?

@antonplietzsch
Copy link
Member Author

I changed the following things in the last commit:

  1. Loads are now modeled as PQAlgebraic
  2. I included the buildexample.jl in the test, such that the test system is only defined once in the repo.
  3. I simplified the plotting script a bit.

@SabineAuer SabineAuer linked an issue Mar 31, 2021 that may be closed by this pull request
Copy link
Member

@SabineAuer SabineAuer left a comment

Choose a reason for hiding this comment

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

Review done together with @antonplietzsch during zoom call

@SabineAuer SabineAuer merged commit 234b784 into master Apr 22, 2021
@SabineAuer SabineAuer deleted the examples branch May 6, 2021 13:30
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
None yet
Development

Successfully merging this pull request may close these issues.

examples folder in PowerDynamics.jl
3 participants