Module: BTAP::Resources::SpaceTypes
- Defined in:
- lib/openstudio-standards/btap/spacetypes.rb
Overview
This module contains methods that relate to Materials, Constructions and Construction Sets
Defined Under Namespace
Classes: SpaceLoadsTests
Class Method Summary collapse
-
.create_merged_space_type(model, spacetype_precentage_array) ⇒ Object
This method will take 2 variables and merge the space types.
-
.create_space_type(model, space_type_name, default_schedule_set, people_load, lighting_load, electric_load, hotwater_load, oa_load, infiltration_load) ⇒ OpenStudio::Model::SpaceType
This method will take 9 variables and returns the space type.
-
.set_wildcard_spacetype_schedules_to_dominant_schedule(model) ⇒ Object
This method will take 1 variable this method will attempt to find the dominant schedule of the surround spaces.
Class Method Details
.create_merged_space_type(model, spacetype_precentage_array) ⇒ Object
This method will take 2 variables and merge the space types.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/openstudio-standards/btap/spacetypes.rb', line 81 def self.create_merged_space_type(model,spacetype_precentage_array) new_spacetype = OpenStudio::Model::SpaceType.new(model) spacetype_precentage_array.each do |spacetype_percentage| spacetype = BTAP::Common::validate_array(model,spacetype_percentage[0],"SpaceType").first spacetype.getDefaultSchedule() spacetype.internalMass() spacetype.people() spacetype.lights() spacetype.luminaires() spacetype.electricEquipment() spacetype.gasEquipment() spacetype.hotWaterEquipment() spacetype.steamEquipment() spacetype.otherEquipment() #A bit more tricky spacetype.designSpecificationOutdoorAir() spacetype.spaceInfiltrationDesignFlowRates() end end |
.create_space_type(model, space_type_name, default_schedule_set, people_load, lighting_load, electric_load, hotwater_load, oa_load, infiltration_load) ⇒ OpenStudio::Model::SpaceType
This method will take 9 variables and returns the space type.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/openstudio-standards/btap/spacetypes.rb', line 62 def self.create_space_type(model,space_type_name,default_schedule_set,people_load,lighting_load,electric_load,hotwater_load,oa_load,infiltration_load) raise("SpaceType #{space_type_name} already exists. Please use a different name") unless model.getSpaceTypeByName(space_type_name).empty? spacetype = OpenStudio::Model::SpaceType.new(model) spacetype.setName(space_type_name) spacetype.setDefaultScheduleSet(default_schedule_set) unless nil == default_schedule_set BTAP::Common::validate_array(model,people_load,"People").first.setSpaceType(spacetype) unless nil == people_load BTAP::Common::validate_array(model,lighting_load,"Lights").first.setSpaceType(spacetype) unless nil == lighting_load BTAP::Common::validate_array(model,electric_load,"ElectricEquipment").first.setSpaceType(spacetype) unless nil == electric_load BTAP::Common::validate_array(model,hotwater_load,"HotWaterEquipment").first.setSpaceType(spacetype) unless nil == hotwater_load spacetype.setDesignSpecificationOutdoorAir(BTAP::Common::validate_array(model,oa_load,"DesignSpecificationOutdoorAir").first) unless nil == oa_load BTAP::Common::validate_array(model,infiltration_load,"SpaceInfiltrationDesignFlowRate").first.setSpaceType(spacetype) unless nil == infiltration_load #puts "Created spacetype #{spacetype.name} in model." return spacetype end |
.set_wildcard_spacetype_schedules_to_dominant_schedule(model) ⇒ Object
This method will take 1 variable this method will attempt to find the dominant schedule of the surround spaces
104 105 106 107 108 109 110 |
# File 'lib/openstudio-standards/btap/spacetypes.rb', line 104 def self.set_wildcard_spacetype_schedules_to_dominant_schedule(model) #1.Find all spaces with wildcard spaces. #2.Iterate through spaces #2.1 Find all adjacent spaces #2.2 Determine dominant space type #2.2 Set the appropriate schedule for occ, lighting, plugs and end |