Ejemplo n.º 1
0
  bool ZoneHVACComponent_Impl::addToThermalZone(ThermalZone & thermalZone)
  {
    Model m = this->model();

    if( thermalZone.model() != m ) {
      return false;
    }

    if( thermalZone.isPlenum() ) {
      return false;
    }

    removeFromThermalZone();

    thermalZone.setUseIdealAirLoads(false);

    // Connect nodes if this is an air based zone hvac component
    if( inletPort() != 0u && outletPort() != 0u ) {
      // Exhaust Node
      Node exhaustNode(m);
      PortList exhaustPortList = thermalZone.exhaustPortList();
      unsigned nextPort = exhaustPortList.nextPort();
      m.connect(exhaustPortList,nextPort,exhaustNode,exhaustNode.inletPort());
      ModelObject mo = this->getObject<ModelObject>();
      m.connect(exhaustNode,exhaustNode.outletPort(),mo,this->inletPort());

      // Air Inlet Node
      Node airInletNode(m);
      PortList inletPortList = thermalZone.inletPortList();
      unsigned nextInletPort = inletPortList.nextPort();
      m.connect(airInletNode,airInletNode.outletPort(),inletPortList,nextInletPort);
      m.connect(mo,this->outletPort(),airInletNode,airInletNode.inletPort());
    }

    thermalZone.addEquipment(this->getObject<ZoneHVACComponent>());

    return true;
  }
Ejemplo n.º 2
0
  bool FanZoneExhaust_Impl::addToThermalZone(ThermalZone & thermalZone)
  {
    Model m = this->model();

    if( thermalZone.model() != m )
    {
      return false;
    }

    removeFromThermalZone();

    thermalZone.setUseIdealAirLoads(false);

    // Zone Exhaust Node (Exhaust Fan Inlet node)

    Node exhaustNode(m);

    PortList exhaustPortList = thermalZone.exhaustPortList();

    unsigned nextPort = exhaustPortList.nextPort();

    m.connect(exhaustPortList,nextPort,exhaustNode,exhaustNode.inletPort());

    ModelObject mo = this->getObject<ModelObject>();

    m.connect(exhaustNode,exhaustNode.outletPort(),mo,this->inletPort());

    // Node (Exhaust Fan Outlet Node) 

    Node exhaustFanOutletNode(m);

    m.connect(mo,this->outletPort(),exhaustFanOutletNode,exhaustFanOutletNode.inletPort());

    thermalZone.addEquipment(this->getObject<ZoneHVACComponent>());

    return true;
  }