def setUp(self): self.gbxml = gbXML(os.path.join(os.path.dirname(__file__), 'input/Single_model.xml')) #self.gbxml = gbXML(os.path.join(os.path.dirname(__file__), 'input/Two_Room_One_Floor_Model.xml')) area = Area() area.createAreaDictionary() area.createWinAreaDictionary() self.areaWinDict = area.getWinDictionary() self.areaDict = area.getDictionary() #self.db = GreenScaleV1(os.path.join(os.path.dirname(__file__), '..\objects')) self.db = os.path.join(os.path.dirname(__file__), '..\objects') #self.db.db_file = 'GreenScaleDBcsv.csv' self.EEspace = GreenscaleSpace() self.duplicates = list() # This is going to have to be optimized for large buildings with many surfaces # Get the first surface to check: spaces = self.gbxml.get_spaces() # Space 1 info, surface "su-8" is [7] and is the interior shared wall here self.space1 = spaces[0] surfaces = spaces[0].surfaces self.surface1 = surfaces[0] # Ext. Wall with window self.surface2 = surfaces[1] # Ext. Wall no openings self.surface3 = surfaces[2] # Ext. Wall with window self.surface4 = surfaces[3] # Ext. Wall with Door self.surface5 = surfaces[4] # Roof self.surface6 = surfaces[5] # Floor
def setUp(self): self.model = GreenScaleV1() self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Single_model.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Two_Room_One_Floor_Model.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Four_Room_Two_Floors_Model.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Fall2013RLMVCRevit_v2_MarcValidation.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Avon.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/L_ShapeFloor.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/FourRoom_with_Zones.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/FourRoomRoundColumn.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/FourRoomSquareColumn.xml') self.model.input_dir = os.path.join(os.path.dirname(__file__), '..\objects') self.db = self.model.input_dir area = Area() area.createAreaDictionary() area.createWinAreaDictionary() self.areaWinDict = area.getWinDictionary() self.areaDict = area.getDictionary() U = GSUtility() devflag = '1' U.setDevFlag(devflag) # Get the surfaces in the space: self.model.run() spaces = self.model.gbxml.get_spaces() self.space1 = spaces[0] self.shade_surfaces = self.model.gbxml.get_shades() surfaces = spaces[0].surfaces
def setUp(self): gbxml = gbXML( os.path.join(os.path.dirname(__file__), 'input/Single_model.xml')) area = Area() area.createAreaDictionary() area.createWinAreaDictionary() self.areaWinDict = area.getWinDictionary() self.areaDict = area.getDictionary() spaces = gbxml.get_spaces() surfaces = spaces[0].surfaces self.surface = Surface() self.surface1 = surfaces[0] self.surface2 = surfaces[1] self.surface3 = surfaces[2] self.surface4 = surfaces[3] self.surface5 = surfaces[4] self.surface6 = surfaces[5] # Create a fake weather self.weather = Weather('Washington', datetime(year=1997, month=1, day=1, hour=3), datetime(year=1997, month=1, day=1, hour=4)) # And a timestep self.tstep2 = datetime(year=1997, month=1, day=1, hour=4) # get the weather at the tstep self.wtstep2 = self.weather.get_weather_step(self.tstep2) # And another timestep self.tstep = datetime(year=1997, month=1, day=1, hour=3) # get the weather at the tstep self.wtstep = self.weather.get_weather_step(self.tstep)
def run(self): """ Main run function """ # Initialize the GBXML self.gbxml = gbXML(self.gbxml) # Get the materials list materials = self.gbxml.get_allMaterials( ) #looks for all material tags in gbxml from Revit AEC database remoteData = wsData( ) #creates a remoteData object that is a wsData type remoteData.getmaterials(materials) # Retrieve the spaces self.spaces = self.gbxml.get_spaces() self.shade_devices = self.gbxml.get_shades( ) # Shade surfaces defined separate from other surfaces area = Area() areaDict = area.getDictionary() areaWinDict = area.getWinDictionary() # For each spaces, calculate Embodied Energy and Embodied Water for a given building EE_spaces = self.buildingEE(self.input_dir, self.shade_devices, areaDict, areaWinDict) #accumulators print(EE_spaces) return None
def setUp(self): self.model = ModelV1() self.model.location = 'Washington' self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Single_model.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Two_Room_One_Floor_Model.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Two_Room_One_Floor_Model.xml') #self.model.gbxml = os.path.join(os.path.dirname(__file__), 'input/Four_Room_Two_Floors_Model.xml') area = Area() area.createAreaDictionary() area.createWinAreaDictionary() self.areaWinDict = area.getWinDictionary() self.areaDict = area.getDictionary() U = GSUtility() devflag = '1' U.setDevFlag(devflag) self.model.Q_total = 0 self.Q_total = self.model.Q_total # Set desired thermal capacitance multiplier, 0.45 for example self.model.Coeff = 1 self.Coeff = self.model.Coeff # Set 0 to ignore shadow factors, set 1 if you do want to include calculations from shadows self.model.ShadowsFlag = 0 # 1 means calculate shadows, 0 means ignore shadows self.ShadowsFlag = self.model.ShadowsFlag self.model.terrain = "Flat or Open Countryside" # User Input Terrain Type self.terrain = self.model.terrain self.model.timestep = 1 self.timestep = self.model.timestep # Need to use version with the year=1997 to pass the Weather Test Cases #self.model.start_date = datetime(year=1997, month=1, day=1, hour=3) #self.model.end_date = datetime(year=1997, month=1, day=1, hour=4) #self.model.start_date = datetime(year=1997, month=1, day=1, hour=0) #self.model.end_date = datetime(year=1997, month=1, day=1, hour=23) self.model.start_date = datetime(year=1997, month=1, day=1, hour=0) self.model.end_date = datetime(year=1997, month=12, day=31, hour=23) self.model.run() spaces = self.model.gbxml.get_spaces() self.space1 = spaces[0] self.temp_record = self.model.gbxml.temp_record self.spaces_dict = self.model.gbxml.spaces_dict self.shgc_dictionary = self.model.gbxml.shgc_dictionary self.shadow_record = self.model.gbxml.shadow_record self.surfaces_dict = self.model.gbxml.surfaces_dict self.shade_surface_total = self.model.gbxml.shade_surface_total self.shade_surf_list = self.model.gbxml.get_shades()
def setUp(self): self.gbxml = gbXML( os.path.join(os.path.dirname(__file__), 'input/Single_model.xml')) #self.gbxml = gbXML(os.path.join(os.path.dirname(__file__), 'input/Four_Room_Two_Floors_Model.xml')) # To test middle interior floor area = Area() area.createAreaDictionary() area.createWinAreaDictionary() self.areaWinDict = area.getWinDictionary() self.areaDict = area.getDictionary() spaces = self.gbxml.get_spaces() surfaces = spaces[0].surfaces self.heat = HeatCalculation() self.temp_record = self.gbxml.temp_record self.spaces_dict = self.gbxml.spaces_dict self.shgc_dictionary = self.gbxml.shgc_dictionary self.shadow_record = self.gbxml.shadow_record self.shade_surf_list = self.gbxml.get_shades() self.surfaces_dict = self.gbxml.surfaces_dict self.space1 = spaces[0] #surfaces1 = spaces[0].surfaces #self.space2 = spaces[1] #surfaces2 = spaces[1].surfaces #self.surface6 = surfaces1[5] # su-6 #self.surface11 = surfaces2[5] # su-11 self.surface1 = surfaces[0] self.surface2 = surfaces[1] self.surface3 = surfaces[2] self.surface4 = surfaces[3] self.surface5 = surfaces[4] self.surface6 = surfaces[5] self.G_space_record = dict() self.G_space_record["sp-1-Room"] = 0 # Create a fake weather self.weather = Weather('Washington', datetime(year=1997, month=1, day=1, hour=3), datetime(year=1997, month=1, day=1, hour=4)) # And a timestep self.tstep2 = datetime(year=1997, month=1, day=1, hour=4) # get the weather at the tstep self.wtstep2 = self.weather.get_weather_step(self.tstep2) # And another timestep self.tstep = datetime(year=1997, month=1, day=1, hour=3) # get the weather at the tstep self.wtstep = self.weather.get_weather_step(self.tstep)