Source-linked AI summary

Performance of interFoam on the simulation of progressive waves

Bjarke Eltard Larsen, David R. Fuhrman, Johan Roenby

arXiv:1804.01158v1physics.flu-dyn

TL;DR

The paper addresses the limited documentation of interFoam’s accuracy and setup sensitivity for nonlinear regular-wave propagation. It systematically tests model settings against an analytical solution and finds that small Courant numbers and carefully balanced discretization choices substantially improve long-distance wave propagation, while isoAdvector maintains a sharper interface with comparable accuracy.

  • Problem

    InterFoam’s accuracy for progressive-wave simulation and sensitivity to numerical setup were insufficiently documented, complicating reliable benchmarking.

  • Method

    The study systematically varies Courant number, mesh resolution, discretization schemes, and solver settings while comparing interFoam simulations with an analytical stream-function wave.

  • Results

    A Courant number of approximately 0.05 gives a good solution over short propagation distances, while a suitable diffusive balance enables interFoam to maintain wave shape over longer distances.

  • Takeaways & Limitations

    Accurate interFoam wave simulations require small time steps or carefully tuned scheme combinations rather than relying on default tutorial settings.

  • Takeaways & Limitations

    The diffusive balance is not universal: its suitability depends on Courant number and wave shape, and more diffusion can worsen results at lower Courant numbers.

Abstract

from arXiv · show

The performance of interFoam (a widely-used solver within the popular open source CFD package OpenFOAM) in simulating the propagation of a nonlinear (stream function solution) regular wave is investigated in this work, with the aim of systematically documenting its accuracy. It is demonstrated that over time there is a tendency for surface elevations to increase, wiggles to appear in the free surface, and crest velocities to become (severely) overestimated. It is shown that increasing the temporal and spatial resolution can mitigate these undesirable effects, but that a relatively small Courant number is required. It is further demonstrated that the choice of discretization schemes and solver settings (often treated as a "black box" by users) can have a major impact on the results. This impact is documented, and it is shown that obtaining a "diffusive balance" is crucial to accurately propagate a surface wave over long distances without requiring exceedingly high temporal and spatial resolutions. Finally, the new code isoAdvector is compared to interFoam, which is demonstrated to produce comparably accurate results, while maintaining a sharper surface. It is hoped that the systematic documentation of the performance of the interFoam solver will enable its more accurate and optimal use, as well as increase awareness of potential shortcomings, by CFD researchers interested in the general CFD simulation of free surface waves.

1. Introduction

The paper investigates why interFoam can perform poorly when propagating regular waves and systematically tests how numerical settings affect accuracy. It argues that detailed, reasonably optimal settings are needed before benchmarking interFoam or related CFD solvers.

  • Motivation: Prior studies reported over-predicted crest velocities, changing wave heights, interface wiggles, and spurious velocities during interFoam wave simulations.These issues were documented across solitary-wave, regular-wave, and other free-surface studies.
  • Benchmarking challenge: Benchmarking is difficult because many published interFoam studies omit relevant setup details, although performance is sensitive to those choices.The paper specifically highlights convection-scheme selection as one influential setting.
  • Implication: The paper emphasizes that reasonably optimal settings should be established before benchmarking interFoam or other CFD solvers.This requirement follows from the solver’s demonstrated sensitivity to setup choices.
  • Study design: The study systematically evaluates interFoam on a canonical progressive regular wave and compares simulated elevations and velocities with an analytical solution.The wave is initialized using a stream function solution and the analysis examines solver behavior over propagation time.
  • Study design: The investigation varies Courant number, mesh resolution, discretization schemes, and solver settings before combining them into a reasonably optimal setup.The study also considers general setup choices and couples interFoam with isoAdvector.

2. Model description

The model solves incompressible two-phase flow using continuity and momentum equations with an indicator field describing the water–air phases. The study applies interFoam’s interface-compression and MULES treatment to a nonlinear stream-function wave under specified physical and numerical conditions.

  • Hydrodynamics: The flow model couples a continuity equation with momentum equations for the two-phase fluid.The momentum formulation includes pressure, density, viscosity, gravity, strain-rate, and surface-tension terms.
  • Hydrodynamics: The indicator field α equals 0 in air and 1 in water and can be used to express intrinsic fluid properties.Its evolution is governed by a continuity equation written in terms of α.
  • Interface treatment: interFoam sharpens the interface with a heuristic compression term and limits phase fluxes using the MULES limiter.The compression term introduces a modelled relative velocity to compress the interface.
  • Numerical implementation: The simulations use OpenFOAM foam-extend 3.2, with an additional check using OpenFOAM-3.0.1 that produced no significantly different results.This comparison addresses the influence of newer MULES and Crank–Nicolson support.
  • Test case: The test case is a nonlinear intermediate-depth stream-function wave with T = 2 s, H = 0.125 m, h = 0.4 m, and a 379×80-cell domain.The base mesh uses Δx = Δy = 0.01 m and N = H/Δy = 12.5 cells per wave height.

3. interFoam settings

interFoam’s numerical setup spans time stepping, finite-volume discretization, interface compression, and iterative-solver controls. The study uses the damBreak tutorial as a base configuration and varies these settings to assess their effects.

  • Base setup: The base configuration copies the damBreak tutorial’s controlDict, fvSchemes, and fvSolution files, with subsequent simulations making minor adjustments.These files specify time stepping, discretization schemes, and solver or solution-algorithm settings.
  • Time stepping: The adjustable time step maintains maximum Co and interface-cell AlphaCo values, initially set to 0.5.The Courant number is defined from velocity, time-step size, and cell size.
  • Convection schemes: Finite-volume convection approximates face values using interpolation schemes, with central differencing offering second-order accuracy but possible oscillations and upwind differencing avoiding oscillations while remaining diffusive.TVD and NVD schemes blend upwind and central estimates to improve accuracy while maintaining boundedness.
  • Convection schemes: The limitedLinearV 1 momentum scheme and vanLeer01 mass-flux scheme use limiter-dependent blending factors, whose diffusivity varies across TVD/NVD choices.The gradient scheme also affects the limiter because the gradient ratio is computed from numerically calculated gradients.
  • Spatial operators: The laplacian discretization requires viscosity interpolation and a surface-normal gradient scheme, with the latter depending on mesh orthogonality.The surface-normal gradient is also used in evaluating viscous terms in the momentum equation.
  • Solution controls: Solver settings include linear-solver choices and PISO/PIMPLE controls for interface compression, pressure correction, outer corrections, alpha sub-cycling, and repeated alpha solves.The cAlpha parameter sets compression magnitude, while nOuterCorrectors is set to one for PISO mode.

4. Results and discussion

The default interFoam setup develops growing wave heights, interface wiggles, phase errors, and overestimated crest velocities during propagation. Lower Courant numbers, finer resolution, and carefully balanced numerical settings mitigate these effects, but scheme choices introduce trade-offs between stability, sharpness, and diffusion.

  • Default performance: After approximately 20 periods, the default simulation develops increasing wave height, crest steepening, and eventual breaking.The wave begins from the analytical stream function solution and is propagated for 100 periods using damBreak settings.
  • Default performance: Significant phase errors emerge after roughly 10 periods because simulated celerity increases relative to the analytical solution.The phase error coincides approximately with over-steepening and is attributed to unphysical growth in wave nonlinearity.
  • Default performance: Crest velocities become severely overestimated, with the error increasing over time and contributing to wave breaking.The authors note that this overestimation has received little recognition in journal literature, despite earlier reports.
  • Courant number and resolution: Lowering Co improves surface elevation, phase, and velocity predictions, but Co = 0.02 still fails to preserve wave shape for 100 periods.For Co ≤ 0.15, wave height remains close to constant only through approximately 20 periods; Co = 0.15 still overestimates crest velocity by about 17% after five periods, whereas Co = 0.05 reduces that error to 0.1%.
  • Courant number and resolution: Increasing spatial resolution sharpens the interface and generally improves the solution, but wiggles can still maintain high crest velocities.At N = 25 and N = 50 the interface is sharper, while N = 25 still exhibits high crest velocity associated with surface wiggles.
  • Discretization and solver settings: Interface compression and time discretization strongly affect wiggles: larger cα accelerates their growth, while Crank–Nicolson makes them appear earlier and extend across the surface.Reducing cα smears the interface, and the less-diffusive Crank–Nicolson scheme provides less numerical damping than Euler.

5. interFoam coupled with isoAdvector: interFlow

The isoAdvector-based interFlow coupling produces a sharper interface and removes the wiggles observed with interFoam, while balanced settings allow both solvers to propagate the wave accurately over long distances. However, interFlow requires altered solver tolerances and does not automatically improve velocity profiles.

  • Solver settings: InterFlow could not propagate the wave with interFoam’s original settings and required pressure tolerances reduced 100-fold and velocity tolerances reduced 10-fold.Despite these tighter tolerances, interFlow completed the simulation slightly faster because its algorithm moved the free surface faster, not because it used larger time steps.
  • Interface representation: InterFlow uses isoAdvector to sharpen interFoam’s smeared interface and eliminate the artificial-compression-induced surface wiggles.The α = 0.99 and α = 0.01 contours remain separated by less than two cell heights, corresponding to approximately one interface cell vertically.
  • Surface evolution: With the initial comparison settings, interFlow mildly decreases wave height while interFoam’s wave heights increase over time.The interFlow interface contours are substantially closer than interFoam’s, indicating a sharper surface representation.
  • Velocity profiles: At t = 5T, interFlow does not improve the velocity profile: crest velocity is slightly larger than interFoam’s and velocity nearer the bed is underestimated.The authors attribute the near-bed underestimation probably to interFlow’s decreased wave height.
  • Balanced settings: A balanced setup enables interFlow, like interFoam, to propagate the stream-function wave for 100 periods while reducing crest-velocity overestimation.Using an upwind scheme with blended Crank–Nicolson produces similar velocity profiles for both solvers, while two outer correctors further improve interFlow’s velocity profile.
  • Long-distance propagation: After 100 periods with balanced settings, interFlow still follows the analytical stream-function solution with wave elevations of the right magnitude and no significant phase differences.This long-duration result demonstrates accurate propagation under the tuned configuration rather than with the original interFoam settings.

6. Conclusions

The study shows that interFoam’s accuracy for progressive waves depends strongly on numerical settings, while carefully balanced schemes can preserve wave shape and improve crest velocities over long propagation distances. interFlow provides a sharper interface and removes wiggles while also supporting long-duration propagation.

  • interFoam performance: Basic interFoam settings produced increasing wave heights, interface wiggles, spurious air velocities, and severely overestimated crest velocities.These shortcomings were observed when using the popular damBreak tutorial settings.
  • Scheme sensitivity: Lowering the artificial compression term cα damped or removed interface wiggles, while less diffusive time discretization caused them to appear earlier and spread farther.The study identified cα as the root of the interface-wiggle behavior examined in the tested settings.
  • Scheme sensitivity: More diffusive convection schemes removed interface wiggles, delayed wave-height growth or reduced wave height, and reduced crest-velocity overestimation.Convection choices affected interface behavior, wave-height evolution, and velocities beneath the crest.
  • Long-distance propagation: A diffusive balance among numerical schemes enabled interFoam to propagate the wave 100 wavelengths while maintaining its shape and improving the velocity profile beneath the crest.The balanced setting avoided requiring exceedingly fine temporal and spatial resolutions for long propagation.
  • interFlow comparison: interFlow propagated the wave for 100 periods with a sharper interface and no surface wiggles, although the wave decreased slightly and its velocity profile initially performed slightly worse than interFoam’s.A balanced interFlow setting also maintained wave shape and a good match with the analytical velocity profile.
  • Implications and scope: The documented sensitivity of OpenFOAM wave simulations is intended to improve users’ numerical setup choices for broader free-surface-wave applications.The study highlights relevance to wave-structure interaction, breaking, surf-zone dynamics, boundary layers, and sediment transport, while focusing on progressive non-breaking waves.
Loading 1804.01158v1…