handling solar thermal water

This commit is contained in:
Khalim Conn-Kowlessar 2024-08-12 20:55:32 +01:00
parent 4b2c4cb0a3
commit b4d8959c16
3 changed files with 20 additions and 3 deletions

View file

@ -1211,6 +1211,11 @@ class Property:
self.hot_water_energy_source = heater_type_to_fuel[self.hotwater["heater_type"]]
else:
fuel = system_type_modification[self.hotwater["system_type"]]
if self.hotwater["extra_features"] == "plus solar":
self.hot_water_energy_source = self.heating_energy_source + " + Solar Thermal"
return
if fuel in ['Main System', "Community Scheme"]:
self.hot_water_energy_source = self.heating_energy_source
else:

View file

@ -274,7 +274,7 @@ class AnnualBillSavings:
return (kwh / cop) * cost_per_kwh
if fuel == "Wood":
if fuel == "Wood Logs":
price_data = cls.FUEL_DATA[cls.FUEL_DATA["Fuel"] == "Pellets (Bagged)"].squeeze()
cost_per_kwh = cls.cost_per_kwh(
price_data["Price (p)"], price_data["Energy Content, Net Calorific value (kWh/unit)"]

View file

@ -28,7 +28,10 @@ DESCRIPTIONS_TO_FUEL_TYPES = {
"Electric immersion, standard tariff": {"fuel": 'Electricity', "cop": 1},
"Portable electric heaters assumed for most rooms": {"fuel": 'Electricity', "cop": 1},
"Boiler and radiators, LPG": {"fuel": 'LPG', "cop": 0.9},
"Room heaters, dual fuel (mineral and wood)": {"fuel": 'Wood', "cop": 1},
"Room heaters, dual fuel (mineral and wood)": {"fuel": 'Wood Logs', "cop": 1},
"Room heaters, mains gas": {"fuel": 'Natural Gas', "cop": 0.9},
"Warm air, mains gas": {"fuel": 'Natural Gas', "cop": 0.9},
"Boiler, mains gas": {"fuel": 'Natural Gas', "cop": 0.9},
}
STARTING_DUMMY_ID_VALUE = -9999
@ -518,12 +521,21 @@ class Recommendations:
mapped = DESCRIPTIONS_TO_FUEL_TYPES[heating_description]
heating_fuel = mapped["fuel"]
if hotwater_description in ["From main system", "From main system, no cylinder thermostat"]:
if hotwater_description in [
"From main system", "From main system, no cylinder thermostat",
]:
return {
"heating_fuel_type": heating_fuel, "hotwater_fuel_type": heating_fuel,
"heating_cop": mapped["cop"], "hotwater_cop": mapped["cop"]
}
if hotwater_description == "From main system, plus solar":
# The fuel is
return {
"heating_fuel_type": heating_fuel, "hotwater_fuel_type": heating_fuel + " + Solar Thermal",
"heating_cop": mapped["cop"], "hotwater_cop": 1
}
mapped_hotwater = DESCRIPTIONS_TO_FUEL_TYPES[hotwater_description]
return {