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

How to switch from space characteristics assigned per space to using a space type object approach?

asked 2016-06-13 13:15:12 -0500

willyJohan gravatar image

updated 2016-06-13 22:03:30 -0500

Please see this question for some context.

I would like to automatically generate OS:SpaceType objects for each unique set of space descriptors (OS:People, OS:Lights, OS:ElectricEquipment, etc) and then assign the newly created space type object to the appropriate spaces. This would facilitate using OS to show the impact of systems that are currently beyond the capability of CBECC-Com.

I feel like this would be something relatively simple to perform programmatically but I am not much of a programmer.

Bit of a long shot, but if there is some sort work around that accomplishes this (e.g. save in one tool then export and re import or some such) i would love to hear about it.

edit retag flag offensive close merge delete

Comments

will@stok.com, the very first thing I would do is get in touch with the CEC because you are pursuing the exceptional compliance path and my experience is that they take 2-3 months to review it! You don't want to hold up a project simply for energy compliance review. Then beyond this, why are you trying to alter the space type information for compliance? Of the space type information, the only real changes you can make per the code are the LPDs and ventilation rates.

pflaumingo gravatar imagepflaumingo ( 2016-06-14 08:49:11 -0500 )edit

I just saw this question so I get why now. How big is your project? I would suggest you dive into some measure writing if you're wanting to pursue exceptional compliance. If the VRF w/ DOAS measure isn't working, you may be able to alter it so that it assigns a system based off of a naming convention that you use for your spaces/zones rather than the assigned OS:SpaceType.

pflaumingo gravatar imagepflaumingo ( 2016-06-14 08:57:09 -0500 )edit

Thanks pflaumingo, I appreciate the insight into the slowness of the process at the CEC, this is good to know. The project is not huge (~150 spaces) but big enough to be annoying to change the approach manually. On the plus side I am actually just getting a feel for how all the tools play together and do not need to pursue exceptional compliance for this project. I agree that measure writing is likely the best/only way to easily solve this and I hope to familiarize myself with that process soon, but for the time being I was hoping to avoid that.

willyJohan gravatar imagewillyJohan ( 2016-06-14 10:16:53 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-06-14 11:27:29 -0500

will@stok.com, I just answered your previous question to show you how to add a sub space type that makes the measure happy and will run. If however anyone is interested in a measure that will create space types from the characteristics of loads assigned to a space,I did create a start at this for internal uses and would be happy to share that code for someone who wants to take it farther. The basic approach was to normalize most loads per area, but ventilation was left per person if it was setup that way to start with. I then make space type and move the existing load instances to it, assign the space to that space type which results hard assigned space loads being removed. The current form is basic and does a unique space type for every space. Ideally it could use some logic such as name to find all "conference rooms" and using weighted average create a single space type, assuming they have the same operational schedule. I also didn't attempt to look at construction sets, but that would be another next step.

model.getSpaces.each do |space|

  # make a new space type
  space_type = OpenStudio::Model::SpaceType.new(model)
  space_type.setName(space.name.get)

  # move internal loads from space to new space type
  space.people.each do |load|
    if load.numberOfPeople.is_initialized
      target_people_per_area = load.numberOfPeople.get/space.floorArea
      load.peopleDefinition.setPeopleperSpaceFloorArea(target_people_per_area)
    else
      # if setup per area no changes necessary
    end
    load.setSpaceType(space_type)
  end
  space.internalMass.each do |load|
    if load.surfaceArea.is_initialized
      target_area_per_area = load.surfaceArea.get/space.floorArea # doesn't look for zone multiplier
      load.internalMassDefinition.setSurfaceAreaperSpaceFloorArea(target_area_per_area)
    end
    load.setSpaceType(space_type)
  end
  space.lights.each do |load|
    if load.lightingLevel.is_initialized
      target_power_per_area = load.lightingLevel.get/space.floorArea
      load.lightsDefinition.setWattsperSpaceFloorArea(target_power_per_area)
    else
      # if setup per person or area no changes necessary
    end
    load.setSpaceType(space_type)
  end
  space.electricEquipment.each do |load|
    if load.designLevel.is_initialized
      target_power_per_area = load.designLevel.get/space.floorArea
      load.electricEquipmentDefinition.setWattsperSpaceFloorArea(target_power_per_area)
    else
      # if setup per person or area no changes necessary
    end
    load.setSpaceType(space_type)
  end
  space.gasEquipment.each do |load|
    if load.designLevel.is_initialized
      target_power_per_area = load.designLevel.get/space.floorArea
      load.gasEquipmentDefinition.setWattsperSpaceFloorArea(target_power_per_area)
    else
      # if setup per person or area no changes necessary
    end
    load.setSpaceType(space_type)
  end
  space.spaceInfiltrationDesignFlowRates.each do |load|
    # todo - normalize outdoor air per floor area
    load.setSpaceType(space_type)
  end
  if space.designSpecificationOutdoorAir.is_initialized
    load = space.designSpecificationOutdoorAir.get
    # assign outdoor air to space type and reset for space
    # todo - normalize outdoor air per floor area, code below only works in specific cases
    flow_rate = load.outdoorAirFlowRate
    flow_rate_per_floor_area = load.outdoorAirFlowperFloorArea
    load.resetOutdoorAirFlowRate
    load.setOutdoorAirFlowperFloorArea(flow_rate_per_floor_area + flow_rate/space.floorArea)
    space_type.setDesignSpecificationOutdoorAir(load)
    space.resetDesignSpecificationOutdoorAir
  end

  # add space to newly made space type
  space.setSpaceType(space_type)

end
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 



Question Tools

2 followers

Stats

Asked: 2016-06-13 13:15:12 -0500

Seen: 89 times

Last updated: Jun 14 '16