CliMA / Oceananigans.jl

🌊 Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs
https://clima.github.io/OceananigansDocumentation/stable
MIT License
989 stars 194 forks source link

questions relating to Oceananigans.jl #770

Closed ali-ramadhan closed 4 years ago

ali-ramadhan commented 4 years ago

Just moving an email thread to a GitHub issue:

  1. Is it hydrostatic or non-hydrostatic? On GitHub it says 'It is designed to solve the rotating Boussinesq equations used in non-hydrostatic ocean modeling but can be used to solve for any incompressible flow.' so it implies it's non-hydrostatic?
  2. Since currently only cartesian coordinate is supported, is it possible to set the Coriolis force with rotation axis at the center of the domain and specify the grids in the shape of a circle around this axis as if it's a rotating cylinder but not in cylindrical coordinate?
  3. Is eddy parameterization supported, like the GM-Redi/Visbeck package in MITgcm?
  4. for the boundary condition, is topographic feature supported? I see in the online doc the UVelocityBoundaryConditions probably can be used to set non-slip boundary but features like topographic wall would still need extra setting right? Is it something related to gradient or no-penetration?

Originally posted over email

ali-ramadhan commented 4 years ago
  1. Yes you're right. Currently Oceananigans.jl is only non-hydrostatic. We've considered adding a hydrostatic mode (shouldn't be hard to implement) but haven't really needed it yet so we've stuck with non-hydrostatic mode as we mostly do small-scale simulations (also see issue #72). Do you need to run in hydrostatic mode?

  2. Ah interesting. Like on a regular Cartesian grid but with some grid cells cut out so you effectively have a cylindrical domain but with jagged walls (that get smoother as you increase the resolution)? It's not a built-in feature but you could use the forcing functions to add topography via an immersed boundary method (basically damping the velocity to zero inside the boundary). For an example of this, see PR #693: Viscous flow around a cylinder verification experiment. We're happy to help with setting up this kind of stuff too.

  3. No we don't have any mesoscale eddy parameterizations. Actually we don't really have any parameterizations in Oceananigans.jl besides turbulent diffusivity/viscosity closures as we've been mostly focused on running small-scale simulations that resolve the turbulence and trying to figure out the best parameterization from the data. Depending on what you need though, it might not be too hard to implement. It's worth discussing if you need something like GM Redi.

  4. Hmmm, this isn't something that we've done as adding topography isn't really a built-in feature yet but it should be possible to impose a no-slip boundary condition at a cylindrical wall using a custom forcing function though, not an Oceananigans.jl boundary condition. I'm not 100% sure but if you want no-slip my guess is that you probably want to use a Value/Dirchlet boundary condition.

I think @glwagner would know more about whether it's possible to properly implement a no-slip Value/Dirchlet BC on a curved boundary.

ali-ramadhan commented 4 years ago

Reply:

  1. No, non-hydrostatic is good... it's just to double check...

  2. Yes... either varied grid or topography is fine as long as it works. I guess I should try to test it to see which is the easy way...

  3. That is ok. Not in an urgent manner. It's perfectly fine to test the non-parameterised eddy resolving case at relative high resolution, since efficiency is the claimed strength of Julia and I want to check how efficient it is as well.

  4. Naively thought it will just be coating 1-3 nonslip layers by enforcing 0 velocities around the topographic feature, well, if the topographic feature is set correctly.. is it more complicated?

Originally posted over email

ali-ramadhan commented 4 years ago
  1. As long as you can describe your boundary using a function like boundary(x, y, z) or using an array like boundary[i, j, k] then implementing an immersed boundary method should be pretty straightforward. I give more details here: https://github.com/CliMA/Oceananigans.jl/issues/743#issuecomment-622406785

  2. Maybe @glwagner can confirm but Oceananigans.jl fills in halo regions to weakly enforce value boundary conditions such as no-slip. An immersed boundary method would dampen velocities in the boundary to zero, so I believe that by using an immersed boundary method, you get no-slip boundary conditions along the topography by default?