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

reorganize the function #1550

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -917,25 +917,17 @@ def model_apply_multizone_vav_outdoor_air_sizing(model)
# @return zone_nmc_sys_type [Hash] Zone to nmc system type mapping
def model_identify_non_mechanically_cooled_systems(model)
# Iterate through zones to find out if they are served by nmc systems
model.getThermalZones.sort.each do |zone|
model.getThermalZones.each do |zone|
# Check if airloop has economizer and either:
# - No cooling coil and/or,
# - An evaporative cooling coil
air_loop = zone.airLoopHVAC

unless air_loop.empty?
# Iterate through all the airloops assigned to a zone
zone.airLoopHVACs.each do |airloop|
air_loop = air_loop.get
if (!air_loop_hvac_include_cooling_coil?(air_loop) &&
air_loop_hvac_include_evaporative_cooler?(air_loop)) ||
(!air_loop_hvac_include_cooling_coil?(air_loop) &&
air_loop_hvac_include_economizer?(air_loop))
air_loop.additionalProperties.setFeature('non_mechanically_cooled', true)
air_loop.thermalZones.each do |thermal_zone|
thermal_zone.additionalProperties.setFeature('non_mechanically_cooled', true)
end
end
zone.airLoopHVACs.each do |air_loop|
if (!air_loop_hvac_include_cooling_coil?(air_loop) &&
air_loop_hvac_include_evaporative_cooler?(air_loop)) ||
(!air_loop_hvac_include_cooling_coil?(air_loop) &&
air_loop_hvac_include_economizer?(air_loop))
air_loop.additionalProperties.setFeature('non_mechanically_cooled', true)
zone.additionalProperties.setFeature('non_mechanically_cooled', true)
end
end
end
Expand Down Expand Up @@ -2052,7 +2044,7 @@ def run_all_orientations(run_all_orients, user_model)
unless run_all_orients
OpenStudio.logFree(OpenStudio::Error,
'prm.log',
"The run_all_orientation flag is set to False, update the run to a single orientation PRM generation.")
'The run_all_orientation flag is set to False, update the run to a single orientation PRM generation.')
run_orients_flag = run_all_orients
end
# Step 3 read user data - priority 1 - user data will override the priority 2
Expand Down Expand Up @@ -2417,7 +2409,7 @@ def get_baseline_system_groups_for_one_building_type(model, hvac_building_type,
has_computer_room = false
# First check if any space in zone has a computer room
zn['zone'].spaces.each do |space|
if prm_get_optional_handler(space, @sizing_run_dir, 'spaceType','standardsSpaceType') == 'computer room'
if prm_get_optional_handler(space, @sizing_run_dir, 'spaceType', 'standardsSpaceType') == 'computer room'
has_computer_room = true
break
end
Expand Down