Skip to content

Commit

Permalink
Merge pull request #358 from NREL/develop
Browse files Browse the repository at this point in the history
v0.42.0 PVWatts tilt angle alignment
  • Loading branch information
bpulluta committed Mar 14, 2024
2 parents 677f3d9 + ff1c984 commit c884e78
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ Classify the change according to the following categories:
### Deprecated
### Removed

## 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)`)

> "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
- Changed default source for CO2 grid emissions values to NREL's Cambium 2022 Database (by default: CO2e, long-run marginal emissions rates levelized (averaged) over the analysis period, assuming start year 2024). Added new emissions inputs and call to Cambium API in `src/core/electric_utility.jl`. Included option for user to use AVERT data for CO2 using **co2_from_avert** boolean.
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "REopt"
uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6"
authors = ["Nick Laws", "Hallie Dunham <hallie.dunham@nrel.gov>", "Bill Becker <william.becker@nrel.gov>", "Bhavesh Rathod <bhavesh.rathod@nrel.gov>", "Alex Zolan <alexander.aolan@nrel.gov>", "Amanda Farthing <amanda.farthing@nrel.gov>"]
version = "0.41.0"
version = "0.42.0"

[deps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
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

2 comments on commit c884e78

@Bill-Becker
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/103069

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.42.0 -m "<description of version>" c884e78acb76051f1448fce12f1ad6d825857571
git push origin v0.42.0

Please sign in to comment.