WIP: Cleans up ManualDClient and adds some more document strings.
Some checks failed
CI / Linux Tests (push) Failing after 7m3s

This commit is contained in:
2026-01-29 22:56:39 -05:00
parent 9b618d55fa
commit 4f3cc2c7ea
14 changed files with 86 additions and 96 deletions

View File

@@ -97,16 +97,16 @@ func roundSize(_ size: Double) throws -> Int {
}
}
func velocity(cfm: CFM, roundSize: Int) -> Int {
func velocity(cfm: ManualDClient.CFM, roundSize: Int) -> Int {
let cfm = Double(cfm.rawValue)
let roundSize = Double(roundSize)
let velocity = cfm / (pow(roundSize / 24, 2) * 3.14)
return Int(round(velocity))
}
func flexSize(_ cfm: CFM, _ frictionRate: DesignFrictionRate) throws -> Int {
func flexSize(_ cfm: ManualDClient.CFM, _ frictionRate: Double) throws -> Int {
let cfm = pow(Double(cfm.rawValue), 0.4)
let fr = pow(frictionRate.rawValue / 1.76, 0.2)
let fr = pow(frictionRate / 1.76, 0.2)
let size = 0.55 * (cfm / fr)
return try roundSize(size)
}