Skip to content
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

Allow Modeling Two Speed & Var Speed Geothermal Heat Pumps #1878

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5765,7 +5765,7 @@ def self.set_heat_pumps(hpxml_bldg, args)
end
end

if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit].include? heat_pump_type
if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit, HPXML::HVACTypeHeatPumpGroundToAir].include? heat_pump_type
compressor_type = args[:heat_pump_cooling_compressor_type]
end

Expand Down
114 changes: 86 additions & 28 deletions HPXMLtoOpenStudio/resources/hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -594,34 +594,92 @@ def self.apply_ground_to_air_heat_pump(model, runner, weather, heat_pump, hvac_s
geothermal_loop.num_bore_holes *= unit_multiplier

# Cooling Coil
clg_total_cap_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg total cap curve",
coeff: hp_ap.cool_cap_curve_spec[0]
)
clg_sens_cap_curve = Model.add_curve_quint_linear(
model,
name: "#{obj_name} clg sens cap curve",
coeff: hp_ap.cool_sh_curve_spec[0]
)
clg_power_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg power curve",
coeff: hp_ap.cool_power_curve_spec[0]
)
clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpEquationFit.new(model, clg_total_cap_curve, clg_sens_cap_curve, clg_power_curve)
clg_coil.setName(obj_name + ' clg coil')
clg_coil.setRatedCoolingCoefficientofPerformance(hp_ap.cool_rated_cops[0])
clg_coil.setNominalTimeforCondensateRemovaltoBegin(1000)
clg_coil.setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(1.5)
clg_coil.setRatedAirFlowRate(UnitConversions.convert(clg_cfm_rated, 'cfm', 'm^3/s'))
clg_coil.setRatedWaterFlowRate(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s'))
clg_coil.setRatedEnteringWaterTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirDryBulbTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirWetBulbTemperature(UnitConversions.convert(67, 'F', 'C'))
clg_coil.setRatedTotalCoolingCapacity(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W'))
clg_coil.setRatedSensibleCoolingCapacity(UnitConversions.convert(hp_ap.cooling_capacity_sensible, 'Btu/hr', 'W'))
clg_coil.additionalProperties.setFeature('HPXML_ID', heat_pump.id) # Used by reporting measure
if heat_pump.compressor_type = HPXML::HVACCompressorTypeSingleStage
clg_total_cap_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg total cap curve",
coeff: hp_ap.cool_cap_curve_spec[0]
)
clg_sens_cap_curve = Model.add_curve_quint_linear(
model,
name: "#{obj_name} clg sens cap curve",
coeff: hp_ap.cool_sh_curve_spec[0]
)
clg_power_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg power curve",
coeff: hp_ap.cool_power_curve_spec[0]
)
clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpEquationFit.new(model, clg_total_cap_curve, clg_sens_cap_curve, clg_power_curve)
clg_coil.setRatedCoolingCoefficientofPerformance(hp_ap.cool_rated_cops[0])
clg_coil.setNominalTimeforCondensateRemovaltoBegin(1000)
clg_coil.setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(1.5)
clg_coil.setRatedAirFlowRate(UnitConversions.convert(clg_cfm_rated, 'cfm', 'm^3/s'))
clg_coil.setRatedWaterFlowRate(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s'))
clg_coil.setRatedEnteringWaterTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirDryBulbTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirWetBulbTemperature(UnitConversions.convert(67, 'F', 'C'))
clg_coil.setRatedTotalCoolingCapacity(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W'))
clg_coil.setRatedSensibleCoolingCapacity(UnitConversions.convert(hp_ap.cooling_capacity_sensible, 'Btu/hr', 'W'))
else
num_speeds = clg_ap.cool_capacity_ratios.size
# TODO: Curve placeholder
plf_fplr_curve = Model.add_curve_quadratic(
model,
name: "Cool-PLF-fPLR#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 1, min_y: 0.7, max_y: 1
)
clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.new(model, plf_fplr_curve)
for i in 0..(num_speeds - 1)
# TODO: Curve placeholder
cap_ft_curve = Model.add_curve_biquadratic(
model,
name: "Cool-CAP-fT#{i + 1}",
coeff: [1, 0, 0, 0, 0, 0]
)
cap_faf_curve = Model.add_curve_quadratic(
model,
name: "Cool-CAP-fAF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
cap_fwf_curve = Model.add_curve_quadratic(
model,
name: "Cool-CAP-fWF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
eir_ft_curve = Model.add_curve_biquadratic(
model,
name: "Cool-EIR-fT#{i + 1}",
coeff: [1, 0, 0, 0, 0, 0]
)
eir_faf_curve = Model.add_curve_quadratic(
model,
name: "Cool-EIR-fAF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
eir_fwf_curve = Model.add_curve_quadratic(
model,
name: "Cool-EIR-fWF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
# Recoverable heat modifier as a function of indoor wet-bulb and water entering temperatures.
waste_heat_ft = Model.add_curve_biquadratic(
model,
name: "WastHeat-FT#{i + 1}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

"WasteHeat" (I think there's a typo, missing the "e")

coeff: [1, 0, 0, 0, 0, 0]
)
speed = OpenStudio::Model::CoilCoolingDXMultiSpeedStageData.new(model, cap_ft_curve, cap_faf_curve, cap_fwf_curve, eir_ft_curve, eir_faf_curve, eir_fwf_curve, waste_heat_ft)
# TODO: Add speed property inputs
clg_coil.addSpeed(speed)
# TODO: Add coil inputs
end
clg_coil.additionalProperties.setFeature('HPXML_ID', heat_pump.id) # Used by reporting measure
end

# Heating Coil
htg_cap_curve = Model.add_curve_quad_linear(
Expand Down
33 changes: 23 additions & 10 deletions workflow/hpxml_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1312,8 +1312,8 @@
"parent_hpxml": "sample_files/base-hvac-central-ac-only-2-speed.xml",
"water_heater_uses_desuperheater": true
},
"sample_files/base-dhw-desuperheater-gshp.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"sample_files/base-dhw-desuperheater-ghp.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"water_heater_uses_desuperheater": true
},
"sample_files/base-dhw-desuperheater-hpwh.xml": {
Expand Down Expand Up @@ -2554,7 +2554,7 @@
"sample_files/base-hvac-furnace-x3-dse.xml": {
"parent_hpxml": "sample_files/base.xml"
},
"sample_files/base-hvac-ground-to-air-heat-pump.xml": {
"sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml": {
"parent_hpxml": "sample_files/base.xml",
"heating_system_type": "none",
"heating_system_heating_efficiency": 0,
Expand All @@ -2563,6 +2563,7 @@
"cooling_system_cooling_efficiency": 0,
"cooling_system_fraction_cool_load_served": 0,
"heat_pump_type": "ground-to-air",
"heat_pump_cooling_compressor_type": "single stage",
"heat_pump_heating_efficiency_type": "COP",
"heat_pump_heating_efficiency": 3.6,
"heat_pump_cooling_efficiency_type": "EER",
Expand All @@ -2574,22 +2575,34 @@
"heat_pump_fraction_cool_load_served": 1,
"heat_pump_backup_type": "none"
},
"sample_files/base-hvac-ground-to-air-heat-pump-2-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_efficiency": 4.0,
"heat_pump_cooling_efficiency": 18,
"heat_pump_cooling_compressor_type": "two stage"
},
"sample_files/base-hvac-ground-to-air-heat-pump-var-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_efficiency": 4.5,
"heat_pump_cooling_efficiency": 19,
"heat_pump_cooling_compressor_type": "variable speed"
},
"sample_files/base-hvac-ground-to-air-heat-pump-backup-integrated.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_backup_type": "integrated",
"heat_pump_backup_heating_efficiency": 1,
"heat_pump_backup_heating_capacity": 36000
},
"sample_files/base-hvac-ground-to-air-heat-pump-backup-stove.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_backup_type": "separate",
"heating_system_2_type": "Stove",
"heating_system_2_fuel": "fuel oil",
"heating_system_2_heating_efficiency": 0.6,
"heating_system_2_heating_capacity": 60000
},
"sample_files/base-hvac-ground-to-air-heat-pump-detailed-geothermal-loop.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"geothermal_loop_configuration": "vertical",
"geothermal_loop_borefield_configuration": "Lopsided U",
"geothermal_loop_loop_flow": 10.0,
Expand All @@ -2604,14 +2617,14 @@
"site_soil_and_moisture_type": "sand, dry"
},
"sample_files/base-hvac-ground-to-air-heat-pump-cooling-only.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_capacity": 0,
"heat_pump_fraction_heat_load_served": 0,
"heat_pump_backup_type": "none",
"heat_pump_backup_heating_efficiency": 0
},
"sample_files/base-hvac-ground-to-air-heat-pump-heating-only.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_cooling_capacity": 0,
"heat_pump_fraction_cool_load_served": 0
},
Expand Down Expand Up @@ -2666,7 +2679,7 @@
"hvac_blower_fan_watts_per_cfm": 0.365
},
"sample_files/base-hvac-install-quality-ground-to-air-heat-pump.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_airflow_defect_ratio": -0.25,
"heat_pump_charge_defect_ratio": -0.25,
"hvac_blower_fan_watts_per_cfm": 0.365
Expand Down Expand Up @@ -2933,7 +2946,7 @@
"cooling_system_integrated_heating_system_fraction_heat_load_served": 1
},
"sample_files/base-hvac-pthp.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_type": "packaged terminal heat pump",
"heat_pump_cooling_efficiency": 11.4,
"heat_pump_cooling_sensible_heat_fraction": 0.65,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
<HeatPumpFuel>electricity</HeatPumpFuel>
<HeatingCapacity>36000.0</HeatingCapacity>
<CoolingCapacity>36000.0</CoolingCapacity>
<CompressorType>single stage</CompressorType>
<CoolingSensibleHeatFraction>0.73</CoolingSensibleHeatFraction>
<FractionHeatLoadServed>1.0</FractionHeatLoadServed>
<FractionCoolLoadServed>1.0</FractionCoolLoadServed>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
<HeatPumpFuel>electricity</HeatPumpFuel>
<HeatingCapacity>36000.0</HeatingCapacity>
<CoolingCapacity>36000.0</CoolingCapacity>
<CompressorType>single stage</CompressorType>
<CoolingSensibleHeatFraction>0.73</CoolingSensibleHeatFraction>
<FractionHeatLoadServed>1.0</FractionHeatLoadServed>
<FractionCoolLoadServed>1.0</FractionCoolLoadServed>
Expand Down
Loading
Loading