Skip to content

Commit

Permalink
Merge pull request #351 from NREL/pv_default_update
Browse files Browse the repository at this point in the history
Pv default update
  • Loading branch information
bpulluta authored Mar 13, 2024
2 parents cb6d9d9 + 0f47b9c commit 73f80e6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ Classify the change according to the following categories:
### Fixed
### Deprecated
### 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 `(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."


## v0.41.0
### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/core/pv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand Down Expand Up @@ -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 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 = latitude0 ? 180 : 0, # set azimuth to zero for southern hemisphere
Expand Down
Empty file modified src/sam/libssc.dylib
100644 → 100755
Empty file.
18 changes: 14 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -172,9 +172,15 @@ 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: 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
Expand All @@ -188,7 +194,11 @@ else # run HiGHS tests
post["PV"]["tilt"] = 17
scen = Scenario(post)
@test scen.pvs[1].tilt 17
end


end



@testset "AlternativeFlatLoads" begin
input_data = JSON.parsefile("./scenarios/flatloads.json")
Expand Down

0 comments on commit 73f80e6

Please sign in to comment.