-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes bug in FlatExtrapolation
matching scheme
#3854
Conversation
Should we add a test for this? Or at least make all directions testable on the validation script? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find! Fix makes sense to me so I'm approving.
If it's non-trivial to design a good test for these open boundary conditions, then to me it make sense to merge this obvious fix and discuss how to more thoroughly test in a separate issue or PR.
I think creating a test is non-trivial, but modifying the existing validation script to be more expansive is trivial since I pretty much have the code ready. Should I just do that? |
Does this fix the problems we see on #3848 ? |
No, this bug makes the code fail with an |
I changed _cylinder_xy_FlatExtrapolation_Nx_40.jld2.mp4and this is the animation for the xz direction: _cylinder_xz_FlatExtrapolation_Nx_40.jld2.mp4@jagoosw, I'm curious to hear your take on the artifacts that appear at the edges of the right |
I'm not sure I'm seeing what you mean? Do you mean the corner points being different? |
Yes that's what I mean. To be even clearer, these: The zero points in |
You may need to fill the point Nx + 1 , Ny + 1 |
If I understand your comment, we are doing that: Oceananigans.jl/src/BoundaryConditions/flat_extrapolation_open_boundary_matching_scheme.jl Lines 78 to 92 in 0c1f4fd
|
Are you sure? What is the range of |
I'm not sure that the corner points are used in the prognostic calculations right? I guess this would be important if you wanted to do something on the boundary that includes the boundary tangent derivatives, but I haven't come across any schemes that use that |
You're right that
You may be right. Still I'd like to investigate. The lack of symmetry between left and right sides is a bit suspicious, no? |
It depends on the physics. You should check for coriolis, VectorInvariant advection, and biharmonic viscosities. I suspect the corners come into play for those.
Check out |
It turns out the open boundary part of the code doesn't use
Changing parameters there in order to go from _cylinder_xy_FlatExtrapolation_Nx_40.jld2.mp4I believe this is the preferred way to do things, but it would be nice to hear from other people. If we agree to change things I can open a PR. |
For sure, you just have to change it |
No description provided.