ZoneHVACUnitHeater::ZoneHVACUnitHeater(const Model& model,
                     Schedule & availabilitySchedule,
                                       HVACComponent & supplyAirFan,
                     HVACComponent & heatingCoil)
  : ZoneHVACComponent(ZoneHVACUnitHeater::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACUnitHeater_Impl>());

  bool ok = setAvailabilitySchedule(availabilitySchedule);
     
  if (!ok) 
  {
    remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                << availabilitySchedule.briefDescription() << ".");
  }

  ok = setSupplyAirFan(supplyAirFan);
  OS_ASSERT(ok);

  ok = setHeatingCoil(heatingCoil);
  OS_ASSERT(ok);

  autosizeMaximumSupplyAirFlowRate();

  setFanControlType("OnOff");

  setMinimumHotWaterFlowRate(0.0);

  setHeatingConvergenceTolerance(0.001);

  setString(OS_ZoneHVAC_UnitHeaterFields::AvailabilityManagerListName,"");
}
Beispiel #2
0
FanOnOff::FanOnOff(const Model& model,
                   Schedule& availabilitySchedule,
                   Curve& fanPowerRatioFunctionofSpeedRatioCurve,
                   Curve& fanEfficiencyRatioFunctionofSpeedRatioCurve
                  )

  : StraightComponent(FanOnOff::iddObjectType(),model)
  {
    OS_ASSERT(getImpl<detail::FanOnOff_Impl>());

    setAvailabilitySchedule(availabilitySchedule);

    bool ok = setFanEfficiency(0.6);
    OS_ASSERT(ok);
    setPressureRise(300);
    autosizeMaximumFlowRate();
    ok = setMotorEfficiency(0.8);
    OS_ASSERT(ok);
    ok = setMotorInAirstreamFraction(1.0);
    OS_ASSERT(ok);

    ok = setFanPowerRatioFunctionofSpeedRatioCurve(fanPowerRatioFunctionofSpeedRatioCurve);
    OS_ASSERT(ok);

    ok = setFanEfficiencyRatioFunctionofSpeedRatioCurve(fanEfficiencyRatioFunctionofSpeedRatioCurve);
    OS_ASSERT(ok);
  }
CoilHeatingElectric::CoilHeatingElectric(const Model& model, Schedule & schedule )
  : StraightComponent(CoilHeatingElectric::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::CoilHeatingElectric_Impl>());

  setAvailabilitySchedule(schedule);
}
Beispiel #4
0
FanOnOff::FanOnOff(const Model& model, Schedule& availabilitySchedule)
  : StraightComponent(FanOnOff::iddObjectType(),model)
  {
    OS_ASSERT(getImpl<detail::FanOnOff_Impl>());

    setAvailabilitySchedule(availabilitySchedule);

    bool ok = setFanEfficiency(0.6);
    OS_ASSERT(ok);
    setPressureRise(300);
    autosizeMaximumFlowRate();
    ok = setMotorEfficiency(0.8);
    OS_ASSERT(ok);
    ok = setMotorInAirstreamFraction(1.0);
    OS_ASSERT(ok);

    CurveExponent fanPowerFtSpeedCurve(model);
    fanPowerFtSpeedCurve.setName("Fan On Off Power Curve");
    fanPowerFtSpeedCurve.setCoefficient1Constant(1.0);
    fanPowerFtSpeedCurve.setCoefficient2Constant(0);
    fanPowerFtSpeedCurve.setCoefficient3Constant(0);
    ok = setFanPowerRatioFunctionofSpeedRatioCurve(fanPowerFtSpeedCurve);
    OS_ASSERT(ok);

    CurveCubic fanEfficiencyFtSpeedCurve(model);
    fanEfficiencyFtSpeedCurve.setName("Fan On Off Efficiency Curve");
    fanEfficiencyFtSpeedCurve.setCoefficient1Constant(1.0);
    fanEfficiencyFtSpeedCurve.setCoefficient2x(0.0);
    fanEfficiencyFtSpeedCurve.setCoefficient3xPOW2(0.0);
    fanEfficiencyFtSpeedCurve.setCoefficient4xPOW3(0.0);
    ok = setFanEfficiencyRatioFunctionofSpeedRatioCurve(fanEfficiencyFtSpeedCurve);
    OS_ASSERT(ok);
  }
AirTerminalSingleDuctParallelPIUReheat::AirTerminalSingleDuctParallelPIUReheat( const Model& model,
                                                                                Schedule & schedule,
                                                                                HVACComponent & fan,
                                                                                HVACComponent & reheatCoil )
  : StraightComponent(AirTerminalSingleDuctParallelPIUReheat::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::AirTerminalSingleDuctParallelPIUReheat_Impl>());

  bool test = setAvailabilitySchedule(schedule);
  if (!test) {
    remove();
    LOG_AND_THROW("Could not construct " << briefDescription() << ", because could not set its "
        << "availability schedule to " << schedule.briefDescription() << ".");
  }

  setFan(fan);

  setReheatCoil(reheatCoil);

  autosizeMaximumHotWaterorSteamFlowRate();

  setMinimumHotWaterorSteamFlowRate(0.0);

  setConvergenceTolerance(0.001);

  autosizeMaximumPrimaryAirFlowRate();

  autosizeMaximumSecondaryAirFlowRate();

  autosizeMinimumPrimaryAirFlowFraction();

  autosizeFanOnFlowFraction();
}
ZoneHVACLowTemperatureRadiantElectric::ZoneHVACLowTemperatureRadiantElectric(const Model& model, Schedule & availabilitySchedule, Schedule & heatingTemperatureSchedule)
  : ZoneHVACComponent(ZoneHVACLowTemperatureRadiantElectric::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACLowTemperatureRadiantElectric_Impl>());


  bool ok = setAvailabilitySchedule(availabilitySchedule);
     
  if (!ok) 
  {
    //remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                << availabilitySchedule.briefDescription() << ".");
  }
  
  ok = setHeatingSetpointTemperatureSchedule(heatingTemperatureSchedule);
     
  if (!ok) 
  {
    //remove();
    //LOG_AND_THROW("Unable to set " << briefDescription() << "'s heating temperature schedule to "
    //            << schedule.briefDescription() << ".");
  }
  
  resetRadiantSurfaceType();
  autosizeMaximumElectricalPowertoPanel();
  setTemperatureControlType("MeanAirTemperature");
  setHeatingThrottlingRange(2.0);
  //setString(OS_ZoneHVAC_LowTemperatureRadiant_ElectricFields::HeatingSetpointTemperatureScheduleName,"");
  
}
CoilHeatingDXMultiSpeed::CoilHeatingDXMultiSpeed(const Model& model)
  : StraightComponent(CoilHeatingDXMultiSpeed::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::CoilHeatingDXMultiSpeed_Impl>());

  bool ok = true;
  auto always_on = model.alwaysOnDiscreteSchedule();
  ok = setAvailabilitySchedule( always_on );
  OS_ASSERT(ok);
  setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-8.0);
  ok = setCrankcaseHeaterCapacity(0.0);
  OS_ASSERT(ok);
  ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0);
  OS_ASSERT(ok);
  ok = setMaximumOutdoorDryBulbTemperatureforDefrostOperation(5.0);
  OS_ASSERT(ok);
  ok = setDefrostStrategy("Resistive");
  OS_ASSERT(ok);
  ok = setDefrostControl("OnDemand");
  OS_ASSERT(ok);
  ok = setDefrostTimePeriodFraction(0.058333);
  OS_ASSERT(ok);
  autosizeResistiveDefrostHeaterCapacity();
  setApplyPartLoadFractiontoSpeedsGreaterthan1(false);
  ok = setFuelType("NaturalGas");
  OS_ASSERT(ok);
  ok = setRegionnumberforCalculatingHSPF(4);
  OS_ASSERT(ok);

  auto stageDataList = ModelObjectList(model);
  stageDataList.setName(this->name().get() + " Stage Data List");
  ok = getImpl<detail::CoilHeatingDXMultiSpeed_Impl>()->setStageDataList(stageDataList);
  OS_ASSERT(ok);

}
ZoneHVACEnergyRecoveryVentilator::ZoneHVACEnergyRecoveryVentilator(
  const Model& model,
  const HVACComponent& heatExchanger,
  const HVACComponent& supplyAirFan,
  const HVACComponent& exhaustAirFan
  )
  : ZoneHVACComponent(ZoneHVACEnergyRecoveryVentilator::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACEnergyRecoveryVentilator_Impl>());

  bool ok = true;
  auto alwaysOn = model.alwaysOnDiscreteSchedule();
  ok = setAvailabilitySchedule( alwaysOn );
  OS_ASSERT(ok);
  if ( auto _heatExchanger = heatExchanger.optionalCast<HeatExchangerAirToAirSensibleAndLatent>() ) {
    // The Supply Air Outlet Temperature Control must be "No" in the heat exchanger, otherwise
    // we need to add a Setpoint Manager on the Supply Air Outlet Node of the heat exchanger.
    _heatExchanger->setSupplyAirOutletTemperatureControl( false );
  }
  ok = setHeatExchanger( heatExchanger );
  OS_ASSERT(ok);
  autosizeSupplyAirFlowRate();
  autosizeExhaustAirFlowRate();
  ok = setSupplyAirFan( supplyAirFan );
  OS_ASSERT(ok);
  ok = setExhaustAirFan( exhaustAirFan );
  OS_ASSERT(ok);
  ok = setVentilationRateperUnitFloorArea( 0.000508 );
  OS_ASSERT(ok);
  ok = setVentilationRateperOccupant( 0.00236 );
  OS_ASSERT(ok);
}
CoilHeatingElectric::CoilHeatingElectric(const Model& model)
  : StraightComponent(CoilHeatingElectric::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::CoilHeatingElectric_Impl>());

  auto schedule = model.alwaysOnDiscreteSchedule();
  setAvailabilitySchedule(schedule);
}
FanConstantVolume::FanConstantVolume(const Model& model)
  : StraightComponent(FanConstantVolume::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::FanConstantVolume_Impl>());
  setString(openstudio::OS_Fan_ConstantVolumeFields::MaximumFlowRate,"AutoSize");
  auto s = model.alwaysOnDiscreteSchedule();
  setAvailabilitySchedule(s);
  setEndUseSubcategory("");
}
 bool ControllerMechanicalVentilation_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
   if (modelObject) {
     OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
     if (intermediate) {
       Schedule schedule(*intermediate);
       return setAvailabilitySchedule(schedule);
     }
   }
   return false;
 }
 bool CoilHeatingElectric_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
   if (modelObject) {
     OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
     if (intermediate) {
       Schedule schedule(*intermediate);
       return setAvailabilitySchedule(schedule);
     }
   }
   return false;
 }
 bool EvaporativeCoolerDirectResearchSpecial_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
   if (modelObject) {
     OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
     if (intermediate) {
       Schedule schedule(*intermediate);
       return setAvailabilitySchedule(schedule);
     }
   }
   return false;
 }
 bool FanConstantVolume_Impl::setAvailibiltyScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
   if (modelObject) {
     OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
     if (intermediate) {
       Schedule schedule(*intermediate);
       return setAvailabilitySchedule(schedule);
     }
   }
   return false;
 }
 bool ZoneHVACBaseboardConvectiveElectric_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
   if (modelObject) {
     OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
     if (intermediate) {
       Schedule schedule(*intermediate);
       return setAvailabilitySchedule(schedule);
     }
   }
   return false;
 }
AirTerminalSingleDuctUncontrolled::AirTerminalSingleDuctUncontrolled(const Model& model,
                                                                     Schedule & availabilitySchedule)
  : StraightComponent(AirTerminalSingleDuctUncontrolled::iddObjectType(),model) 
{
  OS_ASSERT(getImpl<detail::AirTerminalSingleDuctUncontrolled_Impl>());

  setString(openstudio::OS_AirTerminal_SingleDuct_UncontrolledFields::MaximumAirFlowRate,"AutoSize" );

  setAvailabilitySchedule(availabilitySchedule);
}
 bool AirTerminalSingleDuctUncontrolled_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
   if (modelObject) {
     OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
     if (intermediate) {
       Schedule schedule(*intermediate);
       return setAvailabilitySchedule(schedule);
     }
   }
   return false;
 }
ControllerMechanicalVentilation::ControllerMechanicalVentilation(const Model& model)
  : ModelObject(ControllerMechanicalVentilation::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ControllerMechanicalVentilation_Impl>());

  Schedule schedule = model.alwaysOnDiscreteSchedule();

  setAvailabilitySchedule(schedule);

  setSystemOutdoorAirMethod("ZoneSum");
}
ZoneHVACBaseboardConvectiveElectric::ZoneHVACBaseboardConvectiveElectric(const Model& model)
  : ZoneHVACComponent(ZoneHVACBaseboardConvectiveElectric::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACBaseboardConvectiveElectric_Impl>());

  autosizeNominalCapacity();

  Schedule schedule = model.alwaysOnDiscreteSchedule();

  setAvailabilitySchedule(schedule);

  setEfficiency(1.0);
}
AirTerminalDualDuctVAVOutdoorAir::AirTerminalDualDuctVAVOutdoorAir(const Model& model)
  : Mixer(AirTerminalDualDuctVAVOutdoorAir::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::AirTerminalDualDuctVAVOutdoorAir_Impl>());

  Schedule sch = model.alwaysOnDiscreteSchedule();
  bool ok = setAvailabilitySchedule(sch);
  if (!ok)
  {
    remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                << sch.briefDescription() << ".");
  }

  autosizeMaximumTerminalAirFlowRate();
  setPerPersonVentilationRateMode("CurrentOccupancy");
  // This is a very OA-centric object, so enabled by default
  setControlForOutdoorAir(true);
}
CoilCoolingDXVariableRefrigerantFlow::CoilCoolingDXVariableRefrigerantFlow(const Model& model)
  : HVACComponent(CoilCoolingDXVariableRefrigerantFlow::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::CoilCoolingDXVariableRefrigerantFlow_Impl>());

  Schedule schedule = model.alwaysOnDiscreteSchedule();
  setAvailabilitySchedule(schedule);

  autosizeRatedTotalCoolingCapacity();

  autosizeRatedSensibleHeatRatio();

  autosizeRatedAirFlowRate();

  CurveBiquadratic vrfTUCoolCapFT(model);
  vrfTUCoolCapFT.setName("VRFTUCoolCapFT");
  vrfTUCoolCapFT.setCoefficient1Constant(5.85884077803259E-02);
  vrfTUCoolCapFT.setCoefficient2x(5.87396532718384E-02);
  vrfTUCoolCapFT.setCoefficient3xPOW2(-2.10274979759697E-04);
  vrfTUCoolCapFT.setCoefficient4y(1.09370473889647E-02);
  vrfTUCoolCapFT.setCoefficient5yPOW2(-0.0001219549);
  vrfTUCoolCapFT.setCoefficient6xTIMESY(-0.0005246615);
  vrfTUCoolCapFT.setMinimumValueofx(15);
  vrfTUCoolCapFT.setMaximumValueofx(23.89);
  vrfTUCoolCapFT.setMinimumValueofy(20);
  vrfTUCoolCapFT.setMaximumValueofy(43.33);
  vrfTUCoolCapFT.setMinimumCurveOutput(0.8083);
  vrfTUCoolCapFT.setMaximumCurveOutput(1.2583);
  setCoolingCapacityRatioModifierFunctionofTemperatureCurve(vrfTUCoolCapFT);

  CurveQuadratic vrfACCoolCapFFF(model);
  vrfACCoolCapFFF.setName("VRFACCoolCapFFF");
  vrfACCoolCapFFF.setCoefficient1Constant(0.8);
  vrfACCoolCapFFF.setCoefficient2x(0.2);
  vrfACCoolCapFFF.setCoefficient3xPOW2(0.0);
  vrfACCoolCapFFF.setMinimumValueofx(0.5);
  vrfACCoolCapFFF.setMaximumValueofx(1.5);
  setCoolingCapacityModifierCurveFunctionofFlowFraction(vrfACCoolCapFFF);
}
CoilHeatingDXVariableRefrigerantFlow::CoilHeatingDXVariableRefrigerantFlow(const Model& model)
  : HVACComponent(CoilHeatingDXVariableRefrigerantFlow::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::CoilHeatingDXVariableRefrigerantFlow_Impl>());

  Schedule schedule = model.alwaysOnDiscreteSchedule();
  setAvailabilitySchedule(schedule);

  autosizeRatedTotalHeatingCapacity();

  autosizeRatedAirFlowRate();

  CurveBiquadratic vrfTUHeatCAPFT(model);
  vrfTUHeatCAPFT.setName( name().get() + " VRFTUHeatCAPFT");
  vrfTUHeatCAPFT.setCoefficient1Constant(0.375443994956127);
  vrfTUHeatCAPFT.setCoefficient2x(6.68190645147821E-02);
  vrfTUHeatCAPFT.setCoefficient3xPOW2(-1.94171026482001E-03);
  vrfTUHeatCAPFT.setCoefficient4y(4.42618420640187E-02);
  vrfTUHeatCAPFT.setCoefficient5yPOW2(-0.0004009578);
  vrfTUHeatCAPFT.setCoefficient6xTIMESY(-0.0014819801);
  vrfTUHeatCAPFT.setMinimumValueofx(21.11);
  vrfTUHeatCAPFT.setMaximumValueofx(27.22);
  vrfTUHeatCAPFT.setMinimumValueofy(-15);
  vrfTUHeatCAPFT.setMaximumValueofy(18.33);
  vrfTUHeatCAPFT.setMinimumCurveOutput(0.6074);
  vrfTUHeatCAPFT.setMaximumCurveOutput(1.0);
  setHeatingCapacityRatioModifierFunctionofTemperatureCurve(vrfTUHeatCAPFT);

  CurveQuadratic vrfACCoolCapFFF(model);
  vrfACCoolCapFFF.setName( name().get() + " VRFACCoolCapFFF");
  vrfACCoolCapFFF.setCoefficient1Constant(0.8);
  vrfACCoolCapFFF.setCoefficient2x(0.2);
  vrfACCoolCapFFF.setCoefficient3xPOW2(0.0);
  vrfACCoolCapFFF.setMinimumValueofx(0.5);
  vrfACCoolCapFFF.setMaximumValueofx(1.5);
  setHeatingCapacityModifierFunctionofFlowFractionCurve(vrfACCoolCapFFF);
}
ZoneHVACLowTempRadiantVarFlow::ZoneHVACLowTempRadiantVarFlow(const Model& model,
                                                             Schedule& availabilitySchedule,
                                                             HVACComponent& heatingCoil,
                                                             HVACComponent& coolingCoil)
                                                             
  : ZoneHVACComponent(ZoneHVACLowTempRadiantVarFlow::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACLowTempRadiantVarFlow_Impl>());

  bool ok = setAvailabilitySchedule(availabilitySchedule);
  
  if (!ok) 
  {
    remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                  << availabilitySchedule.briefDescription() << ".");
  }
  
  ok = setHeatingCoil(heatingCoil);
  OS_ASSERT(ok);

  ok = setCoolingCoil(coolingCoil);
  OS_ASSERT(ok);
}