-
Notifications
You must be signed in to change notification settings - Fork 26
Fix GHP experimental model rated conditions #2204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yzhou601
wants to merge
39
commits into
master
Choose a base branch
from
GHP_experimental_rated_conditions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
55ae9a1
convert user provided cops
yzhou601 f270e68
hvac sizing
yzhou601 ae7df53
capacity, refactor
yzhou601 33aca65
one more cleanup
yzhou601 dff73ee
temporarily disabled experimental unit tests
yzhou601 4c0cb87
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 76c1ee7
changed capacity ratios and cop ratios based on rated data
yzhou601 0f6fe3c
Latest results. [skip ci]
b48d2b3
update comments
yzhou601 9b34f98
Merge branch 'GHP_experimental_rated_conditions' of https://github.co…
yzhou601 c7b6331
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 2a5d00a
Latest results. [skip ci]
d2c2cf4
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 f1cd56e
Merge branch 'GHP_experimental_rated_conditions' of https://github.co…
yzhou601 2fea4e1
Latest results. [skip ci]
63ae249
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 732765a
Merge branch 'GHP_experimental_rated_conditions' of https://github.co…
yzhou601 30931f3
update unit tests
yzhou601 f23eff8
revert experimental assumptions to stick to E+ rated conditions, wrot…
yzhou601 b95bc5f
changelog
yzhou601 1733f91
Latest results. [skip ci]
1460ef5
typo fix in the unit test
yzhou601 b543e9c
typo fix for unit test 2
yzhou601 b3f6a27
Apply suggestions from code review
yzhou601 625d0cd
change coil reference capacity too, address method comment
yzhou601 9ea8fb8
Merge branch 'GHP_experimental_rated_conditions' of https://github.co…
yzhou601 62b062b
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 981d5e4
fix index, the capacity ratios are calculated at E+ rated conditions,…
yzhou601 88b955d
exclude a warning
yzhou601 e0d9e44
Latest results. [skip ci]
d13b701
Apply suggestions from code review
yzhou601 d4f7866
Potential fix for pull request finding
yzhou601 bb53c39
Apply suggestions from code review - reuse methods
yzhou601 2344d0f
update_measures finally ran!
yzhou601 f4fb5be
Merge branch 'GHP_experimental_rated_conditions' of https://github.co…
yzhou601 6a6237b
remove duplicate method explanation
yzhou601 ab60212
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 d02d202
updated airflow coefficients to fix an excel error at curve generation
yzhou601 c160f82
Latest results. [skip ci]
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -13,11 +13,11 @@ module HVAC | |
| ActualCFMPerTonHeat = 240.0 # cfm/ton of rated capacity, default actual airflow rate for furnaces, RESNET | ||
| MinCapacity = 1.0 # Btuh | ||
| MinAirflow = 3.0 # cfm; E+ min airflow is 0.001 m3/s | ||
| GroundSourceHeatRatedWET = 70.0 # degF, Rated water entering temperature for ground-source systems, heating | ||
| GroundSourceHeatRatedIDB = 70.0 # degF, Rated indoor drybulb for ground-source systems, heating | ||
| GroundSourceCoolRatedWET = 85.0 # degF, Rated water entering temperature for ground-source systems, cooling | ||
| GroundSourceCoolRatedIDB = 80.0 # degF, Rated indoor drybulb for ground-source systems, cooling | ||
| GroundSourceCoolRatedIWB = 67.0 # degF, Rated indoor wetbulb for ground-source systems, cooling | ||
| GroundSourceHeatGLHPRatedEWT = 32.0 # degF, Rated water entering temperature for ground-source systems, heating | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These variables are used to convert E+ rated conditions to GLHP rated conditions |
||
| GroundSourceCoolGLHPRatedEWT = 77.0 # degF, Rated water entering temperature for ground-source systems, cooling | ||
|
|
||
| # Adds any HVAC Systems to the OpenStudio model. | ||
| # | ||
|
|
@@ -670,6 +670,8 @@ def self.apply_ground_source_heat_pump(runner, model, weather, hpxml_bldg, hpxml | |
| min_x: 0, max_x: 1, min_y: 0.7, max_y: 1 | ||
| ) | ||
| end | ||
| # convert GLHP rated capacities to E+ rated | ||
| clg_capacity_rated_eplus = UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W') / get_experimental_ghp_rated_condition_conversion(:clg, hp_ap.cool_cap_ft_spec[-1]) | ||
| clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.new(model, plf_fplr_curve) | ||
| clg_coil.setName(obj_name + ' clg coil') | ||
| clg_coil.setNominalTimeforCondensatetoBeginLeavingtheCoil(1000) | ||
|
|
@@ -678,7 +680,7 @@ def self.apply_ground_source_heat_pump(runner, model, weather, hpxml_bldg, hpxml | |
| clg_coil.setRatedAirFlowRateAtSelectedNominalSpeedLevel(clg_air_flow_rated) | ||
| clg_coil.setRatedWaterFlowRateAtSelectedNominalSpeedLevel(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s')) | ||
| # TODO: Add net to gross conversion after RESNET PR: https://github.com/NatLabRockies/OpenStudio-HPXML/pull/1879 | ||
| clg_coil.setGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W')) | ||
| clg_coil.setGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel(clg_capacity_rated_eplus) | ||
| for i in 0..(num_speeds - 1) | ||
| cap_ft_curve = Model.add_curve_biquadratic( | ||
| model, | ||
|
|
@@ -723,10 +725,12 @@ def self.apply_ground_source_heat_pump(runner, model, weather, hpxml_bldg, hpxml | |
| coeff: [1, 0, 0, 0, 0, 0] | ||
| ) | ||
| speed = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.new(model, cap_ft_curve, cap_faf_curve, cap_fwf_curve, eir_ft_curve, eir_faf_curve, eir_fwf_curve, waste_heat_ft) | ||
| # convert GLHP rated COPs to E+ rated | ||
| rated_cop_eplus = hp_ap.cool_rated_cops[i] * get_experimental_ghp_rated_condition_conversion(:clg, hp_ap.cool_eir_ft_spec[i]) | ||
| # TODO: Add net to gross conversion after RESNET PR: https://github.com/NatLabRockies/OpenStudio-HPXML/pull/1879 | ||
| speed.setReferenceUnitGrossRatedTotalCoolingCapacity(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W') * hp_ap.cool_capacity_ratios[i]) | ||
| speed.setReferenceUnitGrossRatedTotalCoolingCapacity(clg_capacity_rated_eplus * hp_ap.cool_capacity_ratios[i]) | ||
| speed.setReferenceUnitGrossRatedSensibleHeatRatio(hp_ap.cool_rated_shr_gross) | ||
| speed.setReferenceUnitGrossRatedCoolingCOP(hp_ap.cool_rated_cops[i]) | ||
| speed.setReferenceUnitGrossRatedCoolingCOP(rated_cop_eplus) | ||
| speed.setReferenceUnitRatedAirFlowRate(UnitConversions.convert(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'ton') * hp_ap.cool_capacity_ratios[i] * hp_ap.cool_rated_cfm_per_ton, 'cfm', 'm^3/s')) | ||
| speed.setReferenceUnitRatedWaterFlowRate(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s') * hp_ap.cool_capacity_ratios[i]) | ||
| speed.setReferenceUnitWasteHeatFractionofInputPowerAtRatedConditions(0.0) | ||
|
|
@@ -751,10 +755,12 @@ def self.apply_ground_source_heat_pump(runner, model, weather, hpxml_bldg, hpxml | |
| htg_coil = OpenStudio::Model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.new(model, plf_fplr_curve) | ||
| htg_coil.setName(obj_name + ' htg coil') | ||
| htg_coil.setNominalSpeedLevel(num_speeds) | ||
| # convert GLHP rated capacities to E+ rated | ||
| htg_capacity_rated_eplus = UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'W') / get_experimental_ghp_rated_condition_conversion(:htg, hp_ap.heat_cap_ft_spec[-1]) | ||
| htg_coil.setRatedAirFlowRateAtSelectedNominalSpeedLevel(htg_air_flow_rated) | ||
| htg_coil.setRatedWaterFlowRateAtSelectedNominalSpeedLevel(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s')) | ||
| # TODO: Add net to gross conversion after RESNET PR: https://github.com/NatLabRockies/OpenStudio-HPXML/pull/1879 | ||
| htg_coil.setRatedHeatingCapacityAtSelectedNominalSpeedLevel(UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'W')) | ||
| htg_coil.setRatedHeatingCapacityAtSelectedNominalSpeedLevel(htg_capacity_rated_eplus) | ||
| for i in 0..(num_speeds - 1) | ||
| cap_ft_curve = Model.add_curve_biquadratic( | ||
| model, | ||
|
|
@@ -799,9 +805,11 @@ def self.apply_ground_source_heat_pump(runner, model, weather, hpxml_bldg, hpxml | |
| coeff: [1, 0, 0, 0, 0, 0] | ||
| ) | ||
| speed = OpenStudio::Model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.new(model, cap_ft_curve, cap_faf_curve, cap_fwf_curve, eir_ft_curve, eir_faf_curve, eir_fwf_curve, waste_heat_ft) | ||
| # convert GLHP rated COPs to E+ rated | ||
| rated_cop_eplus = hp_ap.heat_rated_cops[i] * get_experimental_ghp_rated_condition_conversion(:htg, hp_ap.heat_eir_ft_spec[i]) | ||
| # TODO: Add net to gross conversion after RESNET PR: https://github.com/NatLabRockies/OpenStudio-HPXML/pull/1879 | ||
| speed.setReferenceUnitGrossRatedHeatingCapacity(UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'W') * hp_ap.heat_capacity_ratios[i]) | ||
| speed.setReferenceUnitGrossRatedHeatingCOP(hp_ap.heat_rated_cops[i]) | ||
| speed.setReferenceUnitGrossRatedHeatingCapacity(htg_capacity_rated_eplus * hp_ap.heat_capacity_ratios[i]) | ||
| speed.setReferenceUnitGrossRatedHeatingCOP(rated_cop_eplus) | ||
| speed.setReferenceUnitRatedAirFlow(UnitConversions.convert(UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'ton') * hp_ap.heat_capacity_ratios[i] * hp_ap.heat_rated_cfm_per_ton, 'cfm', 'm^3/s')) | ||
| speed.setReferenceUnitRatedWaterFlowRate(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s') * hp_ap.heat_capacity_ratios[i]) | ||
| speed.setReferenceUnitWasteHeatFractionofInputPowerAtRatedConditions(0.0) | ||
|
|
@@ -845,6 +853,26 @@ def self.apply_ground_source_heat_pump(runner, model, weather, hpxml_bldg, hpxml | |
| return air_loop | ||
| end | ||
|
|
||
| # Get the curve value at GLHP rated conditions (Only used for experimental model because E+ rated conditions are different from GLHP rated conditions) | ||
| # | ||
| # @param mode [Symbol] Heating or cooling | ||
| # @param biquadratic_spec [Array<Double>] EIR or Capacity function of temperature biquadratic curve coefficients | ||
| # @return [Double] Curve value at GLHP rated conditions for conversion | ||
| def self.get_experimental_ghp_rated_condition_conversion(mode, biquadratic_spec) | ||
| case mode | ||
| when :clg | ||
| return MathTools.biquadratic(UnitConversions.convert(GroundSourceCoolRatedIWB, 'F', 'C'), | ||
| UnitConversions.convert(GroundSourceCoolGLHPRatedEWT, 'F', 'C'), | ||
| biquadratic_spec) | ||
| when :htg | ||
| return MathTools.biquadratic(UnitConversions.convert(GroundSourceHeatRatedIDB, 'F', 'C'), | ||
| UnitConversions.convert(GroundSourceHeatGLHPRatedEWT, 'F', 'C'), | ||
| biquadratic_spec) | ||
| else | ||
| fail "Unexpected mode: #{mode}." | ||
| end | ||
| end | ||
|
yzhou601 marked this conversation as resolved.
yzhou601 marked this conversation as resolved.
|
||
|
|
||
| # Adds the HPXML GeothermalLoop to the OpenStudio model. If it has already been | ||
| # added to the model (because there are multiple ground-source heat pumps attached | ||
| # to it), then it reuses the existing one. | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update outdated product links