-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from urbanopt/hpwh-scenario
Hpwh scenario
- Loading branch information
Showing
5 changed files
with
170 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Feature Id,Feature Name,Mapper Class | ||
1,Mixed_use 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
2,Restaurant 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
3,Restaurant 10,URBANopt::Scenario::FlexibleHotWaterMapper | ||
4,Restaurant 12,URBANopt::Scenario::FlexibleHotWaterMapper | ||
5,Restaurant 14,URBANopt::Scenario::FlexibleHotWaterMapper | ||
6,Restaurant 15,URBANopt::Scenario::FlexibleHotWaterMapper | ||
7,Office 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
8,Hospital 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
9,Hospital 2,URBANopt::Scenario::FlexibleHotWaterMapper | ||
10,Mixed use 2,URBANopt::Scenario::FlexibleHotWaterMapper | ||
11,Restaurant 13,URBANopt::Scenario::FlexibleHotWaterMapper | ||
12,Mall 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
13,Hotel 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
14,Residential 1,URBANopt::Scenario::FlexibleHotWaterMapper | ||
15,Residential 2,URBANopt::Scenario::FlexibleHotWaterMapper | ||
16,Residential 3,URBANopt::Scenario::FlexibleHotWaterMapper | ||
17,Residential 4,URBANopt::Scenario::FlexibleHotWaterMapper | ||
18,Residential 5,URBANopt::Scenario::FlexibleHotWaterMapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#********************************************************************************* | ||
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other | ||
# contributors. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without modification, | ||
# are permitted provided that the following conditions are met: | ||
# | ||
# Redistributions of source code must retain the above copyright notice, this list | ||
# of conditions and the following disclaimer. | ||
# | ||
# Redistributions in binary form must reproduce the above copyright notice, this | ||
# list of conditions and the following disclaimer in the documentation and/or other | ||
# materials provided with the distribution. | ||
# | ||
# Neither the name of the copyright holder nor the names of its contributors may be | ||
# used to endorse or promote products derived from this software without specific | ||
# prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
# OF THE POSSIBILITY OF SUCH DAMAGE. | ||
#********************************************************************************* | ||
|
||
require 'urbanopt/reporting' | ||
|
||
require_relative 'Baseline' | ||
|
||
require 'json' | ||
|
||
module URBANopt | ||
module Scenario | ||
class FlexibleHotWaterMapper < BaselineMapper | ||
|
||
def create_osw(scenario, features, feature_names) | ||
|
||
osw = super(scenario, features, feature_names) | ||
|
||
feature = features[0] | ||
building_type = feature.building_type | ||
|
||
# Only apply to commercial buildings, not residential models | ||
if commercial_building_types.include? building_type | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', '__SKIP__', false) | ||
# Add a sizing multiplier to the tank capacity to cover flex periods | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'vol', 2) | ||
# Update maximum tank and minimum temperature setpoints | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'max_temp', 185) | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'min_temp', 125) | ||
|
||
# Manage water heat charge float periods by building | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'flex0', 'Charge - Heat Pump') | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'flex_hrs0', '16:00-17:00') | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'flex1', 'Float') | ||
OpenStudio::Extension.set_measure_argument(osw, 'add_hpwh', 'flex_hrs1', '17:01-19:00') | ||
end | ||
|
||
return osw | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters