Ask Your Question

NBQ and periodic boundaries

asked 2020-06-22 19:52:38 +0100

krh gravatar image


I'm exploring using CROCO for some stratified flow over topography problems and have some questions. To keep things clear I'll limit this post to one issue.

When testing a simple stratified, nonhydrostatic (NBQ) geostrophic adjustment problem where it is assumed that that d/dy = 0 (flow is invariant in the y-direction, but full dynamics in x-z). The initial condition is a tanh stratification with a localized Gaussian interface displacement. To implement the d/dy=0, I specify NS_PERIODIC and set MMm0=1. However, the code quickly crashes (by developing very large y-velocities) unless MMm0=3. I also find this problem in when rotation is turn off (undef UV_COR), so it doesn't seem to be related to rotation. MMm0=1 with NS periodic conditions works fine in the hydrostatic mode.

Is there a way to simply impose the d/dy=0 invariance with MMm0=1 in the NBQ mode? It is computationally quite inefficient to keep three grid points in y when only one is needed.


edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2020-07-17 21:17:55 +0100

krh gravatar image

I wanted to check to be certain there is absolutely no work-around to avoid Mn = 3 (to get d/dy = 0 with rotation in a 2.5D simulatio). Mm = 1 would greatly reduce the computational load. If not, then I will dig into the code to see if I can't implement it (though this is probably a large task to get right).

edit flag offensive delete link more

answered 2020-07-18 08:37:01 +0100

Stencils in CROCO are large, especially for advection: 5 points at least and 7 points if using UP5 or WENO5 (5th order schemes), i.e. 2 or 3 points on each side of the center point. Thus, you need at least 2 or 3 interior points to copy in the outside (shadow) zones. I guess that if you disable cross-section advection, you may succeed with one point since the pressure gradient has a 3 point stencil (not always with NBQ), but that will require a bit of work and testing. For cross-sections, we often use wall boundaries (with free slip) and Mm=1, but in this case there is no flow across the section...

edit flag offensive delete link more


Thanks. I'm not surprised that the Mm=3 requirement is dictated by the stencil size requirements. I did look into simply setting all y-derivative terms to zero (rather than y-advection), but am just not familiar enough with the code at this time to be sure I can get it correctly implemented.

krh gravatar imagekrh ( 2020-07-20 21:42:38 +0100 )edit

answered 2020-06-22 20:40:22 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >5 is welcome to improve it.

Thanks for the very quick reply.

I'll just checked again and Mm=1 does work for NS_PERIODIC in the hydrostatic mode.

So there is no way to use Mm=1 for the NBQ mode? Mm=3 is pretty inefficient for this situation. Would it be possible to simply eliminate at the d/dy terms in the governing equations? Though I suspect that this could be complicated task.


edit flag offensive delete link more

answered 2020-06-22 20:30:17 +0100

Hi, I am actually surprised that periodic conditions with Mm=1 worked in the hydrostatic case. The way of doing d/dy=0 is either Mm=1 with closed NS conditions (transverse velocities v=0) or Mm=3 with periodic conditions (allowing non zero transverse velocities)... Patrick

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-06-22 19:52:38 +0100

Seen: 3,529 times

Last updated: Jul 18 '20