MaximaLabs
All unit operations

Pipeline simulation

1 inlet -> 1 outlet (Darcy ΔP over a pipe)

Governing equations

The exact equations the solver works for a pipeline — the same math shown in the app's "Theory" panel, not a black box.

ΔP=fLDρv22+ρgLsinθ,f=f(Re,ε/D)\Delta P = f\,\frac{L}{D}\,\frac{\rho v^2}{2} + \rho g L \sin\theta,\quad f = f(\mathrm{Re}, \varepsilon/D)
ReMR=ρv2nDn8n1K(3n+14n)n(Metzner-Reed generalized Reynolds, opt-in rheology_model)\mathrm{Re}_{MR} = \frac{\rho v^{2-n} D^n}{8^{n-1} K \left(\frac{3n+1}{4n}\right)^n}\quad(\text{Metzner-Reed generalized Reynolds, opt-in rheology\_model})
fFanning=16ReMR  (laminar),1f=4n0.75log10 ⁣(ReMRf1n/2)0.4n1.2  (turbulent, Dodge-Metzner)f_{Fanning} = \frac{16}{\mathrm{Re}_{MR}}\;(\text{laminar}),\quad\frac{1}{\sqrt{f}} = \frac{4}{n^{0.75}}\log_{10}\!\left(\mathrm{Re}_{MR}f^{1-n/2}\right) - \frac{0.4}{n^{1.2}}\;(\text{turbulent, Dodge-Metzner})
ΔP\Delta P
pressure drop [Pa]
ff
Darcy friction factor
LL
pipe length [m]
DD
internal diameter [m]
ρ\rho
fluid density [kg/m³]
vv
flow velocity [m/s]
gg
gravitational acceleration
θ\theta
inclination angle — the second term is static head, which can dominate on a hill
Re\mathrm{Re}
Reynolds number
ε/D\varepsilon/D
relative roughness
KK
consistency index [Pa·s^n] (opt-in rheology_model)
nn
flow behavior index [-] — n=1 is Newtonian, n<1 shear-thinning, n>1 shear-thickening
ReMR\mathrm{Re}_{MR}
Metzner-Reed generalized Reynolds number for power-law pipe flow
fFanningf_{Fanning}
Fanning friction factor (the literature convention for these correlations — this codebase's own Darcy-Weisbach ΔP formula above uses f_{Darcy}=4f_{Fanning})

Parameters

diameter [m], length [m]; optional angle_deg, roughness [m], viscosity [Pa·s]. Also usable as a mode='pressure_driven' resistance element (no extra params needed — the same Darcy-Weisbach law is inverted implicitly by that mode's Newton solve). polymer_melt [bool, default False]: when the inlet carries a polymerization reactor's polymer_mwd, derive a real non-Newtonian apparent viscosity instead of the constant 'viscosity' param — optional eta_ref_pa_s + mw_ref_kg_mol [reference melt-viscosity datapoint], mw_scaling_exponent [default 3.4], n [Carreau power-law index, default 0.4], lambda_relax_s [default 1.0], eta_inf_pa_s [default 0], temperature_ref + activation_energy_j_mol [optional Arrhenius T-shift]. rheology_model [one of 'power_law'/'bingham'/'herschel_bulkley', opt-in, mutually exclusive with polymer_melt]: replaces the friction factor itself with the matching generalized (Metzner-Reed/Dodge-Metzner/Buckingham-Reiner) correlation for slurries/suspensions — consistency_index_k [Pa*s^n], flow_behavior_index_n [-, default 1.0], yield_stress_pa [Pa, bingham/herschel_bulkley], plastic_viscosity_pa_s [Pa*s, bingham]

Example flowsheets that use it

Stop fighting legacy software. Build your first flowsheet in 60 seconds.