feat: Adds furnace heating interpolations.
All checks were successful
CI / Ubuntu (push) Successful in 11m23s

This commit is contained in:
2025-03-13 11:49:32 -04:00
parent bd33827e53
commit 5f6d2a7b6c
6 changed files with 170 additions and 8 deletions

View File

@@ -159,6 +159,51 @@ struct ManualSTests {
}
}
@Test
func furnaceInterpolation() async throws {
try await withDependencies {
$0.manualS = .liveValue
} operation: {
@Dependency(\.manualS) var manualS
let response = try await manualS.furnaceInterpolation(
.init(
elevation: nil,
winterDesignTemperature: 5,
heatLoss: 49667,
inputRating: 60000,
afue: 96
)
)
#expect(response.failed == false)
#expect(response.capacityAsPercentOfLoad == 116)
#expect(response.outputCapacity == 57600)
}
}
@Test
func furnaceInterpolation_with_oversizedFurnace() async throws {
try await withDependencies {
$0.manualS = .liveValue
} operation: {
@Dependency(\.manualS) var manualS
let response = try await manualS.furnaceInterpolation(
.init(
elevation: nil,
winterDesignTemperature: 5,
heatLoss: 49667,
inputRating: 160_000,
afue: 96
)
)
#expect(response.failed)
#expect(response.failures == ["Oversizing failure."])
}
}
@Test
func balancePoint() async throws {
try await withDependencies {