First time here? Check out the Help page!
1 | initial version |
I think your code is pretty much on point. Here are a couple of thoughts.
coils = model.getCoilsHeatingWaters
coils.each do |coil|
# This is the one method your example didn't check.
# Since the water coil sits between the air and plant loops, check for both air and plant loops,
# you might have a half connected coil.
if coil.plantLoop.empty?
...
elsif coil.airLoopHVAC.empty?
...
elsie coil.containingHVACComponent.empty?
...
else
# you might get here. In which case the coil might be in the model, but not hooked up to anything.
# The other possibility is that it is inside a piece of zone hvac or terminal unit that containingHVACComponent
# does not know about. This would be a bug in OpenStudio if found to be the case.
end
end
The other key method I would like to draw you attention to is this...
plants = model.getPlantLoops
plants.each do |plant|
coils = plant.supplyComponents(OpenStudio::Model::CoilHeatingWater::iddObjectType)
coils.each do |coil|
....
end
end
2 | No.2 Revision |
I think your code is pretty much on point. Here are a couple of thoughts.
coils = model.getCoilsHeatingWaters
coils.each do |coil|
# This is the one method your example didn't check.
# Since the water coil sits between the air and plant loops, check for both air and plant loops,
# you might have a half connected coil.
if coil.plantLoop.empty?
...
elsif coil.airLoopHVAC.empty?
...
elsie elsif coil.containingHVACComponent.empty?
...
else
# you might get here. In which case the coil might be in the model, but not hooked up to anything.
# The other possibility is that it is inside a piece of zone hvac or terminal unit that containingHVACComponent
# does not know about. This would be a bug in OpenStudio if found to be the case.
end
end
The other key method I would like to draw you attention to is this...
plants = model.getPlantLoops
plants.each do |plant|
coils = plant.supplyComponents(OpenStudio::Model::CoilHeatingWater::iddObjectType)
coils.each do |coil|
....
end
end
3 | No.3 Revision |
I think your code is pretty much on point. Here are a couple of thoughts.
coils = model.getCoilsHeatingWaters
coils.each do |coil|
# This is the one method your example didn't check.
# Since the water coil sits between the air and plant loops, check for both air and plant loops,
# you might have a half connected coil.
if coil.plantLoop.empty?
...
elsif coil.airLoopHVAC.empty?
...
elsif coil.containingHVACComponent.empty?
...
else
# you might get here. In which case the coil might be in the model, but not hooked up to anything.
# The other possibility is that it is inside a piece of zone hvac or terminal unit that containingHVACComponent
# does not know about. This would be a bug in OpenStudio if found to be the case.
end
end
The other key method I would like to draw you your attention to is this...
plants = model.getPlantLoops
plants.each do |plant|
coils = plant.supplyComponents(OpenStudio::Model::CoilHeatingWater::iddObjectType)
coils.each do |coil|
....
end
end
4 | No.4 Revision |
I think your code is pretty much on point. Here are a couple of thoughts.
coils = model.getCoilsHeatingWaters
coils.each do |coil|
# This is the one method your example didn't check.
# Since the water coil sits between the air and plant loops, check for both air and plant loops,
# you might have a half connected coil.
if coil.plantLoop.empty?
...
elsif coil.airLoopHVAC.empty?
...
elsif coil.containingHVACComponent.empty?
...
else
# you might get here. In which case the coil might be in the model, but not hooked up to anything.
# The other possibility is that it is inside a piece of zone hvac or terminal unit that containingHVACComponent
# does not know about. This would be a bug in OpenStudio if found to be the case.
end
end
The other key method I would like to draw your attention to is this...
plants = model.getPlantLoops
plants.each do |plant|
coils = plant.supplyComponents(OpenStudio::Model::CoilHeatingWater::iddObjectType)
plant.demandComponents(OpenStudio::Model::CoilHeatingWater::iddObjectType)
coils.each do |coil|
....
end
end
5 | No.5 Revision |
I think your code is pretty much on point. Here are a couple of thoughts.
coils = model.getCoilsHeatingWaters
model.getCoilHeatingWaters
coils.each do |coil|
# This is the one method your example didn't check.
# Since the water coil sits between the air and plant loops, check for both air and plant loops,
# you might have a half connected coil.
if coil.plantLoop.empty?
...
elsif coil.airLoopHVAC.empty?
...
elsif coil.containingHVACComponent.empty?
...
else
# you might get here. In which case the coil might be in the model, but not hooked up to anything.
# The other possibility is that it is inside a piece of zone hvac or terminal unit that containingHVACComponent
# does not know about. This would be a bug in OpenStudio if found to be the case.
end
end
The other key method I would like to draw your attention to is this...
plants = model.getPlantLoops
plants.each do |plant|
coils = plant.demandComponents(OpenStudio::Model::CoilHeatingWater::iddObjectType)
coils.each do |coil|
....
end
end