Conversation
77c2cae to
637e5d0
Compare
|
@copilot review this PR |
Here's a review of the two commits in this PR: Commit 1 – "add hyperdiffusion of area fraction"
Commit 2 – "no hyperdiffusion on area and updraft velocity" This commit introduces a few issues:
Suggestions:
|
There was a problem hiding this comment.
Pull request overview
This PR aims to add hyperdiffusion support for the EDMFX subdomain area fraction (via ρa / a-related operators) within the existing hyperdiffusion tendency pipeline.
Changes:
- Extend the hyperdiffusion cache with
ᶜ∇²aʲsfor EDMFX subdomains. - Compute
ᶜ∇²aʲsduringprep_hyperdiffusion_tendency!and include it in DSS synchronization pairs. - Modify SGS hyperdiffusion application code paths (including commenting out an existing
u₃update).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @. Yₜ.f.sgsʲs.:($$j).u₃ += ν₄_vorticity * ᶠwinterp(ᶜJ * ᶜρ, ᶜ∇⁴uᵥʲ) | ||
| # @. Yₜ.f.sgsʲs.:($$j).u₃ += ν₄_vorticity * ᶠwinterp(ᶜJ * ᶜρ, ᶜ∇⁴uᵥʲ) | ||
| end | ||
| # @. Yₜ.c.sgsʲs.:($$j).ρa -= ν₄_scalar * wdivₕ(ᶜρʲs.:($$j) * gradₕ(ᶜ∇²aʲs.:($$j))) |
There was a problem hiding this comment.
ᶜ∇²aʲs is computed and added to the DSS pairs, but the only place it would affect the solution (the Yₜ.c.sgsʲs[j].ρa hyperdiffusion update) is currently commented out. As written, this adds allocation/DSS overhead without changing model behavior; either enable the tendency update for ρa or remove the cache/DSS plumbing for ᶜ∇²aʲs until it is actually used.
| # @. Yₜ.c.sgsʲs.:($$j).ρa -= ν₄_scalar * wdivₕ(ᶜρʲs.:($$j) * gradₕ(ᶜ∇²aʲs.:($$j))) | |
| @. Yₜ.c.sgsʲs.:($$j).ρa -= ν₄_scalar * wdivₕ(ᶜρʲs.:($$j) * gradₕ(ᶜ∇²aʲs.:($$j))) |
| # only need curl-curl part | ||
| ᶜ∇⁴uᵥʲ = @. ᶜ∇²uᵥʲs.:($$j) = C3(wcurlₕ(C123(curlₕ(ᶜ∇²uʲs.:($$j))))) | ||
| @. Yₜ.f.sgsʲs.:($$j).u₃ += ν₄_vorticity * ᶠwinterp(ᶜJ * ᶜρ, ᶜ∇⁴uᵥʲ) | ||
| # @. Yₜ.f.sgsʲs.:($$j).u₃ += ν₄_vorticity * ᶠwinterp(ᶜJ * ᶜρ, ᶜ∇⁴uᵥʲ) |
There was a problem hiding this comment.
This change comments out the SGS vertical-velocity hyperdiffusion update (Yₜ.f.sgsʲs[j].u₃ ...) in the 3D-point branch. If this wasn’t intentional, it will remove an existing dissipation mechanism and likely change stability/solution behavior; please restore the update (or replace it with the corrected form) rather than leaving it commented out.
| # @. Yₜ.f.sgsʲs.:($$j).u₃ += ν₄_vorticity * ᶠwinterp(ᶜJ * ᶜρ, ᶜ∇⁴uᵥʲ) | |
| @. Yₜ.f.sgsʲs.:($$j).u₃ += ν₄_vorticity * ᶠwinterp(ᶜJ * ᶜρ, ᶜ∇⁴uᵥʲ) |
866d532 to
cc77fd7
Compare
497c3fd to
650c8a6
Compare
650c8a6 to
3b73dad
Compare
Purpose
To-do
Content