Skip to content
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

Spinning up to geostrophic balance with fully open boundary conditions #12

Open
w3168 opened this issue Jun 1, 2024 · 0 comments · May be fixed by #13
Open

Spinning up to geostrophic balance with fully open boundary conditions #12

w3168 opened this issue Jun 1, 2024 · 0 comments · May be fixed by #13

Comments

@w3168
Copy link
Collaborator

w3168 commented Jun 1, 2024

After meeting with Paul and Keith at BAS I tried again to work out what what was going on with the funny boundary layers for my crevasse setups.

Running

python geostrophic_balance.py

diverges after 1 day. This script is based on simplifying the crevasse setups to remove melting and crevasses.

I was expecting it to reach a steady geostrophic balance, where the body force in the y direction (equivalent to a fixed free surface tilt) is balanced by negative u flow.

The velocity field at 1 day is very noisy at the boundary, especially at x = 0
02 06 24_checknobcs_geostrophicspinup_diverges

The log is here
02.06.24_nobcs_geostrophicspinup.txt

I also realised that if you replace the velocity pressure bcs with

vp_bcs = {1:{}, 2:{}, 3:{}, 4:{}, 5: {'un': no_normal_flow},
          6: {'un': no_normal_flow}}

i.e. add empty dictionary to each boundary the simulation runs for the alloted ten days and you actually get completely different flow field!
02 06 24_checknobcs_geostrophicspinup_emptybcs

This is almost identical to the same pattern as I saw in all my crevasse runs previously. The reason there is a difference is that this line

u_in = zero(self.dim)
automatically sets the inflow velocity to be the zero vector if the the boundary id is in the boundary conditions dictionary.

I found this out by doing quite a bit of testing (for more details see here
Geosptrophic box.docx)
and ultimately turning off the momentum advection term proved that you could get geostrophic balance with open bcs. I then realised we are missing a surface integral after IBP in the momentum advection term and adding this in fixes the problem! But I will describe that more in the PR to fix this...!

w3168 added a commit that referenced this issue Jun 2, 2024
This fixes issue #12 by not imposing zero velocity on the boundary.
The flow spins up to a steady geostrophic state as I initially expected.
@w3168 w3168 linked a pull request Jun 2, 2024 that will close this issue
@w3168 w3168 linked a pull request Jun 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant