Skip to content

Commit

Permalink
Merge pull request #239 from NREL/default_update_23
Browse files Browse the repository at this point in the history
Default update 23
  • Loading branch information
adfarth authored Sep 29, 2023
2 parents aad7db6 + ff86166 commit 402de22
Show file tree
Hide file tree
Showing 19 changed files with 44,099 additions and 74 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,31 @@ Classify the change according to the following categories:
### Deprecated
### Removed

## Develop
### Changed
- ANNUAL UPDATE TO DEFAULT VALUES. Changes outlined below with (old value) --> (new value). See user manual for references.
- Owner Discount rate, nominal (%): : **Financial** **owner_discount_rate_fraction** 0.0564 --> 0.0638
- Offtaker Discount rate, nominal (%): **Financial** **offtaker_discount_rate_fraction** 0.0564 --> 0.0638
- Electricity cost escalation rate, nominal (%): **Financial** **elec_cost_escalation_rate_fraction** 0.019 --> 0.017
- Existing boiler fuel cost escalation rate, nominal (%): **Financial** **existing_boiler_fuel_cost_escalation_rate_fraction** 0.034 --> 0.015
- Boiler fuel cost escalation rate, nominal (%): **Financial** **boiler_fuel_cost_escalation_rate_fraction** 0.034 --> 0.015
- CHP fuel cost escalation rate, nominal (%): **Financial** **chp_fuel_cost_escalation_rate_fraction** 0.034 --> 0.015
- Generator fuel cost escalation rate, nominal (%): **Financial** **generator_fuel_cost_escalation_rate_fraction** 0.027 --> 0.012
- Array tilt – Ground mount, Fixed: **PV** **tilt** latitude --> 20
- O&M cost ($/kW/year): **PV** **om_cost_per_kw** 17 --> 18
- System capital cost ($/kW): **PV** **installed_cost_per_kw** 1592 --> 1790
- Energy capacity cost ($/kWh): **ElectricStorage** **installed_cost_per_kwh** 388 --> 455
- Power capacity cost ($/kW): **ElectricStorage** **installed_cost_per_kw** 775 --> 910
- Energy capacity replacement cost ($/kWh): **ElectricStorage** **replace_cost_per_kwh** 220 --> 318
- Power capacity replacement cost ($/kW): **ElectricStorage** **replace_cost_per_kw** 440 --> 715
- Fuel burn rate by generator capacity (gal/kWh): **Generator** **fuel_slope_gal_per_kwh** 0.076 --> removed and replaced with full and half-load efficiencies
- Electric efficiency at 100% load (% HHV-basis): **Generator** **electric_efficiency_full_load** N/A - new input --> 0.322
- Electric efficiency at 50% load (% HHV-basis): **Generator** **electric_efficiency_half_load** N/A - new input --> 0.322
- Generator fuel higher heating value (HHV): **Generator** **fuel_higher_heating_value_kwh_per_gal** N/A - new input --> 40.7
- System capital cost ($/kW): **Generator** **installed_cost_per_kw** 500 --> $650 if the generator only runs during outages; $800 if it is allowed to run parallel with the grid; $880 for off-grid
- Fixed O&M ($/kW/yr): **Generator** **om_cost_per_kw** Grid connected: 10 Off-grid: 20 --> Grid connected: 20 Off-grid: 10
- System capital cost ($/kW) by Class: **Wind** **size_class_to_installed_cost** residential - 5675 commercial - 4300 medium - 2766 large - 2239 --> residential - 6339 commercial - 4760 medium - 3137 large - 2386
- O&M cost ($/kW/year): **Wind** **om_cost_per_kw** 35 --> 36
## v0.34.0
### Added
- Ability to run hybrid GHX sizing using **GhpGhx.jl** (automatic and fractional sizing)
Expand Down
16 changes: 8 additions & 8 deletions src/core/energy_storage/electric_storage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ end
soc_min_fraction::Float64 = 0.2
soc_init_fraction::Float64 = off_grid_flag ? 1.0 : 0.5
can_grid_charge::Bool = off_grid_flag ? false : true
installed_cost_per_kw::Real = 775.0
installed_cost_per_kwh::Real = 388.0
replace_cost_per_kw::Real = 440.0
replace_cost_per_kwh::Real = 220.0
installed_cost_per_kw::Real = 910.0
installed_cost_per_kwh::Real = 455.0
replace_cost_per_kw::Real = 715.0
replace_cost_per_kwh::Real = 318.0
inverter_replacement_year::Int = 10
battery_replacement_year::Int = 10
macrs_option_years::Int = 7
Expand Down Expand Up @@ -178,10 +178,10 @@ Base.@kwdef struct ElectricStorageDefaults
soc_min_fraction::Float64 = 0.2
soc_init_fraction::Float64 = off_grid_flag ? 1.0 : 0.5
can_grid_charge::Bool = off_grid_flag ? false : true
installed_cost_per_kw::Real = 775.0
installed_cost_per_kwh::Real = 388.0
replace_cost_per_kw::Real = 440.0
replace_cost_per_kwh::Real = 220.0
installed_cost_per_kw::Real = 910.0
installed_cost_per_kwh::Real = 455.0
replace_cost_per_kw::Real = 715.0
replace_cost_per_kwh::Real = 318.0
inverter_replacement_year::Int = 10
battery_replacement_year::Int = 10
macrs_option_years::Int = 7
Expand Down
36 changes: 18 additions & 18 deletions src/core/financial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
`Financial` is an optional REopt input with the following keys and default values:
```julia
om_cost_escalation_rate_fraction::Real = 0.025,
elec_cost_escalation_rate_fraction::Real = 0.019,
existing_boiler_fuel_cost_escalation_rate_fraction::Float64 = 0.034,
boiler_fuel_cost_escalation_rate_fraction::Real = 0.034,
chp_fuel_cost_escalation_rate_fraction::Real = 0.034,
generator_fuel_cost_escalation_rate_fraction::Real = 0.027,
offtaker_tax_rate_fraction::Real = 0.26,
offtaker_discount_rate_fraction::Real = 0.0564,
elec_cost_escalation_rate_fraction::Real = 0.017,
existing_boiler_fuel_cost_escalation_rate_fraction::Float64 = 0.015,
boiler_fuel_cost_escalation_rate_fraction::Real = 0.015,
chp_fuel_cost_escalation_rate_fraction::Real = 0.015,
generator_fuel_cost_escalation_rate_fraction::Real = 0.012,
offtaker_tax_rate_fraction::Real = 0.26, # combined state and federal tax rate
offtaker_discount_rate_fraction::Real = 0.0638,
third_party_ownership::Bool = false,
owner_tax_rate_fraction::Real = 0.26,
owner_discount_rate_fraction::Real = 0.0564,
owner_tax_rate_fraction::Real = 0.26, # combined state and federal tax rate
owner_discount_rate_fraction::Real = 0.0638,
analysis_years::Int = 25,
value_of_lost_load_per_kwh::Union{Array{R,1}, R} where R<:Real = 1.00, #only applies to multiple outage modeling
microgrid_upgrade_cost_fraction::Real = 0.0
Expand Down Expand Up @@ -77,16 +77,16 @@ struct Financial
function Financial(;
off_grid_flag::Bool = false,
om_cost_escalation_rate_fraction::Real = 0.025,
elec_cost_escalation_rate_fraction::Real = 0.019,
existing_boiler_fuel_cost_escalation_rate_fraction::Float64 = 0.034,
boiler_fuel_cost_escalation_rate_fraction::Real = 0.034,
chp_fuel_cost_escalation_rate_fraction::Real = 0.034,
generator_fuel_cost_escalation_rate_fraction::Real = 0.027,
offtaker_tax_rate_fraction::Real = 0.26,
offtaker_discount_rate_fraction::Real = 0.0564,
elec_cost_escalation_rate_fraction::Real = 0.017,
existing_boiler_fuel_cost_escalation_rate_fraction::Float64 = 0.015,
boiler_fuel_cost_escalation_rate_fraction::Real = 0.015,
chp_fuel_cost_escalation_rate_fraction::Real = 0.015,
generator_fuel_cost_escalation_rate_fraction::Real = 0.012,
offtaker_tax_rate_fraction::Real = 0.257,
offtaker_discount_rate_fraction::Real = 0.0638,
third_party_ownership::Bool = false,
owner_tax_rate_fraction::Real = 0.26,
owner_discount_rate_fraction::Real = 0.0564,
owner_tax_rate_fraction::Real = 0.257,
owner_discount_rate_fraction::Real = 0.0638,
analysis_years::Int = 25,
value_of_lost_load_per_kwh::Union{Array{<:Real,1}, Real} = 1.00, #only applies to multiple outage modeling
microgrid_upgrade_cost_fraction::Real = 0.0,
Expand Down
16 changes: 8 additions & 8 deletions src/core/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
existing_kw::Real = 0,
min_kw::Real = 0,
max_kw::Real = 1.0e6,
installed_cost_per_kw::Real = only_runs_during_grid_outage ? 650.0 : 800.0,
om_cost_per_kw::Real = off_grid_flag ? 20.0 : 10.0,
installed_cost_per_kw::Real = off_grid_flag ? 880 : only_runs_during_grid_outage ? 650.0 : 800.0,
om_cost_per_kw::Real = off_grid_flag ? 10.0 : 20.0,
om_cost_per_kwh::Real = 0.0,
fuel_cost_per_gallon::Real = 3.0,
electric_efficiency_full_load::Real = 0.3233,
fuel_cost_per_gallon::Real = 3.61,
electric_efficiency_full_load::Real = 0.322,
electric_efficiency_half_load::Real = electric_efficiency_full_load,
fuel_avail_gal::Real = 1.0e9,
fuel_higher_heating_value_kwh_per_gal::Real = 40.7,
Expand Down Expand Up @@ -101,11 +101,11 @@ struct Generator <: AbstractGenerator
existing_kw::Real = 0,
min_kw::Real = 0,
max_kw::Real = 1.0e6,
installed_cost_per_kw::Real = only_runs_during_grid_outage ? 650.0 : 800.0,
om_cost_per_kw::Real= off_grid_flag ? 20.0 : 10.0,
installed_cost_per_kw::Real = off_grid_flag ? 880 : only_runs_during_grid_outage ? 650.0 : 800.0,
om_cost_per_kw::Real= off_grid_flag ? 10.0 : 20.0,
om_cost_per_kwh::Real = 0.0,
fuel_cost_per_gallon::Real = 3.0,
electric_efficiency_full_load::Real = 0.3233,
fuel_cost_per_gallon::Real = 3.61,
electric_efficiency_full_load::Real = 0.322,
electric_efficiency_half_load::Real = electric_efficiency_full_load,
fuel_avail_gal::Real = 1.0e9,
fuel_higher_heating_value_kwh_per_gal::Real = KWH_PER_GAL_DIESEL,
Expand Down
4 changes: 2 additions & 2 deletions src/core/heating_cooling_loads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ struct CoolingLoad
time_steps_per_hour::Int = 1,
latitude::Float64=0.0,
longitude::Float64=0.0,
existing_chiller_cop::Union{Real, Nothing} = nothing,
existing_chiller_max_thermal_factor_on_peak_load::Union{Real, Nothing}= nothing
existing_chiller_cop::Union{Real, Nothing} = nothing, # Passed from ExistingChiller or set to a default
existing_chiller_max_thermal_factor_on_peak_load::Union{Real, Nothing}= nothing # Passed from ExistingChiller or set to a default
)
# determine the timeseries of loads_kw_thermal
loads_kw_thermal = nothing
Expand Down
12 changes: 6 additions & 6 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 : abs(latitude), # tilt = 10 deg for rooftop systems, abs(lat) for ground-mount
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
Expand All @@ -14,8 +14,8 @@
existing_kw::Real=0,
min_kw::Real=0,
max_kw::Real=1.0e9,
installed_cost_per_kw::Real=1592.0,
om_cost_per_kw::Real=17.0,
installed_cost_per_kw::Real=1790.0,
om_cost_per_kw::Real=18.0,
degradation_fraction::Real=0.005,
macrs_option_years::Int = 5,
macrs_bonus_fraction::Real = 0.8,
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 : abs(latitude), # tilt = 10 deg for rooftop systems, abs(lat) for ground-mount
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 = latitude0 ? 180 : 0, # set azimuth to zero for southern hemisphere
Expand All @@ -113,8 +113,8 @@ mutable struct PV <: AbstractTech
existing_kw::Real=0,
min_kw::Real=0,
max_kw::Real=1.0e9,
installed_cost_per_kw::Real=1592.0,
om_cost_per_kw::Real=17.0,
installed_cost_per_kw::Real=1790.0,
om_cost_per_kw::Real=18.0,
degradation_fraction::Real=0.005,
macrs_option_years::Int = 5,
macrs_bonus_fraction::Real = 0.8,
Expand Down
20 changes: 10 additions & 10 deletions src/core/wind.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
min_kw = 0.0,
max_kw = 1.0e9,
installed_cost_per_kw = nothing,
om_cost_per_kw = 35.0,
om_cost_per_kw = 36.0,
production_factor_series = nothing, # Optional user-defined production factors. Must be normalized to units of kW-AC/kW-DC nameplate. The series must be one year (January through December) of hourly, 30-minute, or 15-minute generation data.
size_class = "",
wind_meters_per_sec = [],
Expand Down Expand Up @@ -41,10 +41,10 @@
If no `installed_cost_per_kw` is provided then it is determined from:
```julia
size_class_to_installed_cost = Dict(
"residential"=> 11950.0,
"commercial"=> 7390.0,
"medium"=> 4440.0,
"large"=> 3450.0
"residential"=> 6339.0,
"commercial"=> 4760.0,
"medium"=> 3137.0,
"large"=> 2386.0
)
```
If the `production_factor_series` is not provided then NREL's System Advisor Model (SAM) is used to get the wind turbine
Expand Down Expand Up @@ -102,7 +102,7 @@ struct Wind <: AbstractTech
min_kw = 0.0,
max_kw = 1.0e9,
installed_cost_per_kw = nothing,
om_cost_per_kw = 35.0,
om_cost_per_kw = 36.0,
production_factor_series = nothing,
size_class = "",
wind_meters_per_sec = [],
Expand Down Expand Up @@ -141,10 +141,10 @@ struct Wind <: AbstractTech
"large"=> 80
)
size_class_to_installed_cost = Dict(
"residential"=> 5675.0,
"commercial"=> 4300.0,
"medium"=> 2766.0,
"large"=> 2239.0
"residential"=> 6339.0,
"commercial"=> 4760.0,
"medium"=> 3137.0,
"large"=> 2386.0
)

if size_class == ""
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ else # run HiGHS tests
post = JSON.parsefile("./scenarios/$post_name")
scen = Scenario(post)

@test scen.pvs[1].tilt post["Site"]["latitude"]
@test scen.pvs[1].tilt 20
@test scen.pvs[1].azimuth 180

## Scenario 2: Palmdale, CA; array-type = 1 (roof)
Expand All @@ -191,7 +191,7 @@ else # run HiGHS tests
post["PV"]["array_type"] = 0
scen = Scenario(post)

@test scen.pvs[1].tilt abs(post["Site"]["latitude"])
@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)
Expand Down
1 change: 1 addition & 0 deletions test/scenarios/chp_sizing.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"analysis_years": 25,
"om_cost_escalation_rate_fraction": 0.025,
"elec_cost_escalation_rate_fraction": 0.023,
"existing_boiler_fuel_cost_escalation_rate_fraction": 0.034,
"boiler_fuel_cost_escalation_rate_fraction": 0.034,
"chp_fuel_cost_escalation_rate_fraction": 0.034,
"offtaker_discount_rate_fraction": 0.083,
Expand Down
1 change: 1 addition & 0 deletions test/scenarios/chp_supplementary_firing.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"analysis_years": 25,
"om_cost_escalation_rate_fraction": 0.025,
"elec_cost_escalation_rate_fraction": 0.023,
"existing_boiler_fuel_cost_escalation_rate_fraction": 0.034,
"boiler_fuel_cost_escalation_rate_fraction": 0.034,
"chp_fuel_cost_escalation_rate_fraction": 0.034,
"offtaker_discount_rate_fraction": 0.083,
Expand Down
1 change: 1 addition & 0 deletions test/scenarios/chp_unavailability_outage.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"analysis_years": 25,
"om_cost_escalation_rate_fraction": 0.025,
"elec_cost_escalation_rate_fraction": 0.023,
"existing_boiler_fuel_cost_escalation_rate_fraction": 0.034,
"boiler_fuel_cost_escalation_rate_fraction": 0.034,
"chp_fuel_cost_escalation_rate_fraction": 0.034,
"offtaker_discount_rate_fraction": 0.083,
Expand Down
10 changes: 8 additions & 2 deletions test/scenarios/nogridcost_minresilhours.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,16 @@
},
"Generator": {
"fuel_avail_gal": 660,
"installed_cost_per_kw": 500.0
"installed_cost_per_kw": 500.0,
"om_cost_per_kw": 10.0,
"fuel_cost_per_gallon": 3.0,
"electric_efficiency_full_load": 0.3233
},
"Financial": {
"value_of_lost_load_per_kwh": 0.001,
"microgrid_upgrade_cost_fraction": 0.3
"microgrid_upgrade_cost_fraction": 0.3,
"generator_fuel_cost_escalation_rate_fraction": 0.027,
"elec_cost_escalation_rate_fraction": 0.019,
"offtaker_discount_rate_fraction": 0.0564
}
}
4 changes: 3 additions & 1 deletion test/scenarios/nogridcost_multiscenario.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
},
"Financial": {
"value_of_lost_load_per_kwh": 1.0,
"microgrid_upgrade_cost_fraction": 0.3
"microgrid_upgrade_cost_fraction": 0.3,
"elec_cost_escalation_rate_fraction": 0.019,
"offtaker_discount_rate_fraction": 0.0564
}
}
7 changes: 5 additions & 2 deletions test/scenarios/off_grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"tilt": 34.579,
"federal_rebate_per_kw": 350,
"operating_reserve_required_fraction": 0.25,
"production_incentive_per_kwh": 0.05
"production_incentive_per_kwh": 0.05,
"om_cost_per_kw": 17.0
},
"Generator": {
"installed_cost_per_kw": 700,
Expand All @@ -25,7 +26,9 @@
"replacement_year": 10,
"replace_cost_per_kw": 700,
"electric_efficiency_full_load": 0.3232898,
"electric_efficiency_half_load": 0.3232898
"electric_efficiency_half_load": 0.3232898,
"om_cost_per_kw": 20.0,
"fuel_cost_per_gallon": 3.0
},
"ElectricLoad": {
"doe_reference_name": "RetailStore",
Expand Down
Loading

0 comments on commit 402de22

Please sign in to comment.