This project studies a wall-heating concept by solving a steady-state heat equation on many building floorplans. The goal is to understand whether heating the interior walls of a building can produce room temperatures that are warm enough and sufficiently uniform.
Use repository documentation in this order:
README.md— project overview and practical usagedescription/tasks.md— assignment deliverablesdescription/project.md— domain background and mathematical model
The project is based on the Modified Swiss Dwellings dataset, which contains 4571 building floorplans. Each floorplan encodes a building layout with two types of walls:
- inside walls: treated as heated walls at a fixed high temperature
- load-bearing walls: left unheated and kept cold
The idea is to place heating elements inside the interior walls instead of using conventional radiators or underfloor heating. The question is whether this produces acceptable indoor temperatures across a large and varied set of real building geometries.
To keep the model tractable, the problem is formulated in two dimensions.
- inside walls are fixed at 25°C
- load-bearing walls are fixed at 5°C
The task is to compute the resulting steady-state temperature field inside the rooms.
Let
with Dirichlet boundary conditions:
-
$u(x, y) = 5$ on load-bearing walls -
$u(x, y) = 25$ on inside walls
The continuous problem is discretized on a
This is the Jacobi method.
Important details:
- interior room points are updated
- wall points remain fixed at their prescribed temperatures
- points outside the building are not updated
- iteration continues until convergence or a maximum iteration count is reached
Each building is stored as a
{building_id}_domain.npy— initial temperature grid- load-bearing walls are set to 5
- inside walls are set to 25
- all other points start at 0
{building_id}_interior.npy— binary mask for interior room points1means the point should be updated0means the point is a wall or outside the building
After the Jacobi iterations, heat diffuses from the warm walls into the rooms while the cold load-bearing walls keep nearby regions cooler. The result is a smooth temperature field over the building interior.
For each floorplan, the simulation reports four summary statistics:
- mean room temperature
- standard deviation of room temperature
- percentage of room area above 18°C
- percentage of room area below 15°C
These quantities are used to judge whether wall heating is a viable heating strategy.
README.md— project overview and usage guidedescription/project.md— domain background and mathematical modeldescription/tasks.md— assignment tasks and deliverablessrc/— simulation implementationscripts/— batch-job templates for CPU and GPU runsoutputs/— CSV outputs from simulation runsjob_outputs/— batch job stdout and stderr files
The main reference implementation is src/simulate.py. It loads the floorplans, runs the Jacobi solver, and prints CSV-formatted summary statistics.
Use scripts/visualize_inputs.py to inspect the raw inputs for selected buildings. The script saves PNG images with three panels per building:
- domain values
- interior mask
- type map (outside/cold wall/warm wall/interior)
Generate images for the first 3 building IDs:
python scripts/visualize_inputs.py --num 3Generate images for specific IDs:
python scripts/visualize_inputs.py --ids 00001 00042 01000Use a custom data location or output folder:
python scripts/visualize_inputs.py \
--data-dir /dtu/projects/02613_2025/data/modified_swiss_dwellings \
--out-dir outputs/input_vizImages are written to outputs/input_viz/ by default.
Use scripts/visualize_simulation_results.py to run the reference Jacobi solver and save steady-state temperature maps.
Generate result images for 2 floorplans (good starting point for task 3):
python scripts/visualize_simulation_results.py --num 2Generate result images for specific IDs:
python scripts/visualize_simulation_results.py --ids 10000 10009Control solver settings and output location:
python scripts/visualize_simulation_results.py \
--num 2 \
--max-iter 20000 \
--atol 1e-4 \
--out-dir outputs/simulation_vizImages are written to outputs/simulation_viz/ by default.
Use the profiling job when you want to compare solver implementations under the same conditions on the cluster.
- Fixed profiling IDs are stored in
description/profile_subset_ids.txt. - The subset contains 20 buildings and is used for every profiling run.
- The profiling job accepts any solver module/function pair that follows the Jacobi signature used by the reference implementation.
Submit the profiling job with optional overrides for the solver file and function name:
bsub < scripts/CPU_profile_job.sh
bsub < scripts/CPU_profile_job.sh src/simulate_numba_cpu.py jacobiThis writes the raw .lprof file and a readable .txt report into outputs/profiling/.
Submit the CPU job from the project root:
bsub < scripts/template_CPU.shThis writes batch logs to job_outputs/ and CSV output to outputs/.
Submit the GPU job from the project root:
bsub < scripts/template_GPU.sh- batch stdout and stderr:
job_outputs/ - simulation CSV files:
outputs/