{"id":23096,"library":"fluids","title":"fluids","description":"Fluid dynamics component of the Chemical Engineering Design Library (ChEDL). Provides correlations for fluid properties, friction factors, pipe flow, pumps, valves, fittings, separators, two-phase flow, and more. Current version 1.3.0. Release cadence is irregular, with major updates every 1-2 years.","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/CalebBell/fluids","tags":["fluid-dynamics","chemical-engineering","pipe-flow","friction-factor","two-phase-flow"],"install":[{"cmd":"pip install fluids","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for numerical methods and interpolation","package":"scipy","optional":false},{"reason":"Required for array operations","package":"numpy","optional":false},{"reason":"Core data files for fluids","package":"fluids-core","optional":false}],"imports":[{"note":"Star import pulls many names into namespace; use explicit imports instead.","wrong":"from fluids import *","symbol":"from fluids import *","correct":"import fluids"},{"note":"FrictionFactor is in the friction submodule, not top-level.","wrong":"from fluids import FrictionFactor","symbol":"FrictionFactor","correct":"from fluids.friction import FrictionFactor"}],"quickstart":{"code":"import fluids\nfrom fluids.friction import FrictionFactor\n# Compute friction factor for turbulent flow (Colebrook)\nRe = 100000.0  # Reynolds number\nroughness = 0.0015  # relative roughness e/D\nff = FrictionFactor(Re=Re, roughness=roughness, Method='Colebrook')\nprint(f'Friction factor: {ff}')\n# Compute pressure drop in a pipe\ndP = fluids.core.dP_from_f(fd=ff, L=100.0, D=0.1, rho=1000.0, V=2.0)\nprint(f'Pressure drop: {dP} Pa')","lang":"python","description":"Basic usage: compute friction factor and pressure drop."},"warnings":[{"fix":"Use numpy>=2.0 compatible code; update scipy usage to 1.14 patterns.","message":"In version 1.0.26, compatibility with numpy 2.0 and scipy 1.14 was added. Code that relied on older numpy/scipy APIs may break if upgrade to 1.0.26+ without updating.","severity":"breaking","affected_versions":">=1.0.26"},{"fix":"Check the changelog for renamed functions and update calls accordingly.","message":"Version 1.1.0 removed deprecated methods and renamed several functions. Code using old names like `K_from_f` (now `K_from_f` still works? check) may break.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Use imports from `fluids.piping`, `fluids.tanks`, etc.","message":"The `fluids.geometry` module is mostly deprecated in favor of more specific modules. Functions moved to `fluids.piping` or `fluids.tanks`.","severity":"deprecated","affected_versions":"all"},{"fix":"Always convert to SI units before calling fluids functions.","message":"Unit conventions: Many functions expect SI units (m, kg, Pa, etc.). Mixing units (e.g., bar instead of Pa) leads to incorrect results without error.","severity":"gotcha","affected_versions":"all"},{"fix":"Check that you are using the correct friction factor type for your calculation.","message":"Friction factor functions (e.g., `FrictionFactor`) return Darcy-Weisbach friction factor, not Fanning. If using Fanning, divide by 4.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import fluids` then `fluids.dP_from_f(...)` or `from fluids import dP_from_f`.","cause":"Importing `fluids.core` directly is incorrect; core functions are exposed via `fluids` or submodules.","error":"ModuleNotFoundError: No module named 'fluids.core'"},{"fix":"Change import to `from fluids.friction import FrictionFactor`.","cause":"FrictionFactor is not in the top-level namespace; it's in fluids.friction.","error":"AttributeError: module 'fluids' has no attribute 'FrictionFactor'"},{"fix":"Use `from fluids.constants import HasNumericData` or remove dependency; check documentation.","cause":"In version 1.0.0, HasNumericData was renamed or moved. Old import pattern is broken.","error":"ImportError: cannot import name 'HasNumericData' from 'fluids'"},{"fix":"Use lowercase `method` if using version <1.0.26; or upgrade and use `Method`.","cause":"In older versions, the argument was `method` (lowercase). Changed to `Method` in newer versions.","error":"TypeError: FrictionFactor() got an unexpected keyword argument 'Method'"},{"fix":"Specify a valid method or omit to use default.","cause":"Empty or invalid method string; must be one of the known methods (e.g., 'Colebrook', 'Blasius').","error":"ValueError: Unknown method '' for function FrictionFactor"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}