feat: Adds heat pump heating interpolation.
All checks were successful
CI / Ubuntu (push) Successful in 11m46s
All checks were successful
CI / Ubuntu (push) Successful in 11m46s
This commit is contained in:
@@ -4,7 +4,7 @@ public enum CoolingInterpolation {
|
||||
|
||||
public let elevation: Int?
|
||||
public let summerDesignInfo: DesignInfo.Summer
|
||||
public let coolingLoad: Models.Capacity.Cooling
|
||||
public let coolingLoad: Capacity.Cooling
|
||||
public let systemType: SystemType
|
||||
public let interpolation: InterpolationRequest
|
||||
|
||||
@@ -27,18 +27,18 @@ public enum CoolingInterpolation {
|
||||
|
||||
public let failed: Bool
|
||||
public let failures: [String]?
|
||||
public let interpolatedCapacity: Models.Capacity.Cooling
|
||||
public let interpolatedCapacity: Capacity.Cooling
|
||||
public let excessLatent: Int
|
||||
public let finalCapacityAtDesign: Models.Capacity.Cooling
|
||||
public let finalCapacityAtDesign: Capacity.Cooling
|
||||
public let altitudeDerating: AdjustmentMultiplier?
|
||||
public let capacityAsPercentOfLoad: Models.Capacity.Cooling
|
||||
public let capacityAsPercentOfLoad: Capacity.Cooling
|
||||
public let sizingLimits: SizingLimits.Response
|
||||
|
||||
public init(
|
||||
failures: [String]? = nil,
|
||||
interpolatedCapacity: Models.Capacity.Cooling,
|
||||
interpolatedCapacity: Capacity.Cooling,
|
||||
excessLatent: Int,
|
||||
finalCapacityAtDesign: Models.Capacity.Cooling,
|
||||
finalCapacityAtDesign: Capacity.Cooling,
|
||||
altitudeDerating: AdjustmentMultiplier? = nil,
|
||||
capacityAsPercentOfLoad: Capacity.Cooling,
|
||||
sizingLimits: SizingLimits.Response
|
||||
@@ -55,7 +55,7 @@ public enum CoolingInterpolation {
|
||||
}
|
||||
|
||||
public enum InterpolationRequest: Codable, Equatable, Sendable {
|
||||
case noInterpolation(Models.Capacity.ManufacturersCooling, AdjustmentMultiplier? = nil)
|
||||
case noInterpolation(Capacity.ManufacturersCooling, AdjustmentMultiplier? = nil)
|
||||
case oneWayIndoor(OneWayIndoor)
|
||||
case oneWayOutdoor(OneWayOutdoor)
|
||||
case twoWay(TwoWay)
|
||||
@@ -82,12 +82,12 @@ public enum CoolingInterpolation {
|
||||
|
||||
public struct Capacities: Codable, Equatable, Sendable {
|
||||
|
||||
public let aboveDewpoint: Models.Capacity.ManufacturersContainer
|
||||
public let belowDewpoint: Models.Capacity.ManufacturersContainer
|
||||
public let aboveDewpoint: Capacity.ManufacturersContainer
|
||||
public let belowDewpoint: Capacity.ManufacturersContainer
|
||||
|
||||
public init(
|
||||
aboveDewpoint: Models.Capacity.ManufacturersContainer,
|
||||
belowDewpoint: Models.Capacity.ManufacturersContainer
|
||||
aboveDewpoint: Capacity.ManufacturersContainer,
|
||||
belowDewpoint: Capacity.ManufacturersContainer
|
||||
) {
|
||||
self.aboveDewpoint = aboveDewpoint
|
||||
self.belowDewpoint = belowDewpoint
|
||||
@@ -116,18 +116,18 @@ public enum CoolingInterpolation {
|
||||
|
||||
public struct Capacities: Codable, Equatable, Sendable {
|
||||
|
||||
public let aboveOutdoor: Capacity
|
||||
public let belowOutdoor: Capacity
|
||||
public let aboveOutdoor: CapacityContainer
|
||||
public let belowOutdoor: CapacityContainer
|
||||
|
||||
public init(
|
||||
aboveOutdoor: CoolingInterpolation.OneWayOutdoor.Capacities.Capacity,
|
||||
belowOutdoor: CoolingInterpolation.OneWayOutdoor.Capacities.Capacity
|
||||
aboveOutdoor: CoolingInterpolation.OneWayOutdoor.Capacities.CapacityContainer,
|
||||
belowOutdoor: CoolingInterpolation.OneWayOutdoor.Capacities.CapacityContainer
|
||||
) {
|
||||
self.aboveOutdoor = aboveOutdoor
|
||||
self.belowOutdoor = belowOutdoor
|
||||
}
|
||||
|
||||
public struct Capacity: Codable, Equatable, Sendable {
|
||||
public struct CapacityContainer: Codable, Equatable, Sendable {
|
||||
|
||||
public let outdoorTemperature: Int
|
||||
public let totalCapacity: Int
|
||||
@@ -174,13 +174,13 @@ public enum CoolingInterpolation {
|
||||
public struct CapacityContainer: Codable, Equatable, Sendable {
|
||||
|
||||
public let outdoorTemperature: Int
|
||||
public let aboveDewPoint: Models.Capacity.ManufacturersContainer
|
||||
public let belowDewPoint: Models.Capacity.ManufacturersContainer
|
||||
public let aboveDewPoint: Capacity.ManufacturersContainer
|
||||
public let belowDewPoint: Capacity.ManufacturersContainer
|
||||
|
||||
public init(
|
||||
outdoorTemperature: Int,
|
||||
aboveDewPoint: Models.Capacity.ManufacturersContainer,
|
||||
belowDewPoint: Models.Capacity.ManufacturersContainer
|
||||
aboveDewPoint: Capacity.ManufacturersContainer,
|
||||
belowDewPoint: Capacity.ManufacturersContainer
|
||||
) {
|
||||
self.outdoorTemperature = outdoorTemperature
|
||||
self.aboveDewPoint = aboveDewPoint
|
||||
|
||||
@@ -37,7 +37,6 @@ public enum Capacity {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove.
|
||||
public struct ManufacturersCooling: Codable, Equatable, Sendable {
|
||||
|
||||
public let airflow: Int
|
||||
|
||||
47
Sources/Models/HeatPumpHeatingInterpolation.swift
Normal file
47
Sources/Models/HeatPumpHeatingInterpolation.swift
Normal file
@@ -0,0 +1,47 @@
|
||||
public enum HeatPumpHeatingInterpolation {
|
||||
public struct Request: Codable, Equatable, Sendable {
|
||||
|
||||
public let elevation: Int?
|
||||
public let winterDesignTemperature: Int
|
||||
public let heatLoss: Int
|
||||
public let climateType: SystemType.ClimateType
|
||||
public let capacity: Capacity.HeatPumpHeating
|
||||
|
||||
public init(
|
||||
elevation: Int? = nil,
|
||||
winterDesignTemperature: Int,
|
||||
heatLoss: Int,
|
||||
climateType: SystemType.ClimateType,
|
||||
capacity: Capacity.HeatPumpHeating
|
||||
) {
|
||||
self.elevation = elevation
|
||||
self.winterDesignTemperature = winterDesignTemperature
|
||||
self.heatLoss = heatLoss
|
||||
self.climateType = climateType
|
||||
self.capacity = capacity
|
||||
}
|
||||
}
|
||||
|
||||
public struct Response: Codable, Equatable, Sendable {
|
||||
|
||||
public let altitudeAdjustmentMultiplier: Double?
|
||||
public let balancePointTemperature: Int
|
||||
public let capacityAtDesign: Int
|
||||
public let finalCapacity: Capacity.HeatPumpHeating
|
||||
public let supplementalHeatRequired: Int
|
||||
|
||||
public init(
|
||||
altitudeAdjustmentMultiplier: Double? = nil,
|
||||
balancePointTemperature: Int,
|
||||
capacityAtDesign: Int,
|
||||
finalCapacity: Capacity.HeatPumpHeating,
|
||||
supplementalHeatRequired: Int
|
||||
) {
|
||||
self.altitudeAdjustmentMultiplier = altitudeAdjustmentMultiplier
|
||||
self.balancePointTemperature = balancePointTemperature
|
||||
self.capacityAtDesign = capacityAtDesign
|
||||
self.finalCapacity = finalCapacity
|
||||
self.supplementalHeatRequired = supplementalHeatRequired
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user