Introduction to SwanOne
y SWAN is a third generation wave model that computes random, short-crested
wind-generated waves in coastal regions and inland waters.
(for more information see http://vlm089.citg.tudelft.nl/swan/index.htm)
y SwanOne is an interface to simplify one-dimensional wave modelling problems
and is written as a series of MATLAB routines (M-files).
SwanOne can be run in two modes:
1. In a MATLAB platform (any version)
2. As a stand-alone executable file
Introduction to SwanOne
y In a MATLAB platform
1. Open MATLAB (any Version).
2. Make the folder containing SwanOne MATLAB scripts
as the current directory of MATLAB.
3. Run SwanOne.m (M‐File) and start working.
y As a stand‐alone executable file:
1. Needs MATLAB Runtime Component (MCRinstaller77.exe), already installed on
your computer. (or the same MCRinstaller.exe of MATLAB version that the
program has been compiled with!)
(See Manual http://www.kennisbank‐waterbouw.nl/Software/SwanOne%20User%20manual.pdf)
2. You may compile it yourself with your own version of MATLAB!
Starting a Project with SwanOne
Folder Path: Defines where you want the SwanOne input files and
output files stored (you may not see any file until you
run the computation)
Projectname: All the input and output files will start with this
projectname
* Using a previously-run project
is not active yet!
Inputs of SwanOne Note % sign
(Comment symbol
in MATLAB)
yBottom Profile
“filename.txt” layout of such a file is
as follows:
Column1 : Distance from the Offshore
Boundary
Column2: Depth
“Negative Downward”
Alpha is the direction of the normal to
o
the coast line (Default 180 )
* Manual option is not active yet!
Inputs of SwanOne
y Nautical Convention of SWAN is used in
SwanOne:
“Zero degree is looking from north
to south and increases clockwise”
y The Difference between the wave ray and
bottom profile cannot be more than 70
degrees.
Inputs of SwanOne
yCurrent Profile:
“CurrentProfile.txt” layout of
such a file must be as follows:
Column1: distance from the
offshore boundary
Column2: X‐component of
current velocities
perpendicular to the
bottom profile)
Column3: Z‐component of
current velocities
(parallel to the bottom
profile)
*Current velocities outside the
defined area are assumed to be zero!
Inputs of SwanOne
Boundary Conditions:
y SP1 file: one‐dimensional spectrum file already computed by SWAN.
y Wave Parameters:
y Significant Wave Height,
y Peak Period,
y Wind Direction and Velocity
y Wave Direction
Inputs of SwanOne
Output Locations:
y for SP1 and SP2 output files of SWAN, at least one location is needed.
Inputs of SwanOne
Starting Computation:
y You may change the Computation Resolution in the
SwanOne‐ Start Computation window.
y SWAN reads the “Projectname.SWN”, and runs the model.
y The results will be stored in the directory that was already defined.
Computation
What SwanOne Creates: What SWAN Creates:
• ProjectName.MAT • ProjectName.PRT
“Data for the Interface”
“A report on SWAN computation
• ProjectName_bot.DAT Process”
“SWAN readable bottom profile” • ProjectName.TAB
• ProjectName_U.DAT “SWAN output results”
“SWAN readable Current Profile” • ProjectName.SP1
• ProjectName.SWN “1‐D Spectrum for output locations”
“List of Commands for SWAN” • ProjectName.SP2
• ProjectName_Table.TAB “2‐D Spectrum for output locations”
“Output Table (Optional)”
Output
y Different Wave Variables along bottom profile, and wave spectrum at
pre‐defined output locations can be plotted and compared.
Output
• The results can be printed in a table as a text file (ProjectName_Table.TAB),
and can be further loaded in MATLAB or Excel.