-
Notifications
You must be signed in to change notification settings - Fork 17
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
Mech Vent Preconditioning - Loads #753
Open
yzhou601
wants to merge
17
commits into
master
Choose a base branch
from
mech_vent_precond
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
17 commits
Select commit
Hold shift + click to select a range
40b37b2
preconditioned to setpoint instead of room temperature
yzhou601 6f9515d
Latest results.
9359dd4
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 f1a399c
Merge branch 'mech_vent_precond' of https://github.com/NREL/OpenStudi…
yzhou601 822bbd6
Latest results.
136c413
Add seasons for precond logic
yzhou601 a47f8e5
Latest results.
598e235
load reporting for preconditioning
yzhou601 515e062
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 d6abdde
bugfix + format
yzhou601 ac6c95f
Latest results.
fa5c6eb
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 735f44d
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit f08f747
Merge branch 'mech_vent_precond_energy_only' of https://github.com/NR…
shorowit 87d7574
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit d32a3e5
Merge branch 'mech_vent_precond' of https://github.com/NREL/OpenStudi…
shorowit 216b73d
Latest results.
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 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 |
---|---|---|
|
@@ -2121,7 +2121,7 @@ def self.add_total_loads_output(runner, model, living_zone) | |
tot_load_sensors[:clg] = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Cooling:EnergyTransfer') | ||
tot_load_sensors[:clg].setName('clg_load_tot') | ||
|
||
# Need to adjusted E+ EnergyTransfer meters for dehumidifiers | ||
# Need to adjust E+ EnergyTransfer meters for dehumidifiers | ||
intgain_dehumidifier = nil | ||
model.getZoneHVACDehumidifierDXs.each do |e| | ||
next unless e.thermalZone.get.name.to_s == living_zone.name.to_s | ||
|
@@ -2138,14 +2138,25 @@ def self.add_total_loads_output(runner, model, living_zone) | |
program.setName(Constants.ObjectNameTotalLoadsProgram) | ||
program.addLine('Set loads_htg_tot = 0') | ||
program.addLine('Set loads_clg_tot = 0') | ||
# Need to adjust E+ EnergyTransfer meters for mech vent preconditioning | ||
# Fixme: is it possible to have cooling in hvac but heating in mech vent preconditioning? How to report load in that case? | ||
# Fixme: Proceed reporting both | ||
model.getEnergyManagementSystemGlobalVariables.sort.each do |ems_var| | ||
next unless ems_var.name.to_s.start_with? 'Precond_' | ||
if ems_var.name.to_s.start_with? 'Precond_HeatingLoad' | ||
program.addLine("Set loads_htg_tot = loads_htg_tot + #{ems_var.name.get}") | ||
else | ||
program.addLine("Set loads_clg_tot = loads_clg_tot + #{ems_var.name.get}") | ||
end | ||
end | ||
program.addLine("If #{liv_load_sensors[:htg].name} > 0") | ||
s = " Set loads_htg_tot = #{tot_load_sensors[:htg].name} - #{tot_load_sensors[:clg].name}" | ||
s = " Set loads_htg_tot = loads_htg_tot + #{tot_load_sensors[:htg].name} - #{tot_load_sensors[:clg].name}" | ||
if not intgain_dehumidifier.nil? | ||
s += " - #{intgain_dehumidifier.name}" | ||
end | ||
program.addLine(s) | ||
program.addLine("ElseIf #{liv_load_sensors[:clg].name} > 0") | ||
s = " Set loads_clg_tot = #{tot_load_sensors[:clg].name} - #{tot_load_sensors[:htg].name}" | ||
s = " Set loads_clg_tot = loads_clg_tot + #{tot_load_sensors[:clg].name} - #{tot_load_sensors[:htg].name}" | ||
if not intgain_dehumidifier.nil? | ||
s += " + #{intgain_dehumidifier.name}" | ||
end | ||
|
@@ -2516,6 +2527,15 @@ def self.add_component_loads_output(runner, model, living_zone, liv_load_sensors | |
mechvent_sensors.each do |sensor| | ||
program.addLine("Set hr_mechvent = hr_mechvent - #{sensor.name}") | ||
end | ||
# Adjust component load reporting for preconditioning | ||
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. Adjust component loads read from equipment objects (add preconditioning loads to mechvent subitem). |
||
model.getEnergyManagementSystemGlobalVariables.sort.each do |ems_var| | ||
next unless ems_var.name.to_s.start_with? 'Precond_' | ||
if ems_var.name.to_s.start_with? 'Precond_HeatingLoad' | ||
program.addLine("Set hr_mechvent = hr_mechvent + #{ems_var.name.get}") | ||
else | ||
program.addLine("Set hr_mechvent = hr_mechvent - #{ems_var.name.get}") | ||
end | ||
end | ||
program.addLine('Set hr_ducts = 0') | ||
ducts_sensors.each do |duct_sensors| | ||
s = 'Set hr_ducts = hr_ducts' | ||
|
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 |
---|---|---|
|
@@ -1537,6 +1537,7 @@ def self.calculate_precond_loads(model, infil_program, vent_mech_preheat, vent_m | |
vent_mech_preheat.each_with_index do |f_preheat, i| | ||
infil_program.addLine("If (OASupInTemp < HtgStp) && (#{clg_ssn_sensor.name} < 1)") | ||
htg_energy_actuator = create_other_equipment_object_and_actuator(model: model, name: "shared mech vent preheating energy #{i}", space: @living_space, frac_lat: 0.0, frac_lost: 1.0, hpxml_fuel_type: f_preheat.preheating_fuel, end_use: Constants.ObjectNameMechanicalVentilationPreconditioning) | ||
htg_load_var = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(model, "Precond_HeatingLoad_#{i}") | ||
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. Global variables created here for load reporting. |
||
hvac_map["#{f_preheat.id}_preheat"] = [htg_energy_actuator.actuatedComponent.get] | ||
infil_program.addLine(" Set Qpreheat = #{UnitConversions.convert(f_preheat.average_oa_unit_flow_rate, 'cfm', 'm^3/s').round(4)}") | ||
if [HPXML::MechVentTypeERV, HPXML::MechVentTypeHRV].include? f_preheat.fan_type | ||
|
@@ -1557,11 +1558,13 @@ def self.calculate_precond_loads(model, infil_program, vent_mech_preheat, vent_m | |
infil_program.addLine('Else') | ||
infil_program.addLine(' Set PreHeatingWatt = 0.0') | ||
infil_program.addLine('EndIf') | ||
infil_program.addLine("Set #{htg_load_var.name.get} = PreHeatingWatt * ZoneTimeStep*3600") | ||
infil_program.addLine("Set #{htg_energy_actuator.name} = PreHeatingWatt / #{f_preheat.preheating_efficiency_cop}") | ||
end | ||
vent_mech_precool.each_with_index do |f_precool, i| | ||
infil_program.addLine("If (OASupInTemp > ClgStp) && (#{clg_ssn_sensor.name} > 0)") | ||
clg_energy_actuator = create_other_equipment_object_and_actuator(model: model, name: "shared mech vent precooling energy #{i}", space: @living_space, frac_lat: 0.0, frac_lost: 1.0, hpxml_fuel_type: f_precool.precooling_fuel, end_use: Constants.ObjectNameMechanicalVentilationPreconditioning) | ||
clg_load_var = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(model, "Precond_CoolingLoad_#{i}") | ||
hvac_map["#{f_precool.id}_precool"] = [clg_energy_actuator.actuatedComponent.get] | ||
infil_program.addLine(" Set Qprecool = #{UnitConversions.convert(f_precool.average_oa_unit_flow_rate, 'cfm', 'm^3/s').round(4)}") | ||
if [HPXML::MechVentTypeERV, HPXML::MechVentTypeHRV].include? f_precool.fan_type | ||
|
@@ -1582,6 +1585,7 @@ def self.calculate_precond_loads(model, infil_program, vent_mech_preheat, vent_m | |
infil_program.addLine('Else') | ||
infil_program.addLine(' Set PreCoolingWatt = 0.0') | ||
infil_program.addLine('EndIf') | ||
infil_program.addLine("Set #{clg_load_var.name.get} = PreCoolingWatt * ZoneTimeStep*3600") | ||
infil_program.addLine("Set #{clg_energy_actuator.name} = PreCoolingWatt / #{f_precool.precooling_efficiency_cop}") | ||
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
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.
Adjust total loads read from E+ output meter