Published December 24, 2024 | Version v1.0
Software Open

comphy-lab/standing-non-linear-waves: Standing Non-Linear Waves – First Official Release

Creators

  • 1. Physics of Fluids, University of Twente

Description

Overview

This release provides a stable version of the standing non-linear wave simulation framework built on Basilisk. The code implements Stokes wave theory for analytical initialization and a best-fit approach for experimental initial conditions. Adaptive mesh refinement enables detailed interface tracking and efficient resolution of wave behavior.

Key Features

  • Two-Phase Flow with Surface Tension

  Employs a Volume of Fluid (VoF) method for interface tracking and a height function method for curvature calculation.

  • Adaptive Mesh Refinement

  Dynamically refines regions of high error and maintains coarser meshes elsewhere.

  • Analytical & Experimental Initial Conditions

  Offers built-in Stokes wave solutions alongside a best-fit initialization from experimental data.

  • Comprehensive Post-Processing

  Includes scripts for data extraction, interface geometry, and video generation.

Installation and Setup

  1. Clone the Repository

 git clone https://github.com/VatsalSy/standing-non-linear-waves.git

 cd standing-non-linear-waves
  1. Run Setup Script
./reset_install_requirements.sh

This checks for Basilisk and installs it if needed.

• Use

./reset_install_requirements.sh 
  • Hard for a fresh, clean installation.
  1. Environment Configuration

A .project_config file is generated to set BASILISK and update PATH automatically.

Usage

  1. Compile and Run

Go to the testCases/ directory and build using the Makefile:

cd testCases

make StokesStandingWaves

or compile directly with:

qcc -O2 -Wall -disable-dimensions StokesStandingWaves.c -o StokesStandingWaves -lm
  1. Execute
./StokesStandingWaves maxLevel Ga Bo A0 ORDER tmax

• maxLevel: max refinement level (default: 7)

• Ga: Galileo number

• Bo: Bond number

• A0: wave amplitude

• ORDER: 0–8 for analytical, -1 for best fit

• tmax: max simulation time

Post-Processing

Use the postProcessData.sh script in postProcessScripts/ to generate visualizations and extract data. For example:

cd testCases/

./postProcessData.sh <folderToProcess>

• video.py: Creates wave evolution videos and contour plots.

• getData / getFacets: Extract velocity, vorticity, and interface geometry.

Changelog

Initial Release

• Integrated Basilisk-based solver.

• Adaptive mesh refinement for two-phase flows.

• Scripts for post-processing and visualization.

• Analytical (Stokes) and experimental (best fit) initial conditions.

License

Distributed under the [GNU General Public License v3.0](https://github.com/comphy-lab/standing-non-linear-waves/releases/LICENSE).

Citation

If you use this code in your research, please cite:

Contact:

[Vatsal Sanjay](mailto:vatsalsanjay@gmail.com) (University of Twente)

Files

comphy-lab/standing-non-linear-waves-v1.0.zip

Files (15.3 MB)

Name Size Download all
md5:757444b90a3ebac6eb42a8dbdd3b360e
15.3 MB Preview Download

Additional details

Related works