# Formulas used by the temperature based investment calculation form

When the temperature location is decided, historical temperature data is taken from the database, extracting historical average temperatures at that location.

For all days where the average temperature is below the temperature defining when heating is needed, the heat need is calculated as the difference in average temperature and the temperature below which heating is needed. These sums are shown as "degree*days".

The specified average heating need for the house is divided by the average yearly sum of "degree*days" above. Thus, the factor indicating the heating need curve (amount of heat needed per degree below the temperature defining when heating is needed) is defined.

The calculations on power consumption and COP are done based on the definitions given above, and for the heat pumps. The calculations are basically done in the same way as when calculating the house need curve. For each day in the database, the difference between average temperature and the temperature below which heating is needed is calculated. That value is multiplied with the house curve factor, thus defining the average heating need for the house during that day.

The heating need of the house is summed to the total electrical heating power consumption. It is then compared to the power that can be generated by the specified heat pumps (based for the geothermal heat pump on the value on maximum power, and for the air water pump based on the COP at that days temperature), multiplied with the input power for that days temperature. Based on the pumps maximum power, and their COP at the given temperature, heat pump consumption is determined. If the total power produced by the pumps are not enough for the total power needed, additional heating need is added to the consumption of the pumps, so that the total need of the house can be filled.

For the hot water calculations, same calculations are done, but after the heating need has been taken care of. Thus, if the heat pump can generate more power than needed for heating, that power is compared to the daily hot water need. If it can produce the hot water, its power consumption for hot water production is calculated in the same way as for the heating. If there is not enough power in the heat pump for delivering hot water during the temperature at that day, additional electric heating is added.

When all days are gone through in this way, the data is shown, indicating for the heat pumps how much consumption they have had, how much that has saved compared to the electric heater and compared to each other, and the possibly needed additional heating is also shown. The calculations are thus based on energy needed and energy produced. If the system controls behave in a way making the heat production less efficient, the cost for true production will become higher.

In the end, COP is calculated. The COP is the yearly average COP for the pumps, and the yearly average COP for the total production.

# COP calculation details

For the pumps, the COP is calculated as produced energy divided by consumed energy for all days during the year (including possible extra energy from circvulation pumps), and then the average is given.

The total production COP is calculated based on the total power produced, divided by the heat pump consumption, the circulation pump consumption, and the additional heating needed.

The heat pumps to use in the calculations is defined, either by selecting one of the predefined pumps, or by specifiying the data for such a pump to use in the calculations. For a geothermal pump, the data is simple since the COP is considered constant independent of outside temperature.

For the air water pump, the COP as well as the input power is considered a function of the outside temperature, and is thus defined by a curve, which can at maximum be described as depending on the temperature raised to three (when only using temperature raised to one, a straight curve is defined, when using temperature squared, a bent curve is defined, and when using temperature raised to three a curve with one additional turn can be defined).

# The columns shown in the temperature table

The below descries the columns shown in the temperature table produced after selecting the locatiuon for which to show temperatures.

- The column Decade indicates from which decade the data are coming. The values shown in the other columns are then an average from that decade
- The column "DegreeeNeed*Days" is calculated as the sum of all days in a year where heating is needed, multiplied with the difference in degrees between the maximum temperature at which heating is needed, and the day average temperature. Thus, it gives the total number of degrees needed to heat compensate during a year, for the days needing heating.
- The column "Min Day Average" shows the lowest daily average for a decade.
- The column "daily average outside temperature" shows the average daily temperature during a year
- The column "average heated temperature" shows the average temperature during the days heating is needed