Purpose of the test bank

The ONR test bank is used to verify Swan and other wave models against analytic and experimental data (Ris et al., 2001). This test bank is presently being used to verify a new version of Swan prior to its release. There are two drawbacks in this:

  1. Running the ONR test bank takes a lot of time, and
  2. Many operational aspects of Swan are not tested.

Therefore a separate configuration test bank was developed designed specifically for Swan which can be used for new Swan releases. It copies a few tests from the ONR test bank, but with moderate resolution to speed up the computations, and it contains a number of new tests to validate i/o procedures of Swan. This is the test bank described in this document; it contains over 150 tests, but it is not yet complete and as SWAN develops new tests will have to be added. Cooperation by SWAN users in extending and correcting the test bank is appreciated. Since this is the first published version of the test bank there may still be a considerable number of errors in the test input files and in the descriptions of the tests, so do not hesitate to contact me if you feel that something is incorrect.

This document describes the structure of the configuration test bank, aspects of Swan that need to be tested in the test bank, and it provides a description of existing tests.

The section Aspects indicates which aspects are covered by existing tests.

In this test bank 6 categories of cases are distinguished:

In general one case treats one physical situation, or one measurement campaign. Usually there are a number of runs within each case where various options of Swan are tested.

One element in the test bank is the possibility to test whether or not the results computed by two different Swan versions are identical. At present only the contents of tables produced by the two versions can be compared.
In each case directory there is a subdirectory Old.dat which contains tables of values computed with the older version. There is a comparison program Util\Compare.for which carries out the actual comparison between the tables generated by the two versions. Compare.for first attempts to open the two files; it will write an error message if either one fails. Both files must contain tables with heading; Compare.for determines the types of output quantities from the table heading.
Because results of two versions do not always have to be identical up to the last digit, a certain tolerance is chosen. For each type of quantity Compare.for has a criterion in order to decide whether values from the tables are different or not. Two values V are taken to be different if: |V1 - V2| > A + 0.5 * R * (V1 + V2) The values of A and R depend on the type of output quantity as follows:

for Hs
0.01 m
for period
0.1 s
for direction
1 °
for directional spread
1 °
For other quantities no comparisons are made.
In the procedure implemented in the test bank detailed results for a [case] are written to the file [case]\[case].CMP. If differences are found a summary is written to a file Compare\[case].DEV.
The comparison procedure for the whole test bank is started by Run_pc\Comprall.bat, and for a category of cases by Run_pc\Compr_a.bat (for all cases of category A).

go to top


The following aspects need to be covered by the Swan configuration test bank:

Physics, Propagation

test code
refraction and shoaling A01
non-stationary propagation A51, A52
propagation over the globe along great circles A21, A22
anti GSE diffusion A52
computation of Cσ A11, A12
refraction on a spatially varying current A13
diffraction A33, A34, A36, L11, L12

Physics, Source terms

test code
wind Input G01, G02, F51
whitecapping field tests
bottom friction field tests
dissipation due to vegetation L31, L32
surf breaking L01, field tests
triad interactions L01
quadruplet interactions A81, A82, A83, G06
setup due to wave action A03

Grid options

test code
regular grid standard orientation many tests
regular grid nonstandard orientation A01, A33b
curvilinear grid A01j, A02j, F01d
unstructured grid A01, A71, F02c, E23
1D grid A01a, A02a, L01, F03
uniform wave field A81, A82, A83
large-scale area in spherical coordinates A21, A22, A52, F51
small-scale area in spherical coordinates A01g, A02g
repeating grid G02, G21, A01h, A02h, A23
Removing isolated grid points F02c
exception values F02c
full circle spectral coverage many tests
computation on a sector F01
Nautical directions F02

Input fields

test code
bathymetry all field tests
current F02
      current=0 equal to no current? F01
      stationary field F02
      non-stationary field A12
water level A45k, A45l
      stationary field F02
      non-stationary field A11
wind uniform F01, F02
wind=0 equal to no wind? F01
      stationary field  
      non-stationary field via 1 file F51, G21a
      non-stationary field via >1 file G21b
check Input fields without computation F02d

Numerical options

test code
1st order scheme A32, A52
higher order scheme many tests
Convergence behaviour G03
Convergence of nonstationary solution to stationary solution A02s, A02t
Initial conditions  
      default F51a
      zero A52
      parametric A52
      from hotfile F51b
      from hotfile (stationary case) G03, G04
      stationary computation as initial condition F51a
Writing hotfile F51a, G03, G04

Boundary conditions

test code
side many tests
segment (xy coord.) A32
segment (grid indices)  
parametric b.c. with Jonswap spectrum many tests
parametric b.c. with PM spectrum  
parametric b.c. with 'Gauss' spectrum A01
time-dependent parametric (TPAR) A91b
1d spectra from file F01
2d spectra from file F02a
stationary nested boundary condition F02b
nonstationary nested boundary condition  
Nesting with non-closed boundary F02c
Nesting in a 1-dimensional computation L04
nesting in WAM  
nesting in WaveWatch III  
      (Constant) transmission A32, A43
      Dam type transmission A42
      (Partial) reflection A41, A43
      Reflection with scattering A41, A43
      wave height in case of full reflection A43
      obstacle in a 1d computation A45
Date-time procedures  
      Input of date-time via command file F51
      Input of date-time via other file F51
      period extending over turn of the century  
      period extending from Feb 28/29 to Mar 1 G09t, G02u
      time coding options  

Operational options

test code
NUM command  
      number of iterations G03, G04
      explicit comput. in sigma  
Mode command  
      Noupdate option (computation with fixed spectra) A81, A82, A83
Include option many tests
nested Include G02
interpolation of spectra A91

Output facilities

test code
Definition of output point sets  
      frame F01
      curve F02
      point F02
      points via file F01
      sites A32p, F01
      lines A32p
Plotting isolines A22
      vector field F01, F51
      STAR plot A22, A41
      locations A32p, A41
      (curvilinear) gridlines A01, A02, F02
      obstacle/line A32
      sites A32p, F01
      spectra A81, A82, A83
      problem points R02
      table many tests
      block F01
      write nesting file F02a
      spectra 1d F02
      spectra 2d F02a
      output options F01
      plot in PostScript format A23a
Output quantities  
      Hsign many tests
      Average period many tests
      setup A03
      fspr (kappa) A02
      time F51
      quantity command to change number of decimals L01, L02
Output options  
      field length in table F01
      field length in noheader table F01
      decimals in block F01
      decimals in spectral file F01
Test output  
      parametric G21
      1d spectra G21
      2d spectra G21

Error detection procedures

test code
checking of Input values (TEST command) E01a
reading of numbers in exponential format E01a
combination of quadruplets and sector E22
incorrect curvilinear grid input E23
incorrect curvilinear grid input (x,y in table format)  
incoming energy >= reflected + transmitted energy? A45k, A45l

go to top

Case descriptions

6 categories of cases are distinguished:

  • Series A: academic cases (often with verification against analytical data),
  • Series L: laboratory cases (verification against lab. Observations)
  • Series F: field cases (verification against field observations)
  • Series G: generalized empiric cases (verification against generally accepted growth curves etc.)
  • Series R: tests for robustness of Swan
  • Series E: tests for error procedures in Swan

academic cases

A01. Shoaling and refraction

A02. Waves propagating towards a beach

A03. Waves propagating towards a beach, with setup

A11. Variation of period with time-varying depth

A12. Variation of period with time-varying current velocity

A13. Propagation on spatially varying current velocity field

A21. 2d propagation, stationary, spherical coordinates

A22. 2d propagation, stationary, spherical coordinates

A23. 2d propagation, repeating cartesian coordinates

A24. 2d propagation, showing Garden Sprinkler effect

A32. 2d propagation passing an obstacle

A33. Propagation along a channel

A34. Propagation along a wave guide

A35. Diffraction in a realistic harbour configuration

A36. Diffraction around a semi-infInite breakwater

A41. Reflection on an obstacle

A42. Transmission through an obstacle of type 'dam'

A43. Transmission and reflection on an obstacle

A45. Obstacle in a 1-d computation

A51. 1d propagation, non-stationary

A52. 2d propagation, non-stationary

A53. single point model, non-stationary convergence test

A54. 1-d stationary computation with hotstart

A71. Nesting an unstructured grid and a curvilinear grid

A81. Source terms for a given fixed spectrum

A82. Source terms for a combination of sea and swell

A83. Source terms for a combination of sea and swell

A91. Interpolation of spectra

Error detection tests

E01. Test with missing bottom file

E22. Combination of quadruplets and sector

E23. Curvilinear grid error

E24. Combination of setup and repeated grid

field cases

F01. Haringvliet estuary

F02. Westerschelde estuary

F03. Petten, almost straight coastline

F04. Friese Zeegat estuary, case with current and variable waterevel

F51. Gorbush storm, a nonstationary field case in the Mediterranean

laboratory cases

L01. Flume measurements by Boers (1996)

L02. Wave growth with opposing swell

L03. Wave growth with following swell

L04. Fraction of breaking waves

L11. Diffraction near a gap in a breakwater

L12. Diffraction on a shoal

L31. vegetation dissipation

L32. vegetation dissipation

generalized empirical tests

G01. Deep-water wave growth

G02. Depth-limited wave growth

G03. Convergence behaviour, deep water

G04. Convergence behaviour, shallow water

G05. Convergence with different initial conditions

G06. Growth with various formulations of the quadruplet interactions

G21. Rotating wind field

robustness tests

R01. Steep bottom gradients

R02. Strong currents

© 2012: Nico Booij