Ejemplo n.º 1
0
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,"");
}
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);
}
Ejemplo n.º 3
0
 bool ZoneHVACUnitHeater_Impl::setSupplyAirFanAsModelObject(const boost::optional<ModelObject>& modelObject) 
 {
   if (modelObject) 
 {
     OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
     if (intermediate) 
   {
       HVACComponent HVACComponent(*intermediate);
       return setSupplyAirFan(HVACComponent);
     }
   }
   return false;
 }
  ModelObject ZoneHVACEnergyRecoveryVentilator_Impl::clone(Model model) const
  {
    auto cloneObject = ZoneHVACComponent_Impl::clone(model).cast<ZoneHVACEnergyRecoveryVentilator>();

    auto const supplyFanClone = supplyAirFan().clone(model).cast<HVACComponent>();
    cloneObject.setSupplyAirFan(supplyFanClone);

    auto const exhaustFanClone = exhaustAirFan().clone(model).cast<HVACComponent>();
    cloneObject.setExhaustAirFan(exhaustFanClone);

    auto const heatExchangerClone = heatExchanger().clone(model).cast<HVACComponent>();
    cloneObject.setHeatExchanger(heatExchangerClone);

    if (auto const controllerObj = controller()) {
      auto const controllerClone = controllerObj->clone(model).cast<ZoneHVACEnergyRecoveryVentilatorController>();
      cloneObject.setController(controllerClone);
    }

    return cloneObject;
  }