# Waves

## Contents

# The [Waves] section

In aNySIM the wave forces on a floater are updated during the simulation when the position of the ship changes. A change of position results in a change in the geometrical phase of the incoming wave. The following document explains how the wave forces are calculated with this effect of the position's change, and gives some theoretical background information: Wave docu.

In a simulation with several floaters, the wave interaction between these floaters depend of the relative positions. As these relative position are frozen for the diffraction calculation in the hydrodynamic database, the effect of the varying relative positions of the floaters on the wave interaction cannot be accounted for during a simulation in aNySIM.

In release v9.0 the Orbital module was added to aNySim. It calculates orbital velocities and accelerations of undisturbed waves. These properties can be used for the calculation of the wave forces on Morison structures. Three keys are added for the Orbital module: ApplyOrbital, OmegaStepOrbital and TruncateIRFunctions, see the table below.

**Warning:** When using TruncateIRFunctions = false the results at a distance from WaveRefPos can be inaccurate.

The Orbital reference manual can be found here.

keyword | unit | description | options | version |
---|---|---|---|---|

WaveType | [-] | Wave type to be used | Compulsory: wave type indicator: 0 - User supplied wave spectrum 1 - Pierson-Moskowitz 2 - Jonswap 3 - Gaussian swell 4 - Torsethaugen 5 - Regular wave 6 - User supplied wave train - timestep of wave train can be finer than HCOM |
aNySIM_V8.1 |

WaveRefPos | [-] | Reference position for the wave height {x,y} | Compulsory | aNySIM_V8.0 |

WaveHs | [m] | Hs | Significant wave height if WaveType = 1, 2, 3, 4 Wave amplitude if WaveType = 5 |
aNySIM_V8.0 |

WaveTp | [s] | Tp | Peak period if WaveType = 1, 2, 3, 4. NOTE: peak period must be > 0 Wave period if WaveType = 5 |
aNySIM_V8.0 |

WaveTrainFile | [-] | Filename that contains the wave train | If WaveType = 6 | aNySIM_V8.0 |

WaveGamma | [-] | Peak shape factor (1 <= Gamma <= 7) | If WaveType = 2 | aNySIM_V8.0 |

WaveGamma | [-] | Dimensionless sigma of the normal distribution | If WaveType = 3, standard 0.08 | aNySIM_V8.0 |

WaveSpeed | [m/s] | Forward speed | WaveSpeed is used to correct the first order wave forces (only long-crested) for a forward speed. Wave drift forces are not corrected. Default = 0. |
aNySIM_V8.0 |

WaveSpectrumFile | [-] | Filename that contains the spectrum of the wave | aNySIM_V8.0 | |

WaveSeed | [-] | Seed number for the choice of the random phase | Compulsory for WaveType 0 through 5 | aNySIM_V8.0 |

WaveDirMu | [deg] | Mean wave direction in Engineering system, 'going to' definition. | Compulsory | aNySIM_V8.0 |

SwellType | [-] | Swell type to be used | Optional: swell type indicator: 0 - User supplied swell spectrum 1 - Pierson-Moskowitz 2 - Jonswap 3 - Gaussian swell 4 - Torsethaugen 5 - Regular wave 6 - User supplied wave train |
aNySIM_V8.0 |

SwellRefPos | [-] | Reference position for the wave height {x,y} | aNySIM_V8.0 | |

SwellHs | [m] | Hs | Significant wave height if SwellType = 1, 2, 3, 4 Wave amplitude if SwellType = 5 |
aNySIM_V8.0 |

SwellTp | [s] | Tp | Peak period if SwellType = 1, 2, 3, 4. NOTE: peak period must be > 0 Wave period if SwellType = 5 |
aNySIM_V8.0 |

SwellTrainFile | [-] | Filename that contains the wave train | If SwellType = 6 | aNySIM_V8.0 |

SwellGamma | [-] | Peak shape factor (1 <= Gamma <= 7) | If SwellType = 2 | aNySIM_V8.0 |

SwellGamma | [-] | Dimensionless sigma of the normal distribution | If SwellType = 3 | aNySIM_V8.0 |

SwellSpeed | [m/s] | Forward speed | SwellSpeed is used to correct the first order swell forces (only long-crested) for a forward speed. Wave drift forces are not corrected. Default = 0. |
aNySIM_V8.0 |

SwellSpectrumFile | [-] | Filename that contains the spectrum of the swell | aNySIM_V8.0 | |

SwellSeed | [-] | Seed number for the choice of the random phase | Compulsory for SwellType 0 through 5 | aNySIM_V8.0 |

SwellDirMu | [deg] | Mean swell direction in global system | aNySIM_V8.0 | |

ApplyOrbital | [-] | Flag for applying orbital velocities and accelerations. | Optional, default = false. | aNySim_v9.0 |

OmegaStepOrbital | [rad/s] | Frequency step of wave orbital velocity and acceleration RAO's. | Optional, if not present it is calculated with the wave period, see reference manual. | aNySim_v9.0 |

TruncateIRFunctions | [-] | Boolean (true or false), if true only 1/8th of the orbital impulse response functions (IRF's) is used to minimize calculation time. | Optional, default = false. | aNySim_v9.0 |

FullReport | [-] | Boolean (true or false), if true an Rtd-file is created. | Optional, default = false. | aNySim_v9.0 |

## Wave and swell direction

The wave (swell) direction is defined in the global co-ordinate system. The wave (swell) is **going to** the given direction. A zero-degrees wave (swell) is therefore coming from the West, a ninety-degree wave (swell) from the South, etc., as illustrated below:

In the standard approach, the wave forces are calculated for the duration of the simulation and the first order step and second order step are chosen automically by the application. This choice is made to optimize the computation effort necessary for the generation of wave-forces. Since aNySIMv8.1, two distinct segments of the wave train are used to calculate the first order forces and the second order forces. As a consequence, the expert user can instruct how to calculate the wave forces on these 2 segments of the wave train separately. The user can optionally specify how the wave-forces are calculated through the following expert settings:

keyword | unit | description | options | version |
---|---|---|---|---|

Section1 | [-,s,-,s] | {NT1, DT1, NT2, DT2} NT1 = number of samples for the calculation of the wave history and the first order force time-traces (the drift forces are ignored). DT1 = time-step for the wave history and the first order time-traces. NT2 = number of samples for the calculation of the second order force time-traces. DT2 = time-step for the second order time-traces. DT2=2 ^{n} DT1 NT1*DT1 = NT2 * DT2 NT1*DT1 is the total length of the wave train which is used during the simulation, it should preferably be taken equal to the total simulation duration. |
For expert only | aNySIM_V8.1 |

SamplesInSection1 | [-] | Nsection1 = number of points in the first segment. First order forces are not calculated at once for the whole wave train but for overlapping segment of the wave train. |
For expert only | aNySIM_V8.1 |

Section2 | [-,s,-,s] | {NT1, DT1, NT2, DT2} NT1 = number of samples for the calculation of the wave history considered to derive the drift forces (the first order forces are ignored). DT1 = time-step for the wave history. NT2 = number of samples for the calculation of the second order force time-traces. DT2 = time-step for the second order time-traces. DT2=2 ^{n} DT1 NT1*DT1 = NT2 * DT2 NT1*DT1 is the total length of the wave train which is used during the simulation, it should preferably be taken equal to the total simulation duration. |
For expert only | aNySIM_V8.1 |

SamplesInSection2 | [-] | Nsection2 = number of points in the second segment. Second order forces are not calculated at once for the whole wave train but for overlapping segment of the wave train. |
For expert only | aNySIM_V8.1 |

HeadingThreshold | [deg] | present wave rel heading - wave rel heading at last update| > Crit Threshold above which wave forces are recalculated By default 1 deg |
aNySIM_V8.0 | |

TimeThreshold | [s] | abs(current time - time at previous call) > Crit Threshold below which the value of the wave forces remains the same By default 0.1 s |
aNySIM_V8.0 | |

HorPosThreshold | [m] | Sqrt( Dx^{2}+Dy^{2} ) > Crit Threshold above which wave forces are recalculated By default 5 m |
aNySIM_V8.0 | |

FullReport | - | Boolean Provide extra reporting information about wave calculation in report file By default F |
aNySIM_V8.0 |

Note that some of these expert settings used to be different in previous version (aNySIMv8.0). The keywords 'Samples' and 'MinSamplesInSection' are now obsolete.

## Wave spectrum file

The wave spectrum file is a free-format file giving a list of wave frequencies (rad s^{-1}) and wave spectral densities (m^{2}s). The frequencies need not be equidistant, but are assumed to be increasing. An example is shown below:

0.25 0.0 0.50 7.5 0.60 8.0 0.75 3.0 1.0 1.5 1.5 0.5

## Wave time trace

The wave time trace file is an text file giving a list of wave elevations (m). The time step is assumed to be equidistant and is given on the first line. This line should start with dt= and contain no spaces. The proceeding lines in the file should list the wave elevation at each time step. These lines may contain spaces. (See example below)

The maximum length of a wave time trace is 127997 samples.

**Note:** If the time step in the wave time trace is not the same or an integer multiple of DtCom, the wave is not properly reproduced (staircases in the reproduced wave). One of the danger of resampling is the 'energy leak': the re-sampled wave train has less energy than the original wave train; this can be checked by comparing Hs given in rep-file to the original Hs. If resampling is preferred, that can be done using the Matlab function interp1. It is necessary to provide a time history which is at least as long as the total simulation time TEND to avoid hazardous periodicity or mirroring side effects in the wave. aNySIM calls the subroutine FFTM to calculate the inverse Fourier trasnform of the wave time series. FFTM can result in an error for very long time trace. The error can be avoided by caring that the time series contains a number of points which is a power of 2, an other option is to shorten the time series by increasing the sampling rate.

An example is shown below:

dt=0.5 -1.2123 -1.6684 -1.8858 -1.7545 -1.3189 -0.6362 0.1716 0.9516 1.5632 1.8169 1.6657 1.2343 0.7087 0.2073 -0.2094 -0.5112 -0.7232 -0.8868 -0.9997 -1.0464 -1.0584 -1.0574 -0.9998 -0.7911 -0.37 0.2137 0.8683 1.515 2.0307