Skip to content

Releases: MUON-CFD/SOMAR

v2.0.1

28 Jun 13:41
966ce93

Choose a tag to compare

New features & improvements

  • Added Buoyant Vortex Ring example code.
  • Added the ability to tag for refinement using the eddy viscosity. Use the amr.eddyNuTagTol parameter in your input file, and specify a threshold on each level. For example, in a three-level simulation, amr.eddyNuTagTol = 1.0e-4 1.0e-6 will tag level 0 cells wherever $\nu_{T} > 1.0\times 10^{-4}$. It will then tag level 1 cells wherever $\nu_{T} > 1.0\times 10^{-6}$.
  • Added a new IO::readASCII function that can very easily read space-separated columns of data into separate vectors. This simplifies reading pre-prepared initial data.
  • Using the incremental version of the projected ARK method by default, which changes how the RK stage variables are constructed. In most cases, this reduces the work needed by the velocity projector and increases the accuracy of the time-stepped state variables. These improvements are slight, but come at no additional efficiency cost.

Code changes

  • The eddy viscosity is no longer considered a state variable. If you need it, you can re-calculate it cheaply on-the-fly using the AMRNSLevel::computeEddyNu function.
  • The postTimeStep function has been replaced with postLevelTimeStep and postCompositeTimeStep, giving finer-grained control over when post-processing code should be executed.
  • Code has been cleaned up to remove compilation warnings.
  • Added function/class descriptions that play nice with VSCode and Doxygen.
  • Added some bounds-checking for --Debug mode.

Bug fixes

  • Fixed a bug in FiniteDiff::computeSlopes to ensure the stencil does not extend past the source data.
  • Fixed a bug where a simulation running in AMR mode with a background stratification and implicit scalar diffusion would set improper coarse-fine interface BCs. This bug did not affect anyone who wasn't using all three of these features at once. If you were affected, you'd have known very quickly into your run.
  • We removed the automatic domain decomposition suggestions. Sometimes, the suggestions were more confusing than helpful.

Full Changelog: v2.0.0...v2.0.1

v2.0.0

02 Jan 21:33

Choose a tag to compare

v2.0.0 Pre-release
Pre-release

This is a pre-release version of SOMAR v2.0.0. It is the code that was used to run test cases for an upcoming paper.

Summary of changes

SOMAR v1.0.0 used cell-averaged state variables (for both the velocity and scalars), an approximate projection scheme, and a time-stepping method based on the works of Bell, Colella, and Glaz. Nonlinear advective fluxes were computed using Colella and Woodward's piecewise parabolic method and Saltzman's unsplit 3D assembly scheme. Also, topographies were handled using a non-orthogonal sigma-coordinate system. These choices raised a number of concerns.

  1. Incompressible flows are very naturally modeled using staggered meshes. Cell-centered velocity discretizations rely on approximate projections that have poor convergence and stability properties and fail to remove high-wavenumber irrotational flow components, both of which lead to instabilities when the flow is marginally resolved.

  2. The time integration scheme of Bell, Collela, and Glaz has an $\mathcal{O}(\Delta t^2)$ local error in the velocity. After proceeding through $1/\Delta t$ timesteps, diffusive errors appear, interfering with the operation of the turbulence model.

  3. The piecewise parabolic method is an excellent method for modeling the nonlinear advection terms present in the Navier-Stokes equations, but we found that upwinding methods are not well-trusted by the community of turbulence modelers. Much of this distrust is warranted, as upwinding schemes are typically associated with limiters, artificial viscosity, and implicit LES schemes.

  4. Non-orthogonal coordinate systems have a number of disadvantages. With off-diagonal metric terms present, Laplacians have elevated condition numbers and more terms to compute. Poisson solvers are thus made considerably more expensive than their orthogonal counterparts -- about 5-8 times more expensive in our experience. Also, strongly non-orthogonal coordinates have been shown to incur first-order spatial errors. Worse of all, sigma coordinates are only useful when modeling simple, idealized terrain.

To address these issues, SOMARv2 uses Arakawa-C grids for the velocity and pressure with standard finite difference stencils. The advective forcing terms are computed in conservative form with fluxes generated using unbiased, fourth-order averaging stencils to re-center the velocity components where necessary. Time integration is accomplished with a globally third-order Runge-Kutta method with excellent stability properties and error control. (We will soon incorporate an immersed boundary method to model complex bathymetry without the need for a non-orthogonal coordinate system.)

All of these changes led to a more accurate fluid solver, whose AMR capabilities are significantly more robust. Second-order AMR solvers suffer from so-called ''mesh-imprinting errors'' when features that require fine-level discretization slip past the coarse-fine interface (CFI) and into the coarser level. These errors reveal themselves as large, first-order errors in the cells that abut the CFI. In SOMAR v1.0.0, subduing these errors required a great deal of care when choosing refinement criteria. SOMAR v2.0.0's use of Arakawa-C grids and higher-order temporal accuracy eliminates these errors, removing much of the ``art'' of choosing appropriate fine-level grids.

SOMAR first release

16 Jan 19:13

Choose a tag to compare

SOMAR first release Pre-release
Pre-release

SOMAR is the Stratified Ocean Model with Adaptive Refinement. Its purpose is to simulate the coastal ocean.