Skip to content

Hourly Simulation

Prageeth Jayathissa edited this page Aug 9, 2020 · 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 Zone

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

my_building = Zone(args*)

The arguments here are

  • window_area: Area of the Glazed Surface in contact with the outside [m2]
  • walls_area: Area of non glazed surfaces to the outside [m2]
  • floor_area: floor area of zone [m2]
  • room_vol: volume of interior zone [m3]
  • total_internal_area: area of all surfaces facing the room. A_t [m2]
  • 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]
  • heating_supply_system: 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
  • cooling_supply_system: 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
  • heating_emission_system: How the heat is distrubuted to the building
  • cooling_emission_system: How the cooling energy is distributed to the building

The default settings are

 window_area=4.0,
 external_envelope_area=15.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=-float("inf"),
 max_heating_energy_per_floor_area=float("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,

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_energy(internal_gains, solar_gains, t_air, t_m_prev)

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

Extract Results

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

  • my_building.heating_demand: space heating demand of the building

  • my_building.heating_sys_electricity: heating electricity consumption

  • my_building.heating_sys_fossils: heating fossil fuel consumption

  • my_building.cooling_demand: space cooling demand of the building

  • my_building.cooling_sys_electricity: electricity consumption from cooling

  • my_building.cooling_sys_fossils: fossil fuel consumption from cooling

  • my_building.electricity_out: electricty produced from combined heat pump systems

  • my_building.sys_total_energy: total exergy consumed (electricity + fossils) for heating and cooling

  • my_building.heating_energy: total exergy consumed (electricity + fossils) for heating

  • my_building.cooling_energy: total exergy consumed (electricity + fossils) for cooling

  • my_building.cop: COP of the heating or cooling system

  • my_building.has_heating_demand: Boolean

  • my_building.has_cooling_demand: Boolean

  • my_building.lighting_demand: lighting demand of the office space in Watts

Clone this wiki locally