feat: Update room cooling load to accept either total or sensible loads, instead of requiring a total load.

This commit is contained in:
2026-02-05 09:44:37 -05:00
parent 5f03056534
commit 6a764ade2b
14 changed files with 210 additions and 130 deletions

View File

@@ -150,7 +150,12 @@ extension PdfClient {
project: project,
rooms: rooms,
componentLosses: ComponentPressureLoss.mock(projectID: project.id),
ductSizes: .mock(equipmentInfo: equipmentInfo, rooms: rooms, trunks: trunks),
ductSizes: .mock(
equipmentInfo: equipmentInfo,
rooms: rooms,
trunks: trunks,
shr: project.sensibleHeatRatio ?? 0.83
),
equipmentInfo: equipmentInfo,
maxSupplyTEL: equivalentLengths.first { $0.type == .supply }!,
maxReturnTEL: equivalentLengths.first { $0.type == .return }!,

View File

@@ -21,10 +21,9 @@ struct RoomsTable: HTML, Sendable {
tr {
td { room.name }
td { room.heatingLoad.string(digits: 0) }
td { room.coolingTotal.string(digits: 0) }
td { try! room.coolingLoad.ensured(shr: projectSHR).total.string(digits: 0) }
td {
(room.coolingSensible
?? (room.coolingTotal * projectSHR)).string(digits: 0)
try! room.coolingLoad.ensured(shr: projectSHR).sensible.string(digits: 0)
}
td { room.registerCount.string() }
}
@@ -37,10 +36,10 @@ struct RoomsTable: HTML, Sendable {
rooms.totalHeatingLoad.string(digits: 0)
}
td(.class("coolingTotal label")) {
rooms.totalCoolingLoad.string(digits: 0)
try! rooms.totalCoolingLoad(shr: projectSHR).string(digits: 0)
}
td(.class("coolingSensible label")) {
rooms.totalCoolingSensible(shr: projectSHR).string(digits: 0)
try! rooms.totalCoolingSensible(shr: projectSHR).string(digits: 0)
}
td {}
}