introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.4 kB
import Mathlib
namespace OAI
/-! Periodic incompressible fields, classical solutions and bounded smooth forcing. -/
namespace Solenoidal
namespace Fluid
open scoped ContDiff
abbrev Space := Fin 3 β†’ ℝ
abbrev SpaceTime := Fin 4 β†’ ℝ
abbrev Field := SpaceTime β†’ Space
abbrev Pressure := SpaceTime β†’ ℝ
def point (t : ℝ) (x : Space) : SpaceTime := Fin.cons t x
def translateTime (h : ℝ) (p : SpaceTime) : SpaceTime :=
Function.update p 0 (p 0 + h)
def translateSpace (k : Fin 3 β†’ β„€) (p : SpaceTime) : SpaceTime :=
point (p 0) (fun i => p i.succ + (k i : ℝ))
def SpatiallyPeriodic {E : Type*} (F : SpaceTime β†’ E) : Prop :=
βˆ€ (p : SpaceTime) (k : Fin 3 β†’ β„€), F (translateSpace k p) = F p
noncomputable def partialD (i : Fin 4) (F : Field) : Field :=
fun p => fderiv ℝ F p (Pi.single i 1)
noncomputable def mixedD : List (Fin 4) β†’ Field β†’ Field
| [], F => F
| i :: l, F => partialD i (mixedD l F)
noncomputable def diverge (F : Field) (p : SpaceTime) : ℝ :=
βˆ‘ i : Fin 3, partialD i.succ F p i
noncomputable def laplacian (F : Field) (p : SpaceTime) : Space :=
βˆ‘ i : Fin 3, partialD i.succ (partialD i.succ F) p
noncomputable def advection (F : Field) (p : SpaceTime) : Space :=
βˆ‘ i : Fin 3, (F p i) β€’ partialD i.succ F p
noncomputable def force (Ξ½ : ℝ) (U : Field) : Field :=
fun p => partialD 0 U p - Ξ½ β€’ laplacian U p
def cell : Set Space := Set.Icc 0 (fun _ => 1)
noncomputable def spatialMean (F : Field) (t : ℝ) : Space :=
∫ x in cell, F (point t x)
noncomputable def pressureMean (p : Pressure) (t : ℝ) : ℝ :=
∫ x in cell, p (point t x)
noncomputable def energy (U : Field) (t : ℝ) : ℝ :=
(1 / 2 : ℝ) * ∫ x in cell, βˆ‘ i : Fin 3, (U (point t x) i) ^ 2
def BoundedMixed (F : Field) : Prop :=
βˆ€ a : List (Fin 4), βˆƒ C : ℝ, 0 ≀ C ∧
βˆ€ p : SpaceTime, 0 ≀ p 0 β†’ β€–mixedD a F pβ€– ≀ C
def PeriodicAfterOne (F : Field) : Prop :=
βˆ€ p : SpaceTime, 1 ≀ p 0 β†’ F (translateTime 1 p) = F p
def ZeroNearIntegers (U f : Field) : Prop :=
βˆ€ n : β„€, βˆƒ Ξ΅ : ℝ, 0 < Ξ΅ ∧ βˆ€ p : SpaceTime,
0 ≀ p 0 β†’ |p 0 - (n : ℝ)| < Ξ΅ β†’ U p = 0 ∧ f p = 0
structure ClassicalSolutionOn (Ξ½ : ℝ) (f v : Field) (p : Pressure) (T : ℝ) : Prop where
periodic_v : βˆ€ t ∈ Set.Icc 0 T, βˆ€ (x : Space) (k : Fin 3 β†’ β„€),
v (point t (fun i => x i + (k i : ℝ))) = v (point t x)
periodic_p : βˆ€ t ∈ Set.Icc 0 T, βˆ€ (x : Space) (k : Fin 3 β†’ β„€),
p (point t (fun i => x i + (k i : ℝ))) = p (point t x)
continuous_v : ContinuousOn (fun tx : ℝ Γ— Space => v (point tx.1 tx.2))
(Set.Icc 0 T Γ—Λ’ Set.univ)
continuous_p : ContinuousOn (fun tx : ℝ Γ— Space => p (point tx.1 tx.2))
(Set.Icc 0 T Γ—Λ’ Set.univ)
zero_initial : βˆ€ x : Space, v (point 0 x) = 0
zero_pressure_mean : βˆ€ t ∈ Set.Icc 0 T, pressureMean p t = 0
derivatives : βˆƒ (vTime : Field) (vSpace : Fin 3 β†’ Field)
(vSpace2 : Fin 3 β†’ Fin 3 β†’ Field) (pSpace : Fin 3 β†’ Pressure),
(ContinuousOn (fun tx : ℝ Γ— Space => vTime (point tx.1 tx.2))
(Set.Icc 0 T Γ—Λ’ Set.univ)) ∧
(βˆ€ i, ContinuousOn (fun tx : ℝ Γ— Space => vSpace i (point tx.1 tx.2))
(Set.Icc 0 T Γ—Λ’ Set.univ)) ∧
(βˆ€ i j, ContinuousOn (fun tx : ℝ Γ— Space => vSpace2 i j (point tx.1 tx.2))
(Set.Icc 0 T Γ—Λ’ Set.univ)) ∧
(βˆ€ i, ContinuousOn (fun tx : ℝ Γ— Space => pSpace i (point tx.1 tx.2))
(Set.Icc 0 T Γ—Λ’ Set.univ)) ∧
(βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space,
HasDerivWithinAt (fun s => v (point s x)) (vTime (point t x)) (Set.Icc 0 T) t) ∧
(βˆ€ i, βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space,
HasDerivAt (fun s : ℝ => v (point t (x + s β€’ Pi.single i 1)))
(vSpace i (point t x)) 0) ∧
(βˆ€ i j, βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space,
HasDerivAt (fun s : ℝ => vSpace i (point t (x + s β€’ Pi.single j 1)))
(vSpace2 i j (point t x)) 0) ∧
(βˆ€ i, βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space,
HasDerivAt (fun s : ℝ => p (point t (x + s β€’ Pi.single i 1)))
(pSpace i (point t x)) 0) ∧
(βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space, βˆ‘ i : Fin 3, vSpace i (point t x) i = 0) ∧
(βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space,
vTime (point t x) + βˆ‘ i : Fin 3, v (point t x) i β€’ vSpace i (point t x) =
-(fun i => pSpace i (point t x)) +
Ξ½ β€’ (βˆ‘ i : Fin 3, vSpace2 i i (point t x)) + f (point t x))
def FluidAssertions (Ξ½ : ℝ) (U f : Field) : Prop :=
ContDiff ℝ ∞ U ∧ ContDiff ℝ ∞ f ∧ SpatiallyPeriodic U ∧ SpatiallyPeriodic f ∧
(βˆ€ q : SpaceTime, 0 ≀ q 0 β†’ diverge f q = 0) ∧
(βˆ€ t : ℝ, 0 ≀ t β†’ spatialMean f t = 0) ∧
(βˆ€ q : SpaceTime, 0 ≀ q 0 β†’
partialD 0 U q + advection U q = Ξ½ β€’ laplacian U q + f q) ∧
(βˆ€ q : SpaceTime, 0 ≀ q 0 β†’ diverge U q = 0) ∧
(βˆ€ x : Space, U (point 0 x) = 0) ∧
(βˆ€ T : ℝ, 0 < T β†’ βˆ€ (v : Field) (p : Pressure), ClassicalSolutionOn Ξ½ f v p T β†’
βˆ€ t ∈ Set.Icc 0 T, βˆ€ x : Space, v (point t x) = U (point t x) ∧ p (point t x) = 0)
def BoundedPeriodicAssertions (U f : Field) : Prop :=
BoundedMixed U ∧ BoundedMixed f ∧
(βˆƒ C : ℝ, 0 ≀ C ∧ βˆ€ t : ℝ, 0 ≀ t β†’ energy U t ≀ C) ∧
PeriodicAfterOne U ∧ PeriodicAfterOne f ∧ ZeroNearIntegers U f
end Fluid
end Solenoidal
end OAI