Hagen–Poiseuille pipe flow: radial equation, boundary conditions, profile, flow rate
DefinitionMathematicsOfWater_PipeFlowDefinitions for steady, axially symmetric, pressure-driven flow of a Newtonian fluid in a straight cylindrical pipe (Lecture 15, slides 13–16). Parameters: viscosity , pipe length , pressure drop , pipe diameter ; the velocity is axial, , depending only on the distance to the axis.
- Radial equation
SatisfiesRadialStokesODE η L Δp R v: for every , and are differentiable at and
- Pipe flow
IsPipeFlow η L Δp d v: satisfies the radial equation on , is bounded on (""), is continuous at the wall from inside, and (no slip). - Poiseuille profile
poiseuilleProfile η L Δp d: . - Flow rate
flowRate d v: . - Average velocity
averageVelocity d v: .
Formalization Note The radial equation is the form obtained on slide 15 after integrating the momentum balance along the pipe; the pressure field itself is not modelled.
import Mathlib
namespace MathematicsOfWater
open Real
/-- The steady radial momentum balance for axial flow `v(r)` in a cylindrical pipe
(Lecture 15, slides 14–15):
`(1/r) d/dr (r dv/dr) = -Δp / (η L)` at every radius `0 < r < R`,
together with the differentiability needed for the two derivatives to exist. -/
def SatisfiesRadialStokesODE (η L Δp R : ℝ) (v : ℝ → ℝ) : Prop :=
∀ r ∈ Set.Ioo 0 R,
DifferentiableAt ℝ v r ∧
DifferentiableAt ℝ (fun s => s * deriv v s) r ∧
(1 / r) * deriv (fun s => s * deriv v s) r = -(Δp / (η * L))
/-- Steady pressure-driven (Hagen–Poiseuille) flow in a pipe of diameter `d`, length `L`,
viscosity `η` and pressure drop `Δp = p(0) - p(L)` (Lecture 15, slides 13–16):
the velocity `v(r)` satisfies the radial equation on `0 < r < d/2`, stays finite
(bounded) near the axis, and obeys the no-slip condition `v(d/2) = 0` at the wall,
with `v` continuous at the wall from inside. -/
def IsPipeFlow (η L Δp d : ℝ) (v : ℝ → ℝ) : Prop :=
SatisfiesRadialStokesODE η L Δp (d / 2) v ∧
(∃ M : ℝ, ∀ r ∈ Set.Ioo 0 (d / 2), |v r| ≤ M) ∧
ContinuousWithinAt v (Set.Iio (d / 2)) (d / 2) ∧
v (d / 2) = 0
/-- The parabolic Poiseuille velocity profile
`v(r) = Δp / (4 η L) * (d²/4 - r²)` (Lecture 15, slide 16). -/
noncomputable def poiseuilleProfile (η L Δp d : ℝ) (r : ℝ) : ℝ :=
Δp / (4 * η * L) * (d ^ 2 / 4 - r ^ 2)
/-- Volumetric flow rate through the circular cross-section of diameter `d`:
`Q = ∫₀^{d/2} v(r) · 2πr dr` (Lecture 15, slide 16). -/
noncomputable def flowRate (d : ℝ) (v : ℝ → ℝ) : ℝ :=
∫ r in (0 : ℝ)..(d / 2), v r * (2 * π * r)
/-- Average velocity `⟨v⟩ = Q / (π d² / 4)` over the cross-section (Lecture 15, slide 16). -/
noncomputable def averageVelocity (d : ℝ) (v : ℝ → ℝ) : ℝ :=
flowRate d v / (π * d ^ 2 / 4)
end MathematicsOfWater
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — NON-BLIND, same agent as drafter
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted these Lean statements, at the explicit request of the proposal owner. It is not the blind, independent auditor read-back the platform recommends; the author knew the intended meaning while writing it. Reviewers must check it against the Lean code themselves and should not treat it as independent confirmation of faithfulness.
This file defines five objects, all over the real numbers.
-
SatisfiesRadialStokesODEholds iff for every with : is differentiable at ; the function is differentiable at , where is the derivative of at and is taken to be wherever is not differentiable; and . No sign condition is placed on ; if the right-hand side is read as (division by zero returns ); if the condition holds vacuously. -
IsPipeFlowholds iff all four hold: (a)SatisfiesRadialStokesODE; (b) some real satisfies for all ; (c) is continuous at relative to , i.e. as ; (d) . No sign conditions are included here; with parts (a),(b) are vacuous. -
poiseuilleProfileis the function on all of (identically if ). -
flowRate, the oriented interval integral (negated if ; equal to if the integrand is not integrable). -
averageVelocity, equal to when .