-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
E+ 9.3.0: Realign OS:SizingPeriod:DesignDay with E+ IDD #3910
Comments
Anything else? |
You're probably correct. I'd probably go the extra mile and try to re-order the rest of the fields. Perhaps also rename a couple (well: deprecate old name and point to new name), such as Maybe that's just me, but when I read the E+ doc I kinda like the idea of being able to infer the OS method name directly... [7] OS-build(main)> os_fields = get_fields(osIdd)
=> {"Handle"=>0,
"Name"=>1,
"Maximum Dry-Bulb Temperature"=>2,
"Daily Dry-Bulb Temperature Range"=>3,
"Humidity Indicating Conditions at Maximum Dry-Bulb"=>4,
"Barometric Pressure"=>5,
"Wind Speed"=>6,
"Wind Direction"=>7,
"Sky Clearness"=>8,
"Rain Indicator"=>9,
"Snow Indicator"=>10,
"Day of Month"=>11,
"Month"=>12,
"Day Type"=>13,
"Daylight Saving Time Indicator"=>14,
"Humidity Indicating Type"=>15,
"Humidity Indicating Day Schedule Name"=>16,
"Dry-Bulb Temperature Range Modifier Type"=>17,
"Dry-Bulb Temperature Range Modifier Schedule Name"=>18,
"Solar Model Indicator"=>19,
"Beam Solar Day Schedule Name"=>20,
"Diffuse Solar Day Schedule Name"=>21,
"ASHRAE Taub"=>22,
"ASHRAE Taud"=>23,
"Daily Wet-Bulb Temperature Range"=>24}
[8] OS-build(main)> ep_fields = get_fields(iddObject)
=> {"Name"=>0,
"Month"=>1,
"Day of Month"=>2,
"Day Type"=>3,
"Maximum Dry-Bulb Temperature"=>4,
"Daily Dry-Bulb Temperature Range"=>5,
"Dry-Bulb Temperature Range Modifier Type"=>6,
"Dry-Bulb Temperature Range Modifier Day Schedule Name"=>7,
"Humidity Condition Type"=>8,
"Wetbulb or DewPoint at Maximum Dry-Bulb"=>9,
"Humidity Condition Day Schedule Name"=>10,
"Humidity Ratio at Maximum Dry-Bulb"=>11,
"Enthalpy at Maximum Dry-Bulb"=>12,
"Daily Wet-Bulb Temperature Range"=>13,
"Barometric Pressure"=>14,
"Wind Speed"=>15,
"Wind Direction"=>16,
"Rain Indicator"=>17,
"Snow Indicator"=>18,
"Daylight Saving Time Indicator"=>19,
"Solar Model Indicator"=>20,
"Beam Solar Day Schedule Name"=>21,
"Diffuse Solar Day Schedule Name"=>22,
"ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub)"=>23,
"ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud)"=>24,
"Sky Clearness"=>25,
"Maximum Number Warmup Days"=>26,
"Begin Environment Reset Mode"=>27} [9] OS-build(main)> missing_fields = ep_fields.keys - os_fields.keys
=> ["Dry-Bulb Temperature Range Modifier Day Schedule Name",
"Humidity Condition Type",
"Wetbulb or DewPoint at Maximum Dry-Bulb",
"Humidity Condition Day Schedule Name",
"Humidity Ratio at Maximum Dry-Bulb",
"Enthalpy at Maximum Dry-Bulb",
"ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub)", # false alarm
"ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud)", # false alarm
"Maximum Number Warmup Days",
"Begin Environment Reset Mode"]
[10] OS-build(main)> extra_fields = os_fields.keys - ep_fields.keys
=> ["Handle",
"Humidity Indicating Conditions at Maximum Dry-Bulb",
"Humidity Indicating Type",
"Humidity Indicating Day Schedule Name",
"Dry-Bulb Temperature Range Modifier Schedule Name",
"ASHRAE Taub", # false alarm
"ASHRAE Taud", # false alarm
] |
I forgot to provide my helpers (change the path to your ProposedEnergy+.idd... in # Helper to locate a given IddObject via Name in the current IDD
# by using IddFileAndFactoryWrapper
#
# @param object_name [String] eg 'OS:ZoneHVAC:TerminalUnit:VariableRefrigerantFlow'
# @return [OpenStudio::IddObject] the IddObject
# raises if not found
def locate_object_in_current_idd(object_name)
factory = OpenStudio::IddFileAndFactoryWrapper.new("OpenStudio".to_IddFileType)
obj = factory.getObject(object_name)
raise "Cannot locate #{object_name} in current IDD" if obj.empty?
return obj.get
end
def locate_object_current_proposed_eplus_idd(object_name)
idd_path = File.join(ENV["HOME"],
'Software/Others/OpenStudio/resources/energyplus/ProposedEnergy+.idd')
raise "Cannot locate '#{idd_path}'" if !File.exist?(idd_path)
oIddFile = OpenStudio::IddFile::load(idd_path)
raise "Couldn't load #{idd_path}" if oIddFile.empty?
iddFile = oIddFile.get
objs = iddFile.objects.select{|obj| obj.name == object_name }
raise "Cannot find #{object_name} in #{idd_path}" if objs.size != 1
return objs[0]
end
# Scans all fields for an IddObject and reutrn hash of {fieldname: index}
#
# @param iddObject [OpenStudio::IddObject] the IddObject to scan
# @return [Hash] : keys are the field names, values are the indices (0-indexed)
def get_fields(iddObject)
num_fields = iddObject.numFields
fields = []
fields_h = {}
for i in 0..num_fields-1
f = iddObject.getField(i).get
fields << [f.name.to_s]
fields_h[f.name.to_s] = i
end
return fields_h
end osIdd = locate_object_in_current_idd("OS:SizingPeriod:DesignDay")
iddObject = locate_object_current_proposed_eplus_idd("SizingPeriod:DesignDay") |
|
Addresses #3910, realign OS:SizingPeriod:DesignDay with E+ IDD
Closed in #4402 |
Enhancement Request
In E+ 9.3.0, SizingPeriod:DesignDay gains a few field, but OS IDD has become quite out of line with E+
It would be nice to re-align, but this is an enhancement request.
The text was updated successfully, but these errors were encountered: