Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple AirLoopHVAC serving the same zone: DSOA is only added the Controller:MechanicalVentilation for the first AirLoopHVAC #3926

Closed
jmarrec opened this issue Mar 20, 2020 · 0 comments · Fixed by #3985

Comments

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 20, 2020

Issue overview

The guilty part is here:

// Add ThermalZone and associated design objects to ControllerMechanicalVentilation.
// This would be done in forwardTranslateControllerMechanicalVentilation except doing it here maintains proper order of the idf file.
boost::optional<model::ControllerMechanicalVentilation> controllerMechanicalVentilation;
boost::optional<IdfObject> _controllerMechanicalVentilation;
if( boost::optional<model::AirLoopHVAC> airLoopHVAC = thermalZone.airLoopHVAC() )
{
if( boost::optional<model::AirLoopHVACOutdoorAirSystem> oaSystem = airLoopHVAC->airLoopHVACOutdoorAirSystem() )
{
model::ControllerOutdoorAir controllerOutdoorAir = oaSystem->getControllerOutdoorAir();
controllerMechanicalVentilation = controllerOutdoorAir.controllerMechanicalVentilation();
}
}
if( controllerMechanicalVentilation )
{
_controllerMechanicalVentilation = translateAndMapModelObject(controllerMechanicalVentilation.get());
}
if( _controllerMechanicalVentilation && _thermalZone )
{
IdfExtensibleGroup eg = _controllerMechanicalVentilation->pushExtensibleGroup();
// Thermal Zone Name
eg.setString(Controller_MechanicalVentilationExtensibleFields::ZoneorZoneListName,_thermalZone->name().get());
// DesignSpecificationOutdoorAir
std::vector<model::Space> spaces = thermalZone.spaces();
if( spaces.size() > 0 )
{
if( boost::optional<model::DesignSpecificationOutdoorAir> designOASpec = spaces.front().designSpecificationOutdoorAir() )
{
if( boost::optional<IdfObject> _designOASpec = translateAndMapModelObject(designOASpec.get()) )
{
eg.setString(Controller_MechanicalVentilationExtensibleFields::DesignSpecificationOutdoorAirObjectName,_designOASpec->name().get());
}
}
}
// DesignSpecificationZoneAirDistributionObjectName
if( _thermalZone && isDSZADTranslated )
{
eg.setString(Controller_MechanicalVentilationExtensibleFields::DesignSpecificationZoneAirDistributionObjectName, dSZADName);
}
}

As you can see, it'll do it for the first airLoopHVAC it finds, not for all of them.

It calls HVACComponent_Impl::airLoopHVAC() whereas it should call ThermalZone::airLoopHVACs() on loop on that

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): all
  • Version of OpenStudio (if using an intermediate build, include SHA): 3.0.0-pre1, d05bc3a

Context

Reported on slack.

@jmarrec jmarrec added Triage Issue needs to be assessed and labeled, further information on reported might be needed component - HVAC component - IDF Translation severity - Normal Bug and removed Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Mar 20, 2020
@tijcolem tijcolem added this to the OpenStudio SDK 3.1.0 milestone May 1, 2020
jmarrec added a commit that referenced this issue May 15, 2020
jmarrec added a commit that referenced this issue May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment