Demand Profile

heatpro.demand_profile.apply_hourly_pattern(hourly_index: DatetimeIndex, hourly_mapping: dict[int, float]) DataFrame[source]

Provide a DataFrame with correct weight format to disaggregate daily load into hourly load with a daily pattern.

Parameters:
  • hourly_index (pd.DatetimeIndex) – Index

  • hourly_mapping (dict[int,float]) – assiossate to each hour (int between 1 and 24) a weight (sum should equals one)

Returns:

DataFrame weight correct format

Return type:

pd.DataFrame

heatpro.demand_profile.apply_weekly_hourly_pattern(hourly_index: DatetimeIndex, hourly_mapping: dict[tuple[int, int], float]) DataFrame[source]

Provide a DataFrame with correct weight format to disaggregate daily load into hourly load with a hourlt weekly pattern. It is better to have weight sum on 24 hours equals to 1 instead of weight sum equals to 1 over a week because week are note always complete in a month. This can lead to false disaggregation.

Parameters:
  • hourly_index (pd.DatetimeIndex) – Index

  • hourly_mapping (dict[tuple[int,int],float]) – assiossate to each hour and each day of week (int between 1 and 7, int between 1 and 24) a weight (sum should equals one over each day)

Returns:

DataFrame weight correct format

Return type:

pd.DataFrame

heatpro.demand_profile.day_length_proportionnal_weight(dates: DatetimeIndex) DataFrame[source]

Create a Dataframe attributing a weight to each datetime of the index the weight depends only of date and month of the datetime. The weight attributed to each datetime equals day length over month length

Parameters:

dates (pd.DatetimeIndex) – DatetimeIndex (a date can appear multiple times)

Returns:

DataFrame with correct format to be used as weight

Return type:

pd.DataFrame

heatpro.demand_profile.month_length_proportionnal_weight(dates: DatetimeIndex) DataFrame[source]

Create a Dataframe attributing a weight to each datetime of the index the weight depends only of month and year of the datetime. The weight attributed to each datetime equals month length over year length

Parameters:

dates (pd.DatetimeIndex) – DatetimeIndex (a month can appear multiple times)

Returns:

DataFrame with correct format to be used as weight

Return type:

pd.DataFrame

Building Heating

heatpro.demand_profile.building_heating_profile.basic_building_heating_profile(felt_temperature: DataFrame, non_heating_temperature: float, hourly_weight: DataFrame) DataFrame[source]

Create an hourly heating building consumption hourly profile adjusted to felt temperature. With sum over a month equals to 1.

Parameters:
  • felt_temperature (pd.DataFrame) – Hourly felt temperature by building (to take into account inertia between outside cold and heating reactions)

  • non_heating_temperature (float) – Temperature above which felt_temperature does not activate heating

  • hourly_weight (pd.DataFrame) – Initial profile

Raises:

ValueError – felt_temperature and hourly_weight should have same index

Returns:

DataFrame with correct weight format

Return type:

pd.DataFrame

Overview

\[P^{(\text{Heating building,adjusted})}_t = \frac{\max(0,T^{(NH)}-T^{(\text{felt})}_t)\cdot P^{(\text{Heating building,raw})}_t}{\int_{t.month}\max(0,T^{(NH)}-T^{(\text{felt})}_t)\cdot P^{(\text{Heating building,raw})}_t}\]

where:

\(T^{(\text{felt})}_t\) : Felt temperature by buildings different from external temperature because of inertia.

\(T^{(NH)}\) : Temperature above which \(T^{(\text{felt})}_t\) emperature does not activate heating.

\(P^{(\text{Heating building,raw})}_t\) : Raw hourly profile (\(\int_{\text{day})}P^{(\text{Heating building,raw})}_t=1\) but not mandatory because of normalisation)

\(P^{(\text{Heating building,adjusted})}_t\) : Adjusted hourly profile.

\(t\) is an instant (datetime) representing an hour, \(t.month\) is month associated to instant \(t\)

Hot Water

heatpro.demand_profile.hot_water_profile.basic_hot_water_hourly_profile(raw_hourly_hotwater_profile: DataFrame, simultaneity: float, sanitary_loop_coef: float) DataFrame[source]

Create an hourly heating building profile adjusted to simultaneity and sanitary loop coef. With sum over a day equals to 1.

Parameters:
  • raw_hourly_hotwater_profile (pd.DataFrame) – hourly profile sum of heating for hot water production

  • simultaneity (float) – coef between 0 and 1, 1 if consumption is simultaneous (leading to peak) and 0 if no simultaneity (leading to flat consumption)

  • sanitary_loop_coef (float) – share of heat used to keep sanitary loop hot.

Returns:

DataFrame hourly weighted correct format

Return type:

pd.DataFrame

Overview

\[\begin{split}P_{t}^{(\text{Hot water,full adjusted})} = \frac{C^{(SL)}}{\Delta_{day}} + (1-C^{(SL)})\cdot (P_{t}^{(\text{Hot water,simultaneity adjusted})} +\\ 1 - \frac{1}{\Delta_{day}}) \int_{t.day} P_{s}^{(\text{Hot water,simultaneity adjusted})}\end{split}\]

where :

\[P_{t}^{(\text{Hot water,simultaneity adjusted})} = \min(P_{t}^{\text{(Hot water,raw)}},S \cdot \underset{s\in t.day}{\max}P_{t}^{(\text{(Hot water,raw)})})\]

\(S\) : Coefficient between 0 and 1, 1 if consumption is simultaneous (leading to peak) and 0 if no simultaneity (leading to flat consumption)

\(C^{(SL)}\) : Share of heat used to keep sanitary loop hot.

\(\frac{1}{\Delta_{day}} \int_{t.day} P_{s}^{(\text{Hot water,simultaneity adjusted})}\) : Average over a day

\(P_{t}^{\text{(Hot water,raw)}}\) : Raw hourly profile heat consumption (\(\int_{day} P_{t}^{\text{(Hot water,raw)}} = 1\))

heatpro.demand_profile.hot_water_profile.basic_hot_water_monthly_profile(cold_water_temperature: DataFrame, T_prod: float, monthly_HW_weight: DataFrame) DataFrame[source]

Create an monthly heating building profile adjusted to cold water temperature. With sum over a year equals to 1.

Parameters:
  • cold_water_temperature (pd.DataFrame) – Cold water temperature. Can be hourly but not necessary

  • T_prod (float) – Hot water temperature

  • monthly_HW_weight (pd.DataFrame) – Initial month weight (often length proportionnal)

Raises:

ValueError – If some month are not present in both cold_water_temperature and monthly_HW_weight index

Returns:

DataFrame monthly weighted correct format

Return type:

pd.DataFrame

Overview

\[P_{m}^{\text{(Hot water,adjusted)}} = \frac{(T^{(\text{prod})}-\frac{1}{\Delta_m}\int_m T^{(\text{Cold water})}_t)\cdot P_{m}^{(\text{(Hot water,raw))}}}{\int_{m.year}(T^{(\text{prod})}-\frac{1}{\Delta_m}\int_m T^{(\text{Cold water})}_t)\cdot P_{m}^{(\text{(Hot water,raw))}}}\]

where:

\(\frac{1}{\Delta_m}\int_m T^{(\text{Cold water})}_t\) is average cold water (potable water arriving by pipepline) average temperature on month \(m\).

\(T^{(\text{prod})}\) is hot water setpoint temperature.

\(P_{m}^{(\text{(Hot water,raw))}}\) is heat consumption for hot water profile over the years (\(\int_{year}P_{m}^{(\text{(Hot water,raw))}})=1\))

Loss

heatpro.demand_profile.loss_profile.Y_to_H_thermal_loss_profile(temperatures: DataFrame) DataFrame[source]

Create an hourly heating building profile adjusted to districtit heating network temperatures and soil temperature. With sum over a year equals to 1.

Parameters:

temperatures (pd.DataFrame) – hourly temperatures

Returns:

Dataframe correct weight format sum over a year equals to 1.

Return type:

pd.DataFrame

Overview

\[P^{(Loss)}_t = \frac{\frac{T^{(departure)}_t + T^{(return)}_t}{2} - T^{(soil)}_t}{\int_{t.year}\frac{T^{(departure)}_s + T^{(return)}_s}{2} - T^{(soil)}_s}\]

where :

\(T^{(soil)}_t\) : Soil temperature

\(T^{(departure)}_t\) : District heating network departure temperature

\(T^{(return)}_t\) : District heating network return temperature