From 07ca94beb82ce59b4cd8c45129a00ec5f91f36bc Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:47:19 -0700 Subject: [PATCH 1/8] updated pv tilt deafault consistent with PVwattsv8 --- src/core/pv.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/pv.jl b/src/core/pv.jl index f562a1634..d89c051c1 100644 --- a/src/core/pv.jl +++ b/src/core/pv.jl @@ -3,7 +3,7 @@ `PV` is an optional REopt input with the following keys and default values: ```julia array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real= array_type == 1 ? 10 : 20, # tilt = 10 deg for rooftop systems, 20 for ground-mount + tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, # System losses azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere @@ -102,7 +102,7 @@ mutable struct PV <: AbstractTech off_grid_flag::Bool = false, latitude::Real, array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real= array_type == 1 ? 10 : 20, # tilt = 10 deg for rooftop systems, 20 for ground-mount + tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere From 6159cbe1c2c0c8e126556c268a26d1d89e1cf378 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:39:30 -0700 Subject: [PATCH 2/8] revert for testing --- src/core/pv.jl | 4 ++-- test/runtests.jl | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/core/pv.jl b/src/core/pv.jl index d89c051c1..f562a1634 100644 --- a/src/core/pv.jl +++ b/src/core/pv.jl @@ -3,7 +3,7 @@ `PV` is an optional REopt input with the following keys and default values: ```julia array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) + tilt::Real= array_type == 1 ? 10 : 20, # tilt = 10 deg for rooftop systems, 20 for ground-mount module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, # System losses azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere @@ -102,7 +102,7 @@ mutable struct PV <: AbstractTech off_grid_flag::Bool = false, latitude::Real, array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) + tilt::Real= array_type == 1 ? 10 : 20, # tilt = 10 deg for rooftop systems, 20 for ground-mount module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere diff --git a/test/runtests.jl b/test/runtests.jl index aae254faf..e4b91c47a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -13,7 +13,7 @@ Random.seed!(42) if "Xpress" in ARGS @testset "test_with_xpress" begin @test true #skipping Xpress while import to HiGHS takes place - #include("test_with_xpress.jl") + # include("test_with_xpress.jl") end elseif "CPLEX" in ARGS @@ -172,9 +172,9 @@ else # run HiGHS tests post["PV"]["array_type"] = 1 scen = Scenario(post) - @test scen.pvs[1].tilt ≈ 10 + @test scen.pvs[1].tilt ≈ 20 # Correct tilt value for array_type = 1 - ## Scenario 3:Cape Town; array-type = 0 (ground) + ## Scenario 3: Cape Town; array-type = 0 (ground) post["Site"]["latitude"] = -33.974732 post["Site"]["longitude"] = 19.130050 post["PV"]["array_type"] = 0 @@ -182,12 +182,18 @@ else # run HiGHS tests @test scen.pvs[1].tilt ≈ 20 @test scen.pvs[1].azimuth ≈ 0 - - ## Scenario 4:Cape Town; array-type = 0 (ground); user-provided tilt (should not get overwritten) + + ## Scenario 4: Cape Town; array-type = 0 (ground); user-provided tilt (should not get overwritten) post["PV"]["tilt"] = 17 scen = Scenario(post) @test scen.pvs[1].tilt ≈ 17 - end + + ## Scenario 5: Test for tilt = 0 for array types other than 0 and 1 + post["PV"]["array_type"] = 3 + scen = Scenario(post) + @test scen.pvs[1].tilt ≈ 0 + end + @testset "AlternativeFlatLoads" begin input_data = JSON.parsefile("./scenarios/flatloads.json") From 005355885f6e0ecc41adfcd038c91e16d6c36388 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:43:49 -0700 Subject: [PATCH 3/8] testing updates --- src/core/pv.jl | 4 ++-- test/runtests.jl | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core/pv.jl b/src/core/pv.jl index f562a1634..d89c051c1 100644 --- a/src/core/pv.jl +++ b/src/core/pv.jl @@ -3,7 +3,7 @@ `PV` is an optional REopt input with the following keys and default values: ```julia array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real= array_type == 1 ? 10 : 20, # tilt = 10 deg for rooftop systems, 20 for ground-mount + tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, # System losses azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere @@ -102,7 +102,7 @@ mutable struct PV <: AbstractTech off_grid_flag::Bool = false, latitude::Real, array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real= array_type == 1 ? 10 : 20, # tilt = 10 deg for rooftop systems, 20 for ground-mount + tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere diff --git a/test/runtests.jl b/test/runtests.jl index e4b91c47a..8b6188ba7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -187,11 +187,7 @@ else # run HiGHS tests post["PV"]["tilt"] = 17 scen = Scenario(post) @test scen.pvs[1].tilt ≈ 17 - - ## Scenario 5: Test for tilt = 0 for array types other than 0 and 1 - post["PV"]["array_type"] = 3 - scen = Scenario(post) - @test scen.pvs[1].tilt ≈ 0 + end From 3f838221f7b55ca56d4ecb7b6ae6bcf407281589 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:47:43 -0700 Subject: [PATCH 4/8] added PVspecs test --- test/runtests.jl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 8b6188ba7..e1a9ddda1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -174,7 +174,13 @@ else # run HiGHS tests @test scen.pvs[1].tilt ≈ 20 # Correct tilt value for array_type = 1 - ## Scenario 3: Cape Town; array-type = 0 (ground) + ## Scenario 3: Palmdale, CA; array-type = 2 (axis-tracking) + post["PV"]["array_type"] = 2 + scen = Scenario(post) + + @test scen.pvs[1].tilt ≈ 0 # Correct tilt value for array_type = 2 + + ## Scenario 4: Cape Town; array-type = 0 (ground) post["Site"]["latitude"] = -33.974732 post["Site"]["longitude"] = 19.130050 post["PV"]["array_type"] = 0 @@ -183,12 +189,14 @@ else # run HiGHS tests @test scen.pvs[1].tilt ≈ 20 @test scen.pvs[1].azimuth ≈ 0 - ## Scenario 4: Cape Town; array-type = 0 (ground); user-provided tilt (should not get overwritten) + ## Scenario 5: Cape Town; array-type = 0 (ground); user-provided tilt (should not get overwritten) post["PV"]["tilt"] = 17 scen = Scenario(post) @test scen.pvs[1].tilt ≈ 17 - + + end + @testset "AlternativeFlatLoads" begin From e4d536456f135e32dc57df469313fa486b7c7abb Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:55:53 -0700 Subject: [PATCH 5/8] pvwatts consistency update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ca41509..cc98c2646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ Classify the change according to the following categories: ### Fixed ### Deprecated ### Removed +## Develop 2024-02-21 +### Changed +- In `core/pv.jl` according to the PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop or ground-mounted (open-rack) system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = 3 or 4`) + ## Develop 2024-01-16 ### Fixed From e5bd26c8e4e69f6257283753a1b8c34d5c6243e7 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:10:21 -0700 Subject: [PATCH 6/8] pvwatts update --- CHANGELOG.md | 5 ++++- src/sam/libssc.dylib | Bin 2 files changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/sam/libssc.dylib diff --git a/CHANGELOG.md b/CHANGELOG.md index cc98c2646..abee7279a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,10 @@ Classify the change according to the following categories: ### Removed ## Develop 2024-02-21 ### Changed -- In `core/pv.jl` according to the PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop or ground-mounted (open-rack) system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = 3 or 4`) +- In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop or ground-mounted (open-rack) system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = 3 or 4`) + +> "The PVWatts® default value for the tilt angle depends on the array type: For a fixed array, the default value is 20 degrees, and for one-axis tracking the default value is zero. A common rule of thumb for fixed arrays is to set the tilt angle to the latitude of the system's location to maximize the system's total electrical output over the year. Use a lower tilt angle favor peak production in the summer months when the sun is high in the sky, or a higher tilt angle to increase output during winter months. Higher tilt angles tend to cost more for racking and mounting hardware, and may increase the risk of wind damage to the array." + ## Develop 2024-01-16 diff --git a/src/sam/libssc.dylib b/src/sam/libssc.dylib old mode 100644 new mode 100755 From 70986b930abb0a942917522ff190751606d9b925 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Wed, 6 Mar 2024 11:31:31 -0700 Subject: [PATCH 7/8] fixed pv default change description --- CHANGELOG.md | 2 +- src/core/pv.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abee7279a..125fbd509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ Classify the change according to the following categories: ### Removed ## Develop 2024-02-21 ### Changed -- In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop or ground-mounted (open-rack) system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = 3 or 4`) +- In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(1)` or ground-mounted (open-rack)`(2)` system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (3) or (4)`) > "The PVWatts® default value for the tilt angle depends on the array type: For a fixed array, the default value is 20 degrees, and for one-axis tracking the default value is zero. A common rule of thumb for fixed arrays is to set the tilt angle to the latitude of the system's location to maximize the system's total electrical output over the year. Use a lower tilt angle favor peak production in the summer months when the sun is high in the sky, or a higher tilt angle to increase output during winter months. Higher tilt angles tend to cost more for racking and mounting hardware, and may increase the risk of wind damage to the array." diff --git a/src/core/pv.jl b/src/core/pv.jl index d89c051c1..6914c5f5f 100644 --- a/src/core/pv.jl +++ b/src/core/pv.jl @@ -3,7 +3,7 @@ `PV` is an optional REopt input with the following keys and default values: ```julia array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) + tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed rooftop arrays (1) or ground-mount (2) ; tilt = 0 for everything else (3 and 4) module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, # System losses azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere @@ -102,7 +102,7 @@ mutable struct PV <: AbstractTech off_grid_flag::Bool = false, latitude::Real, array_type::Int=1, # PV Watts array type (0: Ground Mount Fixed (Open Rack); 1: Rooftop, Fixed; 2: Ground Mount 1-Axis Tracking; 3 : 1-Axis Backtracking; 4: Ground Mount, 2-Axis Tracking) - tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed ground-mount (0) or rooftop arrays (1); tilt = 0 for everything else (3 and 4) + tilt::Real = (array_type == 0 || array_type == 1) ? 20 : 0, # tilt = 20 for fixed rooftop arrays (1) or ground-mount (2) ; tilt = 0 for everything else (3 and 4) module_type::Int=0, # PV module type (0: Standard; 1: Premium; 2: Thin Film) losses::Real=0.14, azimuth::Real = latitude≥0 ? 180 : 0, # set azimuth to zero for southern hemisphere From 002ca131aebd90cdc2d597603842fc07851031b5 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:43:00 -0600 Subject: [PATCH 8/8] updated changelog and toml --- CHANGELOG.md | 3 ++- Project.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 775960f7e..3c48440d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,8 @@ Classify the change according to the following categories: ### Fixed ### Deprecated ### Removed -## Develop 2024-02-21 + +## v0.42.0 ### Changed - In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(1)` or ground-mounted (open-rack)`(2)` system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (3) or (4)`) diff --git a/Project.toml b/Project.toml index cc194352a..567972048 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "REopt" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" authors = ["Nick Laws", "Hallie Dunham ", "Bill Becker ", "Bhavesh Rathod ", "Alex Zolan ", "Amanda Farthing "] -version = "0.41.0" +version = "0.42.0" [deps] ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"