-
Notifications
You must be signed in to change notification settings - Fork 122
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
Update DC-OPF with correct PU and additional flow limit constraints #714
Draft
sambuddhac
wants to merge
12
commits into
develop
Choose a base branch
from
sambuddhac-patch-6
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR attempts to correct enhance flexibility of per-unit system of units in the DC-OPF and also impose line-flow MW limit constraint to represent thermally constrained lines.
Added base quantity definitions explicitly
Added pu reactance instead of P DC Coefficient
Minor typo fix
sum(inputs["pNet_Map"][l, z] * vANGLE[z, t] for z in 1:Z)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Suggested change
Adding transformer details; work in progress
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Added transformer data for HT and LT sides
Added completed transformer details
src/load_inputs/load_network_data.jl
Outdated
Comment on lines
53
to
97
##Adding Transformer data | ||
line_transformer_MVA_base = :Transformer_MVA_Base | ||
|
||
##Transformer LT side data | ||
# LT Base voltage (in kV) | ||
transformer_lt_voltage_kV_Base = to_floats(:Transformer_LT_Voltage_kV_Base) | ||
#Transformer LT Reactance in Ohms | ||
line_transformer_lt_reactance = :Transformer_LT_Reactance_Ohms | ||
#Transformer LT Turns | ||
line_transformer_lt_turns = :Transformer_LT_Turns | ||
# LT Base reactance | ||
lt_reactance_Base = (transformer_lt_voltage_kV_Base .^ 2) ./ line_transformer_MVA_base | ||
#Transformer LT Reactance in pu | ||
transformer_lt_reactance_pu = :Transformer_LT_Reactance_Ohms ./ lt_reactance_Base | ||
|
||
|
||
##Transformer HT side data | ||
# HT Base voltage (in kV) | ||
transformer_ht_voltage_kV_Base = to_floats(:Transformer_HT_Voltage_kV_Base) | ||
#Transformer HT Reactance in Ohms | ||
line_transformer_ht_reactance = :Transformer_HT_Reactance_Ohms | ||
#Transformer HT Turns | ||
line_transformer_ht_turns = :Transformer_HT_Turns | ||
# HT Base reactance | ||
ht_reactance_Base = (transformer_ht_voltage_kV_Base .^ 2) ./ line_transformer_MVA_base | ||
#Transformer LT Reactance in pu | ||
transformer_ht_reactance_pu = :Transformer_HT_Reactance_Ohms ./ ht_reactance_Base | ||
|
||
|
||
#LT Transformer Reactance referred to HT side in Ohms | ||
lt_reactance_referred_to_ht = ((line_transformer_ht_turns ./ line_transformer_lt_turns) .^ 2) .* line_transformer_lt_reactance | ||
#HT Transformer Reactance referred to LT side in Ohms | ||
ht_reactance_referred_to_lt = ((line_transformer_lt_turns ./ line_transformer_ht_turns) .^ 2) .* line_transformer_ht_reactance | ||
#Total LT Reactance in Ohms | ||
total_lt_reactance_ohms = line_transformer_lt_reactance + ht_reactance_referred_to_lt | ||
#Total LT Reactance in pu | ||
total_lt_reactance_pu = total_lt_reactance_ohms ./ lt_reactance_Base | ||
#Total HT Reactance in Ohms | ||
total_ht_reactance_ohms = line_transformer_ht_reactance + lt_reactance_referred_to_ht | ||
#Total HT Reactance in pu | ||
total_ht_reactance_pu = total_ht_reactance_ohms ./ ht_reactance_Base | ||
|
||
#Conversion of Transformer pu reactance to system pu | ||
total_ht_reactance_system_pu = total_ht_reactance_pu .* ((transformer_ht_voltage_kV_Base ./ line_voltage_kV) .^ 2) .* (MVA_Base ./ line_transformer_MVA_base) | ||
total_lt_reactance_system_pu = total_lt_reactance_pu .* ((transformer_lt_voltage_kV_Base ./ line_voltage_kV) .^ 2) .* (MVA_Base ./ line_transformer_MVA_base) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Suggested change
##Adding Transformer data | |
line_transformer_MVA_base = :Transformer_MVA_Base | |
##Transformer LT side data | |
# LT Base voltage (in kV) | |
transformer_lt_voltage_kV_Base = to_floats(:Transformer_LT_Voltage_kV_Base) | |
#Transformer LT Reactance in Ohms | |
line_transformer_lt_reactance = :Transformer_LT_Reactance_Ohms | |
#Transformer LT Turns | |
line_transformer_lt_turns = :Transformer_LT_Turns | |
# LT Base reactance | |
lt_reactance_Base = (transformer_lt_voltage_kV_Base .^ 2) ./ line_transformer_MVA_base | |
#Transformer LT Reactance in pu | |
transformer_lt_reactance_pu = :Transformer_LT_Reactance_Ohms ./ lt_reactance_Base | |
##Transformer HT side data | |
# HT Base voltage (in kV) | |
transformer_ht_voltage_kV_Base = to_floats(:Transformer_HT_Voltage_kV_Base) | |
#Transformer HT Reactance in Ohms | |
line_transformer_ht_reactance = :Transformer_HT_Reactance_Ohms | |
#Transformer HT Turns | |
line_transformer_ht_turns = :Transformer_HT_Turns | |
# HT Base reactance | |
ht_reactance_Base = (transformer_ht_voltage_kV_Base .^ 2) ./ line_transformer_MVA_base | |
#Transformer LT Reactance in pu | |
transformer_ht_reactance_pu = :Transformer_HT_Reactance_Ohms ./ ht_reactance_Base | |
#LT Transformer Reactance referred to HT side in Ohms | |
lt_reactance_referred_to_ht = ((line_transformer_ht_turns ./ line_transformer_lt_turns) .^ 2) .* line_transformer_lt_reactance | |
#HT Transformer Reactance referred to LT side in Ohms | |
ht_reactance_referred_to_lt = ((line_transformer_lt_turns ./ line_transformer_ht_turns) .^ 2) .* line_transformer_ht_reactance | |
#Total LT Reactance in Ohms | |
total_lt_reactance_ohms = line_transformer_lt_reactance + ht_reactance_referred_to_lt | |
#Total LT Reactance in pu | |
total_lt_reactance_pu = total_lt_reactance_ohms ./ lt_reactance_Base | |
#Total HT Reactance in Ohms | |
total_ht_reactance_ohms = line_transformer_ht_reactance + lt_reactance_referred_to_ht | |
#Total HT Reactance in pu | |
total_ht_reactance_pu = total_ht_reactance_ohms ./ ht_reactance_Base | |
#Conversion of Transformer pu reactance to system pu | |
total_ht_reactance_system_pu = total_ht_reactance_pu .* ((transformer_ht_voltage_kV_Base ./ line_voltage_kV) .^ 2) .* (MVA_Base ./ line_transformer_MVA_base) | |
total_lt_reactance_system_pu = total_lt_reactance_pu .* ((transformer_lt_voltage_kV_Base ./ line_voltage_kV) .^ 2) .* (MVA_Base ./ line_transformer_MVA_base) | |
##Adding Transformer data | |
line_transformer_MVA_base = :Transformer_MVA_Base | |
##Transformer LT side data | |
# LT Base voltage (in kV) | |
transformer_lt_voltage_kV_Base = to_floats(:Transformer_LT_Voltage_kV_Base) | |
#Transformer LT Reactance in Ohms | |
line_transformer_lt_reactance = :Transformer_LT_Reactance_Ohms | |
#Transformer LT Turns | |
line_transformer_lt_turns = :Transformer_LT_Turns | |
# LT Base reactance | |
lt_reactance_Base = (transformer_lt_voltage_kV_Base .^ 2) ./ | |
line_transformer_MVA_base | |
#Transformer LT Reactance in pu | |
transformer_lt_reactance_pu = :Transformer_LT_Reactance_Ohms ./ | |
lt_reactance_Base | |
##Transformer HT side data | |
# HT Base voltage (in kV) | |
transformer_ht_voltage_kV_Base = to_floats(:Transformer_HT_Voltage_kV_Base) | |
#Transformer HT Reactance in Ohms | |
line_transformer_ht_reactance = :Transformer_HT_Reactance_Ohms | |
#Transformer HT Turns | |
line_transformer_ht_turns = :Transformer_HT_Turns | |
# HT Base reactance | |
ht_reactance_Base = (transformer_ht_voltage_kV_Base .^ 2) ./ | |
line_transformer_MVA_base | |
#Transformer LT Reactance in pu | |
transformer_ht_reactance_pu = :Transformer_HT_Reactance_Ohms ./ | |
ht_reactance_Base | |
#LT Transformer Reactance referred to HT side in Ohms | |
lt_reactance_referred_to_ht = ((line_transformer_ht_turns ./ | |
line_transformer_lt_turns) .^ 2) .* | |
line_transformer_lt_reactance | |
#HT Transformer Reactance referred to LT side in Ohms | |
ht_reactance_referred_to_lt = ((line_transformer_lt_turns ./ | |
line_transformer_ht_turns) .^ 2) .* | |
line_transformer_ht_reactance | |
#Total LT Reactance in Ohms | |
total_lt_reactance_ohms = line_transformer_lt_reactance + | |
ht_reactance_referred_to_lt | |
#Total LT Reactance in pu | |
total_lt_reactance_pu = total_lt_reactance_ohms ./ lt_reactance_Base | |
#Total HT Reactance in Ohms | |
total_ht_reactance_ohms = line_transformer_ht_reactance + | |
lt_reactance_referred_to_ht | |
#Total HT Reactance in pu | |
total_ht_reactance_pu = total_ht_reactance_ohms ./ ht_reactance_Base | |
#Conversion of Transformer pu reactance to system pu | |
total_ht_reactance_system_pu = total_ht_reactance_pu .* | |
((transformer_ht_voltage_kV_Base ./ | |
line_voltage_kV) .^ 2) .* | |
(MVA_Base ./ line_transformer_MVA_base) | |
total_lt_reactance_system_pu = total_lt_reactance_pu .* | |
((transformer_lt_voltage_kV_Base ./ | |
line_voltage_kV) .^ 2) .* | |
(MVA_Base ./ line_transformer_MVA_base) |
…on of transformer reactance to line reactance remaining
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to correct enhance flexibility of per-unit system of units in the DC-OPF and also impose line-flow MW limit constraint to represent thermally constrained lines.
Description
This PR attempts to correct enhance flexibility of per-unit system of units in the DC-OPF and also impose line-flow MW limit constraint to represent thermally constrained lines.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Checklist
How this can be tested
Post-approval checklist for GenX core developers
After the PR is approved