Reynolds number , kinematic viscosity, hydraulic diameter, and dimension exponents
DefinitionReynoldsNumber_coreThe base model for the mission. For real numbers (density), (flow velocity), (characteristic length) and (dynamic viscosity) we set the Reynolds number , the kinematic viscosity , and the hydraulic diameter of a duct of cross-sectional area and wetted perimeter .
For dimensional analysis we record the physical dimension of the monomial through its three exponents in the mass–length–time system, using , , and :
the three entries being the exponents of mass, length and time respectively. The monomial is dimensionless when this triple is .
All four quantities are modelled as plain real numbers; division in Lean is total, so statements that need or carry the corresponding positivity hypotheses explicitly.
import Mathlib.Data.Real.Basic namespace ReynoldsNumber /-- The Reynolds number `Re = ρ u L / μ` of a flow of a fluid of density `rho` and dynamic viscosity `mu`, with flow velocity `u` and characteristic length `L`. -/ noncomputable def Re (rho u L mu : ℝ) : ℝ := rho * u * L / mu /-- The kinematic viscosity `ν = μ / ρ`. -/ noncomputable def kinematicViscosity (mu rho : ℝ) : ℝ := mu / rho /-- The hydraulic diameter `D_H = 4 A / P` of a duct of cross-sectional area `A` and wetted perimeter `P`. -/ noncomputable def hydraulicDiameter (A P : ℝ) : ℝ := 4 * A / P /-- The exponents of mass, length and time in the physical dimension of the monomial `ρ^a u^b L^c μ^d`, read off from `[ρ] = M L⁻³`, `[u] = L T⁻¹`, `[L] = L` and `[μ] = M L⁻¹ T⁻¹`. -/ def dimExponents (a b c d : ℝ) : ℝ × ℝ × ℝ := (a + d, -3 * a + b + c - d, -b - d) /-- The monomial `ρ^a u^b L^c μ^d` is dimensionless exactly when all three of its dimension exponents vanish. -/ def Dimensionless (a b c d : ℝ) : Prop := dimExponents a b c d = (0, 0, 0) end ReynoldsNumber
Read-back
What the Lean code literally says, in plain math · not-an-independent-auditor: self-authored by the drafting agent
⚠ Disclosure — non-blind read-back, written by the drafting agent. This read-back was not produced by an independent blind auditor. It was written by the same agent that drafted this Lean statement, at the explicit instruction of the proposal owner, and the author had full knowledge of the intended meaning and of the source text while writing it. It is therefore not independent testimony and must not be mistaken for one: it is an annotation by the drafter. An independent read-back should be obtained before this item is relied on as a faithfulness check.
What the code literally declares. A Lean file importing all of Mathlib and opening the namespace ReynoldsNumber, containing five declarations over the real numbers:
Re (rho u L mu : ℝ) : ℝ := rho * u * L / mu— a function of four reals returningrho * u * L / mu. Lean's real division is total, soRe rho u L 0 = 0; the declaration itself imposes no hypotheses.kinematicViscosity (mu rho : ℝ) : ℝ := mu / rho— note the argument order: the first argument is divided by the second.hydraulicDiameter (A P : ℝ) : ℝ := 4 * A / P— again total division;hydraulicDiameter A 0 = 0.dimExponents (a b c d : ℝ) : ℝ × ℝ × ℝ := (a + d, -3 * a + b + c - d, -b - d)— a triple of three linear forms in the four arguments. Nothing in the code names these as mass/length/time; that reading comes only from the docstring.Dimensionless (a b c d : ℝ) : Prop := dimExponents a b c d = (0, 0, 0)— the proposition that all three linear forms vanish, i.e.a + d = 0,-3a + b + c - d = 0and-b - d = 0.
Re, kinematicViscosity and hydraulicDiameter are marked noncomputable; dimExponents and Dimensionless are not. No theorems are stated and no sorry occurs.