Like all ZoneHVACComponents
, you'd use ZoneHVACComponent::addToThermalZone
. See the SDK Documentation here:
bool openstudio::model::ZoneHVACComponent::addToThermalZone ( ThermalZone & thermalZone )
Adds this ZoneHVACComponent to the thermal zone while managing all node connections automatically.
Returns true if the operation was successful.
The actual implementation for FanZoneExhaust is at FanZoneExhaust.cpp#L152:L188 if you're curious.
Example:
m = OpenStudio::Model::Model.new
z = OpenStudio::Model::ThermalZone.new(m)
fan = OpenStudio::Model::FanZoneExhaust.new(m)
fan.addToThermalZone(z)