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.
- pressure drop [Pa]
- Darcy friction factor
- pipe length [m]
- internal diameter [m]
- fluid density [kg/m³]
- flow velocity [m/s]
- gravitational acceleration
- inclination angle — the second term is static head, which can dominate on a hill
- Reynolds number
- relative roughness
- consistency index [Pa·s^n] (opt-in rheology_model)
- flow behavior index [-] — n=1 is Newtonian, n<1 shear-thinning, n>1 shear-thickening
- Metzner-Reed generalized Reynolds number for power-law pipe flow
- 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]