def test_HeatingRequired(self): t_out = 10 t_m_prev = 20 # Internal heat gains, in Watts internal_gains = 10 # Solar heat gains after transmitting through the winow, in Watts solar_gains = 2000 # Illuminance after transmitting through the window ill = 44000 # Lumens # Occupancy for the timestep [people/hour/square_meter] occupancy = 0.1 # Set Zone Parameters Office = Zone( window_area=13.5, walls_area=15.19 - 13.5, floor_area=34.3, room_vol=106.33, total_internal_area=142.38, lighting_load=11.7, lighting_control=300, lighting_utilisation_factor=0.45, lighting_maintenance_factor=0.9, u_walls=0.2, u_windows=1.1, ach_vent=1.5, ach_infl=0.5, ventilation_efficiency=0, thermal_capacitance_per_floor_area=165000, t_set_heating=20, t_set_cooling=26, max_cooling_energy_per_floor_area=-12, max_heating_energy_per_floor_area=12, heating_supply_system=supply_system.DirectHeater, cooling_supply_system=supply_system.DirectCooler, heating_emission_system=emission_system.AirConditioning, cooling_emission_system=emission_system.AirConditioning, ) Office.solve_energy(internal_gains, solar_gains, t_out, t_m_prev) Office.solve_lighting(ill, occupancy) self.assertEqual(round(Office.t_m, 2), 20.46) self.assertTrue(Office.has_heating_demand) self.assertEqual(round(Office.energy_demand, 2), 328.09) self.assertEqual(round(Office.heating_sys_electricity, 2), 328.09) self.assertEqual(round(Office.cooling_sys_electricity, 2), 0) self.assertEqual(Office.lighting_demand, 0)
mainPath, 'auxiliary', 'Zurich-Kloten_2013.epw')) # Initialise an instance of the Zone. Empty spaces take on the default # parameters. See ZonePhysics.py to see the default values Office = Zone(window_area=4.0, walls_area=11.0, floor_area=35.0, room_vol=105, total_internal_area=142.0, lighting_load=11.7, lighting_control=300.0, lighting_utilisation_factor=0.45, lighting_maintenance_factor=0.9, u_walls=0.2, u_windows=1.1, ach_vent=1.5, ach_infl=0.5, ventilation_efficiency=0.6, thermal_capacitance_per_floor_area=165000, t_set_heating=20.0, t_set_cooling=26.0, max_cooling_energy_per_floor_area=-np.inf, max_heating_energy_per_floor_area=np.inf, heating_supply_system=supply_system.OilBoilerMed, cooling_supply_system=supply_system.HeatPumpAir, heating_emission_system=emission_system.NewRadiators, cooling_emission_system=emission_system.AirConditioning,) # Define Windows SouthWindow = Window(azimuth_tilt=0, alititude_tilt=90, glass_solar_transmittance=0.7, glass_light_transmittance=0.8, area=4)
os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from building_physics import Zone # Importing Zone Class # Example Inputs t_air = 10 t_m_prev = 22 internal_gains = 10 # Internal heat gains, in Watts # Solar heat gains after transmitting through the winow [Watts] solar_gains = 2000 ill = 44000 # Illuminance after transmitting through the window [Lumens] occupancy = 0.1 # Occupancy for the timestep [people/hour/square_meter] # Initialise an instance of the Zone. Empty brackets take on the # default parameters. See ZonePhysics.py to see the default values Office = Zone() # Solve for Zone energy Office.solve_energy(internal_gains, solar_gains, t_air, t_m_prev) # Solve for Zone lighting Office.solve_lighting(ill, occupancy) print(Office.t_m) # Printing Room Temperature of the medium print(Office.lighting_demand) # Print Lighting Demand print(Office.energy_demand) # Print heating/cooling loads # Example of how to change the set point temperature after running a simulation Office.theta_int_h_set = 20.0
] # Energy required by the supply system to provide HeatingDemand CoolingDemand = [] # Energy surplus of the zone CoolingEnergy = [ ] # Energy required by the supply system to get rid of CoolingDemand IndoorAir = [] OutsideTemp = [] SolarGains = [] COP = [] gain_per_person = 100 # W per person appliance_gains = 14 # W per sqm max_occupancy = 3.0 # Initialise an instance of the Zone. Empty brackets take on the # default parameters. See ZonePhysics.py to see the default values Office = Zone() # Read Weather Data weatherData = epwreader.epwreader( os.path.join(mainPath, 'auxiliary', 'Zurich-Kloten_2013.epw')) # Read Sunposition and Extract Azimuth and Alitutude Angles sunPosition = pd.read_csv(os.path.join(mainPath, 'auxiliary', 'SunPosition.csv'), skiprows=1) altitude = sunPosition.loc[0] azimuth = 180 - sunPosition.loc[1] # Read Occupancy Profile occupancyProfile = pd.read_csv(
roof_area * roof_u_value) / walls_area print(u_walls) # Initialise an instance of the Zone. See ZonePhysics.py to see the default values Office = Zone( window_area=4.0, walls_area=walls_area, floor_area=35.0, room_vol=105, total_internal_area=142.0, lighting_load=11.7, lighting_control=300.0, lighting_utilisation_factor=0.45, lighting_maintenance_factor=0.9, u_walls=u_walls, u_windows=1.1, ach_vent=1.5, ach_infl=0.5, ventilation_efficiency=0.6, thermal_capacitance_per_floor_area=165000, t_set_heating=20.0, t_set_cooling=26.0, max_cooling_energy_per_floor_area=-np.inf, max_heating_energy_per_floor_area=np.inf, ) # Solve for Zone energy Office.solve_energy(internal_gains, solar_gains, t_air, t_m_prev) # Solve for Zone lighting