First time here? Check out the Help page!
| 1 | initial version |
You are almost there. If you look at the OpenStudio SDK for the AirTerminalSingleDuctParallelPIUReheatobject, there is a method to return the fan object.

In your case, you would just this to your code:
model.getAirLoopHVACs.each do |air_loop|
demand_components = air_loop.demandComponents
demand_components.each do |demand_component|
pfpb = demand_component.to_AirTerminalSingleDuctParallelPIUReheat
if not pfpb.empty?
unit = pfpb.get
fan_cv = unit.fan.to_FanConstantVolume.get
#you could split this line to ensure that fan is a FanConstantVolume
#then call whatever fan methods you'd like
fan_cv.setFanEfficiency(0.6)
fan_cv.setPressureRise(75)
end
end
end
| 2 | No.2 Revision |
You are almost there. If you look at the OpenStudio SDK for the AirTerminalSingleDuctParallelPIUReheatobject, there is a method to return the fan object.

In your case, you would just add this to your code:
model.getAirLoopHVACs.each do |air_loop|
demand_components = air_loop.demandComponents
demand_components.each do |demand_component|
pfpb = demand_component.to_AirTerminalSingleDuctParallelPIUReheat
if not pfpb.empty?
unit = pfpb.get
fan_cv = unit.fan.to_FanConstantVolume.get
#you could split this line to ensure that fan is a FanConstantVolume
#then call whatever fan methods you'd like
fan_cv.setFanEfficiency(0.6)
fan_cv.setPressureRise(75)
end
end
end
| 3 | No.3 Revision |
You are almost there. If you look at the OpenStudio SDK for the AirTerminalSingleDuctParallelPIUReheatobject, there is a method to return the fan object.

In your case, you would just add this to your code:
model.getAirLoopHVACs.each do |air_loop|
demand_components = air_loop.demandComponents
demand_components.each do |demand_component|
pfpb = demand_component.to_AirTerminalSingleDuctParallelPIUReheat
if not pfpb.empty?
unit = pfpb.get
fan_cv = unit.fan.to_FanConstantVolume.get
#you could split this line to ensure that fan is a FanConstantVolume
#then call whatever fan methods you'd like
fan_cv.setFanEfficiency(0.6)
fan_cv.setPressureRise(75)
end
end
end