Errors in input fields
Interpretation of SWAN runs
Interpretation is an important item, particularly during the preliminary phase of your
Remember that it is your responsability to deliver reliable data for your client.
If your Swan run is not completed, or if you get results that you do not understand,
always look first at the print file; this is the file with the same name as the control
file but with extension .prt. Here you will find any error messages that Swan
However, if there are no error messages it does not mean that everything is OK.
If you mistrust the results, there are a few things that you can do to find the cause
and the remedy:
Numerical errors are sensitive to step sizes;
so if choosing a smaller step size
(space or time step) or spectral step (direction or frequency) changes your results
considerably you are dealing with a numerical error. In the NUM command you will
find a number of ways to make your computation more stable.
Halving the step size is also a well known method to estimate the numerical inaccuracy.
An often overlooked numerical problem deals with iteration.
As you can see during the
computation Swan is carrying out a number of iterations to reach the final result.
There are certain criteria in Swan to end the iterative process; these have to do
with the difference between subsequent iterations, NOT with the difference between
the iterative result and the limit, simply because the limit is unknown.
The stopping criteria are described in the NUM command.
Swan reports the percentage of grid points where the stopping criterion is fulfilled.
If the process converges well this number should increase with every new iteration
and should come close to 100% at the end. Even with 100% there is still change in
the computed values. Therefore it is recommended to make a computation with, say,
twice the number of iterations. If necessary you can impose the number of iterations
in the NUM command as follows:
NUM ACCUR npnts=101 STAT 50
The maximum number of iterations is set to 50, and the number 101 ensures that all 50 iterations
are performed (a percentage of 101 is never reached).
It is useful to study the iterative behaviour in a number of test points scattered
over the computational area. Test points are defined by means of the TEST command.
Values of Hs, period and dissipation terms are written to a file which is also
given in the TEST command. Graphs of the values in the file as function of
iteration can easily be made by the post-processing software OPGraph.
The percentage of points where the stopping criterion is fulfilled gives an overall
impression of the iterative process, it is often useful to know the location of the points
with the largest difference between the last two iteration. This information can be obtained
by making a plot of the quantity DHS or DRTM01. These quantities are the difference
in Hs and average period between the last two iterations.
An example of the study of iterative behaviour of Swan is seen in a separate
peaks in bottom profile or in current velocity pattern
indicate errors in the bathymetry data or the current data.
In the preliminary phase of the project you should always make plots of these
fields, preferably directly from the Swan computation because this eliminates
If there is unexplained behaviour in a part of the region, there is a way to get
a closer look at this area. By means of the GROUP .. SUBGRID command you can define a
set of output points smaller than the computational grid itself but consisting of
grid points so that you avoid interpolation errors.
For this area you can make PLOT or BLOCK output, not only for Hs and wave period but also
for dissipation terms, bottom etc.
Instead of plots for average direction it is recommended to make a so-called
star plot (see command PLOTSTAR) since this shows the directional distribution
is each grid point enabling you to follow the flow of wave energy through the
unexpected results may also be due to physical effects,
i.e. poor representation of the physics by the formulations in Swan.
Remember that dissipation terms
and wind growth terms in the action balance equation are empirical, and the
nonlinear energy transfer terms are based on rather severe simplifications (in
order to keep the computation time feasible).
In order to find out if one of these formulations caused your poor results you may try
to make a computation with this term switched off, or if this is too drastic,
make a computation with a different formulation. In the case of bottom friction,
whitecapping and quadruplet interactions there are several alternative formulations
Diffraction in particular is a physical effect that often causes problems.
In Swan diffraction is approximated, and it is assumed that the effect of diffraction
is relatively small. So, always compare with a computation without diffraction.
Moreover, being an approximation it is not only inaccurate, it is also prone to instability.
In the DIFFRAC and the NUM command you find ways to make the computation more stable.
If you have observations available it is worthwhile to make graphs showing the
differences between the computations and the observations.
The post-processing software OPGraph can be very helpful in this respect.
An example including the control file for OPGraph
and the resulting graphs is found in a separate section.
Although your client may not be interested in anything else than Hs in a limited
area, you should always look at the wave field in the whole computational grid.
Pay attention also to the behaviour near the boundaries of the grid because
erroneous boundary conditions will be detrimental to the quality of your results.
go to top