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,"");
}
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,"");
  
}
SetpointManagerScheduled::SetpointManagerScheduled(const Model& model,
                                                   Schedule& schedule)
  : SetpointManager(SetpointManagerScheduled::iddObjectType(),model) 
{
  OS_ASSERT(getImpl<detail::SetpointManagerScheduled_Impl>());
  bool ok = setControlVariable("Temperature");
  OS_ASSERT(ok);
  ok = setSchedule(schedule);
  if (!ok) {
    LOG_AND_THROW("Unable to set " << schedule.briefDescription() << " as "
                  << briefDescription() << "'s temperature setpoint schedule.");
  }
}
Example #5
0
ExteriorLights::ExteriorLights(const ExteriorLightsDefinition& definition,
                               Schedule& schedule)
  : ModelObject(ExteriorLights::iddObjectType(),definition.model())
{
  OS_ASSERT(getImpl<detail::ExteriorLights_Impl>());

  bool ok = setExteriorLightsDefinition(definition);
  OS_ASSERT(ok);
  ok = setSchedule(schedule);
  if (!ok) {
    remove();
    LOG_AND_THROW("Could not set " << briefDescription() << "'s schedule to "
                  << schedule.briefDescription() << ".");
  }
}
SetpointManagerScheduled::SetpointManagerScheduled(const Model& model,
                                                   const std::string& controlVariable,
                                                   Schedule& setpointSchedule)
  : SetpointManager(SetpointManagerScheduled::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::SetpointManagerScheduled_Impl>());
  bool ok = setControlVariable(controlVariable);
  if (!ok) {
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s control variable to "
                  << controlVariable << ".");
  }
  ok = setSchedule(setpointSchedule);
  if (!ok) {
    LOG_AND_THROW("Unable to set " << setpointSchedule.briefDescription() << " as "
                  << briefDescription() << "'s " << this->controlVariable()
                  << " setpoint schedule.");
  }
}
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);
}
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);
}