Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import NavierStokes.TerminalStress |
| 2 | import NavierStokes.TransportPrimitive |
| 3 | import NavierStokes.HeatProfileExtension |
| 4 | import NavierStokes.EdgeWeightJets |
| 5 | import NavierStokes.PhysicalHeatCoordinates |
| 6 | import NavierStokes.TerminalPressure |
| 7 | import NavierStokes.UniformCone |
| 8 | |
| 9 | /-! |
| 10 | # Actual terminal stress factors at the outer edge |
| 11 | |
| 12 | The logarithmic edge coordinate is applied to the actual physical heat carrier |
| 13 | and to `OutgoingTail.tailShape`. A positive global physical chart keeps the |
| 14 | parameter coefficients smooth without assuming a normalized stress factor. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | open Set Filter MeasureTheory |
| 20 | open scoped Topology ContDiff |
| 21 | open NavierStokes.OutgoingTail NavierStokes.TerminalStress |
| 22 | |
| 23 | namespace NavierStokes.TerminalEdgeFactor |
| 24 | |
| 25 | abbrev EdgeParam := ℝ × ℝ |
| 26 | |
| 27 | noncomputable def timeOf (p : EdgeParam) : ℝ := 1 - Real.exp p.1 |
| 28 | noncomputable def axisPoint (p : EdgeParam) : SimilarityProfile.PhysicalPoint := |
| 29 | (timeOf p, (0, p.2)) |
| 30 | noncomputable def chartQ (d : TailData) (p : EdgeParam) : ℝ := |
| 31 | SimilarityProfile.q d.h (axisPoint p) |
| 32 | noncomputable def chartEta (d : TailData) (p : EdgeParam) : ℝ := |
| 33 | SimilarityProfile.eta d.h (axisPoint p) |
| 34 | noncomputable def outerRadius (d : TailData) (y0 : ℝ) (p : EdgeParam) : ℝ := |
| 35 | Real.sqrt (2 * chartQ d p * Real.exp (y0 + 3)) |
| 36 | noncomputable def radius (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 37 | outerRadius d y0 y.1 * Real.exp (-y.2 / 2) |
| 38 | noncomputable def chartPoint (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 39 | SimilarityProfile.PhysicalPoint := radiusPoint (timeOf y.1) (radius d y0 y) y.1.2 |
| 40 | |
| 41 | theorem timeOf_lt_one (p : EdgeParam) : timeOf p < 1 := by |
| 42 | unfold timeOf |
| 43 | linarith [Real.exp_pos p.1] |
| 44 | |
| 45 | theorem timeOf_contDiff : ContDiff ℝ ∞ timeOf := |
| 46 | contDiff_const.sub contDiff_fst.exp |
| 47 | |
| 48 | theorem axisPoint_contDiff : ContDiff ℝ ∞ axisPoint := |
| 49 | timeOf_contDiff.prodMk (contDiff_const.prodMk contDiff_snd) |
| 50 | |
| 51 | theorem chartQ_pos (d : TailData) (p : EdgeParam) : 0 < chartQ d p := |
| 52 | SimilarityProfile.q_pos d.h_pos d.h_lt_half (timeOf_lt_one p) |
| 53 | |
| 54 | theorem chartQ_contDiff (d : TailData) : ContDiff ℝ ∞ (chartQ d) := by |
| 55 | apply contDiff_iff_contDiffAt.mpr |
| 56 | intro p |
| 57 | exact (SimilarityProfile.q_smoothAt d.h_pos d.h_lt_half |
| 58 | (p := axisPoint p) (timeOf_lt_one p)).comp p axisPoint_contDiff.contDiffAt |
| 59 | |
| 60 | theorem chartEta_contDiff (d : TailData) : ContDiff ℝ ∞ (chartEta d) := by |
| 61 | apply contDiff_iff_contDiffAt.mpr |
| 62 | intro p |
| 63 | exact (SimilarityProfile.eta_smoothAt d.h_pos d.h_lt_half |
| 64 | (p := axisPoint p) (timeOf_lt_one p)).comp p axisPoint_contDiff.contDiffAt |
| 65 | |
| 66 | theorem outerRadius_pos (d : TailData) (y0 : ℝ) (p : EdgeParam) : 0 < outerRadius d y0 p := by |
| 67 | apply Real.sqrt_pos.mpr |
| 68 | exact mul_pos (mul_pos (by norm_num) (chartQ_pos d p)) (Real.exp_pos _) |
| 69 | |
| 70 | theorem outerRadius_contDiff (d : TailData) (y0 : ℝ) : ContDiff ℝ ∞ (outerRadius d y0) := by |
| 71 | apply ((contDiff_const.mul (chartQ_contDiff d)).mul contDiff_const).sqrt |
| 72 | intro p |
| 73 | exact ne_of_gt (mul_pos (mul_pos (by norm_num) (chartQ_pos d p)) (Real.exp_pos _)) |
| 74 | |
| 75 | theorem radius_pos (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : 0 < radius d y0 y := |
| 76 | mul_pos (outerRadius_pos d y0 y.1) (Real.exp_pos _) |
| 77 | |
| 78 | theorem radius_contDiff (d : TailData) (y0 : ℝ) : ContDiff ℝ ∞ (radius d y0) := |
| 79 | ((outerRadius_contDiff d y0).comp contDiff_fst).mul |
| 80 | ((contDiff_snd.neg.div_const 2).exp) |
| 81 | |
| 82 | theorem chartPoint_contDiff (d : TailData) (y0 : ℝ) : ContDiff ℝ ∞ (chartPoint d y0) := |
| 83 | (timeOf_contDiff.comp contDiff_fst).prodMk |
| 84 | (((radius_contDiff d y0).pow 2).div_const 2 |>.prodMk contDiff_fst.snd) |
| 85 | |
| 86 | theorem radius_square (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 87 | radius d y0 y ^ 2 = 2 * chartQ d y.1 * Real.exp (y0 + 3 - y.2) := by |
| 88 | have hq := chartQ_pos d y.1 |
| 89 | rw [radius, mul_pow, outerRadius, Real.sq_sqrt (by positivity), ← Real.exp_nat_mul] |
| 90 | rw [mul_assoc, ← Real.exp_add] |
| 91 | congr 2 |
| 92 | norm_num |
| 93 | ring |
| 94 | |
| 95 | theorem chartX (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 96 | SimilarityProfile.X d.h (chartPoint d y0 y) = Real.exp (y0 + 3 - y.2) := by |
| 97 | change (radius d y0 y ^ 2 / 2) / chartQ d y.1 = _ |
| 98 | rw [radius_square] |
| 99 | field_simp [(chartQ_pos d y.1).ne'] |
| 100 | |
| 101 | theorem chart_logX (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 102 | Real.log (SimilarityProfile.X d.h (chartPoint d y0 y)) = y0 + 3 - y.2 := by |
| 103 | rw [chartX, Real.log_exp] |
| 104 | |
| 105 | noncomputable def carrier (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 106 | physicalHeat C (1 + d.h) (chartPoint d y0 y) |
| 107 | |
| 108 | theorem carrier_eq (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 109 | carrier C d y0 y = heatAmplitude C (1 + d.h) (timeOf y.1) (radius d y0 y) := rfl |
| 110 | |
| 111 | theorem carrier_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 112 | ContDiff ℝ ∞ (carrier C d y0) := by |
| 113 | apply contDiff_iff_contDiffAt.mpr |
| 114 | intro y |
| 115 | exact (physicalHeat_contDiffAt C (by linarith [d.h_pos]) |
| 116 | (p := chartPoint d y0 y) (timeOf_lt_one y.1) |
| 117 | (div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num))).comp y |
| 118 | (chartPoint_contDiff d y0).contDiffAt |
| 119 | |
| 120 | noncomputable def carrierRadial (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 121 | radius d y0 y * SimilarityProfile.partialS (physicalHeat C (1 + d.h)) (chartPoint d y0 y) |
| 122 | |
| 123 | theorem carrierRadial_eq (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 124 | carrierRadial C d y0 y = |
| 125 | deriv (heatAmplitude C (1 + d.h) (timeOf y.1)) (radius d y0 y) := by |
| 126 | have hp := physicalHeat_contDiffAt C (a := 1 + d.h) (by linarith [d.h_pos]) |
| 127 | (p := chartPoint d y0 y) (timeOf_lt_one y.1) |
| 128 | (div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num)) |
| 129 | exact (radialSlice_hasDerivAt (hp.differentiableAt (by simp))).deriv.symm |
| 130 | |
| 131 | theorem carrierRadial_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 132 | ContDiff ℝ ∞ (carrierRadial C d y0) := by |
| 133 | apply contDiff_iff_contDiffAt.mpr |
| 134 | intro y |
| 135 | have hp := physicalHeat_contDiffAt C (a := 1 + d.h) (by linarith [d.h_pos]) |
| 136 | (p := chartPoint d y0 y) (timeOf_lt_one y.1) |
| 137 | (div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num)) |
| 138 | exact (radius_contDiff d y0).contDiffAt.mul |
| 139 | ((partialS_contDiffAt hp (m := ∞) (by simp)).comp y |
| 140 | (chartPoint_contDiff d y0).contDiffAt) |
| 141 | |
| 142 | noncomputable def denominator (d : TailData) (p : EdgeParam) : ℝ := |
| 143 | timeDenominator d.h (timeOf p) p.2 |
| 144 | |
| 145 | theorem denominator_pos (d : TailData) (p : EdgeParam) : 0 < denominator d p := |
| 146 | timeDenominator_pos d.h_pos d.h_lt_half (timeOf_lt_one p) |
| 147 | |
| 148 | theorem denominator_contDiff (d : TailData) : ContDiff ℝ ∞ (denominator d) := by |
| 149 | change ContDiff ℝ ∞ (fun p => chartQ d p * CoordinateAlgebra.L d.h (chartEta d p)) |
| 150 | exact (chartQ_contDiff d).mul |
| 151 | (contDiff_const.sub (contDiff_const.mul ((chartEta_contDiff d).pow 2))) |
| 152 | |
| 153 | /-- A radial logarithmic distance, with its outer radius kept explicit. -/ |
| 154 | noncomputable def edgeCoordinate (R r : ℝ) : ℝ := -2 * Real.log (r / R) |
| 155 | |
| 156 | theorem edgeCoordinate_hasDerivAt {R r : ℝ} (hR : 0 < R) (hr : 0 < r) : |
| 157 | HasDerivAt (edgeCoordinate R) (-2 / r) r := by |
| 158 | convert! (((hasDerivAt_id r).div_const R).log (div_pos hr hR).ne').const_mul (-2) using 1 |
| 159 | dsimp only [id] |
| 160 | field_simp |
| 161 | |
| 162 | theorem edgeCoordinate_nonpos {R r : ℝ} (hR : 0 < R) (hRr : R ≤ r) : |
| 163 | edgeCoordinate R r ≤ 0 := by |
| 164 | exact mul_nonpos_of_nonpos_of_nonneg (by norm_num) |
| 165 | (Real.log_nonneg ((le_div_iff₀ hR).mpr (by simpa using hRr))) |
| 166 | |
| 167 | theorem radius_edgeCoordinate (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} (hr : 0 < r) : |
| 168 | radius d y0 (p, edgeCoordinate (outerRadius d y0 p) r) = r := by |
| 169 | have hR := outerRadius_pos d y0 p |
| 170 | have he : -edgeCoordinate (outerRadius d y0 p) r / 2 = |
| 171 | Real.log (r / outerRadius d y0 p) := by unfold edgeCoordinate; ring |
| 172 | rw [radius, he, Real.exp_log (div_pos hr hR)] |
| 173 | field_simp |
| 174 | |
| 175 | theorem edgeCoordinate_radius (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 176 | edgeCoordinate (outerRadius d y0 y.1) (radius d y0 y) = y.2 := by |
| 177 | have hR := (outerRadius_pos d y0 y.1).ne' |
| 178 | unfold edgeCoordinate radius |
| 179 | rw [mul_div_cancel_left₀ _ hR, Real.log_exp] |
| 180 | ring |
| 181 | |
| 182 | theorem physical_logX (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} (hr : 0 < r) : |
| 183 | Real.log (SimilarityProfile.X d.h (radiusPoint (timeOf p) r p.2)) = |
| 184 | y0 + 3 - edgeCoordinate (outerRadius d y0 p) r := by |
| 185 | have h := chart_logX d y0 (p, edgeCoordinate (outerRadius d y0 p) r) |
| 186 | simpa only [chartPoint, radius_edgeCoordinate d y0 p hr] using h |
| 187 | |
| 188 | /-- Continuous positive-radius functions with a zero tail are genuinely integrable. -/ |
| 189 | theorem integrableOn_Ioi_of_eventually_zero {f : ℝ → ℝ} {r : ℝ} (hr : 0 < r) |
| 190 | (hf : ContinuousOn f (Ioi 0)) (hz : f =ᶠ[atTop] fun _ => 0) : |
| 191 | IntegrableOn f (Ioi r) := by |
| 192 | obtain ⟨b, hb⟩ := Filter.eventually_atTop.1 hz |
| 193 | have hi : IntegrableOn f (Icc r (max r b)) := |
| 194 | (hf.mono (fun u hu => hr.trans_le hu.1)).integrableOn_Icc |
| 195 | apply (hi.integrable_indicator measurableSet_Icc).integrableOn.congr |
| 196 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu |
| 197 | by_cases hmax : u ≤ max r b |
| 198 | · simp only [indicator_of_mem (show u ∈ Icc r (max r b) from ⟨hu.le, hmax⟩)] |
| 199 | · have hbu : b ≤ u := (le_max_right r b).trans (le_of_not_ge hmax) |
| 200 | rw [indicator_of_notMem (show u ∉ Icc r (max r b) from fun h => hmax h.2), hb u hbu] |
| 201 | |
| 202 | noncomputable def radialFlatDensity (c : ℝ) (j : ℕ) (a : ℝ → ℝ) (R u : ℝ) : ℝ := |
| 203 | (2 / u) * FlatPrimitive.integrand c j a (edgeCoordinate R u) |
| 204 | |
| 205 | theorem radialFlatDensity_integrable {c R r : ℝ} (hc : 0 < c) (hR : 0 < R) (hr : 0 < r) |
| 206 | (j : ℕ) {a : ℝ → ℝ} (ha : Continuous a) : |
| 207 | IntegrableOn (radialFlatDensity c j a R) (Ioi r) := by |
| 208 | apply integrableOn_Ioi_of_eventually_zero hr |
| 209 | · intro u hu |
| 210 | exact ((continuousAt_const.div continuousAt_id hu.ne').mul |
| 211 | ((FlatPrimitive.integrand_continuous hc j ha).continuousAt.comp |
| 212 | (edgeCoordinate_hasDerivAt hR hu).continuousAt)).continuousWithinAt |
| 213 | · filter_upwards [eventually_ge_atTop R] with u hu |
| 214 | simp only [radialFlatDensity, FlatPrimitive.integrand, |
| 215 | FlatCutoff.edge_of_nonpos c (edgeCoordinate_nonpos hR hu), zero_div, zero_mul, mul_zero] |
| 216 | |
| 217 | /-- An actual radial-to-edge change of variables, proved by the improper FTC. -/ |
| 218 | theorem radialFlatDensity_integral {c R r : ℝ} (hc : 0 < c) (hR : 0 < R) (hr : 0 < r) |
| 219 | (j : ℕ) {a : ℝ → ℝ} (ha : Continuous a) : |
| 220 | (∫ u in Ioi r, radialFlatDensity c j a R u) = |
| 221 | FlatPrimitive.primitive c j a (edgeCoordinate R r) := by |
| 222 | have hd : ∀ u ∈ Ici r, HasDerivAt |
| 223 | (fun v => -FlatPrimitive.primitive c j a (edgeCoordinate R v)) |
| 224 | (radialFlatDensity c j a R u) u := by |
| 225 | intro u hu |
| 226 | convert! ((FlatPrimitive.primitive_hasDerivAt hc j ha (edgeCoordinate R u)).comp u |
| 227 | (edgeCoordinate_hasDerivAt hR (hr.trans_le hu))).neg using 1 |
| 228 | unfold radialFlatDensity |
| 229 | ring |
| 230 | have hz : Tendsto (fun v => -FlatPrimitive.primitive c j a (edgeCoordinate R v)) atTop (𝓝 0) := by |
| 231 | apply tendsto_const_nhds.congr' |
| 232 | filter_upwards [eventually_ge_atTop R] with u hu |
| 233 | simp only [FlatPrimitive.primitive_of_nonpos c j a (edgeCoordinate_nonpos hR hu), neg_zero] |
| 234 | simpa only [sub_neg_eq_add, zero_add] using |
| 235 | integral_Ioi_of_hasDerivAt_of_tendsto' hd (radialFlatDensity_integrable hc hR hr j ha) hz |
| 236 | |
| 237 | noncomputable def logTaper (d : TailData) (y0 : ℝ) (y : ℝ) : ℝ := tailShape d (y - y0) |
| 238 | noncomputable def radialTaper (d : TailData) (y0 : ℝ) (p : EdgeParam) : ℝ → ℝ := |
| 239 | radialSlice (flattening d.h (logTaper d y0)) (timeOf p) p.2 |
| 240 | |
| 241 | theorem logTaper_contDiff (d : TailData) (y0 : ℝ) : ContDiff ℝ ∞ (logTaper d y0) := |
| 242 | (tailShape_contDiff d).comp (contDiff_id.sub contDiff_const) |
| 243 | |
| 244 | theorem logTaper_hasDerivAt (d : TailData) (y0 y : ℝ) : |
| 245 | HasDerivAt (logTaper d y0) (tailShapeDeriv d (y - y0)) y := by |
| 246 | convert! (tailShape_hasDerivAt d (y - y0)).comp y ((hasDerivAt_id y).sub_const y0) using 1 |
| 247 | simp |
| 248 | |
| 249 | theorem logTaper_deriv_at_radius (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 250 | (hr : 0 < r) : |
| 251 | deriv (logTaper d y0) (Real.log (SimilarityProfile.X d.h (radiusPoint (timeOf p) r p.2))) = |
| 252 | (FlatCutoff.edge 4 (edgeCoordinate (outerRadius d y0 p) r) / |
| 253 | edgeCoordinate (outerRadius d y0 p) r ^ 3) * |
| 254 | taperSlopeFactor d (edgeCoordinate (outerRadius d y0 p) r) := by |
| 255 | rw [(logTaper_hasDerivAt d y0 _).deriv, physical_logX d y0 p hr] |
| 256 | rw [show y0 + 3 - edgeCoordinate (outerRadius d y0 p) r - y0 = |
| 257 | 3 - edgeCoordinate (outerRadius d y0 p) r by ring] |
| 258 | exact tailShapeDeriv_factorization d _ |
| 259 | |
| 260 | theorem radialTaper_contDiffAt (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 261 | (hr : 0 < r) : ContDiffAt ℝ ∞ (radialTaper d y0 p) r := by |
| 262 | change ContDiffAt ℝ ∞ (fun u => logTaper d y0 (Real.log ((u ^ 2 / 2) / chartQ d p))) r |
| 263 | exact (logTaper_contDiff d y0).contDiffAt.comp r |
| 264 | (((contDiffAt_id.pow 2).div_const 2).div_const (chartQ d p) |>.log |
| 265 | (div_pos (div_pos (sq_pos_of_pos hr) (by norm_num)) (chartQ_pos d p)).ne') |
| 266 | |
| 267 | theorem radialTaper_deriv (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 268 | (hr : 0 < r) : |
| 269 | deriv (radialTaper d y0 p) r = (2 / r) * |
| 270 | ((FlatCutoff.edge 4 (edgeCoordinate (outerRadius d y0 p) r) / |
| 271 | edgeCoordinate (outerRadius d y0 p) r ^ 3) * |
| 272 | taperSlopeFactor d (edgeCoordinate (outerRadius d y0 p) r)) := by |
| 273 | change deriv (radialSlice (flattening d.h (logTaper d y0)) (timeOf p) p.2) r = _ |
| 274 | rw [(flattening_radial_hasDerivAt (z := p.2) d.h_pos d.h_lt_half (timeOf_lt_one p) hr |
| 275 | ((logTaper_contDiff d y0).differentiable (by simp) _)).deriv, |
| 276 | logTaper_deriv_at_radius d y0 p hr] |
| 277 | ring |
| 278 | |
| 279 | theorem radialTaper_plateau (d : TailData) (y0 : ℝ) (p : EdgeParam) : |
| 280 | radialTaper d y0 p =ᶠ[atTop] fun _ => 1 := by |
| 281 | apply radial_flattening_plateau d.h_pos d.h_lt_half (timeOf_lt_one p) |
| 282 | filter_upwards [eventually_ge_atTop (y0 + 3)] with y hy |
| 283 | exact tailShape_late d (by linarith) |
| 284 | |
| 285 | noncomputable def boundaryCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 286 | (2 * carrier C d y0 y / radius d y0 y) * taperSlopeFactor d y.2 |
| 287 | |
| 288 | noncomputable def timeCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 289 | (radius d y0 y ^ 3 * carrier C d y0 y / (2 * denominator d y.1)) * taperSlopeFactor d y.2 |
| 290 | |
| 291 | noncomputable def correctionCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 292 | (y : EdgeParam × ℝ) : ℝ := |
| 293 | (radius d y0 y * carrier C d y0 y - radius d y0 y ^ 2 * carrierRadial C d y0 y) * |
| 294 | taperSlopeFactor d y.2 |
| 295 | |
| 296 | theorem timeCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 297 | ContDiff ℝ ∞ (timeCoefficient C d y0) := |
| 298 | ((((radius_contDiff d y0).pow 3).mul (carrier_contDiff C d y0)).div |
| 299 | (contDiff_const.mul ((denominator_contDiff d).comp contDiff_fst)) |
| 300 | (fun y => (mul_pos (by norm_num : (0 : ℝ) < 2) (denominator_pos d y.1)).ne')).mul |
| 301 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 302 | |
| 303 | theorem correctionCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 304 | ContDiff ℝ ∞ (correctionCoefficient C d y0) := |
| 305 | (((radius_contDiff d y0).mul (carrier_contDiff C d y0)).sub |
| 306 | (((radius_contDiff d y0).pow 2).mul (carrierRadial_contDiff C d y0))).mul |
| 307 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 308 | |
| 309 | theorem carrier_at_radius (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 310 | (hr : 0 < r) : |
| 311 | carrier C d y0 (p, edgeCoordinate (outerRadius d y0 p) r) = |
| 312 | heatAmplitude C (1 + d.h) (timeOf p) r := by |
| 313 | rw [carrier_eq, radius_edgeCoordinate d y0 p hr] |
| 314 | |
| 315 | theorem carrierRadial_at_radius (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 316 | (hr : 0 < r) : |
| 317 | carrierRadial C d y0 (p, edgeCoordinate (outerRadius d y0 p) r) = |
| 318 | deriv (heatAmplitude C (1 + d.h) (timeOf p)) r := by |
| 319 | rw [carrierRadial_eq, radius_edgeCoordinate d y0 p hr] |
| 320 | |
| 321 | theorem time_weight_eq_density (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 322 | (hr : 0 < r) : |
| 323 | r ^ 2 * timeResidual C d.h (logTaper d y0) (timeOf p) p.2 r = |
| 324 | radialFlatDensity 4 3 (fun v => timeCoefficient C d y0 (p, v)) (outerRadius d y0 p) r := by |
| 325 | unfold timeResidual radialFlatDensity FlatPrimitive.integrand timeCoefficient |
| 326 | dsimp only |
| 327 | rw [logTaper_deriv_at_radius d y0 p hr, carrier_at_radius C d y0 p hr, |
| 328 | radius_edgeCoordinate d y0 p hr] |
| 329 | change _ = (2 / r) * ((FlatCutoff.edge 4 (edgeCoordinate (outerRadius d y0 p) r) / |
| 330 | edgeCoordinate (outerRadius d y0 p) r ^ 3) * |
| 331 | (r ^ 3 * heatAmplitude C (1 + d.h) (timeOf p) r / |
| 332 | (2 * timeDenominator d.h (timeOf p) p.2) * |
| 333 | taperSlopeFactor d (edgeCoordinate (outerRadius d y0 p) r))) |
| 334 | by_cases he : edgeCoordinate (outerRadius d y0 p) r = 0 |
| 335 | · simp [he] |
| 336 | · field_simp [hr.ne', he, (timeDenominator_pos d.h_pos d.h_lt_half (timeOf_lt_one p)).ne'] |
| 337 | |
| 338 | theorem correction_eq_density (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 339 | (hr : 0 < r) : |
| 340 | correction (heatAmplitude C (1 + d.h) (timeOf p)) (radialTaper d y0 p) r = |
| 341 | radialFlatDensity 4 3 (fun v => correctionCoefficient C d y0 (p, v)) |
| 342 | (outerRadius d y0 p) r := by |
| 343 | unfold correction radialFlatDensity FlatPrimitive.integrand correctionCoefficient |
| 344 | dsimp only |
| 345 | rw [radialTaper_deriv d y0 p hr, carrier_at_radius C d y0 p hr, |
| 346 | carrierRadial_at_radius C d y0 p hr, radius_edgeCoordinate d y0 p hr] |
| 347 | ring |
| 348 | |
| 349 | theorem time_weight_integrable (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 350 | (hr : 0 < r) : |
| 351 | IntegrableOn (fun u => u ^ 2 * timeResidual C d.h (logTaper d y0) (timeOf p) p.2 u) (Ioi r) := by |
| 352 | apply (radialFlatDensity_integrable (by norm_num : (0 : ℝ) < 4) |
| 353 | (outerRadius_pos d y0 p) hr 3 |
| 354 | ((timeCoefficient_contDiff C d y0).continuous.comp |
| 355 | (continuous_const.prodMk continuous_id))).congr |
| 356 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu |
| 357 | exact (time_weight_eq_density C d y0 p (hr.trans hu)).symm |
| 358 | |
| 359 | theorem correction_integrable (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {r : ℝ} |
| 360 | (hr : 0 < r) : |
| 361 | IntegrableOn (correction (heatAmplitude C (1 + d.h) (timeOf p)) (radialTaper d y0 p)) |
| 362 | (Ioi r) := by |
| 363 | apply (radialFlatDensity_integrable (by norm_num : (0 : ℝ) < 4) |
| 364 | (outerRadius_pos d y0 p) hr 3 |
| 365 | ((correctionCoefficient_contDiff C d y0).continuous.comp |
| 366 | (continuous_const.prodMk continuous_id))).congr |
| 367 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu |
| 368 | exact (correction_eq_density C d y0 p (hr.trans hu)).symm |
| 369 | |
| 370 | theorem time_weight_integral (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 371 | (∫ u in Ioi (radius d y0 y), |
| 372 | u ^ 2 * timeResidual C d.h (logTaper d y0) (timeOf y.1) y.1.2 u) = |
| 373 | ParametricFlatFactor.primitive 4 3 (timeCoefficient C d y0) y := by |
| 374 | calc |
| 375 | _ = ∫ u in Ioi (radius d y0 y), |
| 376 | radialFlatDensity 4 3 (fun v => timeCoefficient C d y0 (y.1, v)) |
| 377 | (outerRadius d y0 y.1) u := by |
| 378 | apply integral_congr_ae |
| 379 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu |
| 380 | exact time_weight_eq_density C d y0 y.1 ((radius_pos d y0 y).trans hu) |
| 381 | _ = _ := by |
| 382 | rw [radialFlatDensity_integral (a := fun v => timeCoefficient C d y0 (y.1, v)) |
| 383 | (by norm_num : (0 : ℝ) < 4) |
| 384 | (outerRadius_pos d y0 y.1) (radius_pos d y0 y) 3 |
| 385 | ((timeCoefficient_contDiff C d y0).continuous.comp |
| 386 | (continuous_const.prodMk continuous_id)), edgeCoordinate_radius] |
| 387 | rfl |
| 388 | |
| 389 | theorem correction_integral (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 390 | (∫ u in Ioi (radius d y0 y), |
| 391 | correction (heatAmplitude C (1 + d.h) (timeOf y.1)) (radialTaper d y0 y.1) u) = |
| 392 | ParametricFlatFactor.primitive 4 3 (correctionCoefficient C d y0) y := by |
| 393 | calc |
| 394 | _ = ∫ u in Ioi (radius d y0 y), |
| 395 | radialFlatDensity 4 3 (fun v => correctionCoefficient C d y0 (y.1, v)) |
| 396 | (outerRadius d y0 y.1) u := by |
| 397 | apply integral_congr_ae |
| 398 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu |
| 399 | exact correction_eq_density C d y0 y.1 ((radius_pos d y0 y).trans hu) |
| 400 | _ = _ := by |
| 401 | rw [radialFlatDensity_integral (a := fun v => correctionCoefficient C d y0 (y.1, v)) |
| 402 | (by norm_num : (0 : ℝ) < 4) |
| 403 | (outerRadius_pos d y0 y.1) (radius_pos d y0 y) 3 |
| 404 | ((correctionCoefficient_contDiff C d y0).continuous.comp |
| 405 | (continuous_const.prodMk continuous_id)), edgeCoordinate_radius] |
| 406 | rfl |
| 407 | |
| 408 | theorem viscous_weight_integrable (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) |
| 409 | {r : ℝ} (hr : 0 < r) : |
| 410 | IntegrableOn (fun u => u ^ 2 * viscousResidual |
| 411 | (heatAmplitude C (1 + d.h) (timeOf p)) (radialTaper d y0 p) u) (Ioi r) := by |
| 412 | apply integrableOn_Ioi_of_eventually_zero hr |
| 413 | · intro u hu |
| 414 | have hK := heatAmplitude_contDiffAt C (a := 1 + d.h) |
| 415 | (by linarith [d.h_pos]) (timeOf_lt_one p) hu |
| 416 | have hKr := contDiffAt_deriv hK (m := ∞) (by simp) |
| 417 | have hg := radialTaper_contDiffAt d y0 p hu |
| 418 | have hgr := contDiffAt_deriv hg (m := ∞) (by simp) |
| 419 | have hgrr := contDiffAt_deriv hgr (m := ∞) (by simp) |
| 420 | have hV : ContDiffAt ℝ ∞ (fun v => v ^ 2 * viscousResidual |
| 421 | (heatAmplitude C (1 + d.h) (timeOf p)) (radialTaper d y0 p) v) u := |
| 422 | (contDiffAt_id.pow 2).mul |
| 423 | ((hK.neg.mul (hgrr.add (hgr.div contDiffAt_id hu.ne'))).sub |
| 424 | ((contDiffAt_const.mul hKr).mul hgr)) |
| 425 | exact hV.continuousAt.continuousWithinAt |
| 426 | · have hg := deriv_eventually_zero_of_eventually_const (radialTaper_plateau d y0 p) |
| 427 | have hgg := deriv_eventually_zero_of_eventually_const hg |
| 428 | filter_upwards [hg, hgg] with u hu huu |
| 429 | simp only [viscousResidual, hu, huu, zero_div, add_zero, mul_zero, sub_self] |
| 430 | |
| 431 | noncomputable def angularStress (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 432 | terminalStress C d.h (logTaper d y0) (timeOf y.1) y.1.2 (radius d y0 y) |
| 433 | |
| 434 | noncomputable def angularFactor (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 435 | boundaryCoefficient C d y0 y + (y.2 ^ 3 / radius d y0 y ^ 2) * |
| 436 | (ParametricFlatFactor.factor 4 3 (timeCoefficient C d y0) y + |
| 437 | ParametricFlatFactor.factor 4 3 (correctionCoefficient C d y0) y) |
| 438 | |
| 439 | /-- The leading angular stress itself, with all backward-integral hypotheses |
| 440 | proved for the actual heat carrier and actual outgoing taper. -/ |
| 441 | theorem angularStress_factorization (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 442 | angularStress C d y0 y = (FlatCutoff.edge 4 y.2 / y.2 ^ 3) * angularFactor C d y0 y := by |
| 443 | have hf : ContDiff ℝ 2 (logTaper d y0) := |
| 444 | (logTaper_contDiff d y0).of_le (WithTop.coe_le_coe.mpr le_top) |
| 445 | have hform := terminalStress_formula C d.h_pos d.h_lt_half (timeOf_lt_one y.1) |
| 446 | (radius_pos d y0 y) hf (viscous_weight_integrable C d y0 y.1 (radius_pos d y0 y)) |
| 447 | (correction_integrable C d y0 y.1 (radius_pos d y0 y)) |
| 448 | (time_weight_integrable C d y0 y.1 (radius_pos d y0 y)) |
| 449 | (outgoing_boundary_tendsto_zero d C y0 (t := timeOf y.1) (z := y.1.2) (timeOf_lt_one y.1)) |
| 450 | change angularStress C d y0 y = |
| 451 | heatAmplitude C (1 + d.h) (timeOf y.1) (radius d y0 y) * |
| 452 | deriv (radialTaper d y0 y.1) (radius d y0 y) + |
| 453 | ((∫ u in Ioi (radius d y0 y), |
| 454 | u ^ 2 * timeResidual C d.h (logTaper d y0) (timeOf y.1) y.1.2 u) + |
| 455 | ∫ u in Ioi (radius d y0 y), |
| 456 | correction (heatAmplitude C (1 + d.h) (timeOf y.1)) (radialTaper d y0 y.1) u) / |
| 457 | radius d y0 y ^ 2 at hform |
| 458 | rw [hform, radialTaper_deriv d y0 y.1 (radius_pos d y0 y), edgeCoordinate_radius, |
| 459 | time_weight_integral, correction_integral, |
| 460 | ParametricFlatFactor.primitive_eq_scale_mul_factor, |
| 461 | ParametricFlatFactor.primitive_eq_scale_mul_factor, ← carrier_eq C d y0 y] |
| 462 | unfold angularFactor boundaryCoefficient FlatPrimitive.scale |
| 463 | ring |
| 464 | |
| 465 | /-- The same edge coordinate in the regular radial variable `s=r²/2`. -/ |
| 466 | noncomputable def logCoordinate (S s : ℝ) : ℝ := edgeCoordinate S s / 2 |
| 467 | |
| 468 | theorem logCoordinate_hasDerivAt {S s : ℝ} (hS : 0 < S) (hs : 0 < s) : |
| 469 | HasDerivAt (logCoordinate S) (-1 / s) s := by |
| 470 | convert! (edgeCoordinate_hasDerivAt hS hs).div_const 2 using 1 |
| 471 | ring |
| 472 | |
| 473 | theorem logCoordinate_nonpos {S s : ℝ} (hS : 0 < S) (hSs : S ≤ s) : |
| 474 | logCoordinate S s ≤ 0 := |
| 475 | div_nonpos_of_nonpos_of_nonneg (edgeCoordinate_nonpos hS hSs) (by norm_num) |
| 476 | |
| 477 | noncomputable def outerS (d : TailData) (y0 : ℝ) (p : EdgeParam) : ℝ := |
| 478 | chartQ d p * Real.exp (y0 + 3) |
| 479 | |
| 480 | theorem outerS_pos (d : TailData) (y0 : ℝ) (p : EdgeParam) : 0 < outerS d y0 p := |
| 481 | mul_pos (chartQ_pos d p) (Real.exp_pos _) |
| 482 | |
| 483 | theorem radialS_eq (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 484 | radius d y0 y ^ 2 / 2 = outerS d y0 y.1 * Real.exp (-y.2) := by |
| 485 | rw [radius_square] |
| 486 | unfold outerS |
| 487 | rw [sub_eq_add_neg, Real.exp_add] |
| 488 | ring |
| 489 | |
| 490 | theorem radialS_logCoordinate (d : TailData) (y0 : ℝ) (p : EdgeParam) {s : ℝ} (hs : 0 < s) : |
| 491 | radius d y0 (p, logCoordinate (outerS d y0 p) s) ^ 2 / 2 = s := by |
| 492 | rw [radialS_eq] |
| 493 | have he : -logCoordinate (outerS d y0 p) s = Real.log (s / outerS d y0 p) := by |
| 494 | unfold logCoordinate edgeCoordinate |
| 495 | ring |
| 496 | rw [he, Real.exp_log (div_pos hs (outerS_pos d y0 p))] |
| 497 | field_simp [(outerS_pos d y0 p).ne'] |
| 498 | |
| 499 | theorem logCoordinate_radialS (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 500 | logCoordinate (outerS d y0 y.1) (radius d y0 y ^ 2 / 2) = y.2 := by |
| 501 | rw [radialS_eq] |
| 502 | unfold logCoordinate edgeCoordinate |
| 503 | rw [mul_div_cancel_left₀ _ (outerS_pos d y0 y.1).ne', Real.log_exp] |
| 504 | ring |
| 505 | |
| 506 | theorem physical_logX_s (d : TailData) (y0 : ℝ) (p : EdgeParam) {s : ℝ} (hs : 0 < s) : |
| 507 | Real.log (s / chartQ d p) = y0 + 3 - logCoordinate (outerS d y0 p) s := by |
| 508 | have h := chart_logX d y0 (p, logCoordinate (outerS d y0 p) s) |
| 509 | change Real.log ((radius d y0 (p, logCoordinate (outerS d y0 p) s) ^ 2 / 2) / |
| 510 | chartQ d p) = _ at h |
| 511 | rwa [radialS_logCoordinate d y0 p hs] at h |
| 512 | |
| 513 | theorem carrier_at_s (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) {s : ℝ} (hs : 0 < s) : |
| 514 | carrier C d y0 (p, logCoordinate (outerS d y0 p) s) = |
| 515 | physicalHeat C (1 + d.h) (timeOf p, (s, p.2)) := by |
| 516 | unfold carrier physicalHeat chartPoint radiusPoint |
| 517 | dsimp only |
| 518 | rw [radialS_logCoordinate d y0 p hs] |
| 519 | |
| 520 | noncomputable def scalarFlatDensity (c : ℝ) (j : ℕ) (a : ℝ → ℝ) (S s : ℝ) : ℝ := |
| 521 | (1 / s) * FlatPrimitive.integrand c j a (logCoordinate S s) |
| 522 | |
| 523 | theorem scalarFlatDensity_integrable {c S s : ℝ} (hc : 0 < c) (hS : 0 < S) (hs : 0 < s) |
| 524 | (j : ℕ) {a : ℝ → ℝ} (ha : Continuous a) : |
| 525 | IntegrableOn (scalarFlatDensity c j a S) (Ioi s) := by |
| 526 | apply integrableOn_Ioi_of_eventually_zero hs |
| 527 | · intro u hu |
| 528 | exact ((continuousAt_const.div continuousAt_id hu.ne').mul |
| 529 | ((FlatPrimitive.integrand_continuous hc j ha).continuousAt.comp |
| 530 | (logCoordinate_hasDerivAt hS hu).continuousAt)).continuousWithinAt |
| 531 | · filter_upwards [eventually_ge_atTop S] with u hu |
| 532 | simp only [scalarFlatDensity, FlatPrimitive.integrand, |
| 533 | FlatCutoff.edge_of_nonpos c (logCoordinate_nonpos hS hu), zero_div, zero_mul, mul_zero] |
| 534 | |
| 535 | theorem scalarFlatDensity_integral {c S s : ℝ} (hc : 0 < c) (hS : 0 < S) (hs : 0 < s) |
| 536 | (j : ℕ) {a : ℝ → ℝ} (ha : Continuous a) : |
| 537 | (∫ u in Ioi s, scalarFlatDensity c j a S u) = |
| 538 | FlatPrimitive.primitive c j a (logCoordinate S s) := by |
| 539 | have hd : ∀ u ∈ Ici s, HasDerivAt |
| 540 | (fun v => -FlatPrimitive.primitive c j a (logCoordinate S v)) |
| 541 | (scalarFlatDensity c j a S u) u := by |
| 542 | intro u hu |
| 543 | convert! ((FlatPrimitive.primitive_hasDerivAt hc j ha (logCoordinate S u)).comp u |
| 544 | (logCoordinate_hasDerivAt hS (hs.trans_le hu))).neg using 1 |
| 545 | unfold scalarFlatDensity |
| 546 | ring |
| 547 | have hz : Tendsto (fun v => -FlatPrimitive.primitive c j a (logCoordinate S v)) atTop (𝓝 0) := by |
| 548 | apply tendsto_const_nhds.congr' |
| 549 | filter_upwards [eventually_ge_atTop S] with u hu |
| 550 | simp only [FlatPrimitive.primitive_of_nonpos c j a (logCoordinate_nonpos hS hu), neg_zero] |
| 551 | simpa only [sub_neg_eq_add, zero_add] using |
| 552 | integral_Ioi_of_hasDerivAt_of_tendsto' hd (scalarFlatDensity_integrable hc hS hs j ha) hz |
| 553 | |
| 554 | noncomputable def chi (d : TailData) (p : EdgeParam) : ℝ := |
| 555 | 2 * chartEta d p / |
| 556 | (chartQ d p ^ CoordinateAlgebra.D d.h * CoordinateAlgebra.L d.h (chartEta d p)) |
| 557 | |
| 558 | theorem chartL_pos (d : TailData) (p : EdgeParam) : 0 < CoordinateAlgebra.L d.h (chartEta d p) := |
| 559 | SimilarityProfile.L_pos d.h_pos d.h_lt_half (timeOf_lt_one p) |
| 560 | |
| 561 | theorem chi_contDiff (d : TailData) : ContDiff ℝ ∞ (chi d) := by |
| 562 | apply (contDiff_const.mul (chartEta_contDiff d)).div |
| 563 | (((chartQ_contDiff d).rpow_const_of_ne (fun p => (chartQ_pos d p).ne')).mul |
| 564 | (contDiff_const.sub (contDiff_const.mul ((chartEta_contDiff d).pow 2)))) |
| 565 | intro p |
| 566 | exact (mul_pos (Real.rpow_pos_of_pos (chartQ_pos d p) _) (chartL_pos d p)).ne' |
| 567 | |
| 568 | theorem chi_eq_logScale (d : TailData) (p : EdgeParam) : |
| 569 | chi d p = CoordinateAlgebra.qAxial (chartQ d p) d.h (chartEta d p) / chartQ d p := by |
| 570 | unfold chi CoordinateAlgebra.qAxial |
| 571 | field_simp [(chartQ_pos d p).ne', |
| 572 | (Real.rpow_pos_of_pos (chartQ_pos d p) (CoordinateAlgebra.D d.h)).ne', |
| 573 | (chartL_pos d p).ne'] |
| 574 | |
| 575 | noncomputable def pressureCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 576 | (y : EdgeParam × ℝ) : ℝ := |
| 577 | carrier C d y0 y ^ 2 * tailShape d (3 - y.2) * taperSlopeFactor d y.2 |
| 578 | |
| 579 | theorem pressureCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 580 | ContDiff ℝ ∞ (pressureCoefficient C d y0) := |
| 581 | (((carrier_contDiff C d y0).pow 2).mul |
| 582 | ((tailShape_contDiff d).comp (contDiff_const.sub contDiff_snd))).mul |
| 583 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 584 | |
| 585 | noncomputable def pressureFactor (C : ℝ) (d : TailData) (y0 : ℝ) |
| 586 | (y : EdgeParam × ℝ) : ℝ := |
| 587 | chi d y.1 * ParametricFlatFactor.factor 4 3 (pressureCoefficient C d y0) y |
| 588 | |
| 589 | theorem pressureFactor_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 590 | ContDiff ℝ ∞ (pressureFactor C d y0) := |
| 591 | ((chi_contDiff d).comp contDiff_fst).mul |
| 592 | (ParametricFlatFactor.factor_contDiff (by norm_num : (0 : ℝ) < 4) 3 |
| 593 | (pressureCoefficient_contDiff C d y0)) |
| 594 | |
| 595 | noncomputable def axialCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 596 | (y : EdgeParam × ℝ) : ℝ := |
| 597 | (radius d y0 y ^ 2 / 2) * pressureFactor C d y0 y |
| 598 | |
| 599 | theorem axialCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 600 | ContDiff ℝ ∞ (axialCoefficient C d y0) := |
| 601 | (((radius_contDiff d y0).pow 2).div_const 2).mul (pressureFactor_contDiff C d y0) |
| 602 | |
| 603 | noncomputable def axialFactor (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 604 | ParametricFlatFactor.factor 4 0 (axialCoefficient C d y0) y / radius d y0 y |
| 605 | |
| 606 | /-- The actual canonical pressure gradient on the physical chart. -/ |
| 607 | noncomputable def pressureGradient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 608 | (y : EdgeParam × ℝ) : ℝ := |
| 609 | SimilarityProfile.partialZ |
| 610 | (canonicalPressure (swirlCoefficient C d.h (logTaper d y0))) (chartPoint d y0 y) |
| 611 | |
| 612 | /-- The actual axial backward stress, written in the regular radius `s=r²/2`. -/ |
| 613 | noncomputable def axialStress (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : ℝ := |
| 614 | (∫ s in Ioi (radius d y0 y ^ 2 / 2), |
| 615 | SimilarityProfile.partialZ (canonicalPressure (swirlCoefficient C d.h (logTaper d y0))) |
| 616 | (timeOf y.1, (s, y.1.2))) / radius d y0 y |
| 617 | |
| 618 | /-! ## A profile chart including both endpoints `η = ±1` |
| 619 | |
| 620 | These expressions use the actual heat profile on `|η| ≤ 1`. Its proven |
| 621 | smooth extension and a positive extension of `L` supply coefficients on a |
| 622 | neighborhood of that closed interval. No value of the implicit coordinates |
| 623 | at zero backward time is used. |
| 624 | -/ |
| 625 | |
| 626 | noncomputable def positiveExtension (m x : ℝ) : ℝ := |
| 627 | m / 2 + (x - m / 2) * OutgoingSchedule.sigma ((x - m / 2) / (m / 2)) |
| 628 | |
| 629 | theorem positiveExtension_contDiff (m : ℝ) : |
| 630 | ContDiff ℝ ∞ (positiveExtension m) := |
| 631 | contDiff_const.add ((contDiff_id.sub contDiff_const).mul |
| 632 | (OutgoingSchedule.sigma_contDiff.comp ((contDiff_id.sub contDiff_const).div_const _))) |
| 633 | |
| 634 | theorem positiveExtension_pos {m : ℝ} (hm : 0 < m) (x : ℝ) : |
| 635 | 0 < positiveExtension m x := by |
| 636 | unfold positiveExtension |
| 637 | by_cases hx : x ≤ m / 2 |
| 638 | · rw [OutgoingSchedule.sigma_zero (div_nonpos_of_nonpos_of_nonneg |
| 639 | (sub_nonpos.mpr hx) (by positivity)), mul_zero, add_zero] |
| 640 | positivity |
| 641 | · exact add_pos_of_pos_of_nonneg (by positivity) |
| 642 | (mul_nonneg (sub_nonneg.mpr (le_of_not_ge hx)) (OutgoingSchedule.sigma_nonneg _)) |
| 643 | |
| 644 | theorem positiveExtension_eq {m x : ℝ} (hm : 0 < m) (hx : m ≤ x) : |
| 645 | positiveExtension m x = x := by |
| 646 | unfold positiveExtension |
| 647 | rw [OutgoingSchedule.sigma_one ((le_div_iff₀ (by positivity : 0 < m / 2)).mpr |
| 648 | (by linarith))] |
| 649 | ring |
| 650 | |
| 651 | noncomputable def profileL (d : TailData) (η : ℝ) : ℝ := |
| 652 | positiveExtension (1 - 2 * d.h) (CoordinateAlgebra.L d.h η) |
| 653 | |
| 654 | theorem profileL_contDiff (d : TailData) : ContDiff ℝ ∞ (profileL d) := |
| 655 | (positiveExtension_contDiff _).comp |
| 656 | (contDiff_const.sub (contDiff_const.mul (contDiff_id.pow 2))) |
| 657 | |
| 658 | theorem profileL_pos (d : TailData) (η : ℝ) : 0 < profileL d η := |
| 659 | positiveExtension_pos (by linarith [d.h_lt_half]) _ |
| 660 | |
| 661 | theorem profileL_eq (d : TailData) {η : ℝ} (hη : η ^ 2 ≤ 1) : |
| 662 | profileL d η = CoordinateAlgebra.L d.h η := by |
| 663 | apply positiveExtension_eq (by linarith [d.h_lt_half]) |
| 664 | unfold CoordinateAlgebra.L |
| 665 | nlinarith [d.h_pos] |
| 666 | |
| 667 | theorem eta_sq_le_one {η : ℝ} (hη : η ∈ Icc (-1 : ℝ) 1) : η ^ 2 ≤ 1 := by |
| 668 | nlinarith [mul_nonneg (show 0 ≤ η + 1 by linarith [hη.1]) |
| 669 | (show 0 ≤ 1 - η by linarith [hη.2])] |
| 670 | |
| 671 | noncomputable def profileS (y0 x : ℝ) : ℝ := Real.exp (y0 + 3 - x) |
| 672 | noncomputable def profileRadius (y0 x : ℝ) : ℝ := |
| 673 | Real.sqrt (2 * Real.exp (y0 + 3)) * Real.exp (-x / 2) |
| 674 | noncomputable def profileZ (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 675 | 2 * (1 - y.1 ^ 2) / profileS y0 y.2 |
| 676 | |
| 677 | theorem profileS_pos (y0 x : ℝ) : 0 < profileS y0 x := Real.exp_pos _ |
| 678 | theorem profileS_contDiff (y0 : ℝ) : ContDiff ℝ ∞ (profileS y0) := |
| 679 | (contDiff_const.sub contDiff_id).exp |
| 680 | |
| 681 | theorem profileRadius_pos (y0 x : ℝ) : 0 < profileRadius y0 x := |
| 682 | mul_pos (Real.sqrt_pos.mpr (by positivity)) (Real.exp_pos _) |
| 683 | |
| 684 | theorem profileRadius_contDiff (y0 : ℝ) : ContDiff ℝ ∞ (profileRadius y0) := |
| 685 | contDiff_const.mul (contDiff_id.neg.div_const 2).exp |
| 686 | |
| 687 | theorem profileRadius_square (y0 x : ℝ) : |
| 688 | profileRadius y0 x ^ 2 = 2 * profileS y0 x := by |
| 689 | unfold profileRadius profileS |
| 690 | rw [mul_pow, Real.sq_sqrt (by positivity), ← Real.exp_nat_mul, mul_assoc, ← Real.exp_add] |
| 691 | congr 2 |
| 692 | norm_num |
| 693 | ring |
| 694 | |
| 695 | theorem profileZ_contDiff (y0 : ℝ) : ContDiff ℝ ∞ (profileZ y0) := |
| 696 | (contDiff_const.mul (contDiff_const.sub (contDiff_fst.pow 2))).div |
| 697 | ((profileS_contDiff y0).comp contDiff_snd) (fun y => (profileS_pos y0 y.2).ne') |
| 698 | |
| 699 | theorem profileZ_nonneg (y0 : ℝ) {y : ℝ × ℝ} (hη : y.1 ^ 2 ≤ 1) : |
| 700 | 0 ≤ profileZ y0 y := div_nonneg (by nlinarith) (profileS_pos y0 y.2).le |
| 701 | |
| 702 | noncomputable def profileCarrier (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 703 | C * (profileS y0 y.2) ^ RadialHeatProfile.spatialExponent (1 + d.h) * |
| 704 | HeatProfileExtension.extension (1 + d.h) (profileZ y0 y) |
| 705 | |
| 706 | noncomputable def profileCarrierRadial (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 707 | C * (profileS y0 y.2) ^ (RadialHeatProfile.spatialExponent (1 + d.h) - 1) * |
| 708 | (RadialHeatProfile.spatialExponent (1 + d.h) * |
| 709 | HeatProfileExtension.extension (1 + d.h) (profileZ y0 y) - |
| 710 | profileZ y0 y * deriv (HeatProfileExtension.extension (1 + d.h)) (profileZ y0 y)) * |
| 711 | profileRadius y0 y.2 |
| 712 | |
| 713 | theorem profileCarrier_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 714 | ContDiff ℝ ∞ (profileCarrier C d y0) := |
| 715 | (contDiff_const.mul (((profileS_contDiff y0).comp contDiff_snd).rpow_const_of_ne |
| 716 | (fun y => (profileS_pos y0 y.2).ne'))).mul |
| 717 | ((HeatProfileExtension.extension_contDiff (by linarith [d.h_pos])).comp |
| 718 | (profileZ_contDiff y0)) |
| 719 | |
| 720 | theorem profileCarrierRadial_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 721 | ContDiff ℝ ∞ (profileCarrierRadial C d y0) := by |
| 722 | have hH : ContDiff ℝ ∞ (HeatProfileExtension.extension (1 + d.h)) := |
| 723 | HeatProfileExtension.extension_contDiff (by linarith [d.h_pos]) |
| 724 | have hH' : ContDiff ℝ ∞ (deriv (HeatProfileExtension.extension (1 + d.h))) := |
| 725 | (contDiff_infty_iff_deriv.mp hH).2 |
| 726 | exact ((contDiff_const.mul |
| 727 | (((profileS_contDiff y0).comp contDiff_snd).rpow_const_of_ne |
| 728 | (fun y => (profileS_pos y0 y.2).ne'))).mul |
| 729 | ((contDiff_const.mul (hH.comp (profileZ_contDiff y0))).sub |
| 730 | ((profileZ_contDiff y0).mul (hH'.comp (profileZ_contDiff y0))))).mul |
| 731 | ((profileRadius_contDiff y0).comp contDiff_snd) |
| 732 | |
| 733 | theorem profileCarrier_pos {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 734 | {y : ℝ × ℝ} (hη : y.1 ^ 2 ≤ 1) : 0 < profileCarrier C d y0 y := |
| 735 | mul_pos (mul_pos hC (Real.rpow_pos_of_pos (profileS_pos y0 y.2) _)) |
| 736 | (HeatProfileExtension.extension_pos (by linarith [d.h_pos]) (profileZ_nonneg y0 hη)) |
| 737 | |
| 738 | noncomputable def profileChi (d : TailData) (η : ℝ) : ℝ := 2 * η / profileL d η |
| 739 | |
| 740 | theorem profileChi_contDiff (d : TailData) : ContDiff ℝ ∞ (profileChi d) := |
| 741 | (contDiff_const.mul contDiff_id).div (profileL_contDiff d) (fun η => (profileL_pos d η).ne') |
| 742 | |
| 743 | noncomputable def profileBoundaryCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 744 | (y : ℝ × ℝ) : ℝ := |
| 745 | (2 * profileCarrier C d y0 y / profileRadius y0 y.2) * taperSlopeFactor d y.2 |
| 746 | |
| 747 | noncomputable def profileTimeCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 748 | (y : ℝ × ℝ) : ℝ := |
| 749 | (profileRadius y0 y.2 ^ 3 * profileCarrier C d y0 y / (2 * profileL d y.1)) * |
| 750 | taperSlopeFactor d y.2 |
| 751 | |
| 752 | noncomputable def profileCorrectionCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 753 | (y : ℝ × ℝ) : ℝ := |
| 754 | (profileRadius y0 y.2 * profileCarrier C d y0 y - |
| 755 | profileRadius y0 y.2 ^ 2 * profileCarrierRadial C d y0 y) * taperSlopeFactor d y.2 |
| 756 | |
| 757 | theorem profileBoundaryCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 758 | ContDiff ℝ ∞ (profileBoundaryCoefficient C d y0) := |
| 759 | ((contDiff_const.mul (profileCarrier_contDiff C d y0)).div |
| 760 | ((profileRadius_contDiff y0).comp contDiff_snd) |
| 761 | (fun y => (profileRadius_pos y0 y.2).ne')).mul |
| 762 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 763 | |
| 764 | theorem profileTimeCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 765 | ContDiff ℝ ∞ (profileTimeCoefficient C d y0) := |
| 766 | (((((profileRadius_contDiff y0).comp contDiff_snd).pow 3).mul |
| 767 | (profileCarrier_contDiff C d y0)).div |
| 768 | (contDiff_const.mul ((profileL_contDiff d).comp contDiff_fst)) |
| 769 | (fun y => (mul_pos (by norm_num) (profileL_pos d y.1)).ne')).mul |
| 770 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 771 | |
| 772 | theorem profileCorrectionCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 773 | ContDiff ℝ ∞ (profileCorrectionCoefficient C d y0) := |
| 774 | ((((profileRadius_contDiff y0).comp contDiff_snd).mul |
| 775 | (profileCarrier_contDiff C d y0)).sub |
| 776 | ((((profileRadius_contDiff y0).comp contDiff_snd).pow 2).mul |
| 777 | (profileCarrierRadial_contDiff C d y0))).mul |
| 778 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 779 | |
| 780 | noncomputable def profileAngularFactor (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 781 | profileBoundaryCoefficient C d y0 y + (y.2 ^ 3 / profileRadius y0 y.2 ^ 2) * |
| 782 | (ParametricFlatFactor.factor 4 3 (profileTimeCoefficient C d y0) y + |
| 783 | ParametricFlatFactor.factor 4 3 (profileCorrectionCoefficient C d y0) y) |
| 784 | |
| 785 | /-- The boundary term and the two actual terminal primitives in profile coordinates. -/ |
| 786 | noncomputable def profileAngularStress (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 787 | (FlatCutoff.edge 4 y.2 / y.2 ^ 3) * profileBoundaryCoefficient C d y0 y + |
| 788 | (ParametricFlatFactor.primitive 4 3 (profileTimeCoefficient C d y0) y + |
| 789 | ParametricFlatFactor.primitive 4 3 (profileCorrectionCoefficient C d y0) y) / |
| 790 | profileRadius y0 y.2 ^ 2 |
| 791 | |
| 792 | theorem profileAngularFactor_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 793 | ContDiff ℝ ∞ (profileAngularFactor C d y0) := |
| 794 | (profileBoundaryCoefficient_contDiff C d y0).add |
| 795 | (((contDiff_snd.pow 3).div (((profileRadius_contDiff y0).comp contDiff_snd).pow 2) |
| 796 | (fun y => (sq_pos_of_pos (profileRadius_pos y0 y.2)).ne')).mul |
| 797 | ((ParametricFlatFactor.factor_contDiff (by norm_num : (0 : ℝ) < 4) 3 |
| 798 | (profileTimeCoefficient_contDiff C d y0)).add |
| 799 | (ParametricFlatFactor.factor_contDiff (by norm_num : (0 : ℝ) < 4) 3 |
| 800 | (profileCorrectionCoefficient_contDiff C d y0)))) |
| 801 | |
| 802 | theorem profileAngularStress_factorization (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : |
| 803 | profileAngularStress C d y0 y = |
| 804 | (FlatCutoff.edge 4 y.2 / y.2 ^ 3) * profileAngularFactor C d y0 y := by |
| 805 | unfold profileAngularStress profileAngularFactor |
| 806 | rw [ParametricFlatFactor.primitive_eq_scale_mul_factor, |
| 807 | ParametricFlatFactor.primitive_eq_scale_mul_factor] |
| 808 | unfold FlatPrimitive.scale |
| 809 | ring |
| 810 | |
| 811 | theorem profileAngularFactor_zero (C : ℝ) (d : TailData) (y0 η : ℝ) : |
| 812 | profileAngularFactor C d y0 (η, 0) = |
| 813 | (2 * profileCarrier C d y0 (η, 0) / profileRadius y0 0) * taperSlopeFactor d 0 := by |
| 814 | simp only [profileAngularFactor, zero_pow (by norm_num : 3 ≠ 0), zero_div, zero_mul, |
| 815 | add_zero, profileBoundaryCoefficient] |
| 816 | |
| 817 | theorem profileAngularFactor_zero_pos {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 818 | {η : ℝ} (hη : η ∈ Icc (-1 : ℝ) 1) : 0 < profileAngularFactor C d y0 (η, 0) := by |
| 819 | rw [profileAngularFactor_zero] |
| 820 | exact mul_pos (div_pos (mul_pos (by norm_num) |
| 821 | (profileCarrier_pos hC d y0 (eta_sq_le_one hη))) (profileRadius_pos y0 0)) |
| 822 | (taperSlopeFactor_zero_pos d) |
| 823 | |
| 824 | noncomputable def profilePressureCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 825 | (y : ℝ × ℝ) : ℝ := |
| 826 | profileCarrier C d y0 y ^ 2 * tailShape d (3 - y.2) * taperSlopeFactor d y.2 |
| 827 | |
| 828 | theorem profilePressureCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 829 | ContDiff ℝ ∞ (profilePressureCoefficient C d y0) := |
| 830 | (((profileCarrier_contDiff C d y0).pow 2).mul |
| 831 | ((tailShape_contDiff d).comp (contDiff_const.sub contDiff_snd))).mul |
| 832 | ((taperSlopeFactor_contDiff d).comp contDiff_snd) |
| 833 | |
| 834 | noncomputable def profilePressureFactor (C : ℝ) (d : TailData) (y0 : ℝ) |
| 835 | (y : ℝ × ℝ) : ℝ := |
| 836 | profileChi d y.1 * ParametricFlatFactor.factor 4 3 (profilePressureCoefficient C d y0) y |
| 837 | |
| 838 | /-- The first genuine terminal primitive, before any factorization. -/ |
| 839 | noncomputable def profilePressureGradient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 840 | (y : ℝ × ℝ) : ℝ := |
| 841 | profileChi d y.1 * ParametricFlatFactor.primitive 4 3 (profilePressureCoefficient C d y0) y |
| 842 | |
| 843 | theorem profilePressureFactor_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 844 | ContDiff ℝ ∞ (profilePressureFactor C d y0) := |
| 845 | ((profileChi_contDiff d).comp contDiff_fst).mul |
| 846 | (ParametricFlatFactor.factor_contDiff (by norm_num : (0 : ℝ) < 4) 3 |
| 847 | (profilePressureCoefficient_contDiff C d y0)) |
| 848 | |
| 849 | theorem scale_three (c x : ℝ) : FlatPrimitive.scale c 3 x = FlatCutoff.edge c x := by |
| 850 | by_cases hx : x = 0 |
| 851 | · subst x |
| 852 | simp [FlatPrimitive.scale, FlatCutoff.edge_zero] |
| 853 | · simp only [FlatPrimitive.scale, div_mul_cancel₀ _ (pow_ne_zero 3 hx)] |
| 854 | |
| 855 | theorem profilePressureGradient_factorization (C : ℝ) (d : TailData) (y0 : ℝ) |
| 856 | (y : ℝ × ℝ) : profilePressureGradient C d y0 y = |
| 857 | FlatCutoff.edge 4 y.2 * profilePressureFactor C d y0 y := by |
| 858 | unfold profilePressureGradient profilePressureFactor |
| 859 | rw [ParametricFlatFactor.primitive_eq_scale_mul_factor, scale_three] |
| 860 | ring |
| 861 | |
| 862 | noncomputable def profileAxialCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 863 | (y : ℝ × ℝ) : ℝ := profileS y0 y.2 * profilePressureFactor C d y0 y |
| 864 | |
| 865 | noncomputable def profileAxialFactor (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 866 | ParametricFlatFactor.factor 4 0 (profileAxialCoefficient C d y0) y / profileRadius y0 y.2 |
| 867 | |
| 868 | /-- The second terminal primitive is the integral of the first one, with |
| 869 | the exact Jacobian `s = exp(Y-δ)` of the regular radial coordinate. -/ |
| 870 | noncomputable def profileAxialStress (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 871 | (∫ u in (0 : ℝ)..y.2, profileS y0 u * profilePressureGradient C d y0 (y.1, u)) / |
| 872 | profileRadius y0 y.2 |
| 873 | |
| 874 | theorem profileAxialCoefficient_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 875 | ContDiff ℝ ∞ (profileAxialCoefficient C d y0) := |
| 876 | ((profileS_contDiff y0).comp contDiff_snd).mul (profilePressureFactor_contDiff C d y0) |
| 877 | |
| 878 | theorem profileAxialFactor_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 879 | ContDiff ℝ ∞ (profileAxialFactor C d y0) := |
| 880 | (ParametricFlatFactor.factor_contDiff (by norm_num : (0 : ℝ) < 4) 0 |
| 881 | (profileAxialCoefficient_contDiff C d y0)).div |
| 882 | ((profileRadius_contDiff y0).comp contDiff_snd) (fun y => (profileRadius_pos y0 y.2).ne') |
| 883 | |
| 884 | theorem profileAxialStress_eq_primitive (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : |
| 885 | profileAxialStress C d y0 y = |
| 886 | ParametricFlatFactor.primitive 4 0 (profileAxialCoefficient C d y0) y / |
| 887 | profileRadius y0 y.2 := by |
| 888 | unfold profileAxialStress ParametricFlatFactor.primitive FlatPrimitive.primitive |
| 889 | congr 1 |
| 890 | apply intervalIntegral.integral_congr |
| 891 | intro u hu |
| 892 | dsimp only |
| 893 | rw [profilePressureGradient_factorization] |
| 894 | simp only [FlatPrimitive.integrand, pow_zero, div_one, profileAxialCoefficient] |
| 895 | ring |
| 896 | |
| 897 | theorem profileAxialStress_factorization (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : |
| 898 | profileAxialStress C d y0 y = |
| 899 | FlatCutoff.edge 4 y.2 * y.2 ^ 3 * profileAxialFactor C d y0 y := by |
| 900 | rw [profileAxialStress_eq_primitive, ParametricFlatFactor.primitive_eq_scale_mul_factor] |
| 901 | simp only [FlatPrimitive.scale, pow_zero, div_one, profileAxialFactor] |
| 902 | ring |
| 903 | |
| 904 | /-! ## Identification of both physical pressure primitives -/ |
| 905 | |
| 906 | theorem pressure_density_eq (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) |
| 907 | {s : ℝ} (hs : 0 < s) : |
| 908 | physicalHeat C (1 + d.h) (timeOf p, (s, p.2)) ^ 2 * |
| 909 | tailShape d (Real.log (s / chartQ d p) - y0) * |
| 910 | tailShapeDeriv d (Real.log (s / chartQ d p) - y0) / s = |
| 911 | scalarFlatDensity 4 3 (fun v => pressureCoefficient C d y0 (p, v)) (outerS d y0 p) s := by |
| 912 | unfold scalarFlatDensity FlatPrimitive.integrand pressureCoefficient |
| 913 | dsimp only |
| 914 | rw [carrier_at_s C d y0 p hs, physical_logX_s d y0 p hs] |
| 915 | rw [show y0 + 3 - logCoordinate (outerS d y0 p) s - y0 = |
| 916 | 3 - logCoordinate (outerS d y0 p) s by ring, |
| 917 | tailShapeDeriv_factorization] |
| 918 | ring |
| 919 | |
| 920 | theorem pressureGradient_eq_primitive (C : ℝ) (d : TailData) (y0 : ℝ) |
| 921 | (y : EdgeParam × ℝ) : pressureGradient C d y0 y = |
| 922 | chi d y.1 * ParametricFlatFactor.primitive 4 3 (pressureCoefficient C d y0) y := by |
| 923 | change SimilarityProfile.partialZ (TerminalPressure.outgoingPressure C d y0) |
| 924 | (chartPoint d y0 y) = _ |
| 925 | rw [TerminalPressure.outgoingPressure_partialZ C d y0 (timeOf_lt_one y.1) |
| 926 | (show 0 < (chartPoint d y0 y).2.1 from |
| 927 | div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num))] |
| 928 | have hchi : TerminalPressure.logScaleDerivative d.h (chartPoint d y0 y) = chi d y.1 := |
| 929 | (chi_eq_logScale d y.1).symm |
| 930 | rw [hchi] |
| 931 | congr 1 |
| 932 | change (∫ s in Ioi (radius d y0 y ^ 2 / 2), |
| 933 | physicalHeat C (1 + d.h) (timeOf y.1, (s, y.1.2)) ^ 2 * |
| 934 | tailShape d (Real.log (s / chartQ d y.1) - y0) * |
| 935 | tailShapeDeriv d (Real.log (s / chartQ d y.1) - y0) / s) = _ |
| 936 | calc |
| 937 | _ = ∫ s in Ioi (radius d y0 y ^ 2 / 2), scalarFlatDensity 4 3 |
| 938 | (fun v => pressureCoefficient C d y0 (y.1, v)) (outerS d y0 y.1) s := by |
| 939 | apply integral_congr_ae |
| 940 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with s hs |
| 941 | exact pressure_density_eq C d y0 y.1 |
| 942 | ((div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num)).trans hs) |
| 943 | _ = FlatPrimitive.primitive 4 3 (fun v => pressureCoefficient C d y0 (y.1, v)) |
| 944 | (logCoordinate (outerS d y0 y.1) (radius d y0 y ^ 2 / 2)) := |
| 945 | scalarFlatDensity_integral (by norm_num) (outerS_pos d y0 y.1) |
| 946 | (div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num)) 3 |
| 947 | ((ParametricFlatFactor.coefficient_slice_contDiff |
| 948 | (pressureCoefficient_contDiff C d y0) y.1).continuous) |
| 949 | _ = ParametricFlatFactor.primitive 4 3 (pressureCoefficient C d y0) y := by |
| 950 | rw [logCoordinate_radialS] |
| 951 | rfl |
| 952 | |
| 953 | theorem pressureGradient_factorization (C : ℝ) (d : TailData) (y0 : ℝ) |
| 954 | (y : EdgeParam × ℝ) : pressureGradient C d y0 y = |
| 955 | FlatCutoff.edge 4 y.2 * pressureFactor C d y0 y := by |
| 956 | rw [pressureGradient_eq_primitive, ParametricFlatFactor.primitive_eq_scale_mul_factor, |
| 957 | scale_three] |
| 958 | unfold pressureFactor |
| 959 | ring |
| 960 | |
| 961 | theorem pressureGradient_at_s (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) |
| 962 | {s : ℝ} (hs : 0 < s) : |
| 963 | SimilarityProfile.partialZ (canonicalPressure (swirlCoefficient C d.h (logTaper d y0))) |
| 964 | (timeOf p, (s, p.2)) = |
| 965 | FlatCutoff.edge 4 (logCoordinate (outerS d y0 p) s) * |
| 966 | pressureFactor C d y0 (p, logCoordinate (outerS d y0 p) s) := by |
| 967 | have he := pressureGradient_factorization C d y0 (p, logCoordinate (outerS d y0 p) s) |
| 968 | unfold pressureGradient chartPoint radiusPoint at he |
| 969 | dsimp only at he |
| 970 | rwa [radialS_logCoordinate d y0 p hs] at he |
| 971 | |
| 972 | theorem axial_density_eq (C : ℝ) (d : TailData) (y0 : ℝ) (p : EdgeParam) |
| 973 | {s : ℝ} (hs : 0 < s) : |
| 974 | SimilarityProfile.partialZ (canonicalPressure (swirlCoefficient C d.h (logTaper d y0))) |
| 975 | (timeOf p, (s, p.2)) = |
| 976 | scalarFlatDensity 4 0 (fun v => axialCoefficient C d y0 (p, v)) (outerS d y0 p) s := by |
| 977 | rw [pressureGradient_at_s C d y0 p hs] |
| 978 | unfold scalarFlatDensity FlatPrimitive.integrand axialCoefficient |
| 979 | dsimp only |
| 980 | rw [radialS_logCoordinate d y0 p hs] |
| 981 | simp only [pow_zero, div_one] |
| 982 | field_simp [hs.ne'] |
| 983 | |
| 984 | theorem axialStress_eq_primitive (C : ℝ) (d : TailData) (y0 : ℝ) |
| 985 | (y : EdgeParam × ℝ) : axialStress C d y0 y = |
| 986 | ParametricFlatFactor.primitive 4 0 (axialCoefficient C d y0) y / radius d y0 y := by |
| 987 | unfold axialStress |
| 988 | congr 1 |
| 989 | calc |
| 990 | _ = ∫ s in Ioi (radius d y0 y ^ 2 / 2), scalarFlatDensity 4 0 |
| 991 | (fun v => axialCoefficient C d y0 (y.1, v)) (outerS d y0 y.1) s := by |
| 992 | apply integral_congr_ae |
| 993 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with s hs |
| 994 | exact axial_density_eq C d y0 y.1 |
| 995 | ((div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num)).trans hs) |
| 996 | _ = FlatPrimitive.primitive 4 0 (fun v => axialCoefficient C d y0 (y.1, v)) |
| 997 | (logCoordinate (outerS d y0 y.1) (radius d y0 y ^ 2 / 2)) := |
| 998 | scalarFlatDensity_integral (by norm_num) (outerS_pos d y0 y.1) |
| 999 | (div_pos (sq_pos_of_pos (radius_pos d y0 y)) (by norm_num)) 0 |
| 1000 | ((ParametricFlatFactor.coefficient_slice_contDiff |
| 1001 | (axialCoefficient_contDiff C d y0) y.1).continuous) |
| 1002 | _ = ParametricFlatFactor.primitive 4 0 (axialCoefficient C d y0) y := by |
| 1003 | rw [logCoordinate_radialS] |
| 1004 | rfl |
| 1005 | |
| 1006 | theorem axialStress_factorization (C : ℝ) (d : TailData) (y0 : ℝ) (y : EdgeParam × ℝ) : |
| 1007 | axialStress C d y0 y = FlatCutoff.edge 4 y.2 * y.2 ^ 3 * axialFactor C d y0 y := by |
| 1008 | rw [axialStress_eq_primitive, ParametricFlatFactor.primitive_eq_scale_mul_factor] |
| 1009 | simp only [FlatPrimitive.scale, pow_zero, div_one, axialFactor] |
| 1010 | ring |
| 1011 | |
| 1012 | /-! ## Agreement with the physical section away from the endpoints -/ |
| 1013 | |
| 1014 | noncomputable def normalizedParam (η : ℝ) : EdgeParam := (Real.log (1 - η ^ 2), η) |
| 1015 | |
| 1016 | theorem timeOf_normalizedParam {η : ℝ} (hη : η ^ 2 < 1) : |
| 1017 | timeOf (normalizedParam η) = η ^ 2 := by |
| 1018 | simp only [timeOf, normalizedParam, Real.exp_log (sub_pos.mpr hη)] |
| 1019 | ring |
| 1020 | |
| 1021 | theorem chartQ_normalizedParam (d : TailData) {η : ℝ} (hη : η ^ 2 < 1) : |
| 1022 | chartQ d (normalizedParam η) = 1 := by |
| 1023 | unfold chartQ axisPoint |
| 1024 | rw [timeOf_normalizedParam hη] |
| 1025 | exact PhysicalHeatCoordinates.q_normalizedSection d.h_pos d.h_lt_half hη 0 |
| 1026 | |
| 1027 | theorem chartEta_normalizedParam (d : TailData) {η : ℝ} (hη : η ^ 2 < 1) : |
| 1028 | chartEta d (normalizedParam η) = η := by |
| 1029 | unfold chartEta axisPoint |
| 1030 | rw [timeOf_normalizedParam hη] |
| 1031 | exact PhysicalHeatCoordinates.eta_normalizedSection d.h_pos d.h_lt_half hη 0 |
| 1032 | |
| 1033 | theorem radius_normalizedParam (d : TailData) (y0 x : ℝ) {η : ℝ} (hη : η ^ 2 < 1) : |
| 1034 | radius d y0 (normalizedParam η, x) = profileRadius y0 x := by |
| 1035 | unfold radius outerRadius |
| 1036 | dsimp only |
| 1037 | rw [chartQ_normalizedParam d hη] |
| 1038 | simp only [mul_one] |
| 1039 | rfl |
| 1040 | |
| 1041 | theorem radialS_normalizedParam (d : TailData) (y0 x : ℝ) {η : ℝ} (hη : η ^ 2 < 1) : |
| 1042 | radius d y0 (normalizedParam η, x) ^ 2 / 2 = profileS y0 x := by |
| 1043 | rw [radius_normalizedParam d y0 x hη, profileRadius_square] |
| 1044 | ring |
| 1045 | |
| 1046 | theorem carrier_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1047 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1048 | carrier C d y0 (normalizedParam η, x) = profileCarrier C d y0 (η, x) := by |
| 1049 | unfold carrier physicalHeat chartPoint radiusPoint RadialHeatProfile.spatialProfile |
| 1050 | dsimp only |
| 1051 | rw [timeOf_normalizedParam hη, radialS_normalizedParam d y0 x hη] |
| 1052 | unfold profileCarrier |
| 1053 | dsimp only |
| 1054 | rw [HeatProfileExtension.extension_eq_profile _ (profileZ_nonneg y0 hη.le)] |
| 1055 | unfold profileZ |
| 1056 | ring |
| 1057 | |
| 1058 | theorem carrierRadial_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1059 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1060 | carrierRadial C d y0 (normalizedParam η, x) = profileCarrierRadial C d y0 (η, x) := by |
| 1061 | rw [carrierRadial_eq] |
| 1062 | unfold heatAmplitude |
| 1063 | rw [deriv_const_mul_field, |
| 1064 | RadialHeatProfile.radialProfile_first_derivative (by linarith [d.h_pos]) |
| 1065 | (sub_pos.mpr (timeOf_lt_one (normalizedParam η))) (radius_pos d y0 (normalizedParam η, x))] |
| 1066 | unfold RadialHeatProfile.radialFirst RadialHeatProfile.spatialFirst |
| 1067 | rw [timeOf_normalizedParam hη, radialS_normalizedParam d y0 x hη, |
| 1068 | radius_normalizedParam d y0 x hη] |
| 1069 | have hder := HeatProfileExtension.iteratedDeriv_extension_eq_profileJet |
| 1070 | (a := 1 + d.h) (by linarith [d.h_pos]) 1 (profileZ_nonneg y0 (y := (η, x)) hη.le) |
| 1071 | simp only [iteratedDeriv_one] at hder |
| 1072 | unfold profileCarrierRadial |
| 1073 | dsimp only |
| 1074 | rw [hder, HeatProfileExtension.extension_eq_profile _ (profileZ_nonneg y0 hη.le)] |
| 1075 | unfold profileZ |
| 1076 | ring |
| 1077 | |
| 1078 | theorem denominator_normalizedParam (d : TailData) {η : ℝ} (hη : η ^ 2 < 1) : |
| 1079 | denominator d (normalizedParam η) = profileL d η := by |
| 1080 | change chartQ d (normalizedParam η) * CoordinateAlgebra.L d.h (chartEta d (normalizedParam η)) = _ |
| 1081 | rw [chartQ_normalizedParam d hη, chartEta_normalizedParam d hη, one_mul, profileL_eq d hη.le] |
| 1082 | |
| 1083 | theorem chi_normalizedParam (d : TailData) {η : ℝ} (hη : η ^ 2 < 1) : |
| 1084 | chi d (normalizedParam η) = profileChi d η := by |
| 1085 | unfold chi profileChi |
| 1086 | rw [chartQ_normalizedParam d hη, chartEta_normalizedParam d hη, Real.one_rpow, |
| 1087 | one_mul, profileL_eq d hη.le] |
| 1088 | |
| 1089 | theorem boundaryCoefficient_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1090 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1091 | boundaryCoefficient C d y0 (normalizedParam η, x) = profileBoundaryCoefficient C d y0 (η, x) := by |
| 1092 | unfold boundaryCoefficient profileBoundaryCoefficient |
| 1093 | rw [carrier_normalizedParam C d y0 x hη, radius_normalizedParam d y0 x hη] |
| 1094 | |
| 1095 | theorem timeCoefficient_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1096 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1097 | timeCoefficient C d y0 (normalizedParam η, x) = profileTimeCoefficient C d y0 (η, x) := by |
| 1098 | unfold timeCoefficient profileTimeCoefficient |
| 1099 | rw [carrier_normalizedParam C d y0 x hη, radius_normalizedParam d y0 x hη, |
| 1100 | denominator_normalizedParam d hη] |
| 1101 | |
| 1102 | theorem correctionCoefficient_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1103 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1104 | correctionCoefficient C d y0 (normalizedParam η, x) = profileCorrectionCoefficient C d y0 (η, x) := by |
| 1105 | unfold correctionCoefficient profileCorrectionCoefficient |
| 1106 | rw [carrier_normalizedParam C d y0 x hη, radius_normalizedParam d y0 x hη, |
| 1107 | carrierRadial_normalizedParam C d y0 x hη] |
| 1108 | |
| 1109 | theorem pressureCoefficient_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1110 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1111 | pressureCoefficient C d y0 (normalizedParam η, x) = profilePressureCoefficient C d y0 (η, x) := by |
| 1112 | unfold pressureCoefficient profilePressureCoefficient |
| 1113 | rw [carrier_normalizedParam C d y0 x hη] |
| 1114 | |
| 1115 | theorem factor_congr_slice {P Q : Type*} (c : ℝ) (j : ℕ) (b : P × ℝ → ℝ) |
| 1116 | (a : Q × ℝ → ℝ) (p : P) (q : Q) (x : ℝ) (he : ∀ u, b (p, u) = a (q, u)) : |
| 1117 | ParametricFlatFactor.factor c j b (p, x) = ParametricFlatFactor.factor c j a (q, x) := by |
| 1118 | unfold ParametricFlatFactor.factor ParametricFlatFactor.kernel |
| 1119 | apply integral_congr_ae |
| 1120 | filter_upwards with t |
| 1121 | rw [he] |
| 1122 | |
| 1123 | theorem angularFactor_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1124 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1125 | angularFactor C d y0 (normalizedParam η, x) = profileAngularFactor C d y0 (η, x) := by |
| 1126 | unfold angularFactor profileAngularFactor |
| 1127 | rw [boundaryCoefficient_normalizedParam C d y0 x hη, radius_normalizedParam d y0 x hη, |
| 1128 | factor_congr_slice 4 3 _ _ _ _ x (fun u => timeCoefficient_normalizedParam C d y0 u hη), |
| 1129 | factor_congr_slice 4 3 _ _ _ _ x (fun u => correctionCoefficient_normalizedParam C d y0 u hη)] |
| 1130 | |
| 1131 | theorem pressureFactor_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1132 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1133 | pressureFactor C d y0 (normalizedParam η, x) = profilePressureFactor C d y0 (η, x) := by |
| 1134 | unfold pressureFactor profilePressureFactor |
| 1135 | rw [chi_normalizedParam d hη, |
| 1136 | factor_congr_slice 4 3 _ _ _ _ x (fun u => pressureCoefficient_normalizedParam C d y0 u hη)] |
| 1137 | |
| 1138 | theorem axialCoefficient_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1139 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1140 | axialCoefficient C d y0 (normalizedParam η, x) = profileAxialCoefficient C d y0 (η, x) := by |
| 1141 | unfold axialCoefficient profileAxialCoefficient |
| 1142 | rw [radialS_normalizedParam d y0 x hη, pressureFactor_normalizedParam C d y0 x hη] |
| 1143 | |
| 1144 | theorem axialFactor_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1145 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1146 | axialFactor C d y0 (normalizedParam η, x) = profileAxialFactor C d y0 (η, x) := by |
| 1147 | unfold axialFactor profileAxialFactor |
| 1148 | rw [radius_normalizedParam d y0 x hη, |
| 1149 | factor_congr_slice 4 0 _ _ _ _ x (fun u => axialCoefficient_normalizedParam C d y0 u hη)] |
| 1150 | |
| 1151 | theorem angularStress_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1152 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1153 | angularStress C d y0 (normalizedParam η, x) = profileAngularStress C d y0 (η, x) := by |
| 1154 | rw [angularStress_factorization, profileAngularStress_factorization, |
| 1155 | angularFactor_normalizedParam C d y0 x hη] |
| 1156 | |
| 1157 | theorem axialStress_normalizedParam (C : ℝ) (d : TailData) (y0 x : ℝ) |
| 1158 | {η : ℝ} (hη : η ^ 2 < 1) : |
| 1159 | axialStress C d y0 (normalizedParam η, x) = profileAxialStress C d y0 (η, x) := by |
| 1160 | rw [axialStress_factorization, profileAxialStress_factorization, |
| 1161 | axialFactor_normalizedParam C d y0 x hη] |
| 1162 | |
| 1163 | /-! ## Full profile stress, all jets, and the edge direction -/ |
| 1164 | |
| 1165 | noncomputable def profileStress (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ × ℝ := |
| 1166 | (profileAngularStress C d y0 y, profileAxialStress C d y0 y) |
| 1167 | |
| 1168 | noncomputable def profileStressFactor (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ × ℝ := |
| 1169 | (profileAngularFactor C d y0 y, y.2 ^ 6 * profileAxialFactor C d y0 y) |
| 1170 | |
| 1171 | theorem profileStressFactor_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 1172 | ContDiff ℝ ∞ (profileStressFactor C d y0) := |
| 1173 | (profileAngularFactor_contDiff C d y0).prodMk |
| 1174 | ((contDiff_snd.pow 6).mul (profileAxialFactor_contDiff C d y0)) |
| 1175 | |
| 1176 | theorem profileStress_factorization (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : |
| 1177 | profileStress C d y0 y = |
| 1178 | (FlatCutoff.edge 4 y.2 / y.2 ^ 3) • profileStressFactor C d y0 y := by |
| 1179 | apply Prod.ext |
| 1180 | · exact profileAngularStress_factorization C d y0 y |
| 1181 | · change profileAxialStress C d y0 y = |
| 1182 | (FlatCutoff.edge 4 y.2 / y.2 ^ 3) * (y.2 ^ 6 * profileAxialFactor C d y0 y) |
| 1183 | rw [profileAxialStress_factorization] |
| 1184 | by_cases hx : y.2 = 0 |
| 1185 | · simp [hx] |
| 1186 | · field_simp [hx] |
| 1187 | |
| 1188 | theorem profileStress_contDiff (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 1189 | ContDiff ℝ ∞ (profileStress C d y0) := by |
| 1190 | have he : profileStress C d y0 = fun y => |
| 1191 | (FlatCutoff.edge 4 y.2 / y.2 ^ 3) • profileStressFactor C d y0 y := |
| 1192 | funext (profileStress_factorization C d y0) |
| 1193 | rw [he] |
| 1194 | exact ((FlatCutoff.edge_div_pow_contDiff (by norm_num : (0 : ℝ) < 4) 3).comp |
| 1195 | contDiff_snd).smul (profileStressFactor_contDiff C d y0) |
| 1196 | |
| 1197 | theorem profileStressFactor_zero (C : ℝ) (d : TailData) (y0 η : ℝ) : |
| 1198 | profileStressFactor C d y0 (η, 0) = (profileAngularFactor C d y0 (η, 0), 0) := by |
| 1199 | simp [profileStressFactor] |
| 1200 | |
| 1201 | theorem profileStressFactor_zero_ne {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 1202 | {η : ℝ} (hη : η ∈ Icc (-1 : ℝ) 1) : profileStressFactor C d y0 (η, 0) ≠ 0 := by |
| 1203 | intro he |
| 1204 | have hzero := congrArg Prod.fst he |
| 1205 | exact (profileAngularFactor_zero_pos hC d y0 hη).ne' hzero |
| 1206 | |
| 1207 | noncomputable def profileTilt (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 1208 | y.2 ^ 6 * profileAxialFactor C d y0 y / profileAngularFactor C d y0 y |
| 1209 | |
| 1210 | theorem profileTilt_eq_ratio (C : ℝ) (d : TailData) (y0 η : ℝ) {x : ℝ} (hx : 0 < x) : |
| 1211 | profileAxialStress C d y0 (η, x) / profileAngularStress C d y0 (η, x) = |
| 1212 | profileTilt C d y0 (η, x) := by |
| 1213 | have hw : FlatCutoff.edge 4 x / x ^ 3 ≠ 0 := div_ne_zero (FlatCutoff.edge_pos 4 hx).ne' |
| 1214 | (pow_ne_zero 3 hx.ne') |
| 1215 | have hvec := congrArg Prod.snd (profileStress_factorization C d y0 (η, x)) |
| 1216 | change profileAxialStress C d y0 (η, x) = |
| 1217 | (FlatCutoff.edge 4 x / x ^ 3) * (x ^ 6 * profileAxialFactor C d y0 (η, x)) at hvec |
| 1218 | rw [hvec, profileAngularStress_factorization] |
| 1219 | exact mul_div_mul_left _ _ hw |
| 1220 | |
| 1221 | theorem profileTilt_zero (C : ℝ) (d : TailData) (y0 η : ℝ) : profileTilt C d y0 (η, 0) = 0 := by |
| 1222 | simp [profileTilt] |
| 1223 | |
| 1224 | theorem profileTilt_contDiffAt {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 1225 | {η : ℝ} (hη : η ∈ Icc (-1 : ℝ) 1) : ContDiffAt ℝ ∞ (profileTilt C d y0) (η, 0) := |
| 1226 | ((contDiffAt_snd.pow 6).mul (profileAxialFactor_contDiff C d y0).contDiffAt).div |
| 1227 | (profileAngularFactor_contDiff C d y0).contDiffAt |
| 1228 | (profileAngularFactor_zero_pos hC d y0 hη).ne' |
| 1229 | |
| 1230 | /-- The actual velocity shear ratio for the terminal product `K f_o`. -/ |
| 1231 | noncomputable def profileSpeed (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 1232 | 1 - profileRadius y0 y.2 * profileCarrierRadial C d y0 y / profileCarrier C d y0 y - |
| 1233 | 2 * tailShapeDeriv d (3 - y.2) / tailShape d (3 - y.2) |
| 1234 | |
| 1235 | theorem profileSpeed_contDiffAt_of_ne (C : ℝ) (d : TailData) (y0 : ℝ) |
| 1236 | {y : ℝ × ℝ} (hK : profileCarrier C d y0 y ≠ 0) : |
| 1237 | ContDiffAt ℝ ∞ (profileSpeed C d y0) y := by |
| 1238 | apply ContDiffAt.sub |
| 1239 | · exact contDiffAt_const.sub |
| 1240 | ((((profileRadius_contDiff y0).comp contDiff_snd).contDiffAt.mul |
| 1241 | (profileCarrierRadial_contDiff C d y0).contDiffAt).div |
| 1242 | (profileCarrier_contDiff C d y0).contDiffAt hK) |
| 1243 | · exact (contDiffAt_const.mul ((tailShapeDeriv_contDiff d).comp |
| 1244 | (contDiff_const.sub contDiff_snd)).contDiffAt).div |
| 1245 | ((tailShape_contDiff d).comp (contDiff_const.sub contDiff_snd)).contDiffAt |
| 1246 | (tailShape_pos d _).ne' |
| 1247 | |
| 1248 | theorem profileSpeed_contDiffAt {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 1249 | {y : ℝ × ℝ} (hη : y.1 ^ 2 ≤ 1) : ContDiffAt ℝ ∞ (profileSpeed C d y0) y := |
| 1250 | profileSpeed_contDiffAt_of_ne C d y0 (profileCarrier_pos hC d y0 hη).ne' |
| 1251 | |
| 1252 | noncomputable def profileDomain (C : ℝ) (d : TailData) (y0 : ℝ) : Set (ℝ × ℝ) := |
| 1253 | {y | profileCarrier C d y0 y ≠ 0} |
| 1254 | |
| 1255 | theorem profileDomain_open (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 1256 | IsOpen (profileDomain C d y0) := |
| 1257 | isOpen_ne.preimage (profileCarrier_contDiff C d y0).continuous |
| 1258 | |
| 1259 | theorem profileDomain_contains_closed {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) : |
| 1260 | (Icc (-1 : ℝ) 1) ×ˢ (univ : Set ℝ) ⊆ profileDomain C d y0 := by |
| 1261 | intro y hy |
| 1262 | exact (profileCarrier_pos hC d y0 (eta_sq_le_one hy.1)).ne' |
| 1263 | |
| 1264 | theorem profileSpeed_contDiffOn (C : ℝ) (d : TailData) (y0 : ℝ) : |
| 1265 | ContDiffOn ℝ ∞ (profileSpeed C d y0) (profileDomain C d y0) := |
| 1266 | fun _ hy => (profileSpeed_contDiffAt_of_ne C d y0 hy).contDiffWithinAt |
| 1267 | |
| 1268 | theorem extended_heat_slope (d : TailData) {z : ℝ} (hz : 0 ≤ z) : |
| 1269 | -z * deriv (HeatProfileExtension.extension (1 + d.h)) z < |
| 1270 | d.h * HeatProfileExtension.extension (1 + d.h) z := by |
| 1271 | rcases eq_or_lt_of_le hz with he | hp |
| 1272 | · subst z |
| 1273 | simpa only [neg_zero, zero_mul, HeatProfileExtension.extension_zero |
| 1274 | (a := 1 + d.h) (by linarith [d.h_pos]), |
| 1275 | mul_one] using d.h_pos |
| 1276 | · have he := HeatProfileExtension.iteratedDeriv_extension_eq_profileJet |
| 1277 | (a := 1 + d.h) (by linarith [d.h_pos]) 1 hp.le |
| 1278 | simp only [iteratedDeriv_one] at he |
| 1279 | rw [he, HeatProfileExtension.extension_eq_profile _ hp.le, |
| 1280 | ← (RadialHeatProfile.profile_hasDerivAt (by linarith [d.h_pos]) hp).deriv] |
| 1281 | exact (div_lt_iff₀ (RadialHeatProfile.profile_pos (by linarith [d.h_pos]) hp.le)).mp |
| 1282 | (RadialHeatProfile.profile_h_logSlope_lt d.h_pos hp) |
| 1283 | |
| 1284 | theorem profileCarrier_radial_gap {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 1285 | {y : ℝ × ℝ} (hη : y.1 ^ 2 ≤ 1) : |
| 1286 | profileRadius y0 y.2 * profileCarrierRadial C d y0 y + profileCarrier C d y0 y < 0 := by |
| 1287 | have hs := profileS_pos y0 y.2 |
| 1288 | have hlog := extended_heat_slope d (profileZ_nonneg y0 hη) |
| 1289 | have hb : 2 * (RadialHeatProfile.spatialExponent (1 + d.h) * |
| 1290 | HeatProfileExtension.extension (1 + d.h) (profileZ y0 y) - |
| 1291 | profileZ y0 y * deriv (HeatProfileExtension.extension (1 + d.h)) (profileZ y0 y)) + |
| 1292 | HeatProfileExtension.extension (1 + d.h) (profileZ y0 y) < 0 := by |
| 1293 | unfold RadialHeatProfile.spatialExponent |
| 1294 | nlinarith |
| 1295 | have hi := mul_neg_of_pos_of_neg |
| 1296 | (mul_pos hC (Real.rpow_pos_of_pos hs (RadialHeatProfile.spatialExponent (1 + d.h)))) hb |
| 1297 | convert! hi using 1 |
| 1298 | unfold profileCarrierRadial profileCarrier |
| 1299 | rw [Real.rpow_sub hs, Real.rpow_one] |
| 1300 | field_simp [hs.ne'] |
| 1301 | ring_nf |
| 1302 | rw [profileRadius_square] |
| 1303 | ring |
| 1304 | |
| 1305 | theorem profileSpeed_zero_gt_two {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 1306 | {η : ℝ} (hη : η ∈ Icc (-1 : ℝ) 1) : 2 < profileSpeed C d y0 (η, 0) := by |
| 1307 | have hK := profileCarrier_pos hC d y0 (y := (η, 0)) (eta_sq_le_one hη) |
| 1308 | have hgap := profileCarrier_radial_gap hC d y0 (y := (η, 0)) (eta_sq_le_one hη) |
| 1309 | have hdiv : profileRadius y0 0 * profileCarrierRadial C d y0 (η, 0) / |
| 1310 | profileCarrier C d y0 (η, 0) < -1 := (div_lt_iff₀ hK).mpr (by linarith) |
| 1311 | have hz : tailShapeDeriv d 3 = 0 := by |
| 1312 | have he := tailShapeDeriv_factorization d 0 |
| 1313 | simpa only [sub_zero, FlatCutoff.edge_zero, zero_div, zero_mul] using he |
| 1314 | simp only [profileSpeed, sub_zero, hz, mul_zero, zero_div] |
| 1315 | linarith |
| 1316 | |
| 1317 | noncomputable def profileConeGap (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 1318 | 2 - (profileSpeed C d y0 y - 2) * profileTilt C d y0 y ^ 2 |
| 1319 | |
| 1320 | theorem profileConeGap_zero (C : ℝ) (d : TailData) (y0 η : ℝ) : |
| 1321 | profileConeGap C d y0 (η, 0) = 2 := by |
| 1322 | simp [profileConeGap, profileTilt_zero] |
| 1323 | |
| 1324 | theorem compact_positive_collar {E : Type*} [NormedAddCommGroup E] |
| 1325 | {K : Set E} (hK : IsCompact K) {f : E × ℝ → ℝ} |
| 1326 | (hf : ∀ p ∈ K, ContinuousAt f (p, 0)) (hpos : ∀ p ∈ K, 0 < f (p, 0)) : |
| 1327 | ∃ ε m : ℝ, 0 < ε ∧ 0 < m ∧ ∀ p ∈ K, ∀ x : ℝ, |x| < ε → m ≤ f (p, x) := by |
| 1328 | have hc : ContinuousOn (fun p => f (p, 0)) K := by |
| 1329 | intro p hp |
| 1330 | exact ((hf p hp).comp (f := fun q : E => (q, (0 : ℝ))) |
| 1331 | (continuousAt_id.prodMk continuousAt_const)).continuousWithinAt |
| 1332 | obtain ⟨m, hm, hmb⟩ := UniformCone.positive_uniform_margin hK hc hpos |
| 1333 | have hE : ∀ᶠ x in 𝓝 (0 : ℝ), ∀ p ∈ K, m / 2 < f (p, x) := by |
| 1334 | apply hK.eventually_forall_of_forall_eventually |
| 1335 | intro p hp |
| 1336 | exact ((hf p hp).comp (f := fun q : ℝ × E => (q.2, q.1)) |
| 1337 | (continuousAt_snd.prodMk continuousAt_fst)).eventually |
| 1338 | (Ioi_mem_nhds (lt_of_lt_of_le (show m / 2 < m by linarith) (hmb p hp))) |
| 1339 | obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.mp hE |
| 1340 | refine ⟨ε, m / 2, hε, by positivity, ?_⟩ |
| 1341 | intro p hp x hx |
| 1342 | exact (hball (by simpa only [Metric.mem_ball, Real.dist_eq, sub_zero] using hx) p hp).le |
| 1343 | |
| 1344 | /-- One strict relative cone margin on a collar, uniformly for `-1 ≤ η ≤ 1`. |
| 1345 | The shear is the finite, actual terminal velocity shear; its value is proved |
| 1346 | strictly larger than two on the boundary. -/ |
| 1347 | theorem profile_uniform_cone {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) : |
| 1348 | ∃ ε m : ℝ, 0 < ε ∧ 0 < m ∧ ∀ η ∈ Icc (-1 : ℝ) 1, ∀ x : ℝ, |x| < ε → |
| 1349 | m ≤ profileAngularFactor C d y0 (η, x) ∧ |
| 1350 | m ≤ profileSpeed C d y0 (η, x) - 2 ∧ m ≤ profileConeGap C d y0 (η, x) := by |
| 1351 | let f : ℝ × ℝ → ℝ := fun y => min (profileAngularFactor C d y0 y) |
| 1352 | (min (profileSpeed C d y0 y - 2) (profileConeGap C d y0 y)) |
| 1353 | have hc : ∀ η ∈ Icc (-1 : ℝ) 1, ContinuousAt f (η, 0) := by |
| 1354 | intro η hη |
| 1355 | have hs := (profileSpeed_contDiffAt hC d y0 (y := (η, 0)) (eta_sq_le_one hη)).continuousAt |
| 1356 | have ht := (profileTilt_contDiffAt hC d y0 hη).continuousAt |
| 1357 | exact (profileAngularFactor_contDiff C d y0).continuous.continuousAt.min |
| 1358 | ((hs.sub continuousAt_const).min |
| 1359 | (continuousAt_const.sub ((hs.sub continuousAt_const).mul (ht.pow 2)))) |
| 1360 | have hp : ∀ η ∈ Icc (-1 : ℝ) 1, 0 < f (η, 0) := by |
| 1361 | intro η hη |
| 1362 | apply lt_min (profileAngularFactor_zero_pos hC d y0 hη) |
| 1363 | apply lt_min (sub_pos.mpr (profileSpeed_zero_gt_two hC d y0 hη)) |
| 1364 | rw [profileConeGap_zero] |
| 1365 | norm_num |
| 1366 | obtain ⟨ε, m, hε, hm, hb⟩ := compact_positive_collar isCompact_Icc hc hp |
| 1367 | refine ⟨ε, m, hε, hm, ?_⟩ |
| 1368 | intro η hη x hx |
| 1369 | exact (le_min_iff.mp (hb η hη x hx)).imp_right (fun h => le_min_iff.mp h) |
| 1370 | |
| 1371 | /-! ## The shear formula is the derivative of the actual profile velocity -/ |
| 1372 | |
| 1373 | noncomputable def profileAngularVelocity (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 1374 | profileCarrier C d y0 y * tailShape d (3 - y.2) |
| 1375 | |
| 1376 | theorem profileS_hasDerivAt (y0 x : ℝ) : HasDerivAt (profileS y0) (-profileS y0 x) x := by |
| 1377 | convert! (((hasDerivAt_const x (y0 + 3)).sub (hasDerivAt_id x)).exp) using 1 |
| 1378 | simp [profileS] |
| 1379 | |
| 1380 | theorem profileZ_hasDerivAt (y0 η x : ℝ) : |
| 1381 | HasDerivAt (fun u => profileZ y0 (η, u)) (profileZ y0 (η, x)) x := by |
| 1382 | convert! (hasDerivAt_const x (2 * (1 - η ^ 2))).div |
| 1383 | (profileS_hasDerivAt y0 x) (profileS_pos y0 x).ne' using 1 |
| 1384 | unfold profileZ |
| 1385 | dsimp only |
| 1386 | field_simp [(profileS_pos y0 x).ne'] ; ring |
| 1387 | |
| 1388 | theorem profileCarrier_hasDerivAt_edge (C : ℝ) (d : TailData) (y0 η x : ℝ) : |
| 1389 | HasDerivAt (fun u => profileCarrier C d y0 (η, u)) |
| 1390 | (-(profileRadius y0 x * profileCarrierRadial C d y0 (η, x)) / 2) x := by |
| 1391 | have hs := profileS_pos y0 x |
| 1392 | have hpow := (profileS_hasDerivAt y0 x).rpow_const |
| 1393 | (p := RadialHeatProfile.spatialExponent (1 + d.h)) (Or.inl hs.ne') |
| 1394 | have hH := ((HeatProfileExtension.extension_contDiff (a := 1 + d.h) |
| 1395 | (by linarith [d.h_pos])).differentiable (by simp) (profileZ y0 (η, x))).hasDerivAt |
| 1396 | have hp := (hpow.fun_mul (hH.comp x (profileZ_hasDerivAt y0 η x))).const_mul C |
| 1397 | simp only [Function.comp_def] at hp |
| 1398 | convert! hp using 1 |
| 1399 | · funext u |
| 1400 | unfold profileCarrier |
| 1401 | dsimp only [Function.comp_apply] |
| 1402 | ring |
| 1403 | · unfold profileCarrierRadial |
| 1404 | dsimp only |
| 1405 | rw [Real.rpow_sub hs, Real.rpow_one] |
| 1406 | field_simp [hs.ne'] |
| 1407 | ring_nf |
| 1408 | rw [profileRadius_square] |
| 1409 | ring |
| 1410 | |
| 1411 | theorem profileAngularVelocity_hasDerivAt_edge (C : ℝ) (d : TailData) (y0 η x : ℝ) : |
| 1412 | HasDerivAt (fun u => profileAngularVelocity C d y0 (η, u)) |
| 1413 | (-(profileRadius y0 x * profileCarrierRadial C d y0 (η, x)) / 2 * tailShape d (3 - x) - |
| 1414 | profileCarrier C d y0 (η, x) * tailShapeDeriv d (3 - x)) x := by |
| 1415 | have hf := (tailShape_hasDerivAt d (3 - x)).comp x |
| 1416 | ((hasDerivAt_const x 3).sub (hasDerivAt_id x)) |
| 1417 | convert! (profileCarrier_hasDerivAt_edge C d y0 η x).mul hf using 1 |
| 1418 | dsimp only [Function.comp_apply] |
| 1419 | ring |
| 1420 | |
| 1421 | /-- Since `δ=Y-2 log r`, `1+2 ∂δ log(K f_o)` is exactly the radial shear |
| 1422 | `1-r ∂r(K f_o)/(K f_o)`. Here its logarithmic derivative is proved directly. -/ |
| 1423 | theorem profileSpeed_eq_log_deriv {C : ℝ} (hC : 0 < C) (d : TailData) (y0 η x : ℝ) |
| 1424 | (hη : η ∈ Icc (-1 : ℝ) 1) : |
| 1425 | profileSpeed C d y0 (η, x) = |
| 1426 | 1 + 2 * deriv (fun u => profileAngularVelocity C d y0 (η, u)) x / |
| 1427 | profileAngularVelocity C d y0 (η, x) := by |
| 1428 | rw [(profileAngularVelocity_hasDerivAt_edge C d y0 η x).deriv] |
| 1429 | unfold profileSpeed profileAngularVelocity |
| 1430 | dsimp only |
| 1431 | field_simp [(profileCarrier_pos hC d y0 (y := (η, x)) (eta_sq_le_one hη)).ne', |
| 1432 | (tailShape_pos d (3 - x)).ne'] |
| 1433 | ring |
| 1434 | |
| 1435 | /-! ## The same weighted estimates on compact physical parameter sets -/ |
| 1436 | |
| 1437 | noncomputable def physicalStress (C : ℝ) (d : TailData) (y0 : ℝ) |
| 1438 | (y : EdgeParam × ℝ) : ℝ × ℝ := (angularStress C d y0 y, axialStress C d y0 y) |
| 1439 | |
| 1440 | theorem profileStress_of_nonpos (C : ℝ) (d : TailData) (y0 : ℝ) |
| 1441 | {y : ℝ × ℝ} (hy : y.2 ≤ 0) : profileStress C d y0 y = 0 := by |
| 1442 | rw [profileStress_factorization, FlatCutoff.edge_of_nonpos 4 hy, zero_div, zero_smul] |
| 1443 | |
| 1444 | /-! ## The genuine root-form cone on the terminal collar -/ |
| 1445 | |
| 1446 | noncomputable def profileSwirlCoefficient (C : ℝ) (d : TailData) (y0 : ℝ) |
| 1447 | (y : ℝ × ℝ) : ℝ := profileAngularVelocity C d y0 y / profileRadius y0 y.2 |
| 1448 | |
| 1449 | theorem profileSwirlCoefficient_pos {C : ℝ} (hC : 0 < C) (d : TailData) (y0 : ℝ) |
| 1450 | {y : ℝ × ℝ} (hη : y.1 ∈ Icc (-1 : ℝ) 1) : |
| 1451 | 0 < profileSwirlCoefficient C d y0 y := |
| 1452 | div_pos (mul_pos (profileCarrier_pos hC d y0 (eta_sq_le_one hη)) (tailShape_pos d _)) |
| 1453 | (profileRadius_pos y0 y.2) |
| 1454 | |
| 1455 | noncomputable def profileP (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 1456 | profileSpeed C d y0 y + profileAngularStress C d y0 y / profileSwirlCoefficient C d y0 y |
| 1457 | |
| 1458 | noncomputable def profileJ (C : ℝ) (d : TailData) (y0 : ℝ) (y : ℝ × ℝ) : ℝ := |
| 1459 | profileAxialStress C d y0 y / profileSwirlCoefficient C d y0 y |
| 1460 | |
| 1461 | end NavierStokes.TerminalEdgeFactor |