流量単位変換ツール
L/s、L/min、m³/h、gal/min、ft³/sなどの流量単位を変換します。
| 単位 | 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
よくある質問
コード実装
# 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.