Thermomechanical processes, balance laws and the Clausius–Duhem inequalities
DefinitionClausiusDuhem_thermo_processA thermomechanical process on is a collection of fields of time and position : mass density , specific entropy , velocity , heat flux , energy source per unit mass , absolute temperature , specific internal energy and Cauchy stress . With the operators of the field-calculus definition:
- Regularity: are jointly in and is jointly continuous.
- Integral Clausius–Duhem inequality on every fixed control volume, here every box with :
- Conservation of mass: .
- Balance of energy: .
- Differential (entropy) form: .
- Internal-energy form: .
- Dissipation: .
Conditions 3–6 are required at every time and every point.
Formalization Note The control volumes are the non-degenerate boxes; the source's general moving-boundary form (normal velocity ) is specialised to fixed control volumes, , which is the case the source's derivation uses. Division by is Lean division (with ); every theorem of the mission that divides by in an essential way assumes .
import Definitions.Def_ClausiusDuhem_field_calculus
/-!
Thermomechanical processes of a continuum and the balance laws / inequalities appearing in
the Wikipedia article "Clausius–Duhem inequality" (oldid=1182390552).
-/
namespace ClausiusDuhem
/-- A thermomechanical process of a continuum body occupying `ℝ³`: every field is a function
of time `t` and of the spatial point `x`. -/
structure ThermoProcess where
/-- mass density `ρ` -/
rho : ℝ → Space → ℝ
/-- specific entropy (entropy per unit mass) `η` -/
eta : ℝ → Space → ℝ
/-- velocity of the particles `v` -/
vel : ℝ → Space → Fin 3 → ℝ
/-- heat flux vector `q` -/
heatFlux : ℝ → Space → Fin 3 → ℝ
/-- energy source per unit mass `s` -/
source : ℝ → Space → ℝ
/-- absolute temperature `T` -/
temp : ℝ → Space → ℝ
/-- specific internal energy (internal energy per unit mass) `e` -/
energy : ℝ → Space → ℝ
/-- Cauchy stress tensor `σ` -/
stress : ℝ → Space → Matrix (Fin 3) (Fin 3) ℝ
/-- A time-dependent field is `C¹` jointly in time and space. -/
def IsC1Field {β : Type} [NormedAddCommGroup β] [NormedSpace ℝ β]
(φ : ℝ → Space → β) : Prop :=
ContDiff ℝ 1 (fun p : ℝ × Space => φ p.1 p.2)
/-- Standing regularity of a process: `ρ, η, v, q, T, e` are continuously differentiable
jointly in `(t, x)`, and the source `s` is jointly continuous. -/
def ThermoProcess.Smooth (P : ThermoProcess) : Prop :=
IsC1Field P.rho ∧ IsC1Field P.eta ∧ IsC1Field P.vel ∧ IsC1Field P.heatFlux ∧
IsC1Field P.temp ∧ IsC1Field P.energy ∧
Continuous (fun p : ℝ × Space => P.source p.1 p.2)
/-- The integral Clausius–Duhem inequality for every fixed control volume (so the normal
velocity of the boundary is `u_n = 0`), with control volumes the non-degenerate closed
rectangular boxes `Ω = [a, b]`:
`d/dt ∫_Ω ρη dV ≥ ∫_{∂Ω} ρη(0 - v·n) dA - ∫_{∂Ω} (q·n)/T dA + ∫_Ω ρs/T dV`. -/
def ThermoProcess.IntegralEntropyInequality (P : ThermoProcess) : Prop :=
∀ (a b : Space), (∀ i, a i < b i) → ∀ t : ℝ,
deriv (fun τ => ∫ x in Set.Icc a b, P.rho τ x * P.eta τ x) t ≥
-boxOutwardFlux (fun x => (P.rho t x * P.eta t x) • P.vel t x) a b
- boxOutwardFlux (fun x => (P.temp t x)⁻¹ • P.heatFlux t x) a b
+ ∫ x in Set.Icc a b, P.rho t x * P.source t x / P.temp t x
/-- Conservation of mass: `ρ̇ + ρ ∇·v = 0` at every time and point. -/
def ThermoProcess.MassConservation (P : ThermoProcess) : Prop :=
∀ t x, materialDeriv P.rho P.vel t x + P.rho t x * div (P.vel t) x = 0
/-- Balance of energy: `ρ ė - σ : ∇v + ∇·q - ρ s = 0` at every time and point. -/
def ThermoProcess.EnergyBalance (P : ThermoProcess) : Prop :=
∀ t x, P.rho t x * materialDeriv P.energy P.vel t x
- doubleDot (P.stress t x) (velocityGradient (P.vel t) x)
+ div (P.heatFlux t) x - P.rho t x * P.source t x = 0
/-- The Clausius–Duhem inequality in differential form (in terms of the specific entropy):
`ρ η̇ ≥ -∇·(q/T) + ρ s / T` at every time and point. -/
def ThermoProcess.EntropyInequality (P : ThermoProcess) : Prop :=
∀ t x, P.rho t x * materialDeriv P.eta P.vel t x ≥
-div (fun y => (P.temp t y)⁻¹ • P.heatFlux t y) x + P.rho t x * P.source t x / P.temp t x
/-- The Clausius–Duhem inequality in terms of the specific internal energy:
`ρ (ė - T η̇) - σ : ∇v ≤ -(q · ∇T)/T` at every time and point. -/
def ThermoProcess.InternalEnergyInequality (P : ThermoProcess) : Prop :=
∀ t x, P.rho t x * (materialDeriv P.energy P.vel t x
- P.temp t x * materialDeriv P.eta P.vel t x)
- doubleDot (P.stress t x) (velocityGradient (P.vel t) x) ≤
-(dot (P.heatFlux t x) (grad (P.temp t) x) / P.temp t x)
/-- The dissipation `𝒟 = ρ (T η̇ - ė) + σ : ∇v - (q · ∇T)/T`. -/
noncomputable def ThermoProcess.dissipation (P : ThermoProcess) (t : ℝ) (x : Space) : ℝ :=
P.rho t x * (P.temp t x * materialDeriv P.eta P.vel t x - materialDeriv P.energy P.vel t x)
+ doubleDot (P.stress t x) (velocityGradient (P.vel t) x)
- dot (P.heatFlux t x) (grad (P.temp t) x) / P.temp t x
end ClausiusDuhem
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - non-blind, same agent as the drafter
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statements, with full knowledge of the source article and of the intended meaning. It was not produced by a blind, independent auditor, so it must not be mistaken for independent testimony; reviewers should compare it against the Lean code themselves.
This file (importing the field-calculus file, whose operators are used below with the meanings given there) defines, in namespace ClausiusDuhem:
ThermoProcess: a record of eight functions of : real-valued (rho), (eta), (source), (temp), (energy); -valued (vel), (heatFlux); and -matrix-valued (stress). No sign, positivity or regularity condition is part of the record.IsC1Field: the map on is once continuously differentiable (jointly).Smooth: are allIsC1Field, and is continuous. Nothing is assumed about .IntegralEntropyInequality: for all with for , and every ,
with the closed box and Lebesgue measure. The derivative is the one-variable derivative (equal to where it does not exist); integrals are for non-integrable integrands; and give where .
5. MassConservation : for all : .
6. EnergyBalance : for all : , everything evaluated at , with the material derivative of along , and taken in at fixed .
7. EntropyInequality : for all :
InternalEnergyInequality: for all :
dissipation, all at (a real number; the last term is if ).