-
Notifications
You must be signed in to change notification settings - Fork 195
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
ZoneHVACUnitHeater components missing air inlet/outlet node names if created by API #3426
Comments
@MatthewSteen I think you may have forgotten to do
Result:
|
@jmarrec no, i tried that too.
|
the Forwardtranslator is the one that sets the nodes, not the model API |
Ok, well that's strange then. Perhaps it was some more EP instability that I've been experiencing lately. |
FYI @jmarrec I'm experiencing this issue again with CoilCoolingWater and CoilHeatingWater, which appears to be an EnergyPlus issue. I created a model with the API with the code and topology below. All of the hydronic coils are connected to plant loops. Workaround is to delete the coils and re-add them using the app. Code class_names.each do |class_name|
# puts node.name, class_name if class_name
if class_name
component = Object.const_get("OpenStudio::Model::#{class_name}").new(model)
component.addToNode(node)
end
end Error
OpenStudio Object
EnergyPlus Object
|
@MatthewSteen I don't have enough to reproduce this, could you share more? If this is proprietary and you cannot create a MCVE you can send it to me privately via Slack or email. Thanks! |
@jmarrec experiencing this again, so here's a model in the early stages of development (i.e. only hit run once)... ERR
OSM
IDF
|
I'm about to look at your model, but I have a hunch this could be because you ordered the Ctor arguments wrong. Or the FT is doing something fishy. We'll see! |
Created this file 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
m = osload('20146-Proposed.osm')
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
w = ft.translateModel(m)
puts w.getObjectsByName("100.Vestibule.TZ - UH")
# Change to 291
w.save('310.idf') So it works in 310, not in 291: |
@MatthewSteen My (strong) guess is that it's this commit that fixed it: f304968#diff-6e5de9c83c5afa147df589cdacadf05ddb5d361b3766b1e99e83dda333ff5e20 while I was implementing FanSystemModel in #3856 (I could git bisect to make sure it is, but it's not like I have 4 hours ahead of me to satisfy my curiosity) |
@jmarrec thanks for taking a look and tracking it down. Strange that it doesn't happen in the App. |
@jmarrec I am experiencing the same issue again in OS 3.2.1. I also created my ZoneHVACUnitHeaters. I can upload my model and the code I used to create the equipment if needed. |
@luisclv yes, I would need something to reproduce the bug. please share. |
In my case I noticed that this happened when I wanted to create the Unit Heater with a The code below reproduces my issue the same as in my model (the inlet and outlet nodes in the I am creating two models, and on each one creating a require 'openstudio'
m_constant = OpenStudio::Model::Model.new
m_on_off = OpenStudio::Model::Model.new
hc_constant = OpenStudio::Model::CoilHeatingElectric.new(m_constant)
hc_on_off = OpenStudio::Model::CoilHeatingElectric.new(m_on_off)
f_constant = OpenStudio::Model::FanConstantVolume.new(m_constant)
f_on_off = OpenStudio::Model::FanOnOff.new(m_on_off)
z_constant = OpenStudio::Model::ThermalZone.new(m_constant)
z_on_off = OpenStudio::Model::ThermalZone.new(m_on_off)
cuh_constant = OpenStudio::Model::ZoneHVACUnitHeater.new(m_constant, m_constant.alwaysOnDiscreteSchedule, f_constant, hc_constant)
cuh_on_off = OpenStudio::Model::ZoneHVACUnitHeater.new(m_on_off, m_on_off.alwaysOnDiscreteSchedule, f_on_off, hc_on_off)
cuh_constant.setName('CUH')
cuh_on_off.setName('CUH')
cuh_constant.addToThermalZone(z_constant)
cuh_on_off.addToThermalZone(z_on_off)
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
w_constant = ft.translateModel(m_constant)
w_onoff = ft.translateModel(m_on_off)
puts w_constant.getObjectsByName("Fan Constant Volume 1")
puts w_onoff.getObjectsByName("Fan On Off 1") The output is below. Note the nodes are assigned correctly in
|
Yep, confirmed it's missing there: OpenStudio/src/energyplus/ForwardTranslator/ForwardTranslateZoneHVACUnitHeater.cpp Lines 139 to 148 in 65607ae
|
…ERT inc ase new types are supported in the future)
Fix #3426 - ZoneHVACUnitHeater components missing air inlet/outlet node names when Fan:OnOff
I used the API to add unit heaters to a model, but EP failed because the fan and heating coil inlet and outlet node names were missing. After removing the unit heaters with the API and then adding new unit heaters with the app the model ran.
The text was updated successfully, but these errors were encountered: