Registry / data / fluids

fluids

JSON →
library1.3.0pypypi✓ verified 85d ago

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.

pip install fluids
INSTALL
IMPORT
SIG · FLUIDS
F
fluids
datapythonv1.3.0
Install
7.8s avg
Import
335ms
Disk
234MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.328s · 235.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.8s · import 0.342s · 226MB
234MB installed
● package 234MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from fluids import *
import fluids
from fluids import *
Star import pulls many names into namespace; use explicit imports instead.
FrictionFactor
from fluids.friction import FrictionFactor
from fluids import FrictionFactor
FrictionFactor is in the friction submodule, not top-level.

Basic usage: compute friction factor and pressure drop.

import fluids from fluids.friction import FrictionFactor # Compute friction factor for turbulent flow (Colebrook) Re = 100000.0 # Reynolds number roughness = 0.0015 # relative roughness e/D ff = FrictionFactor(Re=Re, roughness=roughness, Method='Colebrook') print(f'Friction factor: {ff}') # Compute pressure drop in a pipe dP = fluids.core.dP_from_f(fd=ff, L=100.0, D=0.1, rho=1000.0, V=2.0) print(f'Pressure drop: {dP} Pa')
Debug
Known issues
breakingIn 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.
fix
Use numpy>=2.0 compatible code; update scipy usage to 1.14 patterns.
affects: >=1.0.26
breakingVersion 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.
fix
Check the changelog for renamed functions and update calls accordingly.
affects: >=1.1.0
deprecatedThe `fluids.geometry` module is mostly deprecated in favor of more specific modules. Functions moved to `fluids.piping` or `fluids.tanks`.
fix
Use imports from `fluids.piping`, `fluids.tanks`, etc.
affects: all
gotchaUnit conventions: Many functions expect SI units (m, kg, Pa, etc.). Mixing units (e.g., bar instead of Pa) leads to incorrect results without error.
fix
Always convert to SI units before calling fluids functions.
affects: all
gotchaFriction factor functions (e.g., `FrictionFactor`) return Darcy-Weisbach friction factor, not Fanning. If using Fanning, divide by 4.
fix
Check that you are using the correct friction factor type for your calculation.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'fluids.core'
Importing `fluids.core` directly is incorrect; core functions are exposed via `fluids` or submodules.
fix
Use `import fluids` then `fluids.dP_from_f(...)` or `from fluids import dP_from_f`.
AttributeError: module 'fluids' has no attribute 'FrictionFactor'
FrictionFactor is not in the top-level namespace; it's in fluids.friction.
fix
Change import to `from fluids.friction import FrictionFactor`.
ImportError: cannot import name 'HasNumericData' from 'fluids'
In version 1.0.0, HasNumericData was renamed or moved. Old import pattern is broken.
fix
Use `from fluids.constants import HasNumericData` or remove dependency; check documentation.
TypeError: FrictionFactor() got an unexpected keyword argument 'Method'
In older versions, the argument was `method` (lowercase). Changed to `Method` in newer versions.
fix
Use lowercase `method` if using version <1.0.26; or upgrade and use `Method`.
ValueError: Unknown method '' for function FrictionFactor
Empty or invalid method string; must be one of the known methods (e.g., 'Colebrook', 'Blasius').
fix
Specify a valid method or omit to use default.
Upgrade
Version history
1.3.0latest on PyPI · released Oct 25, 2025
Audit
Dependencies
scipyrequiredRequired for numerical methods and interpolation
numpyrequiredRequired for array operations
fluids-corerequiredCore data files for fluids
Agent activity
2 hits · last 30 days
node
2
Resources
fluids — pip install fluids · libregistry