Skip to content

Commit

Permalink
Merge pull request #69 from NREL-Sienna/jd/add_radial_system
Browse files Browse the repository at this point in the history
add radial branches test system
  • Loading branch information
jd-lara committed Jan 16, 2024
2 parents 46cd9a4 + deadb58 commit e6ae57d
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
109 changes: 109 additions & 0 deletions src/library/psitest_library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4125,3 +4125,112 @@ function build_c_sys5_all_components(; kwargs...)
PSY.convert_component!(c_sys5_all_components, bus3, StandardLoad)
return c_sys5_all_components
end

function build_c_sys5_radial(; kwargs...)
sys = build_c_sys5_uc(; kwargs...)
new_sys = deepcopy(sys)
################################
#### Create Extension Buses ####
################################

busC = get_component(ACBus, new_sys, "nodeC")

busC_ext1 = ACBus(;
number = 301,
name = "nodeC_ext1",
bustype = ACBusTypes.PQ,
angle = 0.0,
magnitude = 1.0,
voltage_limits = (min = 0.9, max = 1.05),
base_voltage = 230.0,
area = nothing,
load_zone = nothing,
)

busC_ext2 = ACBus(;
number = 302,
name = "nodeC_ext2",
bustype = ACBusTypes.PQ,
angle = 0.0,
magnitude = 1.0,
voltage_limits = (min = 0.9, max = 1.05),
base_voltage = 230.0,
area = nothing,
load_zone = nothing,
)

add_components!(new_sys, [busC_ext1, busC_ext2])

################################
#### Create Extension Lines ####
################################

line_C_to_ext1 = Line(;
name = "C_to_ext1",
available = true,
active_power_flow = 0.0,
reactive_power_flow = 0.0,
arc = Arc(; from = busC, to = busC_ext1),
#r = 0.00281,
r = 0.0,
x = 0.0281,
b = (from = 0.00356, to = 0.00356),
rate = 2.0,
angle_limits = (min = -0.7, max = 0.7),
)

line_ext1_to_ext2 = Line(;
name = "ext1_to_ext2",
available = true,
active_power_flow = 0.0,
reactive_power_flow = 0.0,
arc = Arc(; from = busC_ext1, to = busC_ext2),
#r = 0.00281,
r = 0.0,
x = 0.0281,
b = (from = 0.00356, to = 0.00356),
rate = 2.0,
angle_limits = (min = -0.7, max = 0.7),
)

add_components!(new_sys, [line_C_to_ext1, line_ext1_to_ext2])

###################################
###### Update Extension Loads #####
###################################

load_bus3 = get_component(PowerLoad, new_sys, "Bus3")

load_ext1 = PowerLoad(;
name = "Bus_ext1",
available = true,
bus = busC_ext1,
active_power = 1.0,
reactive_power = 0.9861 / 3,
base_power = 100.0,
max_active_power = 1.0,
max_reactive_power = 0.9861 / 3,
)

load_ext2 = PowerLoad(;
name = "Bus_ext2",
available = true,
bus = busC_ext2,
active_power = 1.0,
reactive_power = 0.9861 / 3,
base_power = 100.0,
max_active_power = 1.0,
max_reactive_power = 0.9861 / 3,
)

add_components!(new_sys, [load_ext1, load_ext2])

copy_time_series!(load_ext1, load_bus3)
copy_time_series!(load_ext2, load_bus3)

set_active_power!(load_bus3, 1.0)
set_max_active_power!(load_bus3, 1.0)
set_reactive_power!(load_bus3, 0.3287)
set_max_reactive_power!(load_bus3, 0.3287)
return new_sys
end
7 changes: 7 additions & 0 deletions src/system_descriptor_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ const SYSTEM_CATALOG = [
raw_data = joinpath(DATA_DIR, "psy_data", "data_5bus_pu.jl"),
build_function = build_c_sys5_reg,
),
SystemDescriptor(;
name = "c_sys5_radial",
description = "5-Bus with a radial branches",
category = PSITestSystems,
raw_data = joinpath(DATA_DIR, "psy_data", "data_5bus_pu.jl"),
build_function = build_c_sys5_radial,
),
SystemDescriptor(;
name = "sys10_pjm_ac_dc",
description = "10-bus system (duplicate 5-bus PJM) with 4-DC bus system",
Expand Down

0 comments on commit e6ae57d

Please sign in to comment.