-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
clean up 🧹technical debt is real peopletechnical debt is real peopledycore 🌀It's only solving Navier-Stokes, what could possibly go wrong?It's only solving Navier-Stokes, what could possibly go wrong?semanticssimultaneously unimportant and most importantsimultaneously unimportant and most important
Description
Breeze.jl/src/AtmosphereModels/atmosphere_model.jl
Lines 47 to 48 in 304f38a
| pressure :: Prs | |
| pressure_solver :: Sol |
these properties should probably be in AnelasticFormulation.
First of all, "pressure" is actually the pressure perturbation (which participates in the velocity update):
Breeze.jl/src/AtmosphereModels/anelastic_formulation.jl
Lines 274 to 305 in 304f38a
| @kernel function _pressure_correct_momentum!(M, grid, Δt, αᵣ_pₙ, ρᵣ) | |
| i, j, k = @index(Global, NTuple) | |
| ρᶠ = ℑzᵃᵃᶠ(i, j, k, grid, ρᵣ) | |
| ρᶜ = @inbounds ρᵣ[i, j, k] | |
| @inbounds M.ρu[i, j, k] -= ρᶜ * Δt * ∂xᶠᶜᶜ(i, j, k, grid, αᵣ_pₙ) | |
| @inbounds M.ρv[i, j, k] -= ρᶜ * Δt * ∂yᶜᶠᶜ(i, j, k, grid, αᵣ_pₙ) | |
| @inbounds M.ρw[i, j, k] -= ρᶠ * Δt * ∂zᶜᶜᶠ(i, j, k, grid, αᵣ_pₙ) | |
| end | |
| """ | |
| $(TYPEDSIGNATURES) | |
| Update the predictor momentum ``(ρu, ρv, ρw)`` with the non-hydrostatic pressure via | |
| ```math | |
| (\\rho\\boldsymbol{u})^{n+1} = (\\rho\\boldsymbol{u})^n - \\Delta t \\, \\rho_r \\boldsymbol{\\nabla} \\left( \\alpha_r p_{nh} \\right) | |
| ``` | |
| """ | |
| function make_pressure_correction!(model::AnelasticModel, Δt) | |
| launch!(model.architecture, model.grid, :xyz, | |
| _pressure_correct_momentum!, | |
| model.momentum, | |
| model.grid, | |
| Δt, | |
| model.pressure, | |
| model.formulation.reference_state.density) | |
| return nothing | |
| end |
Also, we don't have a pressure perturbation or pressure solver for a FullyCompressibleFormulation.
Discussed with @kaiyuan-cheng
With a fully compressible formulation, we may not have pressure either --- for example we may prognose density or an Exner function, and then pressure would be computed on the fly from those variables.
Metadata
Metadata
Assignees
Labels
clean up 🧹technical debt is real peopletechnical debt is real peopledycore 🌀It's only solving Navier-Stokes, what could possibly go wrong?It's only solving Navier-Stokes, what could possibly go wrong?semanticssimultaneously unimportant and most importantsimultaneously unimportant and most important