Correct regularization for ImmersedBoundaryCondition#4670
Merged
Conversation
glwagner
approved these changes
Jul 25, 2025
Member
|
just noting that even after this is merged; using ClimaSeaIce#main and Oceananigans#main I get: (ClimaSeaIce) pkg> st
Project ClimaSeaIce v0.3.2
Status `~/Library/CloudStorage/OneDrive-TheUniversityofMelbourne/Documents/Research/ClimaSeaIce.jl/Project.toml`
[79e6a3ab] Adapt v4.3.0
[63c18a36] KernelAbstractions v0.9.38
[9e8cae18] Oceananigans v0.97.3 `https://github.com/CliMA/Oceananigans.jl.git#main`
[7181ea78] RootSolvers v0.4.4
[f2b01f46] Roots v2.2.8
[d496a93d] SeawaterPolynomials v0.3.10
julia> using Oceananigans, ClimaSeaIce
julia> grid = RectilinearGrid(size = (10, 10, 1), x = (0, 1), y = (0, 1), z = (0, 1));
julia> grid = ImmersedBoundaryGrid(grid, GridFittedBottom(rand(10, 10)));
julia> u_bcs = FieldBoundaryConditions(grid, (Face, Center, Nothing); immersed = FluxBoundaryCondition(1));
julia> model = SeaIceModel(grid; boundary_conditions = (; u = u_bcs));
julia> model.velocities.u.boundary_conditions.immersed
ImmersedBoundaryCondition:
├── west: Nothing
├── east: Nothing
├── south: FluxBoundaryCondition: 1.0
├── north: FluxBoundaryCondition: 1.0
├── bottom: FluxBoundaryCondition: 1.0
└── top: FluxBoundaryCondition: 1.0 |
Member
|
I think this happens because |
Member
|
good call. Then perhaps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am implementing immersed drag for a
SeaIceModelhere, but I noticed that the regularization forImmersedBoundaryConditionis not correct because it assigns boundary conditions innothingdirections, for example, in CliMA/ClimaSeaIce.jl#84 this happens:In this case,
topandbottomboundary conditions should be aNothing, so this PR corrects this regularization