Slab-geometry reduction of the BGK model
DefinitionBoltzmannBGK_slabThis file sets up the slab geometry of parts (c) and (d) of the source question. There the position is , the bulk velocity is , the velocity splits as with , and the distribution function is independent of and .
The three-dimensional Maxwellian written in these variables is
and the one-dimensional Maxwellian is
Given a distribution , the two reduced fields of part (c) are obtained by integrating out the perpendicular velocity,
The hydrodynamic quantities of the reduced system are
and the two further quantities of part (d) are
with the peculiar velocity; is the deviatoric part of the longitudinal stress and is the heat flux.
Formalization Note The perpendicular velocity lives in EuclideanSpace ℝ (Fin 2) and the reduced fields are ordinary real functions of one real variable; all integrals are against Lebesgue measure. The quantities , , , and are defined as functions of the reduced pair rather than being supplied as parameters, so they cannot be instantiated independently of the fields.
import Mathlib
noncomputable section
open MeasureTheory Real
namespace BoltzmannBGK
/-- The two perpendicular velocity components `v⊥ = (v_y, v_z)`. -/
abbrev Perp := EuclideanSpace ℝ (Fin 2)
/-- The three–dimensional Maxwellian written in slab geometry, where the bulk velocity is
`u = (u, 0, 0)`, the velocity is `v = (w, w⊥)`, and the distribution depends on `x` only:
`ρ (2πθ)^(-3/2) exp (-((w - u)² + |w⊥|²)/(2θ))`. -/
def maxwellianSlab (ρ u θ : ℝ) (w : ℝ) (wperp : Perp) : ℝ :=
ρ / (2 * π * θ) ^ (3 / 2 : ℝ) * exp (-(((w - u) ^ 2 + ‖wperp‖ ^ 2) / (2 * θ)))
/-- The one–dimensional Maxwellian `ρ (2πθ)^(-1/2) exp (-(w - u)²/(2θ))`. -/
def maxwellian1d (ρ u θ : ℝ) (w : ℝ) : ℝ :=
ρ / (2 * π * θ) ^ (1 / 2 : ℝ) * exp (-((w - u) ^ 2 / (2 * θ)))
/-- The reduced distribution `g(w) = ∫ dw⊥ F(w, w⊥)`. -/
def reduceG (F : ℝ → Perp → ℝ) (w : ℝ) : ℝ := ∫ wperp, F w wperp
/-- The reduced distribution `h(w) = ∫ dw⊥ |w⊥|² F(w, w⊥)`. -/
def reduceH (F : ℝ → Perp → ℝ) (w : ℝ) : ℝ := ∫ wperp, ‖wperp‖ ^ 2 * F w wperp
/-- Mass density of the reduced system, `ρ = ∫ dv g`. -/
def density1d (g : ℝ → ℝ) : ℝ := ∫ v, g v
/-- Bulk velocity of the reduced system, `u = (1/ρ) ∫ dv v g`. -/
def bulkVelocity1d (g : ℝ → ℝ) : ℝ := (∫ v, v * g v) / density1d g
/-- Temperature of the reduced system, `3ρθ = ∫ dv (v - u)² g + ∫ dv h`. -/
def temperature1d (g h : ℝ → ℝ) : ℝ :=
((∫ v, (v - bulkVelocity1d g) ^ 2 * g v) + ∫ v, h v) / (3 * density1d g)
/-- The quantity `T = -2ρθ + ∫ dv h` of the reduced system. -/
def stressT (g h : ℝ → ℝ) : ℝ :=
-2 * density1d g * temperature1d g h + ∫ v, h v
/-- The quantity `q = ½ ∫ dv w³ g + ½ ∫ dv w h`, where `w = v - u` is the peculiar velocity. -/
def heatFlux (g h : ℝ → ℝ) : ℝ :=
1 / 2 * (∫ v, (v - bulkVelocity1d g) ^ 3 * g v) +
1 / 2 * (∫ v, (v - bulkVelocity1d g) * h 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 with two spaces: the real line , and (two-dimensional Euclidean space with the Euclidean norm). All integrals are Bochner integrals over the whole space against Lebesgue measure, with a non-integrable integrand giving .
For real numbers it defines two functions:
Both prefactors use real powers of with total division, so gives junk values rather than errors, and no sign condition on or is imposed by the definitions.
For a function of a real variable and a variable in it defines two reductions, each a function of one real variable:
For real functions of one real variable it defines four further quantities. The density and bulk velocity depend on alone:
(total division, so when ). The temperature depends on both:
Finally
In and the density, bulk velocity and temperature are always the ones computed from the same pair by the formulas above; they are not free parameters. No claim is asserted by this bundle; it introduces notation only, and imposes no positivity, integrability or measurability conditions on , or .