I'm trying to retrieve fan objects FanConstantVolume
associated with terminal units AirTerminalSingleDuctParallelPIUReheat
to assign fan parameters, but only want the fans associated with their respective terminal units without changing other fans within the model.
I'm able to retrieve the terminal unit objects, but don't know how to retrieve the fan specifically associated with each one. I got this far:
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
#how to retrieve terminal unit fan objects?
end
end
end
One way I can think of is to get the fan name for each terminal unit, then retrieve the fan by that name somehow. From the SDK it looks as if there's a method for this but I don't know how to apply it.
'HVACComponent openstudio::model::AirTerminalSingleDuctParallelPIUReheat::fan ( ) const'
Thanks in advance for any assistance.