Skip to content

Hourly Simulation

Prageeth Jayathissa edited this page May 8, 2017 · 8 revisions

HourSimulation.py

An hourly simulation is the simplest utilisation of this code. We assume that we know:

  • T_air: The outside air temperature
  • T_m_prev: The starting building temperature
  • internal_gains: Internal heat gains, in Watts
  • solar_gains: Solar heat gains after transmitting through the winow [Watts]
  • ill: Illuminance after transmitting through the window [Lumens]
  • occupancy: Occupancy for the timestep [probabilty of full occupancy]

If the solar gains are not known, then they can be calculated using the radiation.py script

Initialise the Building

The building to be studied is then created using the Building() class

my_building = Building(args*)

The arguments here are

  • window_area: Area of the Glazed Surface in contact with the outside [m2]
  • external_envelope_area: Area of all envelope surfaces, including windows in contact with the outside
  • room_depth: Depth of the modeled building [m]
  • room_width: Width of the modeled building [m]
  • room_height: Height of the modeled building [m]
  • lighting_load: Lighting Load [W/m2]
  • lighting_control: Lux threshold at which the lights turn on [Lx]
  • U_walls: U value of opaque surfaces [W/m2K]
  • U_windows: U value of glazed surfaces [W/m2K]
  • ACH_vent: Air changes per hour through ventilation [Air Changes Per Hour]
  • ACH_infl: Air changes per hour through infiltration [Air Changes Per Hour]
  • ventilation_efficiency: The efficiency of the heat recovery system for ventilation. Set to 0 if there is no heat recovery []
  • thermal_capacitance_per_floor_area: Thermal capacitance of the room per floor area [J/m2K]
  • **T_set_heating **: Thermal heating set point [C]
  • T_set_cooling: Thermal cooling set point [C]
  • max_cooling_energy_per_floor_area: Maximum cooling load. Set to -np.inf for unresctricted cooling [C]
  • max_heating_energy_per_floor_area: Maximum heating load per floor area. Set to no.inf for unrestricted heating [C]
  • heatingSupplySystem: The type of heating system. Choices are DirectHeater, ResistiveHeater, HeatPumpHeater. Direct heater has no changes to the heating demand load, a resistive heater takes an efficiency into account, and a HeatPumpHeater calculates a COP based on the outdoor and indoor temperature
  • coolingSupplySystem: The type of cooling system. Choices are DirectCooler HeatPumpCooler. DirectCooler has no changes to the cooling demand load, a HeatPumpCooler calculates a COP based on the outdoor and indoor temperature
  • heatingEmissionSystem: How the heat is distrubuted to the building
  • coolingEmissionSystem: How the cooling energy is distributed to the building

The default settings are

	window_area=4.0,
	external_envelope_area=15.0,
	room_depth=7.0,
	room_width=5.0,
	room_height=3.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,
	heatingSupplySystem=supplySystem.OilBoilerMed,
	coolingSupplySystem=supplySystem.HeatPumpAir,
	heatingEmissionSystem=emissionSystem.NewRadiators,
	coolingEmissionSystem=emissionSystem.AirConditioning,

Solve for Energy and Lighting

Once initialised, you may solve the building for thermal energy demand and lighting demand

#Solve for building energy
my_building.solve_building_energy(internal_gains, solar_gains, T_air, T_m_prev)

#Solve for building lighting
my_building.solve_building_lighting(ill, occupancy)

Extract Results

The results are bound to the Building Object, in this example my_building

my_building.heatingDemand, space heating demand of the building
my_building.heatingSysElectricity, heating electricity consumption
my_building.heatingSysFossils, heating fossil fuel consumption 
my_building.coolingDemand, space cooling demand of the building
my_building.coolingSysElectricity, electricity consumption from cooling
my_building.coolingSysFossils, fossil fuel consumption from cooling
my_building.electricityOut, electricty produced from combined heat pump systems
my_building.sysTotalEnergy, total exergy consumed (electricity + fossils) for heating and cooling
my_building.heatingEnergy, total exergy consumed (electricity + fossils) for heating 
my_building.coolingEnergy, total exergy consumed (electricity + fossils) for cooling
my_building.COP, COP of the heating or cooling system

mybuilding.lighting_demand, Lighting Energy Required for the timestep

Clone this wiki locally