Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

I would write an EnergyPlus measure to edit each surface to edit the surface objects and add the natural vented cavity to the idf when you run your OpenStudio model. The run portion of the measure would probably look something like this:

# create other side conditions model object
sideConditionModel = "
SurfaceProperty:OtherSideConditionsModel,
    ScreenCavityModel,          ! OtherSideConditionsModel Name
    GapConvectionRadiation;         ! Type of Modeling used to determine Boundary Conditions
    "       
object = OpenStudio::IdfObject::load(sideConditionModel).get
wsObject = workspace.addObject(object)

# get all building surfaces in the starting model
heat_transfer_surfaces = workspace.getObjectsByType("BuildingSurface:Detailed".to_IddObjectType)

surface_names = []

heat_transfer_surfaces.each do |surface|
    # change outside boundary condition based on surface construction name
    construction_name = surface.getString(2)
    if construction_name.match("Ext wall - Insulated metal siding")
        surface.setString(4,"OtherSideConditionsModel")
        surface.setString(5,"ScreenCavityModel")
    end
    # put surface name in array
    surface_name = surface.getString(0)
    surface_names << surface_name
end

naturallyVentedCavity = "
SurfaceProperty:ExteriorNaturalVentedCavity,
    Vented Cavity Exterior Surface,     ! Name
    ScreenCavityModel,      ! OtherSideConditionsModel Object Name
    0.02,                       ! Area Fraction of Openings
    0.9,                        ! Thermal Emissivity of Exterior Baffle Material
    0.92,                       ! Solar Absorbtivity of Exterior Baffle
    0.05,                       ! Height scale for bouyancy-driven ventilation
    0.05,                       ! Effective Thickness of Cavity Behind Exterior Baffle
    0.97,                       ! Ratio of Actual surface area to projected surface area
    Smooth ,                    ! Roughness of collector
    0.1 ,                       ! Cv, Effectiveness for perforations with respect to Wind
    0.5 ,                       ! Cd, Discharge Coefficient for Openings with respect to bouyancy-driven flow
    #{surface_names.join(",")} ;            ! Surface Name
    "   
cavity = OpenStudio::IdfObject::load(naturallyVentedCavity).get
wsCavity = workspace.addObject(cavity)

I would write an EnergyPlus measure to edit each surface to edit the surface objects and add the natural vented cavity to the idf when you run your OpenStudio model. The run portion of the measure would probably look something like this:

# create other side conditions model object
sideConditionModel = "
SurfaceProperty:OtherSideConditionsModel,
    ScreenCavityModel,          ! OtherSideConditionsModel Name
    GapConvectionRadiation;         ! Type of Modeling used to determine Boundary Conditions
    "       
object = OpenStudio::IdfObject::load(sideConditionModel).get
wsObject = workspace.addObject(object)

# get all building surfaces in the starting model
heat_transfer_surfaces = workspace.getObjectsByType("BuildingSurface:Detailed".to_IddObjectType)

surface_names = []

heat_transfer_surfaces.each do |surface|
    # change outside boundary condition based on surface construction name
    construction_name = surface.getString(2)
    if construction_name.match("Ext wall - Insulated metal siding")
        surface.setString(4,"OtherSideConditionsModel")
        surface.setString(5,"ScreenCavityModel")
    end
    # put surface name in array
    surface_name = surface.getString(0)
    surface_names << surface_name
end

naturallyVentedCavity = "
SurfaceProperty:ExteriorNaturalVentedCavity,
    Vented Cavity Exterior Surface,     ! Name
    ScreenCavityModel,      ! OtherSideConditionsModel Object Name
    0.02,                       ! Area Fraction of Openings
    0.9,                        ! Thermal Emissivity of Exterior Baffle Material
    0.92,                       ! Solar Absorbtivity of Exterior Baffle
    0.05,                       ! Height scale for bouyancy-driven ventilation
    0.05,                       ! Effective Thickness of Cavity Behind Exterior Baffle
    0.97,                       ! Ratio of Actual surface area to projected surface area
    Smooth ,                    ! Roughness of collector
    0.1 ,                       ! Cv, Effectiveness for perforations with respect to Wind
    0.5 ,                       ! Cd, Discharge Coefficient for Openings with respect to bouyancy-driven flow
    #{surface_names.join(",")} ;            ! Surface Name
    "   
cavity = OpenStudio::IdfObject::load(naturallyVentedCavity).get
wsCavity = workspace.addObject(cavity)