Skip to content

Fout gevonden in DHW profielen #304

Description

@BasDekker-Zenmo

Fout gevonden in genereren van DHW tapprofielen door Claude tijdens het maken van de documentatie.

Prompt:
I want you to write documentation about how the domestic hot water tapping consumption profiles were obtained, generated, and what assumptions are taken to create the domestic hot water tapping consumption profiles. Write this documentation in an existing markdown file "Domestic hot water tapping profiles.md" in folder "lux-docs\docs\loader\data_Generic". Read other markdown files in "lux-docs\docs" and https://docs.lux.energy/, using Claude in Chrome, to fit the writing of this new part of documentation with the current existing documentation. I have used the application DHWcalc_2_02b.exe to generate my DHW tap profiles. Explore how this application works and the documentation of this specific tool in the folder "data_Generic\WeatherAndEPEX-data\DHW\DHW-calc". Understand these to write our documentation. In DHWcalc_2_02b.exe, I set the following settings: DHW standard distibutions for Probability during the day, selected Step function for months and I have clicked default in the new window, assumption that the total mean daily draw-off volume per person in a household consumes 40 liters per day, so 2 person is 80L, 3 persons is 120L, 4p is 160L, and 5p is 200L. However, to generate different multiple DHW tap profiles, the total mean daily draw-off volume per person had to be varied slightly. Therefore, a series range was set for the total mean daily draw-off volume. A list of all assumptions per generated profile can be found in folders "1p_DHW", "1p_DHW", "3p_DHW", "4p_DHW", and "5p_DHW" in folder "data_Generic\WeatherAndEPEX-data\DHW\DHW_Profiles". The individual profiles are put together in excel worksheet "dhw_profiles.xlsx". The original excel was generated using create_dhw_excel.py. The original profiles are in liters per quarter-hour but had to be converted to kWh to be able to load them into our model. Therefore, the soil temperature data was obtained from KNMI and the data can be found in "bodemtemp_260.txt". The assumption is taken that DHW temperature is 60 degrees Celsius to convert the profiles to kWh.

Claude:
The raw DHWcalc profiles are in litres/hour per 15-min step, but create_dhw_excel.py treats them as litres per quarter-hour, making dhw_profiles.xlsx ~4× too high. How should I handle this?

Me:
Reask this question before I can decide but first tell me how you would fix the script.

Claude:
The fix is a one-line change in create_dhw_excel.py, in the loop that reads each profile (step 2):
python# Current:
profile_data = data[profile].values

Fixed: DHWcalc output is a mean flow rate in litres/hour for each 15-min time step. Divide by 4 to get the tapped volume in litres per step.

profile_data = data[profile].values / 4.0

Nothing else needs to change: the dhw_profiles_literquarterhour sheet then truly contains litres per quarter-hour, and the kWh conversion (V × cp × (60 − T_ground) / 3600) automatically becomes correct since it already expects litres. After the fix I'd rerun the script to regenerate dhw_profiles.xlsx.
Sanity check of the result: a 1-person profile would total ~835 kWh/year (typical for NL) instead of the current ~3,340 kWh/year.

Me:
Reask this question but I need to know why you this that the raw DHWcalc output is in litres/hour even though Im using a 15-min step. Why would this be wrong?

Claude:
Three independent reasons, all from your own files:

  1. The manual says so explicitly. Manual §4 "Output Files" (p. 19): "The file Filename_DHW.txt contains a value for a DHW flow rate in litre/hour for each time step in the duration chosen." And §2.1: "The profile consist of an integer value of the flow rate in litre/hour for each time step." The time step length only determines how many values the file has and how long each flow rate lasts — it doesn't change the unit. A flow of X L/h sustained for 15 min (0.25 h) delivers X × 0.25 litres.
  2. DHWcalc's own daily sums confirm it. 1p_DHW_1_sum.txt (which the manual defines as daily draw-off volumes in litres) lists day 1 = 59 L. The first 96 values (day 1) of 1p_DHW_1_DHW.txt sum to 236 — exactly 4 × 59. If the values were already litres per quarter-hour, those two numbers would match directly.
  3. The annual total only matches your setting after ÷4. You set 39 L/day for 1p_DHW_1. The raw annual sum is 57,494 → that would be 157.5 L/day if read as litres. Divided by 4: 14,373 L/year = 39.4 L/day — matching the log file. Same for 5p: raw 292,000/4 = 73,000 L/year = exactly 200 L/day.
    A plausibility check too: the largest value in the file is 572. As a flow rate that's 9.5 L/min (a bathtub tap — category 3, mean 560 L/h in your settings). As litres-per-15-min it would mean a 2,288 L/h draw-off, above the tool's own 1,200 L/h maximum.

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions