🛠️ToolsShed

Flow Rate Converter

Convert between flow rate units: L/s, L/min, m3/h, gal/min, ft3/s, and more.

UnitFlowRateConverter.result
L/s27.7778
L/min1,666.667
L/h100,000
m³/s0.0277778
m³/min1.66667
m³/h100
GPS (UK)6.11026
GPM (US)440.287
GPH (US)26,417.205
CFM58.8578
CFS0.980963
bbl/day (oil)15,095.546

FlowRateConverter.clickToConvert

Preguntas Frecuentes

Implementación de Código

# Flow rate unit converter
# Base unit: liters per second (L/s)

FLOW_UNITS = {
    "L/s":    1,
    "L/min":  1 / 60,
    "L/h":    1 / 3600,
    "m³/s":   1000,
    "m³/min": 1000 / 60,
    "m³/h":   1000 / 3600,
    "mL/s":   0.001,
    "mL/min": 0.001 / 60,
    "ft³/s":  28.316846592,
    "ft³/min": 28.316846592 / 60,
    "gal/s":  3.785411784,
    "gal/min": 3.785411784 / 60,
}

def convert_flow_rate(value: float, from_unit: str, to_unit: str) -> float:
    if from_unit not in FLOW_UNITS or to_unit not in FLOW_UNITS:
        raise ValueError(f"Unknown unit. Supported: {list(FLOW_UNITS.keys())}")
    base = value * FLOW_UNITS[from_unit]
    return base / FLOW_UNITS[to_unit]

# Examples
print(f"1 m³/s = {convert_flow_rate(1, 'm³/s', 'L/s'):.4f} L/s")
print(f"100 L/min = {convert_flow_rate(100, 'L/min', 'gal/min'):.4f} gal/min")
print(f"1 ft³/s = {convert_flow_rate(1, 'ft³/s', 'L/s'):.4f} L/s")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.