The Boltzmann equation with the BGK collision operator
DefinitionBoltzmannBGK_modelThis file fixes the kinetic model of Question 1 of the source paper: the Boltzmann equation with the BGK collision operator, together with the hydrodynamic moments it is built from. Velocities and positions range over three-dimensional Euclidean space, particles have unit mass and the Boltzmann constant is .
For a distribution function on velocity space the three moments are the mass density, the bulk velocity and the temperature,
The Maxwellian with parameters is
the local Maxwellian of is , and the BGK collision operator with relaxation time is . A distribution function is called admissible when it is everywhere strictly positive, integrable, and has a finite second velocity moment. Finally, a time-dependent field solves the BGK equation when it is differentiable in and in and satisfies
where the collision operator acts on the velocity profile at each fixed time and position.
This is the model on which every statement of the mission rests: the conservation laws, the entropy inequality and the slab reduction are all phrased in terms of these moments and this operator.
Formalization Note Integrals are Bochner integrals against the Lebesgue measure on EuclideanSpace ℝ (Fin 3); the bulk velocity is a vector-valued integral. Division by the density is Lean's total division, so the moments of the zero function are junk values rather than errors, which is why positivity of the density is assumed wherever it matters. The directional derivative is expressed as the Fréchet derivative in evaluated at the vector .
import Mathlib
noncomputable section
open MeasureTheory Real
namespace BoltzmannBGK
/-- Velocity space (and position space): three–dimensional Euclidean space. -/
abbrev Vel := EuclideanSpace ℝ (Fin 3)
/-- Mass density of a distribution function, `ρ[f] = ∫ f dv` (particles have unit mass). -/
def density (f : Vel → ℝ) : ℝ := ∫ v, f v
/-- Bulk (mean) velocity, `u[f] = (1/ρ) ∫ v f dv`. -/
def bulkVelocity (f : Vel → ℝ) : Vel := (density f)⁻¹ • ∫ v, f v • v
/-- Temperature, `θ[f] = (1/(3ρ)) ∫ |v - u|² f dv` (unit mass, Boltzmann constant `k_B = 1`). -/
def temperature (f : Vel → ℝ) : ℝ :=
(∫ v, ‖v - bulkVelocity f‖ ^ 2 * f v) / (3 * density f)
/-- The Maxwellian distribution with mass density `ρ`, bulk velocity `u` and temperature `θ`:
`ρ (2πθ)^(-3/2) exp (-|v - u|²/(2θ))`. -/
def maxwellian (ρ : ℝ) (u : Vel) (θ : ℝ) (v : Vel) : ℝ :=
ρ / (2 * π * θ) ^ (3 / 2 : ℝ) * exp (-(‖v - u‖ ^ 2 / (2 * θ)))
/-- The local Maxwellian `f⁽⁰⁾` attached to `f`: the Maxwellian whose density, bulk velocity and
temperature are those of `f`. -/
def localMaxwellian (f : Vel → ℝ) : Vel → ℝ :=
maxwellian (density f) (bulkVelocity f) (temperature f)
/-- The BGK collision operator `C[f] = -(1/τ) (f - f⁽⁰⁾)`. -/
def collision (τ : ℝ) (f : Vel → ℝ) (v : Vel) : ℝ :=
-(1 / τ) * (f v - localMaxwellian f v)
/-- A distribution function that is everywhere positive, integrable, and has a finite second
moment in velocity. -/
structure IsKineticState (f : Vel → ℝ) : Prop where
pos : ∀ v, 0 < f v
integrable : Integrable f
integrable_sq : Integrable fun v => ‖v‖ ^ 2 * f v
/-- The Boltzmann equation with the BGK collision operator,
`∂f/∂t + v · ∇ₓ f = C[f]`, for `f : time → position → velocity → ℝ` and relaxation time `τ`. -/
structure IsBGKSolution (τ : ℝ) (f : ℝ → Vel → Vel → ℝ) : Prop where
differentiable_time : ∀ x v, Differentiable ℝ fun t => f t x v
differentiable_space : ∀ t v, Differentiable ℝ fun x => f t x v
equation : ∀ t x v,
deriv (fun s => f s x v) t + fderiv ℝ (fun y => f t y v) x v = collision τ (f t x) v
end BoltzmannBGK
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter, non-blind
Provenance note — this read-back is NOT blind and NOT independent testimony. It was written by the same agent that drafted the Lean statements in this proposal, at the explicit instruction of the proposal owner, and not by a separate auditor with a fresh context. It therefore carries the drafter's knowledge of what the code was intended to say, and a reviewer must not treat it as an outside check on faithfulness.
This bundle works over (three-dimensional Euclidean space, with the Euclidean norm) and over its Lebesgue measure; every integral below is a Bochner integral over all of , with the convention that a non-integrable integrand gives the value .
For a real-valued function on it defines three numbers. The density is . The bulk velocity is the vector , where the inverse is total division (so when ). The temperature is the scalar
again with total division.
For real numbers , a vector and it defines
where is a real power: for this is the real-power convention (in particular it is when , making the quotient a division by zero, which is ), and no positivity of or is required by the definition itself. The local Maxwellian of is the function , i.e. the parameters are read off from by the three formulas above. The collision operator is, for a real ,
with again total division, so identically.
Two predicates are defined. A function is an admissible state when all three of the following hold: for every (strict, at every point, not almost everywhere); is integrable; and is integrable. Note the second moment is taken about the origin, not about .
A family , with and , is a BGK solution with parameter when all three of the following hold: for all the map is differentiable on all of ; for all the map is (Fréchet) differentiable on all of ; and for all ,
where is the derivative in the position variable evaluated on the vector — that is, the directional derivative of at in the direction — and the right-hand side applies the collision operator to the velocity profile at the frozen time and position , so its density, bulk velocity and temperature are those of that profile.
No claim is asserted by this bundle; it introduces notation only. Degenerate inputs are not excluded anywhere: , , , and non-integrable all produce well-defined junk values rather than errors.