amr-wind icon indicating copy to clipboard operation
amr-wind copied to clipboard

Spurious currents created across coarse-fine boundary from hydrostatic pressure near air-water interface

Open mbkuhn opened this issue 6 months ago • 6 comments

Bug description

When the air-water interface crosses a coarse-fine boundary, a flat, quiescent interface leads to spurious velocities. This is likely due to the discretization of the pressure equation in amrex (MLMG), in particular its interpolation of sigma (1/rho). More detail will be in comments below. No spuriousness arises when the interface is perfectly aligned with the cell boundaries (because then there is no gradient of density) and likewise when the density ratio between phases is unity.

Steps to reproduce

Simple case that can be run in serial, only needs one time step to show up. flat-surface-inp.txt

Steps to reproduce the behavior:

  1. Compiler used
    • [ ] GCC
    • [ ] LLVM
    • [ ] oneapi (Intel)
    • [ ] nvcc (NVIDIA)
    • [ ] rocm (AMD)
    • [x] with MPI
    • [x] other: apple-clang
  2. Operating system
    • [ ] Linux
    • [x] OSX
    • [ ] Windows
    • [ ] other (do tell ;)):
  3. Hardware:
    • [x] CPU
    • [ ] GPU
  4. Machine details ():
basic amr-wind environment created using exawind-manager on my laptop
  1. Input file attachments
  2. Error (paste or attach):
<!-- error output -->
  1. If this is a segfault, a stack trace from a debug build (paste or attach):
<!-- stack trace -->

Expected behavior

Velocities to remain near 0.

AMR-Wind information

not a problem with a particular commit

==============================================================================
                AMR-Wind (https://github.com/exawind/amr-wind)

  AMR-Wind version :: v2.1.0-85-g741cb771
  AMR-Wind Git SHA :: 741cb77111da01fe7026512f0a0cfdb3b9072398
  AMReX version    :: 24.08-11-gb6ed5237987e

  Exec. time       :: Fri Aug 16 10:52:33 2024
  Build time       :: Aug 16 2024 10:51:55
  C++ compiler     :: AppleClang 14.0.3.14030022

  MPI              :: ON    (Num. ranks = 8)
  GPU              :: OFF
  OpenMP           :: OFF

  Enabled third-party libraries: 
    NetCDF    4.9.2
    HYPRE     2.31.0

           This software is released under the BSD 3-clause license.           
 See https://github.com/Exawind/amr-wind/blob/development/LICENSE for details. 
------------------------------------------------------------------------------

Additional context

see comments

mbkuhn avatar Aug 16 '24 18:08 mbkuhn