cea.demand package¶
Submodules¶
cea.demand.airconditioning_model module¶
Contains debugged version of HVAC model from [Kämpf2009]
- originally coded by J. Fonseca
- debugged by G. Happle
Note
this is not really true anymore. The procedure now is just loosely based on [Kämpf2009].
[Kämpf2009] | (1, 2, 3, 4) Kämpf, Jérôme Henri On the modelling and optimisation of urban energy fluxes http://dx.doi.org/10.5075/epfl-thesis-4548 |
-
cea.demand.airconditioning_model.
calc_hvac_cooling
(tsd, hoy, gv)[source]¶ Calculate AC air mass flows, energy demand and temperatures For the cooling case for AC systems with demand controlled ventilation air flows (mechanical ventilation) and conditioning of recirculated air (outdoor air flows are not modified)
Parameters: - tsd (Dict[str, numpy.ndarray[numpy.float64]]) – time series data dict
- hoy (int) – time step
- gv (cea.globalvar.GlobalVariables) – global variables
Returns: AC air mass flows, energy demand and temperatures for the cooling case
Return type: Dict[str, numpy.float64]
-
cea.demand.airconditioning_model.
calc_hvac_heating
(tsd, hoy, gv)[source]¶ Calculate AC air mass flows, energy demand and temperatures for the heating case For AC system with demand controlled ventilation air flows (mechanical ventilation) and conditioning of recirculated air (outdoor air flows are not modified)
Parameters: - tsd (Dict[str, numpy.ndarray[numpy.float64]]) – time series data dict
- hoy (int) – time step
- gv (cea.globalvar.GlobalVariables) – global variables
Returns: AC air mass flows, energy demand and temperatures for the heating case
Return type: Dict[str, numpy.float64]
-
cea.demand.airconditioning_model.
calc_w3_cooling_case
(t5, w2, t3, w5)[source]¶ Algorithm 2 Determination of the room’s supply moisture content (w3) for the cooling case from Kaempf’s HVAC model for non-evaporative cooling
Source: [Kämpf2009]
Parameters: t5 (numpy.float64) – temperature 5 in (°C) :param w2 : moisture content 2 in (kg/kg dry air) :type w2: numpy.float64
Parameters: - t3 (numpy.float64) – temperature 3 in (°C)
- w5 (numpy.float64) – moisture content 5 in (kg/kg dry air)
Returns: w3, moisture content of HVAC supply air in (kg/kg dry air)
Return type: numpy.float64
-
cea.demand.airconditioning_model.
calc_w3_heating_case
(t5, w2, w5, t3, gv)[source]¶ Algorithm 1 Determination of the room’s supply moisture content (w3) for the heating case from Kaempf’s HVAC model [Kämpf2009]
Parameters: - t5 (numpy.float64) – temperature 5 in (°C)
- w2 (numpy.float64) – moisture content 2 in (kg/kg dry air)
- w5 (numpy.float64) – moisture content 5 in (kg/kg dry air)
- t3 (numpy.float64) – temperature 3 in (°C)
- gv (cea.globalvar.GlobalVariables) – global variables
Returns: w3, moisture content of HVAC supply air in (kg/kg dry air)
Return type: numpy.float64
cea.demand.control_heating_cooling_systems module¶
-
cea.demand.control_heating_cooling_systems.
cooling_system_is_ac
(bpr)[source]¶ determines whether a building’s heating system is ac or not
Param: bpr: building properties row object Return type: bool
-
cea.demand.control_heating_cooling_systems.
has_cooling_system
(bpr)[source]¶ determines whether a building has a cooling system installed or not
Parameters: bpr – building properties row object Return type: bool
-
cea.demand.control_heating_cooling_systems.
has_heating_system
(bpr)[source]¶ determines whether a building has a heating system installed or not
bpr : building properties row object
Returns: Return type: bool
cea.demand.control_ventilation_systems module¶
-
cea.demand.control_ventilation_systems.
is_economizer_active
(bpr, tsd, t)[source]¶ Control of activity of economizer of mechanical ventilation system Economizer of mechanical ventilation is controlled via zone set point temperatures, indoor air temperature and outdoor air temperature. Economizer is active during cooling season if the indoor air temperature exceeds the set point and the outdoor temperatures are lower than the set point. Economizer increases mechanical ventilation flow rate to the maximum.
Author: Gabriel Happle Date: APR 2017
Parameters: - bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: Economizer ON/OFF status
Return type: bool
-
cea.demand.control_ventilation_systems.
is_mechanical_ventilation_heat_recovery_active
(bpr, tsd, t)[source]¶ Control of activity of heat exchanger of mechanical ventilation system
Author: Gabriel Happle Date: APR 2017
Parameters: - bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: Heat exchanger ON/OFF status
Return type: bool
cea.demand.datacenter_loads module¶
datacenter loads
cea.demand.demand_main module¶
cea.demand.demand_writers module¶
A collection of classes that write out the demand results files. The cea.globalvar.GlobalVariables.demand_writer variable references the DemandWriter to use. The default is HourlyDemandWriter. A MonthlyDemandWriter is provided that sums the values up monthly. See the cea.analysis.sensitivity.sensitivity_demand module for an example of using the MonthlyDemandWriter.
-
class
cea.demand.demand_writers.
DemandWriter
(gv)[source]¶ Bases:
object
This is meant to be an abstract base class: Use the subclasses of this class instead.
Subclasses are expected to:
- set the gv field to a cea.globalvar.GlobalVariables instance in the constructor
- set the vars_to_print field in the constructor (FIXME: describe the vars_to_print structure.
- implement the write_to_csv method
-
class
cea.demand.demand_writers.
HourlyDemandWriter
(gv)[source]¶ Bases:
cea.demand.demand_writers.DemandWriter
Write out the hourly demand results
-
class
cea.demand.demand_writers.
MonthlyDemandWriter
(gv)[source]¶ Bases:
cea.demand.demand_writers.DemandWriter
Write out the monthly demand results
cea.demand.electrical_loads module¶
Electrical loads
-
cea.demand.electrical_loads.
average_appliances_lighting_schedule
(list_uses, schedules, building_uses)[source]¶ Calculate the schedule to use for lighting and appliances based on the building uses from the schedules defined for the project unsing a weighted average.
Parameters: - list_uses (List[str]) – the schedule names for the schedules parameter
- schedules (List[Tuple[List[float], List[float], List[float]]]) – the schedules, one for each name in list_uses. Each schedule is a list of 8760 floats...
- building_uses (Dict[str, float]) – A set of weights for the schedules as they apply to this particular building.
Returns: appliances lighting schedule as a weighted average of the schedules for a specific building.
Return type: numpy.ndarray[numpy.float64]
-
cea.demand.electrical_loads.
calc_Eauxf
(Ll, Lw, Mww, Qcsf, Qcsf_0, Qhsf, Qhsf_0, Qww, Qwwf, Qwwf_0, Tcs_re, Tcs_sup, Ths_re, Ths_sup, Vw, Year, fforma, gv, nf_ag, nfp, sys_e_cooling, sys_e_heating, Ehs_lat_aux, tsd)[source]¶
-
cea.demand.electrical_loads.
calc_Eauxf_cs_dis
(Qcsf, Qcsf0, Imax, deltaP_des, b, ts, tr, cpw)[source]¶
-
cea.demand.electrical_loads.
calc_Eauxf_hs_dis
(Qhsf, Qhsf0, Imax, deltaP_des, b, ts, tr, cpw)[source]¶
-
cea.demand.electrical_loads.
calc_Eauxf_ve
(tsd, gv)[source]¶ calculation of auxiliary electricity consumption of mechanical ventilation and AC fans
Parameters: - tsd (dict) – Time series data of building
- gv – global variables
:type gv :return: electrical energy for fans of mechanical ventilation in [Wh/h] :rtype: float
-
cea.demand.electrical_loads.
calc_Edataf
(schedule, Ed_Wm2, Aef)[source]¶ Calculates the final electricity consumption in data centers.
Parameters: - schedule (ndarray) – The data center schedule as calculated by calc_Ea_El_Edata_Eref_schedule but just for the SERVERROOM portion of the occupancy.
- Ed_Wm2 (float64) – The maximum electrical consumption due to servers per unit of gross floor area (as taken from the building properties / internal loads file)
- Aef (float64) – The floor area with electricity in [m2]
Returns: final electricity consumption in data centers per hour in [W]
Return type: numpy.ndarray[numpy.float64]
-
cea.demand.electrical_loads.
calc_Eint
(tsd, bpr, list_uses, schedules)[source]¶ Calculate final internal electrical loads (without auxiliary loads)
Parameters: - tsd (Dict[str, numpy.ndarray]) – Timestep data
- bpr (cea.demand.thermal_loads.BuildingPropertiesRow) – building properties
- list_uses (list) – The list of uses used in the project
- schedules (List[numpy.ndarray]) – The list of schedules defined for the project - in the same order as list_uses
- building_uses (Dict[str, numpy.ndarray]) – for each use in list_uses, the percentage of that use for this building. Sum of values is 1.0
Returns: tsd with new keys: [‘Eaf’, ‘Elf’, ‘Ealf’, ‘Edataf’, ‘Eref’, ‘Eprof’]
Return type: Dict[str, numpy.ndarray]
-
cea.demand.electrical_loads.
calc_Eprof_schedule
(list_uses, schedules, building_uses)[source]¶ Calculate a weighted average of the schedules as defined in list_uses and schedules, using the weights in building_uses (which is taken from bpr.occupancy).
Parameters: - list_uses (list of str) – the schedule names for the schedules parameter
- schedules (list of list of float) – the schedules, one for each name in list_uses. Each schedule is a list of 8760 floats...
- building_uses (dict of (str, float)) – A set of weights for the schedules as they apply to this particular building.
Returns: A weighted average of the schedules for a specific building.
Return type: numpy.ndarray[numpy.float64]
cea.demand.hotwater_loads module¶
Hotwater load (it also calculates fresh water needs)
-
cea.demand.hotwater_loads.
calc_Qww_dis_ls_nr
(tair, Qww, Lvww_dis, Lvww_c, Y, Qww_0, V, Flowtap, twws, Cpw, Pwater, Bf, te, gv)[source]¶
-
cea.demand.hotwater_loads.
calc_Qww_dis_ls_r
(Tair, Qww, lsww_dis, lcww_dis, Y, Qww_0, V, Flowtap, twws, Cpw, Pwater, gv)[source]¶
-
cea.demand.hotwater_loads.
calc_Qww_schedule
(list_uses, schedules, building_uses)[source]¶ Algoithm to calculate the schedule of Qww use
Parameters: - list_uses –
- schedules –
- building_uses –
-
cea.demand.hotwater_loads.
calc_Qww_st_ls
(T_ext, Ta, Qww, Vww, Qww_dis_ls_r, Qww_dis_ls_nr, gv)[source]¶
-
cea.demand.hotwater_loads.
calc_Qwwf
(Af, Lcww_dis, Lsww_dis, Lvww_c, Lvww_dis, T_ext, Ta, Tww_re, Tww_sup_0, Y, gv, Vww_lpd, Vw_lpd, Occ_m2p, list_uses, schedules, building_uses)[source]¶ This function calculates the distribution heat loss and final energy consumption of domestic hot water. Final energy consumption of dhw includes dhw demand, sensible heat loss in hot water storage tank, and heat loss in the distribution network. :param Af: Conditioned floor area in m2. :param Lcww_dis: Length of dhw usage circulation pipeline in m. :param Lsww_dis: Length of dhw usage distribution pipeline in m. :param Lvww_c: Length of dhw heating circulation pipeline in m. :param Lvww_dis: Length of dhw heating distribution pipeline in m. :param T_ext: Ambient temperature in C. :param Ta: Room temperature in C. :param Tww_re: Domestic hot water tank return temperature in C, this temperature is the ground water temperature, set according to norm. :param Tww_sup_0: Domestic hot water suppply set point temperature. :param vw: specific fresh water consumption in m3/hr*m2. :param vww: specific domestic hot water consumption in m3/hr*m2. :return:
-
cea.demand.hotwater_loads.
calc_disls
(tamb, hotw, Flowtap, V, twws, Lsww_dis, p, cpw, Y, gv)[source]¶
-
cea.demand.hotwater_loads.
calc_mww
(schedule, Vww_lpd, Occ_m2p, Af, Pwater)[source]¶ Algorithm to calculate the hourly mass flow rate of domestic hot water
Parameters: - schedule – hourly DHW demand profile [1/h]
- Vww_lpd – DHW demand per person per day in [L/person/day]
- Occ_m2p – Occupant density in [m2/person]
- Af – Total floor area per building [m2]
- Pwater – water density [kg/m3]
cea.demand.occupancy_model module¶
Query schedules according to database
-
cea.demand.occupancy_model.
calc_occ
(list_uses, schedules, bpr)[source]¶ Calculate the occupancy in number of people for the whole building per timestep.
Parameters: - list_uses (list) – The list of uses used in the project
- schedules (list[ndarray[float]]) – The list of schedules defined for the project - in the same order as list_uses
- bpr (cea.demand.thermal_loads.BuildingPropertiesRow) – The properties of the building to calculate
Returns: Occupancy as number of persons per timestep for the whole building
Return type: ndarray
-
cea.demand.occupancy_model.
calc_occ_schedule
(list_uses, schedules, building_uses)[source]¶ Given schedule data for archetypical building uses, calc_occ_schedule calculates the schedule for a building with possibly a mixed schedule as defined in building_uses using a weighted average approach.
Parameters: - list_uses (list) – The list of uses used in the project
- schedules (list[ndarray[float]]) – The list of schedules defined for the project - in the same order as list_uses
- building_uses (dict[str, float]) – for each use in list_uses, the percentage of that use for this building. Sum of values is 1.0
Returns: Return type: ndarray
cea.demand.rc_model_SIA module¶
-
cea.demand.rc_model_SIA.
calc_f_ic
(a_t, a_m, h_ec)[source]¶ Parameters: - a_t – see
bpr.rc_model['Atot']
- a_m – see
bpr.rc_model['Am']
- h_ec – see
calc_h_ec
Returns: - a_t – see
-
cea.demand.rc_model_SIA.
calc_f_im
(a_t, a_m)[source]¶ Parameters: - a_t – see
bpr.rc_model['Atot']
- a_m – see
bpr.rc_model['Am']
Returns: - a_t – see
-
cea.demand.rc_model_SIA.
calc_f_sc
(a_t, a_m, a_w, h_ec)[source]¶ Parameters: - a_t – see
bpr.rc_model['Atot']
- a_m – see
bpr.rc_model['Am']
- a_w – see
bpr.rc_model['Aw']
- h_ec – see
calc_h_ec
Returns: - a_t – see
-
cea.demand.rc_model_SIA.
calc_f_sm
(a_t, a_m, a_w)[source]¶ Parameters: - a_t – bpr.rc_model[‘Atot’]
- a_m – bpr.rc_model[‘Am’]
- a_w – bpr.rc_model[‘Aw’]
Returns:
-
cea.demand.rc_model_SIA.
calc_h_ac
(a_t)[source]¶ Parameters: a_t – equivalent to bpr.rc_model['Atot']
Returns:
-
cea.demand.rc_model_SIA.
calc_phi_m_tot
(phi_m, phi_a, phi_c, theta_ea, theta_em, theta_ec, h_1, h_2, h_3, h_ec, h_ea, h_em)[source]¶
-
cea.demand.rc_model_SIA.
calc_rc_model_temperatures_cooling
(phi_hc, bpr, tsd, t)[source]¶ This function executes the equations of SIA 2044 R-C-Building-Model to calculate the node temperatures for a given cooling energy demand
:py:func: cea.demand.rc_model_SIA.lookup_f_hc_cv_cooling :py:func: cea.demand.rc_model_SIA.calc_phi_hc_cv :py:func: cea.demand.rc_model_SIA.calc_phi_hc_r :py:func: cea.demand.rc_model_SIA.calc_rc_model_temperatures
Author: Gabriel Happle Date: FEB 2017
Parameters: - phi_hc (float) – Heating or cooling energy demand of building
- bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: R-C-Building-Model node temperatures
Return type: dict
-
cea.demand.rc_model_SIA.
calc_rc_model_temperatures_heating
(phi_hc, bpr, tsd, t)[source]¶ This function executes the equations of SIA 2044 R-C-Building-Model to calculate the node temperatures for a given heating energy demand
:py:func: cea.demand.rc_model_SIA.lookup_f_hc_cv_heating :py:func: cea.demand.rc_model_SIA.calc_phi_hc_cv :py:func: cea.demand.rc_model_SIA.calc_phi_hc_r :py:func: cea.demand.rc_model_SIA.calc_rc_model_temperatures
Author: Gabriel Happle Date: FEB 2017
Parameters: - phi_hc (float) – Heating or cooling energy demand of building
- bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: R-C-Building-Model node temperatures
Return type: dict
-
cea.demand.rc_model_SIA.
calc_rc_model_temperatures_no_heating_cooling
(bpr, tsd, t)[source]¶ Calculates R-C-Model temperatures are calculated with zero heating/cooling power according to SIA 2044 procedure.
:py:func: cea.demand.rc_model_SIA.calc_rc_model_temperatures_no_heating_cooling
Author: Gabriel Happle Date: FEB 2017
Parameters: - bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: R-C-Model node temperatures
Return type: dict
-
cea.demand.rc_model_SIA.
calc_theta_c
(phi_a, phi_c, theta_ea, theta_ec, theta_m, h_1, h_mc, h_ec, h_ea)[source]¶
-
cea.demand.rc_model_SIA.
calc_theta_ea
(m_ve_mech, m_ve_window, m_ve_inf_simple, theta_ve_mech, T_ext)[source]¶
-
cea.demand.rc_model_SIA.
has_cooling_demand
(bpr, tsd, t)[source]¶ This function checks whether the building R-C-Model has a cooling demand according to the procedure in SIA 2044. R-C-Model temperatures are calculated with zero cooling power and checked versus the set-point temperature. Function includes a temperature tolerance according to the precision of the result reporting.
:py:func: cea.demand.rc_model_SIA.calc_rc_model_temperatures_no_heating_cooling
Author: Gabriel Happle Date: FEB 2017
Parameters: - bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: True or False
Return type: bool
-
cea.demand.rc_model_SIA.
has_heating_demand
(bpr, tsd, t)[source]¶ This function checks whether the building R-C-Model has a heating demand according to the procedure in SIA 2044. R-C-Model temperatures are calculated with zero heating power and checked versus the set-point temperature. Function includes a temperature tolerance according to the precision of the result reporting.
:py:func: cea.demand.rc_model_SIA.calc_rc_model_temperatures_no_heating_cooling
Author: Gabriel Happle Date: FEB 2017
Parameters: - bpr (BuildingPropertiesRow) – Building Properties
- tsd (dict) – Time series data of building
- t (int) – time step / hour of the year
Returns: True or False
Return type: bool
cea.demand.rc_model_crank_nicholson_procedure module¶
-
cea.demand.rc_model_crank_nicholson_procedure.
calc_rc_model_demand_heating_cooling
(bpr, tsd, t, gv)[source]¶ Crank-Nicholson Procedure to calculate heating / cooling demand of buildings following the procedure in 2.3.2 in SIA 2044 / Korrigenda C1 zum Merkblatt SIA 2044:2011 / Korrigenda C2 zum Mekblatt SIA 2044:2011
Special procedures for updating ventilation air AC-heated and AC-cooled buildings
Author: Gabriel Happle Date: 01/2017
Parameters: - bpr – building properties row object
- tsd – time series data dict
- t – time step / hour of year [0..8760]
- gv – globalvars
Returns: updates values in tsd
cea.demand.refrigeration_loads module¶
refrigeration loads
cea.demand.sensible_loads module¶
Sensible space heating and space cooling loads EN-13970
-
cea.demand.sensible_loads.
calc_Asol
(t, bpr, gv)[source]¶ This function calculates the effective collecting solar area accounting for use of blinds according to ISO 13790, for the sake of simplicity and to avoid iterations, the delta is calculated based on the last time step.
Parameters: - t – time of the year
- bpr – building properties object
- gv – global variables class
Returns:
-
cea.demand.sensible_loads.
calc_I_rad
(t, tsd, bpr, Rse)[source]¶ This function calculates the solar radiation re-irradiated from a building to the sky according to ISO 13790
Parameters: - t – hour of the year
- tsd – time series dataframe
- bpr – building properties object
- gv – global variables class
Returns: I_rad: vector solar radiation re-irradiated to the sky.
-
cea.demand.sensible_loads.
calc_I_sol
(t, bpr, tsd, gv)[source]¶ This function calculates the net solar radiation (incident -reflected - re-irradiated) according to ISO 13790
Parameters: - t – hour of the year
- bpr – building properties object
- tsd – time series dataframe
- gv – global variables class
Returns: I_sol: vector of net solar radiation to the building I_rad: vector solar radiation re-irradiated to the sky.
-
cea.demand.sensible_loads.
calc_Qhs_Qcs_dis_ls
(tair, text, Qhs, Qcs, tsh, trh, tsc, trc, Qhs_max, Qcs_max, D, Y, SystemH, SystemC, Bf, Lv)[source]¶ calculates distribution losses based on ISO 15316
-
cea.demand.sensible_loads.
calc_hr
(emissivity, theta_ss)[source]¶ This function calculates the external radiative heat transfer coefficient according to ISO 13790
Parameters: - emissivity – emissivity of the considered surface
- theta_ss – delta of temperature between building surface and the sky.
Returns: hr:
cea.demand.space_emission_systems module¶
Space emission systems (heating and cooling) EN 15316-2 prEN 15316-2:2014
-
cea.demand.space_emission_systems.
calc_delta_theta_int_inc_cooling
(cooling_system, control_system)[source]¶ Model of losses in the emission and control system for space heating and cooling.
Correction factor for the heating and cooling setpoints. Extracted from EN 15316-2
(see ceadatabasesCHSystemsemission_systems.xls for valid values for the heating and cooling system values)
T0 means there’s no heating/cooling systems installed, therefore, also no control systems for heating/cooling. In short, when the input system is T0, the output set point correction should be 0.0. So if there is no cooling systems, the setpoint_correction_for_space_emission_systems function input: (T1, T0, T1) (type_hs, type_cs, type_ctrl), return should be (2.65, 0.0), the control system is only specified for the heating system. In another case with no heating systems: input: (T0, T3, T1) return: (0.0, -2.0), the control system is only specified for the heating system.
Parameters: - heating_system (str) – The heating system used. Valid values: T0, T1, T2, T3, T4
- cooling_system (str) – The cooling system used. Valid values: T0, T1, T2, T3
- control_system (str) – The control system used. Valid values: T1, T2, T3, T4 - as defined in the contributors manual under Databases / Archetypes / Building Properties / Mechanical systems. T1 for none, T2 for PI control, T3 for PI control with optimum tuning, and T4 for room temperature control (electromagnetically/electronically).
Returns: two delta T to correct the set point temperature, dT_heating, dT_cooling
Return type: tuple(double, double)
-
cea.demand.space_emission_systems.
calc_delta_theta_int_inc_heating
(heating_system, control_system)[source]¶ Model of losses in the emission and control system for space heating and cooling.
Correction factor for the heating and cooling setpoints. Extracted from EN 15316-2
(see ceadatabasesCHSystemsemission_systems.xls for valid values for the heating and cooling system values)
T0 means there’s no heating/cooling systems installed, therefore, also no control systems for heating/cooling. In short, when the input system is T0, the output set point correction should be 0.0. So if there is no cooling systems, the setpoint_correction_for_space_emission_systems function input: (T1, T0, T1) (type_hs, type_cs, type_ctrl), return should be (2.65, 0.0), the control system is only specified for the heating system. In another case with no heating systems: input: (T0, T3, T1) return: (0.0, -2.0), the control system is only specified for the heating system.
Parameters: - heating_system (str) – The heating system used. Valid values: T0, T1, T2, T3, T4
- cooling_system (str) – The cooling system used. Valid values: T0, T1, T2, T3
- control_system (str) – The control system used. Valid values: T1, T2, T3, T4 - as defined in the contributors manual under Databases / Archetypes / Building Properties / Mechanical systems. T1 for none, T2 for PI control, T3 for PI control with optimum tuning, and T4 for room temperature control (electromagnetically/electronically).
Returns: two delta T to correct the set point temperature, dT_heating, dT_cooling
Return type: tuple(double, double)
-
cea.demand.space_emission_systems.
calc_q_em_ls
(q_em_out, delta_theta_int_inc, theta_int_inc, theta_e_comb, q_em_max)[source]¶ Eq. (8) in [prEN 15316-2:2014]
With modification of capping emission losses at system capacity [Happle 01/2017]
Parameters: - q_em_out – heating power of emission system (W)
- delta_theta_int_inc – delta temperature caused by all losses (K)
- theta_int_inc – equivalent room temperature (°C)
- theta_e_comb – ?comb? outdoor temperature (°C)
Returns:
-
cea.demand.space_emission_systems.
calc_q_em_ls_cooling
(bpr, tsd, hoy)[source]¶ calculation procedure for space emissions losses in the cooling case [prEN 15316-2:2014]
Returns:
-
cea.demand.space_emission_systems.
calc_q_em_ls_heating
(bpr, tsd, hoy)[source]¶ calculation procedure for space emissions losses in the heating case [prEN 15316-2:2014]
Returns:
-
cea.demand.space_emission_systems.
calc_theta_e_comb_cooling
(theta_e, bpr)[source]¶ Eq. (10) in [prEN 15316-2:2014]
Returns:
-
cea.demand.space_emission_systems.
calc_theta_e_comb_heating
(theta_e)[source]¶ Eq. (9) in [prEN 15316-2:2014]
Returns:
-
cea.demand.space_emission_systems.
calc_theta_int_inc
(theta_int_ini, delta_theta_int_inc)[source]¶ Eq. (1) in [prEN 15316-2:2014]
Parameters: theta_int_ini – Returns:
-
cea.demand.space_emission_systems.
get_delta_theta_e_sol
(bpr)[source]¶ Appendix B.7 in [prEN 15316-2:2014]
delta_theta_e_sol = 8K – for medium window fraction or internal loads (e.g. residential) delta_theta_e_sol = 12K – for large window fraction or internal loads (e.g. office)
Parameters: bpr – Returns:
cea.demand.thermal_loads module¶
cea.demand.ventilation_air_flows_detailed module¶
Ventilation according to [DIN-16798-7] and [ISO-9972]
[DIN-16798-7] | Energieeffizienz von Gebäuden - Teil 7: Modul M5-1, M 5-5, M 5-6, M 5-8 – Berechnungsmethoden zur Bestimmung der Luftvolumenströme in Gebäuden inklusive Infiltration; Deutsche Fassung prEN 16798-7:2014 |
[ISO-9972] | Wärmetechnisches Verhalten von Gebäuden – Bestimmung der Luftdurchlässigkeit von Gebäuden – Differenzdruckverfahren (ISO 9972:2015); Deutsche Fassung EN ISO 9972:2015 |
Convention: all temperature inputs in (°C)
-
cea.demand.ventilation_air_flows_detailed.
allocate_default_leakage_paths
(coeff_lea_zone, area_facade_zone, area_roof_zone, height_zone)[source]¶ Allocate default leakage paths according to B.1.3.17 in [1]
Parameters: - coeff_lea_zone – leakage coefficient of zone
- area_facade_zone – facade area of zone (m2)
- area_roof_zone – roof area of zone (m2)
- height_zone – height of zone (m)
Returns: - coeff_lea_path : coefficients of default leakage paths
- height_lea_path : heights of default leakage paths (m)
- orientation_lea_path : orientation index of default leakage paths (-)
-
cea.demand.ventilation_air_flows_detailed.
allocate_default_ventilation_openings
(coeff_vent_zone, height_zone)[source]¶ Allocate default ventilation openings according to B.1.3.13 in [1]
:param coeff_vent_zone : coefficient of ventilation openings of zone :param height_zone : height of zone (m)
Returns: - coeff_vent_path : coefficients of default ventilation opening paths
- height_vent_path : heights of default ventilation opening paths (m)
- orientation_vent_path : orientation index of default ventilation opening paths (-)
-
cea.demand.ventilation_air_flows_detailed.
calc_air_flow_mass_balance
(p_zone_ref, temp_zone, u_wind_10, temp_ext, dict_props_nat_vent, option)[source]¶ Air flow mass balance for iterative calculation according to 6.4.3.9 in [1]
:param p_zone_ref : zone reference pressure (Pa) :param temp_zone : air temperature in ventilation zone (°C) :param u_wind_10 : meteorological wind velocity (m/s) :param temp_ext : exterior air temperature (°C) :param dict_props_nat_vent : dictionary containing natural ventilation properties of zone :param option : ‘minimize’ = returns sum of air mass flows, ‘calculate’ = returns air mass flows
Returns: sum of air mass flows in and out of zone in (kg/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_air_flows
(temp_zone, u_wind, temp_ext, dict_props_nat_vent)[source]¶ Minimization of variable air flows as a function of zone gauge
Parameters: - temp_zone – zone indoor air temperature (°C)
- u_wind – wind velocity (m/s)
- temp_ext – exterior air temperature (°C)
- dict_props_nat_vent – dictionary containing natural ventilation properties of zone
qm_sum_in : total air mass flow rates into zone (kg/h) qm_sum_out : total air mass flow rates out of zone (kg/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_area_window_cros
(dict_windows_building, r_window_arg)[source]¶ Calculate cross-ventilation window area according to the procedure in 6.4.3.5.4.3 in [1]
:param dict_windows_building : dictionary containing information of all windows in building :param r_window_arg : fraction of window opening (-)
Returns: area_window_cros : effective window area for cross ventilation (m2)
-
cea.demand.ventilation_air_flows_detailed.
calc_area_window_free
(area_window_max, r_window_arg)[source]¶ Calculate free window opening area according to 6.4.3.5.2 in [1]
:param area_window_max : area of single operable window (m2) :param r_window_arg : fraction of window opening (-)
Returns: area_window_free : open area of window (m2)
-
cea.demand.ventilation_air_flows_detailed.
calc_area_window_tot
(dict_windows_building, r_window_arg)[source]¶ Calculation of total open window area according to 6.4.3.5.2 in [1]
:param dict_windows_building : dictionary containing information of all windows in building :param r_window_arg : fraction of window opening (-)
Returns: area_window_tot = total open area of windows in building (m2)
-
cea.demand.ventilation_air_flows_detailed.
calc_coeff_lea_zone
(qv_delta_p_lea_ref)[source]¶ Calculate default leakage coefficient of zone according to B.1.3.16 in [1]
Parameters: qv_delta_p_lea_ref – air volume flow rate at reference pressure (m3/h) Returns: coeff_lea_zone : leakage coefficient of zone
-
cea.demand.ventilation_air_flows_detailed.
calc_coeff_vent_zone
(area_vent_zone)[source]¶ Calculate air volume flow coefficient of ventilation openings of zone according to 6.4.3.6.4 in [1]
:param area_vent_zone : total area of ventilation openings of zone (cm2)
:returns coeff_vent_zone : coefficient of ventilation openings of zone
-
cea.demand.ventilation_air_flows_detailed.
calc_delta_p_path
(p_zone_ref, height_path, temp_zone, coeff_wind_pressure_path, u_wind_site, temp_ext)[source]¶ Calculation of indoor-outdoor pressure difference at air path according to 6.4.2.4 in [1]
Parameters: - p_zone_ref – zone reference pressure (Pa)
- height_path – height of ventilation path (m)
- temp_zone – air temperature of ventilation zone in (°C)
- coeff_wind_pressure_path – wind pressure coefficient of ventilation path (-)
- u_wind_site – wind velocity (m/s)
- temp_ext – external air temperature (°C)
Returns: delta_p_path
, pressure difference across ventilation path (Pa)
-
cea.demand.ventilation_air_flows_detailed.
calc_effective_stack_height
(dict_windows_building)[source]¶ Calculation of effective stack height for window ventilation according to 6.4.3.4.1 in [1]
:param dict_windows_building : dictionary containing information of all windows in building
Returns: height_window_stack : effective stack height of windows of building (m)
-
cea.demand.ventilation_air_flows_detailed.
calc_qm_arg
(factor_cros, temp_ext, dict_windows_building, u_wind_10, temp_zone, r_window_arg)[source]¶ Calculation of cross ventilated and non-cross ventilated window ventilation according to procedure in 6.4.3.5.4 in [1]
:param factor_cros : cross ventilation factor [0,1] :param temp_ext : exterior temperature (°C) :param dict_windows_building : dictionary containing information of all windows in building :param u_wind_10 : wind velocity (m/s) :param temp_zone : zone temperature (°C) :param r_window_arg : fraction of window opening (-)
Returns: window ventilation air mass flows in (kg/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_qm_lea
(p_zone_ref, temp_zone, temp_ext, u_wind_site, dict_props_nat_vent)[source]¶ Calculation of leakage infiltration and exfiltration air mass flow as a function of zone indoor reference pressure
Parameters: - p_zone_ref – zone reference pressure (Pa)
- temp_zone – air temperature in ventilation zone (°C)
- temp_ext – exterior air temperature (°C)
- u_wind_site – wind velocity (m/s)
- dict_props_nat_vent – dictionary containing natural ventilation properties of zone
Returns: - qm_lea_in : air mass flow rate into zone through leakages (kg/h)
- qm_lea_out : air mass flow rate out of zone through leakages (kg/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_qm_vent
(p_zone_ref, temp_zone, temp_ext, u_wind_site, dict_props_nat_vent)[source]¶ Calculation of air flows through ventilation openings in the facade
:param p_zone_ref : zone reference pressure (Pa) :param temp_zone : zone air temperature (°C) :param temp_ext : exterior air temperature (°C) :param u_wind_site : wind velocity (m/s) :param dict_props_nat_vent : dictionary containing natural ventilation properties of zone
Returns: - qm_vent_in : air mass flow rate into zone through ventilation openings (kg/h)
- qm_vent_out : air mass flow rate out of zone through ventilation openings (kg/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_qv_delta_p_ref
(n_delta_p_ref, vol_building)[source]¶ Calculate airflow at reference pressure according to 6.3.2 in [2]
Parameters: - n_delta_p_ref – air changes at reference pressure [1/h]
- vol_building – building_volume [m3]
Returns: qv_delta_p_ref : air volume flow rate at reference pressure (m3/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_qv_lea_path
(coeff_lea_path, delta_p_lea_path)[source]¶ Calculate volume air flow of single leakage path according to 6.4.3.6.5 in [1]
Parameters: - coeff_lea_path – coefficient of leakage path
- delta_p_lea_path – pressure difference across leakage path (Pa)
Returns: qv_lea_path : volume flow rate across leakage path (m3/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_qv_vent_path
(coeff_vent_path, delta_p_vent_path)[source]¶ Calculate volume air flow of single ventilation opening path according to 6.4.3.6.4 in [1]
:param coeff_vent_path : ventilation opening coefficient of air path :param delta_p_vent_path : pressure difference across air path (Pa)
Returns: qv_vent_path : air volume flow rate across air path (m3/h)
-
cea.demand.ventilation_air_flows_detailed.
calc_u_wind_site
(u_wind_10)[source]¶ Adjusts meteorological wind velocity to site surroundings according to 6.4.2.2 in [1]
Parameters: u_wind_10 – meteorological wind velocity (m/s) Returns: u_wind_site, site wind velocity (m/s)
-
cea.demand.ventilation_air_flows_detailed.
get_properties_natural_ventilation
(bpr, gv)[source]¶ gdf_geometry_building : GeoDataFrame containing geometry properties of single building gdf_architecture_building : GeoDataFrame containing architecture props of single building :param gv: globalvars :param bpr: building propert row
Returns: dictionary containing natural ventilation properties of zone
-
cea.demand.ventilation_air_flows_detailed.
lookup_coeff_wind_pressure
(height_path, class_shielding, orientation_path, slope_roof, factor_cros)[source]¶ Lookup default wind pressure coefficients for air leakage paths according to B.1.3.3 in [1]
Parameters: - height_path –
- class_shielding –
- orientation_path –
- slope_roof –
- factor_cros –
Returns: wind pressure coefficients (-)
Conventions:
class_shielding = 0 : open terrain class_shielding = 1 : normal class_shielding = 2 : shielded
- orientation_path = 0 : facade facing wind
- 1 : facade not facing wind 2 : roof
- factor_cros = 0 : cross ventilation not possible
- = 1 : cross ventilation possible
cea.demand.ventilation_air_flows_simple module¶
-
cea.demand.ventilation_air_flows_simple.
calc_air_mass_flow_mechanical_ventilation
(bpr, tsd, t)[source]¶ - Calculates mass flow rate of mechanical ventilation at time step t according to ventilation control options and
- building systems properties
Author: Gabriel Happle Date: 01/2017
Parameters: - bpr – Building properties row object
- tsd – Time series data dict
- t – time step [0..8760]
Returns: updates tsd
-
cea.demand.ventilation_air_flows_simple.
calc_air_mass_flow_window_ventilation
(bpr, tsd, t)[source]¶ - Calculates mass flow rate of window ventilation at time step t according to ventilation control options and
- building systems properties
Author: Gabriel Happle Date: 01/2017
Parameters: - bpr – Building properties row object
- tsd – Time series data dict
- t – time step [0..8760]
Returns: updates tsd
-
cea.demand.ventilation_air_flows_simple.
calc_m_ve_leakage_simple
(bpr, tsd, gv)[source]¶ - Calculates mass flow rate of leakage at time step t according to ventilation control options and
- building systems properties
Estimation of infiltration air volume flow rate according to Eq. (3) in DIN 1946-6
Author: Gabriel Happle Date: 01/2017
Parameters: - bpr – Building properties row object
- tsd – Time series data dict
- gv – globalvars
Returns: updates tsd
-
cea.demand.ventilation_air_flows_simple.
calc_m_ve_required
(bpr, tsd)[source]¶ Calculate required outdoor air ventilation rate according to occupancy
Author: Legacy Date: old
Parameters: - bpr – Building properties row object
- tsd – Time series data dict
Returns: updates tsd
-
cea.demand.ventilation_air_flows_simple.
calc_theta_ve_mech
(bpr, tsd, t, gv)[source]¶ - Calculates supply temperature of mechanical ventilation system according to ventilation control options and
- building systems properties
Author: Gabriel Happle Date: 01/2017
Parameters: - bpr – Building properties row object
- tsd – Time series data dict
- t – time step [0..8760]
- gv – globalvars
Returns: updates tsd