-
Notifications
You must be signed in to change notification settings - Fork 25
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
Crashing Issue in OpenStudio When Accessing Thermal Zone Tab #686
Comments
@eliaseid1 sent the OSM in question and the issue was a OS:ZoneHVAC:EquipmentList with objects of priority 1, 3, 4 (missing priority 2). @eliaseid1 if you can provide steps to reproduce the issue when building a model, we can try to fix it |
Dear Dan, I appreciate your response and apologize for the delay in getting back to you. During this time, I have been attempting to recreate the bug. After conducting various tests, I have successfully identified the issue: I suspect that the problem may be related to the OS:ZoneVentilation component as well, particularly because the crash did not occur when only the CV Unit Heater gas was present. Best regards, |
Thanks @eliaseid1, in your model the third zone equipment named "Exhaust Fan" is actually a schedule. I'm not sure how you added that to the zone equipment list? I can't drag a schedule to that location. Can you share how you did that? |
@jmarrec I can't reproduce this, can you? |
@macumber I've just noticed that the screenshot you shared depicts the old OSM model. In my last email of Thursday, I provided you with two OSMs: one before encountering the bug and another immediately after. Could you please confirm whether you received the email and attempted to address the issue using these two models? |
Where do I find the "faulty" (before) model? I don't see it on the OSC email. Also, what do you mean by "before the bug" and "another immediately after". Did you change anything in between or just reopened it? Did you ever edit the model by hand / outside of the OpenStudioApplication? |
Hello Julien, I appreciate your response. Dan requested that I replicate the bug for you to address, which is why I generated two versions of the file: one before the bug and one after. The sole difference between the two is removing the CV unit heater from the zone equipment in the model after, which triggers the bug. I believe Dan has the two models, if you don't have them, I'm more than happy to provide them. Thank you for your help. |
I put the files in the issues repo for this issue @jmarrec. I just now saw the second set of files you sent, the before and after osms are the exact same. However, I can reproduce the bug by opening @eliaseid1 are you able to reproduce this issue if you start a model in OpenStudio Application 1.7.0? Or does it only occur if you build the model in OpenStudio Application 1.5.0 and then upgrade it to OpenStudio Application 1.7.0? |
I think this is an OpenStudio issue, there is an assertion failing in
|
Hi @macumber , |
Another observation I made while reviewing the model: Yesterday, I encountered what seems to be another bug. When attempting to use an electric baseboard convective heater as a zone equipment, I opted for autosize for the heater capacity. However, despite this setting, I consistently received a 0 W output and no heating in the kitchen. Interestingly, manually specifying a value for the heater capacity resolved the issue. It appears that Openstudio considered the autosizing of this component as 0 W. I hope this information proves helpful. |
So funny thing @macumber
One liner test:
|
Hey @jmarrec must be some differences in logging, when I run your command I see the failed BOOST_ASSERT statements below:
If I add forward translation I get a crash:
|
This seems like an OpenStudio issue rather than an OpenStudio Application issue to me. |
Even with a debugger attached I can't reproduce it. Also, I see no reason it would do that. Here's the equivalent ruby code (also on the OpenStudioApplication-Issues repo): require 'openstudio'
include OpenStudio::Model
# Helper to load a model in one line
# It will raise if the path (or the model) isn't valid
#
# @param path [String] The path to the osm
# @return [OpenStudio::Model::Model] the resulting model.
def osload(path)
translator = OpenStudio::OSVersion::VersionTranslator.new
ospath = OpenStudio::Path.new(path)
model = translator.loadModel(ospath)
if model.empty?
raise "Path '#{path}' is not a valid path to an OpenStudio Model"
else
model = model.get
end
return model
end
def getGroupForModelObject(eqlist, modelObject)
eqlist.extensibleGroups.each do |eg|
meg = eg.to_ModelExtensibleGroup.get
if meg.getTarget(0).get.handle == modelObject.handle
return meg
end
end
end
m = osload('Kitchen Domestic (before removing the CV unit heater).osm')
eqlist = m.getZoneHVACEquipmentLists.first
uh = m.getZoneHVACUnitHeaters.first
puts "Eq List before"
pp eqlist.extensibleGroups.map{|eg| [eg.to_ModelExtensibleGroup.get.getTarget(0).get.nameString, eg.getUnsigned(1).get, eg.getUnsigned(2).get]}
coolingVector = eqlist.equipmentInCoolingOrder
heatingVector = eqlist.equipmentInHeatingOrder
eqlist.eraseExtensibleGroup(getGroupForModelObject(eqlist, uh).groupIndex)
heatingVector = heatingVector.reject{|x| x==uh}
coolingVector = coolingVector.reject{|x| x==uh}
priority = 1
coolingVector.each do |elem|
eg = getGroupForModelObject(eqlist, elem)
raise if eg.nil?
eg.setUnsigned(1, priority)
priority += 1
end
priority = 1
heatingVector.each do |elem|
eg = getGroupForModelObject(eqlist, elem)
raise if eg.nil?
eg.setUnsigned(2, priority)
priority += 1
end
puts "Eq List after"
pp eqlist.extensibleGroups.map{|eg| [eg.to_ModelExtensibleGroup.get.getTarget(0).get.nameString, eg.getUnsigned(1).get, eg.getUnsigned(2).get]} |
Ok what the hell, I can reproduce on windoze |
Moved to NREL/OpenStudio#5121 . Will reopen if I find this is an OSApp issue after all but I doubt it |
Just an FYI, the issue arises only because the ZoneVentilation:DesignFlowRate object named "Natural Ventilation" has a Schedule assigned that is also named exactly the same. If you were to rename the Schedule to "Natural Ventilation Schedule", the problem goes away. |
Fix is in NREL/OpenStudio#5122 |
Hi there,
I'm experiencing consistent crashes in OpenStudio whenever I try to access the thermal zones tab. This issue arose after I included natural ventilation and an exhaust fan in a kitchen I'm modelling (as zone equipment). Could you please provide assistance? I've ensured that I have the latest updates for both OpenStudio and EnergyPlus. I can provide the OSM if someone can help please.
Thanks in advance.
The text was updated successfully, but these errors were encountered: