当前位置: 首页>>代码示例>>C++>>正文


C++ ThermalZone类代码示例

本文整理汇总了C++中ThermalZone的典型用法代码示例。如果您正苦于以下问题:C++ ThermalZone类的具体用法?C++ ThermalZone怎么用?C++ ThermalZone使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ThermalZone类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ModelObject

ZoneHVACEquipmentList::ZoneHVACEquipmentList(const ThermalZone & thermalZone)
  : ModelObject(ZoneHVACEquipmentList::iddObjectType(),thermalZone.model())
{
  OS_ASSERT(getImpl<detail::ZoneHVACEquipmentList_Impl>());

  setPointer(OS_ZoneHVAC_EquipmentListFields::ThermalZone,thermalZone.handle());
}
开发者ID:CUEBoxer,项目名称:OpenStudio,代码行数:7,代码来源:ZoneHVACEquipmentList.cpp

示例2: setSourceZone

 bool ZoneMixing_Impl::setSourceZone(const ThermalZone& zone) {
   bool result(false);
   
   // source zone cannot be the same as this zone
   if (zone.handle() != this->zone().handle()){
     result = setPointer(OS_ZoneMixingFields::SourceZoneName, zone.handle());
   }
   return result;
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:9,代码来源:ZoneMixing.cpp

示例3: TEST_F

TEST_F(ModelFixture, AirflowNetwork_Zone_Basic)
{
  Model model;
  ThermalZone thermalZone(model);
  Space space1(model);
  Space space2(model);

  EXPECT_FALSE(thermalZone.airflowNetworkZone());
  EXPECT_FALSE(space1.thermalZone());
  EXPECT_FALSE(space2.thermalZone());
  EXPECT_EQ(0u, thermalZone.spaces().size());

  EXPECT_TRUE(space1.setThermalZone(thermalZone));
  ASSERT_TRUE(space1.thermalZone());
  EXPECT_EQ(thermalZone.handle(), space1.thermalZone()->handle());
  EXPECT_FALSE(space2.thermalZone());
  EXPECT_EQ(1u, thermalZone.spaces().size());

  ASSERT_TRUE(space1.thermalZone());
  EXPECT_EQ(thermalZone.handle(), space1.thermalZone()->handle());
  EXPECT_TRUE(space2.setThermalZone(thermalZone));
  ASSERT_TRUE(space2.thermalZone());
  EXPECT_EQ(thermalZone.handle(), space2.thermalZone()->handle());
  EXPECT_EQ(2u, thermalZone.spaces().size());

  auto zone = thermalZone.getAirflowNetworkZone();
  auto optzone = thermalZone.airflowNetworkZone();
  ASSERT_TRUE(optzone);
  EXPECT_EQ(zone, optzone.get());

  zone.setFacadeWidth(50.0);
  CurveLinear curve(model);
  curve.setCoefficient1Constant(55.0);
  curve.setCoefficient2x(0.0);

  AirflowNetworkOccupantVentilationControl ovc(model, curve);
  EXPECT_FALSE(zone.occupantVentilationControl());
  EXPECT_TRUE(zone.setOccupantVentilationControl(ovc));
  ASSERT_TRUE(zone.occupantVentilationControl());
  EXPECT_EQ(ovc, zone.occupantVentilationControl().get());

  ThermalZone thermalZoneClone = thermalZone.clone(model).cast<ThermalZone>();
  optzone = thermalZoneClone.airflowNetworkZone();
  ASSERT_TRUE(optzone);
  EXPECT_NE(zone, optzone.get());
  EXPECT_EQ(50.0, optzone.get().facadeWidth());
  ASSERT_TRUE(optzone.get().occupantVentilationControl());
  EXPECT_EQ(ovc, optzone.get().occupantVentilationControl().get());

}
开发者ID:NREL,项目名称:OpenStudio,代码行数:50,代码来源:AirflowNetworkZone_GTest.cpp

示例4: ModelObject

ZoneMixing::ZoneMixing(const ThermalZone& zone)
  : ModelObject(ZoneMixing::iddObjectType(), zone.model())
{
  OS_ASSERT(getImpl<detail::ZoneMixing_Impl>());

  bool ok = setPointer(OS_ZoneMixingFields::ZoneName, zone.handle());
  OS_ASSERT(ok);

  ok = setPointer(OS_ZoneMixingFields::ScheduleName, zone.model().alwaysOnContinuousSchedule().handle());
  OS_ASSERT(ok);

  ok = setDesignFlowRate(0.0);
  OS_ASSERT(ok);
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:14,代码来源:ZoneMixing.cpp

示例5: removeFromThermalZone

  bool RefrigerationAirChiller_Impl::addToThermalZone(ThermalZone & thermalZone)
  {
    Model m = this->model();

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

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

    return true;
  }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:15,代码来源:RefrigerationAirChiller.cpp

示例6: removeFromThermalZone

  bool ZoneHVACBaseboardConvectiveElectric_Impl::addToThermalZone(ThermalZone & thermalZone)
  {
    Model m = this->model();

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

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

    removeFromThermalZone();

    thermalZone.setUseIdealAirLoads(false);

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

    return true;
  }
开发者ID:pepsi7959,项目名称:OpenStudio,代码行数:22,代码来源:ZoneHVACBaseboardConvectiveElectric.cpp

示例7: removeFromThermalZone

  //reimplemented to override the base-class method in ZoneHVACComponent
  //because this component doesn't get attached to the zone inlet and zone outlet nodes
  bool ZoneHVACLowTempRadiantVarFlow_Impl::addToThermalZone(ThermalZone & thermalZone)
  {
    Model m = this->model();

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

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

    removeFromThermalZone();

    thermalZone.setUseIdealAirLoads(false);

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

    return true;
  }
开发者ID:pepsi7959,项目名称:OpenStudio,代码行数:24,代码来源:ZoneHVACLowTempRadiantVarFlow.cpp

示例8: removeFromThermalZone

  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;
  }
开发者ID:CUEBoxer,项目名称:OpenStudio,代码行数:37,代码来源:FanZoneExhaust.cpp

示例9: secondaryAirInletNode

  bool AirTerminalSingleDuctParallelPIUReheat_Impl::setInducedAirPlenumZone(ThermalZone & plenumZone)
  {
    bool result = true;

    if( ! plenumZone.isPlenum() )
    {
      result = false;
    }

    boost::optional<Node> t_secondaryAirInletNode;
    if( result )
    {
      t_secondaryAirInletNode = secondaryAirInletNode();
      if( ! t_secondaryAirInletNode )
      {
        result = false;
      }
    }

    boost::optional<AirLoopHVACReturnPlenum> plenum;
    if( result )
    {
      plenum = plenumZone.getImpl<detail::ThermalZone_Impl>()->airLoopHVACReturnPlenum();
      if( ! plenum )
      {
        result = false;
      }
    }

    if( result )
    {
      Model t_model = model();
      PortList pl = plenum->getImpl<detail::AirLoopHVACReturnPlenum_Impl>()->inducedAirOutletPortList();
      t_model.connect(pl,pl.nextPort(),t_secondaryAirInletNode.get(),t_secondaryAirInletNode->inletPort());
    }

    return result;
  }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:38,代码来源:AirTerminalSingleDuctParallelPIUReheat.cpp

示例10: removeFromThermalZone

  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;
  }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:38,代码来源:ZoneHVACComponent.cpp

示例11: setControlledZone

 bool ZoneControlContaminantController_Impl::setControlledZone(ThermalZone& zone) {
   return setPointer(OS_ZoneControl_ContaminantControllerFields::ControlledZoneName,zone.handle());
 }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:3,代码来源:ZoneControlContaminantController.cpp

示例12: setControlZone

  void SetpointManagerSingleZoneReheat_Impl::setControlZone(ThermalZone & thermalZone)
  {
    SetpointManagerSingleZoneReheat thisModelObject = this->getObject<SetpointManagerSingleZoneReheat>();

    thisModelObject.setPointer(OS_SetpointManager_SingleZone_ReheatFields::ControlZoneName,thermalZone.handle());
  }
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:6,代码来源:SetpointManagerSingleZoneReheat.cpp

示例13: createRegisterAndNameIdfObject

boost::optional<IdfObject> ForwardTranslator::translateZoneMixing( ZoneMixing & modelObject )
{
  // Makes sure the modelObject gets put in the map, and that the new idfObject gets put in 
  // the final file. Also set's the idfObject's name.
  IdfObject idfObject = createRegisterAndNameIdfObject(IddObjectType::ZoneMixing, modelObject);

  boost::optional<double> value;

  // ZoneName 
  ThermalZone zone = modelObject.zone();
  translateAndMapModelObject(zone);
  idfObject.setString(ZoneMixingFields::ZoneName, zone.name().get());

  // ScheduleName 
  Schedule schedule = modelObject.schedule();
  translateAndMapModelObject(schedule);
  idfObject.setString(ZoneMixingFields::ScheduleName, schedule.name().get());

  // DesignFlowRateCalculationMethod
  idfObject.setString(ZoneMixingFields::DesignFlowRateCalculationMethod, modelObject.designFlowRateCalculationMethod());

  // DesignFlowRate
  value = modelObject.designFlowRate();
  if (value){
    idfObject.setDouble(ZoneMixingFields::DesignFlowRate, *value);
  }

  // FlowRateperZoneFloorArea
  value = modelObject.flowRateperZoneFloorArea();
  if (value){
    idfObject.setDouble(ZoneMixingFields::FlowRateperZoneFloorArea, *value);
  }

  // FlowRateperPerson
  value = modelObject.flowRateperPerson();
  if (value){
    idfObject.setDouble(ZoneMixingFields::FlowRateperPerson, *value);
  }

  // AirChangesperHour
  value = modelObject.airChangesperHour();
  if (value){
    idfObject.setDouble(ZoneMixingFields::AirChangesperHour, *value);
  }

  // SourceZone
  boost::optional<ThermalZone> sourceZone = modelObject.sourceZone();
  if (sourceZone){
    // DLM: do not translate source zone now, it will be translated at the right time
    idfObject.setString(ZoneMixingFields::SourceZoneName, sourceZone->name().get());
  }

  // DeltaTemperature
  value = modelObject.deltaTemperature();
  if (value){
    idfObject.setDouble(ZoneMixingFields::DeltaTemperature, *value);
  }

  // DeltaTemperatureScheduleName
  boost::optional<Schedule> optSchedule = modelObject.deltaTemperatureSchedule();
  if (optSchedule){
    translateAndMapModelObject(*optSchedule);
    idfObject.setString(ZoneMixingFields::DeltaTemperatureScheduleName, optSchedule->name().get());
  }
  
  // MinimumZoneTemperatureScheduleName
  optSchedule = modelObject.minimumZoneTemperatureSchedule();
  if (optSchedule){
    translateAndMapModelObject(*optSchedule);
    idfObject.setString(ZoneMixingFields::MinimumZoneTemperatureScheduleName, optSchedule->name().get());
  }

  // MaximumZoneTemperatureScheduleName
  optSchedule = modelObject.maximumZoneTemperatureSchedule();
  if (optSchedule){
    translateAndMapModelObject(*optSchedule);
    idfObject.setString(ZoneMixingFields::MaximumZoneTemperatureScheduleName, optSchedule->name().get());
  }

  // MinimumSourceZoneTemperatureScheduleName
  optSchedule = modelObject.minimumSourceZoneTemperatureSchedule();
  if (optSchedule){
    translateAndMapModelObject(*optSchedule);
    idfObject.setString(ZoneMixingFields::MinimumSourceZoneTemperatureScheduleName, optSchedule->name().get());
  }

  // MaximumSourceZoneTemperatureScheduleName
  optSchedule = modelObject.maximumSourceZoneTemperatureSchedule();
  if (optSchedule){
    translateAndMapModelObject(*optSchedule);
    idfObject.setString(ZoneMixingFields::MaximumSourceZoneTemperatureScheduleName, optSchedule->name().get());
  }

  // MinimumOutdoorTemperatureScheduleName
  optSchedule = modelObject.minimumOutdoorTemperatureSchedule();
  if (optSchedule){
    translateAndMapModelObject(*optSchedule);
    idfObject.setString(ZoneMixingFields::MinimumOutdoorTemperatureScheduleName, optSchedule->name().get());
  }

//.........这里部分代码省略.........
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:101,代码来源:ForwardTranslateZoneMixing.cpp

示例14: setThermalZone

 bool ElectricLoadCenterInverterSimple_Impl::setThermalZone(const ThermalZone& thermalZone) {
   return setPointer(OS_ElectricLoadCenter_Inverter_SimpleFields::ZoneName, thermalZone.handle());
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:3,代码来源:ElectricLoadCenterInverterSimple.cpp

示例15: setControlZone

 bool SetpointManagerSingleZoneHumidityMaximum_Impl::setControlZone(const ThermalZone& thermalZone) {
   bool result = setPointer(OS_SetpointManager_SingleZone_Humidity_MaximumFields::ControlZoneName, thermalZone.handle());
   return result;
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:4,代码来源:SetpointManagerSingleZoneHumidityMaximum.cpp


注:本文中的ThermalZone类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。