UrbanHeatPro.Classes.Simulation
Simulation.py A. Molar-Cruz @ TUM ENS
Module Contents
Classes
Initialize the UrbanHeatPro Simulation object. |
- class UrbanHeatPro.Classes.Simulation.Simulation(NAME, SIMULATION, CITY, SPACE_HEATING, HOT_WATER, REPORTING)[source]
Initialize the UrbanHeatPro Simulation object.
- Parameters:
NAME (str) – The name of the simulation.
SIMULATION (list) – A list containing the simulation parameters.
CITY (list) – A list containing the city parameters.
SPACE_HEATING (list) – A list containing the space heating parameters.
HOT_WATER (list) – A list containing the hot water parameters.
REPORTING (list) – A list containing the reporting options.
- read_raw_building_data()[source]
Reads building data from csv file. Returns a pd.DataFrame. Columns are renamed to variables in UrbanHeatPro.
- read_Tamb()[source]
Reads Tamb data from csv file. The file contains the Tamb values for the whole year in simulation resolution. Only the simulation timesteps are extracted.
- read_I()[source]
Reads solar radiation data from csv file. The file contains I values [W/m2] for the whole year in simulation resolution in the form [I_Gh, I_Dh, I_ex, hs]. Only the simulation timesteps are extracted.
- read_refurbishment_matrices()[source]
Reads refurbishment matrix for residential and non residential buildings for scenario simulated.
- prepare_result_directory(include_date=True)[source]
Creates a time stamped directory within the result folder. Returns path as string.
- read_data_from_csv(my_file, usecols=None)[source]
Uses numpy to read csv file and returns content as numpy array. Two rows of header are always skipped.
- calculate_typical_days()[source]
Calculates typical days based on Tamb timeseries. Based on Nahmmacher et al. (2016), Carpe diem: A novel approach to select representative days for long-term power system modeling.
- calculate_dt_vector()[source]
Calculates a vector of datetime objects based on the raw dt_matrix of the form [Y, M, D, h, m] and the simulation time steps.
- Returns:
self.dt_vector <list> List of datetime objects
- plot_power(space_heating=True, hot_water=True, total=True)[source]
Plot min, max, and mean power values for each time step.
- plot_energy(space_heating=True, hot_water=True, total=True)[source]
Plots histogram of aggregated heat demand for all simulations