| @@ -244,12 +244,6 @@ theorem linearResidual_mode_split {U : Set E} (ε κ : ℝ) (R b F G : E → ℝ |
| 244 | 244 | |
| 245 | 245 | /-! ## Actual slot phase and projected pressure -/ |
| 246 | 246 | |
| 247 | | -/-- Scaling a prescribed fast direction produces exactly the manuscript's |
| 248 | | -prefactor, for example `c = Q^(1+h)` multiplying `Nabs`. -/ |
| 249 | | -theorem along_scaled_direction (c : ℝ) (V : E → E) (f : E → ℂ) (x : E) : |
| 250 | | - along (fun y => c • V y) f x = (c : ℂ) * along V f x := by |
| 251 | | - simp [along, map_smul, Complex.real_smul] |
| 252 | | - |
| 253 | 247 | /-- The material defect used in the residual is the actual backward-time |
| 254 | 248 | material derivative already computed in `PhaseCalculus`. -/ |
| 255 | 249 | theorem materialPhaseDefect_slot (ε p pz x₀ : ℝ) (b F G : PhaseCalculus.Slow → ℝ) |
| @@ -284,29 +278,6 @@ theorem materialPhaseDefect_slot_formula (ε p pz x₀ : ℝ) |
| 284 | 278 | rw [materialPhaseDefect_slot ε p pz x₀ b F G q (ne_of_gt hR)] |
| 285 | 279 | exact PhaseCalculus.backwardMaterialOp_phase ε p pz x₀ b F G q hε hR hF hG |
| 286 | 280 | |
| 287 | | -/-- A base coefficient depending only on slow coordinates has precisely |
| 288 | | -the slow differential along a slot direction. -/ |
| 289 | | -theorem slot_base_derivative (f : PhaseCalculus.Slow → ℝ) (q w : PhaseCalculus.Slot) |
| 290 | | - (hf : DifferentiableAt ℝ f q.1) : |
| 291 | | - along (fun _ => w) (fun y : PhaseCalculus.Slot => f y.1) q = fderiv ℝ f q.1 w.1 := by |
| 292 | | - have hd := (hf.hasFDerivAt.comp q (hasFDerivAt_id (𝕜 := ℝ) q).fst).fderiv |
| 293 | | - dsimp only [Function.comp_def] at hd |
| 294 | | - unfold along |
| 295 | | - rw [hd] |
| 296 | | - rfl |
| 297 | | - |
| 298 | | -theorem slot_base_radial (f : PhaseCalculus.Slow → ℝ) (q : PhaseCalculus.Slot) |
| 299 | | - (hf : DifferentiableAt ℝ f q.1) : |
| 300 | | - along (fun _ => PhaseCalculus.eR) (fun y : PhaseCalculus.Slot => f y.1) q = |
| 301 | | - PhaseCalculus.slowR f q.1 := slot_base_derivative f q PhaseCalculus.eR hf |
| 302 | | - |
| 303 | | -theorem slot_base_angular (f : PhaseCalculus.Slow → ℝ) (q : PhaseCalculus.Slot) |
| 304 | | - (hf : DifferentiableAt ℝ f q.1) : |
| 305 | | - along (fun _ => PhaseCalculus.eTheta) (fun y : PhaseCalculus.Slot => f y.1) q = 0 := by |
| 306 | | - rw [slot_base_derivative f q PhaseCalculus.eTheta hf] |
| 307 | | - change fderiv ℝ f q.1 0 = 0 |
| 308 | | - exact map_zero _ |
| 309 | | - |
| 310 | 281 | /-- Numerator in the pressure from the projected equation. The derivative |
| 311 | 282 | of `n` is the actual derivative in the fast direction. -/ |
| 312 | 283 | noncomputable def projectionNumerator (Vf : E → E) (n : E → EuclideanSpace ℝ (Fin 3)) |
| @@ -318,70 +289,6 @@ noncomputable def projectedPressure (κ : ℝ) (Vf : E → E) |
| 318 | 289 | (Complex.I / (κ : ℂ)) * projectionNumerator Vf n a Ka f x / |
| 319 | 290 | Complex.ofReal (‖n x‖ ^ 2) |
| 320 | 291 | |
| 321 | | -theorem projectedPressure_force (κ : ℝ) (Vf : E → E) |
| 322 | | - (n : E → EuclideanSpace ℝ (Fin 3)) (a Ka f : E → ComplexVector) (x : E) |
| 323 | | - (hκ : κ ≠ 0) (i : Fin 3) : |
| 324 | | - phaseFactor κ * Complex.ofReal (n x i) * projectedPressure κ Vf n a Ka f x = |
| 325 | | - -Complex.ofReal (n x i) * projectionNumerator Vf n a Ka f x / |
| 326 | | - Complex.ofReal (‖n x‖ ^ 2) := by |
| 327 | | - have hk : (κ : ℂ) ≠ 0 := by exact_mod_cast hκ |
| 328 | | - have hc : phaseFactor κ * (Complex.I / (κ : ℂ)) = -1 := by |
| 329 | | - unfold phaseFactor |
| 330 | | - field_simp [hk] |
| 331 | | - simp [] |
| 332 | | - unfold projectedPressure |
| 333 | | - calc |
| 334 | | - _ = (phaseFactor κ * (Complex.I / (κ : ℂ))) * Complex.ofReal (n x i) * |
| 335 | | - projectionNumerator Vf n a Ka f x / Complex.ofReal (‖n x‖ ^ 2) := by ring |
| 336 | | - _ = _ := by rw [hc]; ring |
| 337 | | - |
| 338 | | -/-- Substituting the projected pressure into the principal part is an exact |
| 339 | | -identity for arbitrary amplitudes; no tangent ODE is imposed on the actual |
| 340 | | -coefficient supplied to the residual. -/ |
| 341 | | -theorem principal_projectedPressure (ε κ : ℝ) (R F G : E → ℝ) (Vr Vθ Vz Vf : E → E) |
| 342 | | - (Φ : E → ℝ) (a f : E → ComplexVector) (x : E) (hκ : κ ≠ 0) : |
| 343 | | - principal ε κ R F G Vr Vθ Vz Vf Φ a |
| 344 | | - (projectedPressure κ Vf (phaseNormal R Vr Vθ Vz Φ) a (shear R F G Vr a) f) x = |
| 345 | | - fun i => along Vf (fun y => a y i) x + shear R F G Vr a x i + |
| 346 | | - Complex.ofReal (ε * κ ^ 2 * ‖phaseNormal R Vr Vθ Vz Φ x‖ ^ 2) * a x i - |
| 347 | | - Complex.ofReal (phaseNormal R Vr Vθ Vz Φ x i) * |
| 348 | | - projectionNumerator Vf (phaseNormal R Vr Vθ Vz Φ) a (shear R F G Vr a) f x / |
| 349 | | - Complex.ofReal (‖phaseNormal R Vr Vθ Vz Φ x‖ ^ 2) := by |
| 350 | | - ext i |
| 351 | | - unfold principal |
| 352 | | - rw [projectedPressure_force κ Vf (phaseNormal R Vr Vθ Vz Φ) a (shear R F G Vr a) f x hκ i] |
| 353 | | - ring |
| 354 | | - |
| 355 | | -theorem contDiffOn_normalDot {U : Set E} {n : E → EuclideanSpace ℝ (Fin 3)} |
| 356 | | - {a : E → ComplexVector} (hn : ContDiffOn ℝ ∞ n U) |
| 357 | | - (ha : ∀ i, ContDiffOn ℝ ∞ (fun y => a y i) U) : |
| 358 | | - ContDiffOn ℝ ∞ (fun y => normalDot (n y) (a y)) U := by |
| 359 | | - have hc i : ContDiffOn ℝ ∞ (fun y => Complex.ofReal (n y i)) U := |
| 360 | | - Complex.ofRealCLM.contDiff.comp_contDiffOn |
| 361 | | - ((EuclideanSpace.proj i : EuclideanSpace ℝ (Fin 3) →L[ℝ] ℝ).contDiff.comp_contDiffOn hn) |
| 362 | | - exact (((hc 0).mul (ha 0)).add ((hc 1).mul (ha 1))).add ((hc 2).mul (ha 2)) |
| 363 | | - |
| 364 | | -theorem contDiffOn_projectedPressure {U : Set E} (κ : ℝ) {Vf : E → E} |
| 365 | | - {n : E → EuclideanSpace ℝ (Fin 3)} {a Ka f : E → ComplexVector} |
| 366 | | - (hU : IsOpen U) (hVf : ContDiffOn ℝ ∞ Vf U) (hn : ContDiffOn ℝ ∞ n U) |
| 367 | | - (hn₀ : ∀ x ∈ U, n x ≠ 0) |
| 368 | | - (ha : ∀ i, ContDiffOn ℝ ∞ (fun y => a y i) U) |
| 369 | | - (hKa : ∀ i, ContDiffOn ℝ ∞ (fun y => Ka y i) U) |
| 370 | | - (hf : ∀ i, ContDiffOn ℝ ∞ (fun y => f y i) U) : |
| 371 | | - ContDiffOn ℝ ∞ (projectedPressure κ Vf n a Ka f) U := by |
| 372 | | - have hnum : ContDiffOn ℝ ∞ (projectionNumerator Vf n a Ka f) U := |
| 373 | | - ((contDiffOn_normalDot hn hKa).sub |
| 374 | | - (contDiffOn_normalDot (contDiffOn_along hU hVf hn) ha)).add (contDiffOn_normalDot hn hf) |
| 375 | | - have hden : ContDiffOn ℝ ∞ (fun y => Complex.ofReal (‖n y‖ ^ 2)) U := |
| 376 | | - Complex.ofRealCLM.contDiff.comp_contDiffOn ((contDiff_norm_sq ℝ).comp_contDiffOn hn) |
| 377 | | - have htop : ContDiffOn ℝ ∞ (fun y => (Complex.I / (κ : ℂ)) * |
| 378 | | - projectionNumerator Vf n a Ka f y) U := contDiffOn_const.mul hnum |
| 379 | | - have hnz : ∀ x ∈ U, Complex.ofReal (‖n x‖ ^ 2) ≠ 0 := by |
| 380 | | - intro x hx |
| 381 | | - exact_mod_cast pow_ne_zero 2 (norm_ne_zero_iff.mpr (hn₀ x hx)) |
| 382 | | - unfold projectedPressure |
| 383 | | - simpa only [div_eq_mul_inv, Pi.inv_apply] using htop.mul (hden.inv hnz) |
| 384 | | - |
| 385 | 292 | /-! ## Real-linear transfer of the complex calculation -/ |
| 386 | 293 | |
| 387 | 294 | section LinearMaps |
| @@ -500,20 +407,6 @@ noncomputable def bilinearAdvection (u v : Space → Space) (q : Space) : Space |
| 500 | 407 | (u q 1 / q 0) • (CylindricalResidual.dCoord 1 v q + CylindricalResidual.connection (v q)) + |
| 501 | 408 | u q 2 • CylindricalResidual.dCoord 2 v q |
| 502 | 409 | |
| 503 | | -noncomputable def cylindricalLinearResidual (ε : ℝ) (B a : VelocityField) (p : PressureField) |
| 504 | | - (t : ℝ) (q : Space) : Space := |
| 505 | | - temporalDerivative a t q + bilinearAdvection (fun y => B (t, y)) (fun y => a (t, y)) q + |
| 506 | | - bilinearAdvection (fun y => a (t, y)) (fun y => B (t, y)) q + |
| 507 | | - CylindricalResidual.scalarGradient (fun y => p (t, y)) q - |
| 508 | | - ε • CylindricalResidual.vectorLaplacian (fun y => a (t, y)) q |
| 509 | | - |
| 510 | | -/-- Linearization in the original Cartesian derivative definitions. -/ |
| 511 | | -noncomputable def cartesianLinearResidual (ε : ℝ) (B a : VelocityField) (p : PressureField) |
| 512 | | - (t : ℝ) (x : Space) : Space := |
| 513 | | - temporalDerivative a t x + spatialDerivative a t x (B (t, x)) + |
| 514 | | - spatialDerivative B t x (a (t, x)) + pressureGradient p t x - |
| 515 | | - ε • spatialLaplacian a t x |
| 516 | | - |
| 517 | 410 | theorem cartesianBilinearAdvection_components {u v : Space → Space} {q : Space} |
| 518 | 411 | (hv : DifferentiableAt ℝ v (CylindricalResidual.chart q)) (hr : q 0 ≠ 0) : |
| 519 | 412 | fderiv ℝ v (CylindricalResidual.chart q) (u (CylindricalResidual.chart q)) = |
| @@ -528,46 +421,6 @@ theorem cartesianBilinearAdvection_components {u v : Space → Space} {q : Space |
| 528 | 421 | simp only [CylindricalResidual.frame_inverse'] at he' |
| 529 | 422 | exact he' |
| 530 | 423 | |
| 531 | | -/-- The real differential linearization is exactly conjugated by the |
| 532 | | -cylindrical frame. Both cross-advections are derived from the actual |
| 533 | | -Cartesian derivative, rather than from a postulated residual identity. -/ |
| 534 | | -theorem cartesianLinearResidual_cylindrical (ε : ℝ) {B a : VelocityField} {p : PressureField} |
| 535 | | - {t : ℝ} {q : Space} |
| 536 | | - (ha : ContDiffAt ℝ 2 a (t, CylindricalResidual.chart q)) |
| 537 | | - (hB : DifferentiableAt ℝ B (t, CylindricalResidual.chart q)) |
| 538 | | - (hp : DifferentiableAt ℝ p (t, CylindricalResidual.chart q)) (hr : 0 < q 0) : |
| 539 | | - cartesianLinearResidual ε B a p t (CylindricalResidual.chart q) = |
| 540 | | - CylindricalResidual.frame (q 1) |
| 541 | | - (cylindricalLinearResidual ε (CylindricalResidual.velocityComponents B) |
| 542 | | - (CylindricalResidual.velocityComponents a) (CylindricalResidual.pressurePullback p) t q) := by |
| 543 | | - have has : ContDiffAt ℝ 2 (fun y => a (t, y)) (CylindricalResidual.chart q) := |
| 544 | | - ha.comp _ (contDiffAt_const.prodMk contDiffAt_id) |
| 545 | | - have had := has.differentiableAt (by norm_num) |
| 546 | | - have hBs : DifferentiableAt ℝ (fun y : Space => B (t, y)) (CylindricalResidual.chart q) := |
| 547 | | - hB.comp (CylindricalResidual.chart q) ((differentiableAt_const t).prodMk differentiableAt_id) |
| 548 | | - have hps : DifferentiableAt ℝ (fun y : Space => p (t, y)) (CylindricalResidual.chart q) := |
| 549 | | - hp.comp (CylindricalResidual.chart q) ((differentiableAt_const t).prodMk differentiableAt_id) |
| 550 | | - have hat : DifferentiableAt ℝ (fun s : ℝ => a (s, CylindricalResidual.chart q)) t := |
| 551 | | - (ha.differentiableAt (by norm_num)).comp t |
| 552 | | - (differentiableAt_id.prodMk (differentiableAt_const (CylindricalResidual.chart q))) |
| 553 | | - have ht : temporalDerivative a t (CylindricalResidual.chart q) = |
| 554 | | - CylindricalResidual.frame (q 1) |
| 555 | | - (temporalDerivative (CylindricalResidual.velocityComponents a) t q) := by |
| 556 | | - rw [CylindricalResidual.temporalDerivative_components hat, CylindricalResidual.frame_inverse'] |
| 557 | | - unfold cartesianLinearResidual |
| 558 | | - change temporalDerivative a t (CylindricalResidual.chart q) + |
| 559 | | - fderiv ℝ (fun y => a (t, y)) (CylindricalResidual.chart q) (B (t, CylindricalResidual.chart q)) + |
| 560 | | - fderiv ℝ (fun y => B (t, y)) (CylindricalResidual.chart q) (a (t, CylindricalResidual.chart q)) + |
| 561 | | - CylindricalResidual.euclideanGradient (fun y => p (t, y)) (CylindricalResidual.chart q) - |
| 562 | | - ε • CylindricalResidual.euclideanLaplacian (fun y => a (t, y)) (CylindricalResidual.chart q) = _ |
| 563 | | - rw [ht, cartesianBilinearAdvection_components (u := fun y => B (t, y)) had (ne_of_gt hr), |
| 564 | | - cartesianBilinearAdvection_components (u := fun y => a (t, y)) hBs (ne_of_gt hr), |
| 565 | | - CylindricalResidual.cartesianGradient_pullback hps (ne_of_gt hr), |
| 566 | | - CylindricalResidual.cartesianLaplacian_components has (ne_of_gt hr)] |
| 567 | | - simp only [cylindricalLinearResidual, map_add, map_sub, map_smul, |
| 568 | | - CylindricalResidual.velocityComponents, CylindricalResidual.pressurePullback] |
| 569 | | - rfl |
| 570 | | - |
| 571 | 424 | noncomputable def spaceDirection (i : Fin 3) (_ : SpaceTime) : SpaceTime := |
| 572 | 425 | (0, coordinateVector i) |
| 573 | 426 | |
| @@ -620,53 +473,4 @@ theorem laplacian_space_slice {U : Set SpaceTime} {f : SpaceTime → W} {t : ℝ |
| 620 | 473 | |
| 621 | 474 | end Slices |
| 622 | 475 | |
| 623 | | -/-- The generic real component operator used for the harmonic calculation |
| 624 | | -is the actual cylindrical linearization when its directions are the physical |
| 625 | | -spacetime coordinate directions. -/ |
| 626 | | -theorem realComponentLinearResidual_eq_cylindrical {U : Set SpaceTime} (ε : ℝ) |
| 627 | | - {B a : VelocityField} {p : PressureField} {t : ℝ} {q : Space} |
| 628 | | - (hU : IsOpen U) (hB : ContDiffOn ℝ ∞ B U) (ha : ContDiffOn ℝ ∞ a U) |
| 629 | | - (hp : ContDiffOn ℝ ∞ p U) (hx : (t, q) ∈ U) : |
| 630 | | - realComponentLinearResidual ε coordinateRadius (spaceDirection 0) (spaceDirection 1) |
| 631 | | - (spaceDirection 2) physicalTimeDirection (fun z i => B z i) (fun z i => a z i) p (t, q) = |
| 632 | | - fun i => cylindricalLinearResidual ε B a p t q i := by |
| 633 | | - have hAc (i : Fin 3) : ContDiffOn ℝ ∞ (fun z => a z i) U := |
| 634 | | - (AxisymmetricFields.projection i).contDiff.comp_contDiffOn ha |
| 635 | | - have hBc (i : Fin 3) : ContDiffOn ℝ ∞ (fun z => B z i) U := |
| 636 | | - (AxisymmetricFields.projection i).contDiff.comp_contDiffOn hB |
| 637 | | - have had := (ha.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 638 | | - have hbd := (hB.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 639 | | - have hpd := (hp.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 640 | | - have has : ContDiffAt ℝ 2 (fun y : Space => a (t, y)) q := |
| 641 | | - ((ha.contDiffAt (hU.mem_nhds hx)).comp q (contDiffAt_const.prodMk contDiffAt_id)).of_le |
| 642 | | - (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2) |
| 643 | | - have hasd := has.differentiableAt (by norm_num) |
| 644 | | - have hbsd : DifferentiableAt ℝ (fun y : Space => B (t, y)) q := |
| 645 | | - hbd.comp q ((differentiableAt_const t).prodMk differentiableAt_id) |
| 646 | | - have hAfirst (i j : Fin 3) : along (spaceDirection i) (fun z => a z j) (t, q) = |
| 647 | | - CylindricalResidual.dCoord i (fun y => a (t, y)) q j := by |
| 648 | | - rw [along_space_slice (((hAc j).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp))] |
| 649 | | - exact CylindricalResidual.dCoord_map (AxisymmetricFields.projection j) hasd i |
| 650 | | - have hBfirst (i j : Fin 3) : along (spaceDirection i) (fun z => B z j) (t, q) = |
| 651 | | - CylindricalResidual.dCoord i (fun y => B (t, y)) q j := by |
| 652 | | - rw [along_space_slice (((hBc j).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp))] |
| 653 | | - exact CylindricalResidual.dCoord_map (AxisymmetricFields.projection j) hbsd i |
| 654 | | - have hLap (j : Fin 3) : cylindricalLaplacian coordinateRadius |
| 655 | | - (spaceDirection 0) (spaceDirection 1) (spaceDirection 2) (fun z => a z j) (t, q) = |
| 656 | | - CylindricalResidual.scalarLaplacian (fun y => a (t, y)) q j := by |
| 657 | | - rw [laplacian_space_slice hU (hAc j) hx] |
| 658 | | - exact CylindricalResidual.scalarLaplacian_component has j |
| 659 | | - have htime (j : Fin 3) : along physicalTimeDirection (fun z => a z j) (t, q) = |
| 660 | | - temporalDerivative a t q j := by |
| 661 | | - calc |
| 662 | | - _ = (along physicalTimeDirection a (t, q)) j := |
| 663 | | - along_map (AxisymmetricFields.projection j) physicalTimeDirection had |
| 664 | | - _ = _ := congrArg (fun v : Space => v j) (along_time_slice had) |
| 665 | | - ext i |
| 666 | | - fin_cases i <;> |
| 667 | | - simp [realComponentLinearResidual, realTransport, realFrameLaplacian, realAngularGenerator, |
| 668 | | - hAfirst, hBfirst, hLap, htime, along_space_slice hpd, coordinateRadius, |
| 669 | | - cylindricalLinearResidual, bilinearAdvection, CylindricalResidual.vectorLaplacian, |
| 670 | | - CylindricalResidual.scalarGradient, CylindricalResidual.connection_apply] <;> ring |
| 671 | | - |
| 672 | 476 | end NavierStokes.LinearWaveResidual |