This repository has been archived on 2026-02-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
swift-duct-calc/Sources/ProjectClient/Internal/Room+loadPerRegister.swift
Michael Housh e4ddec0d53
All checks were successful
CI / Linux Tests (push) Successful in 6m32s
feat: Updates to home / landing page.
2026-02-08 19:12:52 -05:00

21 lines
543 B
Swift

import Foundation
import ManualDCore
extension Room {
public func heatingLoadPerRegister(delegatedRooms: [Room]? = nil) -> Double {
(heatingLoad + (delegatedRooms?.totalHeatingLoad ?? 0)) / Double(registerCount)
}
public func coolingSensiblePerRegister(
projectSHR: Double,
delegatedRooms: [Room]? = nil
) throws -> Double {
let sensible =
try coolingLoad.ensured(shr: projectSHR).sensible
+ (delegatedRooms?.totalCoolingSensible(shr: projectSHR) ?? 0)
return sensible / Double(registerCount)
}
}