MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / containingHVACComponent

Method containingHVACComponent

src/model/FanSystemModel.cpp:322–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320 }
321
322 boost::optional<HVACComponent> FanSystemModel_Impl::containingHVACComponent() const {
323 auto t_handle = handle();
324
325 // AirLoopHVACUnitarySystem
326 std::vector<AirLoopHVACUnitarySystem> airLoopHVACUnitarySystems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>();
327
328 for (const auto& airLoopHVACUnitarySystem : airLoopHVACUnitarySystems) {
329 if (boost::optional<HVACComponent> fan = airLoopHVACUnitarySystem.supplyFan()) {
330 if (fan->handle() == t_handle) {
331 return airLoopHVACUnitarySystem;
332 }
333 }
334 }
335
336 // AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass
337 std::vector<AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass> bypassSystems =
338 this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass>();
339
340 for (const auto& bypassSystem : bypassSystems) {
341 if (boost::optional<HVACComponent> fan = bypassSystem.supplyAirFan()) {
342 if (fan->handle() == t_handle) {
343 return bypassSystem;
344 }
345 }
346 }
347
348 // TODO: Energy+.idd currently won't let that actually happen right now (cf https://github.com/NREL/EnergyPlus/issues/7697)
349 // But it can't hurt to have that code in already
350 // AirLoopHVACUnitaryHeatPumpAirToAir
351 //std::vector<AirLoopHVACUnitaryHeatPumpAirToAir> airLoopHVACUnitaryHeatPumpAirToAirs = this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatPumpAirToAir>();
352
353 //for( const auto & airLoopHVACUnitaryHeatPumpAirToAir : airLoopHVACUnitaryHeatPumpAirToAirs )
354 //{
355 //if( boost::optional<HVACComponent> fan = airLoopHVACUnitaryHeatPumpAirToAir.supplyAirFan() )
356 //{
357 //if( fan->handle() == this->handle() )
358 //{
359 //return airLoopHVACUnitaryHeatPumpAirToAir;
360 //}
361 //}
362 //}
363
364 // TODO: Energy+.idd currently won't let that actually happen
365 // AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed
366 //std::vector<AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed> airLoopHVACUnitaryHeatPumpAirToAirMultiSpeeds = this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed>();
367
368 //for( const auto & airLoopHVACUnitaryHeatPumpAirToAirMultiSpeed : airLoopHVACUnitaryHeatPumpAirToAirMultiSpeeds )
369 //{
370 //if( boost::optional<HVACComponent> fan = airLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.supplyAirFan() )
371 //{
372 //if( fan->handle() == this->handle() )
373 //{
374 //return airLoopHVACUnitaryHeatPumpAirToAirMultiSpeed;
375 //}
376 //}
377 //}
378
379 // AirTerminalSingleDuctParallelPIUReheat

Callers

nothing calls this directly

Calls 5

modelMethod · 0.45
supplyFanMethod · 0.45
handleMethod · 0.45
supplyAirFanMethod · 0.45
fanMethod · 0.45

Tested by

no test coverage detected