Flow Rate Converter
Convert between flow rate units: L/s, L/min, m3/h, gal/min, ft3/s, and more.
| Unit | FlowRateConverter.result |
|---|---|
| L/s | 27.7778 |
| L/min | 1,666.667 |
| L/h | 100,000 |
| mÂł/s | 0.0277778 |
| mÂł/min | 1.66667 |
| mÂł/h | 100 |
| GPS (UK) | 6.11026 |
| GPM (US) | 440.287 |
| GPH (US) | 26,417.205 |
| CFM | 58.8578 |
| CFS | 0.980963 |
| bbl/day (oil) | 15,095.546 |
FlowRateConverter.clickToConvert
Questions Fréquentes
Implémentation du Code
# 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.