FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Functions/Subroutines | Variables
wavefunctionsmodule Module Reference

Module with subroutines for sea wave evaluation. More...

Data Types

interface  initfunc4
 Initializes parameters of a sea wave function. More...
 

Functions/Subroutines

subroutine initfunc4fromfile (FNAME, G, D, RFUNC, IERR, RSEED)
 Initializes wave function parameters from the given file. More...
 
subroutine initspectrumof (IOP, H3, T1, Gamma, Omega0, dOmega, g, D, RFUNC, IERR, RSEED)
 Initializes a wave function based on statistical parameters. More...
 
subroutine initspectrumdnv (Hs, Tp, Gamma, Omega0, dOmega, g, D, RFUNC, IERR, RSEED, NWdir, SprExp)
 Initializes a wave function based on statistical parameters. More...
 
real(dp) function, public wavenumber (omega, g, d)
 Calculates the wave number for finite depth waves. More...
 
logical function, public checkdepth (d, k)
 Checks that the finite water depth does not cause cause overflow. More...
 
subroutine, public deepwave (RFUNC, g, x, z, t, atSurface, noWheelerStretching, h, u, w, du, dw, p)
 Evaluates the deep water wave profile. More...
 
subroutine, public deepwaves (RFUNC, g, x, y, z, t, atSurface, noWheelerStretching, h, u, v, w, du, dv, dw, p)
 Evaluates the deep water wave profile. More...
 
subroutine, public finitedepthwave (RFUNC, g, d, x, z, t, atSurface, noWheelerStretching, h, u, w, du, dw, p)
 Evaluates the finite depth wave profile. More...
 
subroutine, public finitedepthwaves (RFUNC, g, d, x, y, z, t, atSurface, noWheelerStretching, h, u, v, w, du, dv, dw, p)
 Evaluates the finite depth wave profile. More...
 
subroutine, public stokes2wave (RFUNC, g, d, x, z, t, atSurface, noWheelerStretching, h, u, w, du, dw)
 Evaluates the wave profile according to 2nd order Stokes theory. More...
 
subroutine, public initfunc7 (H, T, eps, g, D, RFUNC, ierr)
 Computes coefficients for 5th order Stokes waves. More...
 
subroutine, public stokes5wave (RFUNC, d, x, z, t, atSurface, h, u, w, du, dw)
 Evaluates the wave profile according to 5th order Stokes theory. More...
 
subroutine, public initfunc8 (H, T, eps, g, D, RFUNC, iOrder)
 Solves the streamline wave equation. More...
 
subroutine, public streamwave (RFUNC, d, x, z, t, atSurface, h, u, w, du, dw)
 Evaluates the nonlinear wave profile according to streamline theory. More...
 
subroutine, public initfunc9 (IOP, NR, NC, H3, T1, Gamma, Omega0, dOmega, g, D, ramp, embSLW, IFUNC, RFUNC, IERR, RSEED)
 Initializes an irregular wave function with embedded streamlines. More...
 
subroutine, public embeddedwave (IFUNC, RFUNC, g, d, x, z, t, atSurf, noWS, h, u, w, du, dw)
 Evaluates a wave function with embedded nonlinear components. More...
 
subroutine, public userdefinedwave (ikf, IFUNC, RFUNC, g, d, Xt, atSurf, h, u, du, ierr)
 Evaluates the user-defined wave profile. More...
 

Variables

integer, parameter, public dp = kind(1.0D0)
 8-byte real (double) More...
 
real(dp), parameter pi = 3.141592653589793238_dp
 The value of π. More...
 
real(dp), parameter, public twopi = pi+pi
 The value of 2π. More...
 

Detailed Description

Module with subroutines for sea wave evaluation.

This module contains subroutines for initialization of real parameters for the explicit wave function (explicitfunctionsmodule::func4). It also has subroutines for evaluating the wave function at a given point in time and space. The FUNC4 interface of the explicitfunctionsmodule only yields the free surface level at a given time and x = 0, and infinite water depth, whereas the subroutines herein can be used for any value of x and finite depth. Subroutines returning the corresponding velocity and acceleration for any depth z ≤ 0 are provided as well.

Function/Subroutine Documentation

◆ checkdepth()

logical function, public wavefunctionsmodule::checkdepth ( real(dp), intent(in)  d,
real(dp), intent(in)  k 
)

Checks that the finite water depth does not cause cause overflow.

Parameters
[in]dWater depth
[in]kThe wave number
Author
Knut Morten Okstad
Date
25 Jan 2013
Here is the caller graph for this function:

◆ deepwave()

subroutine, public wavefunctionsmodule::deepwave ( real(dp), dimension(:,:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  x,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
logical, intent(in)  noWheelerStretching,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dw,
real(dp), intent(out), optional  p 
)

Evaluates the deep water wave profile.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc4
[in]gGravity constant
[in]xCurrent horizontal position
[in]zCurrent vertical position
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[in]noWheelerStretchingIf .true., switch off Wheeler stretching
[out]hCurrent wave height (depends on x and t only)
[out]uCurrent particle velocity in local x direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dwCurrent particle acceleration in local z direction
[out]pCurrent dynamic pressure

This subroutine evaluates the wave profile height and associated particle velocity and acceleration at a given spatial point and time. Assuming deep water waves, i.e., 2*depth > largest wave length. z=0 represents the mean free surface level and z is positive upwards.

Reference:

  1. O. M. Faltinsen, "Sea Loads on Ships and Offshore Structures", Table 2.1, page 16.
Author
Knut Morten Okstad
Date
25 March 2009
Here is the caller graph for this function:

◆ deepwaves()

subroutine, public wavefunctionsmodule::deepwaves ( real(dp), dimension(:,:,:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  x,
real(dp), intent(in)  y,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
logical, intent(in)  noWheelerStretching,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  v,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dv,
real(dp), intent(out)  dw,
real(dp), intent(out), optional  p 
)

Evaluates the deep water wave profile.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc4
[in]gGravity constant
[in]xCurrent horizontal position
[in]yCurrent horizontal position normal to the x direction
[in]zCurrent vertical position
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[in]noWheelerStretchingIf .true., switch off Wheeler stretching
[out]hCurrent wave height (depends on x, y and t only)
[out]uCurrent particle velocity in local x direction
[out]vCurrent particle velocity in local y direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dvCurrent particle acceleration in local y direction
[out]dwCurrent particle acceleration in local z direction
[out]pCurrent dynamic pressure

This subroutine evaluates the wave profile height and associated particle velocity and acceleration at a given spatial point and time. Assuming deep water waves, i.e., 2*depth > largest wave length. z=0 represents the mean free surface level and z is positive upwards. This subroutine also accounts for wave spreading through an outer loop.

Reference:

  1. O. M. Faltinsen, "Sea Loads on Ships and Offshore Structures", Table 2.1, page 16.
Author
Knut Morten Okstad
Date
15 July 2015
Here is the caller graph for this function:

◆ embeddedwave()

subroutine, public wavefunctionsmodule::embeddedwave ( integer, dimension(:), intent(in)  IFUNC,
real(dp), dimension(:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  d,
real(dp), intent(in)  x,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurf,
logical, intent(in)  noWS,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dw 
)

Evaluates a wave function with embedded nonlinear components.

Parameters
[in]IFUNCInteger wave data from wavefunctionsmodule::initfunc9
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc9
[in]gGravity constant
[in]dWater depth
[in]xCurrent horizontal position
[in]zCurrent vertical position
[in]tCurrent time
[in]atSurfIf .true., evaluate at water surface instead of z
[in]noWSIf .true., switch off Wheeler stretching
[out]hCurrent wave height (depends on x and t only)
[out]uCurrent particle velocity in local x direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dwCurrent particle acceleration in local z direction

This subroutine evaluates the wave profile and the associated particle velocity and acceleration at a given spatial point and time. Assuming finite depth water waves, linear wave theory, with embedded nonlinear streamline waves at user-defined times.

Author
Knut Morten Okstad
Date
16 May 2012
Here is the call graph for this function:
Here is the caller graph for this function:

◆ finitedepthwave()

subroutine, public wavefunctionsmodule::finitedepthwave ( real(dp), dimension(:,:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  d,
real(dp), intent(in)  x,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
logical, intent(in)  noWheelerStretching,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dw,
real(dp), intent(out), optional  p 
)

Evaluates the finite depth wave profile.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc4
[in]gGravity constant
[in]dWater depth
[in]xCurrent horizontal position
[in]zCurrent vertical position, positive upwards (z= 0 means free surface level)
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[in]noWheelerStretchingIf .true., switch off Wheeler stretching
[out]hCurrent wave height (depends on x and t only)
[out]uCurrent particle velocity in local x direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dwCurrent particle acceleration in local z direction
[out]pCurrent dynamic pressure

This subroutine evaluates the wave profile and the associated particle velocity and acceleration at a given spatial point and time. Assuming finite depth water waves and linear wave theory.

References:

  1. O. M. Faltinsen, "Sea Loads on Ships and Offshore Structures", Table 2.1, page 16.
Author
Arne Rekdal
Date
5 Oct 2010
Here is the caller graph for this function:

◆ finitedepthwaves()

subroutine, public wavefunctionsmodule::finitedepthwaves ( real(dp), dimension(:,:,:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  d,
real(dp), intent(in)  x,
real(dp), intent(in)  y,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
logical, intent(in)  noWheelerStretching,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  v,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dv,
real(dp), intent(out)  dw,
real(dp), intent(out), optional  p 
)

Evaluates the finite depth wave profile.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc4
[in]gGravity constant
[in]dWater depth
[in]xCurrent horizontal position
[in]yCurrent horizontal position normal to the x direction
[in]zCurrent vertical position, positive upwards (z= 0 means free surface level)
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[in]noWheelerStretchingIf .true., switch off Wheeler stretching
[out]hCurrent wave height (depends on x, y and t only)
[out]uCurrent particle velocity in local x direction
[out]vCurrent particle velocity in local y direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dvCurrent particle acceleration in local y direction
[out]dwCurrent particle acceleration in local z direction
[out]pCurrent dynamic pressure

This subroutine evaluates the wave profile and the associated particle velocity and acceleration at a given spatial point and time. Assuming finite depth water waves and linear wave theory. This subroutine also accounts for wave spreading through an outer loop.

References:

  1. O. M. Faltinsen, "Sea Loads on Ships and Offshore Structures", Table 2.1, page 16.
Author
Knut Morten Okstad
Date
15 Jul 2015
Here is the caller graph for this function:

◆ initfunc4fromfile()

subroutine wavefunctionsmodule::initfunc4fromfile ( character(len=*), intent(in)  FNAME,
real(dp), intent(in)  G,
real(dp), intent(in)  D,
real(dp), dimension(:,:), intent(out)  RFUNC,
integer, intent(out)  IERR,
integer, intent(in), optional  RSEED 
)
private

Initializes wave function parameters from the given file.

Parameters
[in]FNAMEName of file to read wave parameters from.
[in]GGravity constant
[in]DSea depth for finite depth waves
[out]RFUNCReal function parameters
[out]IERRError flag
[in]RSEEDSeed for random value generator

The file may consist of either two, three or four columns of data. The number of columns may be specified on the first line as #ncol <ncol>. If the first line does not contain the keyword #ncol, a two-column file is assumed. The phase shift is then generated randomly. The wave number is calculated internally unless specified in the fourth column.

col #1 : Amplitude [m]
col #2 : Frequency [Hz]
col #3 : Phase shift [0,1]
col #4 : Wave number [1/m]
Author
Knut Morten Okstad
Date
16 Jan 2007

◆ initfunc7()

subroutine, public wavefunctionsmodule::initfunc7 ( real(dp), intent(in)  H,
real(dp), intent(in)  T,
real(dp), intent(in)  eps,
real(dp), intent(in)  g,
real(dp), intent(in)  D,
real(dp), dimension(*), intent(out)  RFUNC,
integer, intent(out)  ierr 
)

Computes coefficients for 5th order Stokes waves.

Parameters
[in]HWave height
[in]TWave period
[in]epsPhase shift
[in]gGravity constant
[in]DWater depth
[out]RFUNCReal function parameters
[out]ierrError flag

The subroutine stokes5 is from the code that was downloaded from the following web-page: http://www.civil.soton.ac.uk/hydraulics/download/downloadtable.htm This web-page no longer exists (January 2015).

Author
Knut Morten Okstad
Date
23 May 2011
Here is the caller graph for this function:

◆ initfunc8()

subroutine, public wavefunctionsmodule::initfunc8 ( real(dp), intent(in)  H,
real(dp), intent(in)  T,
real(dp), intent(in)  eps,
real(dp), intent(in)  g,
real(dp), intent(in)  D,
real(dp), dimension(*), intent(out)  RFUNC,
integer, intent(out)  iOrder 
)

Solves the streamline wave equation.

Parameters
[in]HWave height
[in]TWave period
[in]epsPhase shift
[in]gGravity constant
[in]DWater depth
[out]RFUNCReal function parameters
[out]iOrderWave theory order (negative on error)

The subroutine cw260 is (a slightly modified version of) the code that was downloaded from this web-page: http://www.civil.soton.ac.uk/hydraulics/download/downloadtable.htm Note: This web-page no longer exists (January 2015).

Author
Knut Morten Okstad
Date
9 May 2011
Here is the caller graph for this function:

◆ initfunc9()

subroutine, public wavefunctionsmodule::initfunc9 ( integer, intent(in)  IOP,
integer, intent(in)  NR,
integer, intent(in)  NC,
real(dp), intent(in)  H3,
real(dp), intent(in)  T1,
real(dp), intent(in)  Gamma,
real(dp), intent(in)  Omega0,
real(dp), intent(in)  dOmega,
real(dp), intent(in)  g,
real(dp), intent(in)  D,
real(dp), dimension(2), intent(in)  ramp,
real(dp), dimension(:,:), intent(in)  embSLW,
integer, dimension(:), intent(out)  IFUNC,
real(dp), dimension(:), intent(out)  RFUNC,
integer, intent(out)  IERR,
integer, intent(in), optional  RSEED 
)

Initializes an irregular wave function with embedded streamlines.

Parameters
[in]IOPWave spectrum model:
  1. Pierson-Moskowitz with constant frequency intervals
  2. Pierson-Moskowitz with random frequency intervals
  3. JONSWAP spectrum with constant frequency intervals
  4. JONSWAP spectrum with random frequency intervals
[in]NRNumber of data per irregular wave component
[in]NCNumber of irregular wave components
[in]H3Significant wave height (mean of the one third highest waves)
[in]T1Mean wave period
[in]GammaSpectral peakedness
[in]Omega0Lowest frequency in wave spectrum
[in]dOmegaFrequency increment between successive wave components
[in]gGravity constant
[in]DSea depth for finite depth waves
[in]rampRamping parameters
[in]embSLWStreanline data
[out]IFUNCInteger function parameters
[out]RFUNCReal function parameters
[out]IERRError flag
[in]RSEEDSeed for random value generator

This subroutine generates and irregular wave function based on statistical parameters (by using wavefunctionsmodule::initfunc4), with embedded streamline wave components at specified time locations.

Author
Knut Morten Okstad
Date
16 May 2011
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initspectrumdnv()

subroutine wavefunctionsmodule::initspectrumdnv ( real(dp), intent(in)  Hs,
real(dp), intent(in)  Tp,
real(dp), intent(in)  Gamma,
real(dp), intent(in)  Omega0,
real(dp), intent(in)  dOmega,
real(dp), intent(in)  g,
real(dp), intent(in)  D,
real(dp), dimension(:,:), intent(out)  RFUNC,
integer, intent(out)  IERR,
integer, intent(in), optional  RSEED,
integer, intent(in), optional  NWdir,
integer, intent(in), optional  SprExp 
)

Initializes a wave function based on statistical parameters.

Parameters
[in]HsSignificant wave height (mean of the one third highest waves)
[in]TpThe wave period corresponding to the peak frequency
[in]GammaSpectral peakedness (see below).
[in]Omega0Lowest frequency in wave spectrum (if ≤ 0 use constant frequency intervals)
[in]dOmegaFrequency increment between successive wave components
[in]gGravity constant
[in]DSea depth for finite depth waves
[out]RFUNCReal function parameters
[out]IERRError flag
[in]RSEEDSeed for random value generator
[in]NWdirNumber of wave directions
[in]SprExpWave spreading exponent (for Ndir > 1)

This subroutine generates the wave function parameters from a wave spectrum. If Gamma ≤ 1, a Pierson-Moskowitz spectrum is used, otherwise a JONSWAP spectrum depending on Gamma is used.

References:

  1. DNV Recommended practice 205, October 2010.
  2. S. K. Chakrabarti, "Hydrodynamics of Offshore Structures", pp. 113-116.
Author
Paul Anton Letnes
Date
3 Jan 2013
Author
Knut Morten Okstad
Date
20 Jul 2015

◆ initspectrumof()

subroutine wavefunctionsmodule::initspectrumof ( integer, intent(in)  IOP,
real(dp), intent(in)  H3,
real(dp), intent(in)  T1,
real(dp), intent(in)  Gamma,
real(dp), intent(in)  Omega0,
real(dp), intent(in)  dOmega,
real(dp), intent(in)  g,
real(dp), intent(in)  D,
real(dp), dimension(:,:), intent(out)  RFUNC,
integer, intent(out)  IERR,
integer, intent(in), optional  RSEED 
)

Initializes a wave function based on statistical parameters.

Parameters
[in]IOPWave spectrum model:
  1. Pierson-Moskowitz with constant frequency intervals
  2. Pierson-Moskowitz with random frequency intervals
  3. JONSWAP spectrum with constant frequency intervals
  4. JONSWAP spectrum with random frequency intervals
[in]H3Significant wave height (mean of the one third highest waves)
[in]T1Mean wave period
[in]GammaSpectral peakedness
[in]Omega0Lowest frequency in wave spectrum
[in]dOmegaFrequency increment between successive wave components
[in]gGravity constant
[in]DSea depth for finite depth waves
[out]RFUNCReal function parameters
[out]IERRError flag
[in]RSEEDSeed for random value generator

This subroutine generates the wave function parameters from a wave spectrum depending on the input argument IOP (see above).

References:

  1. O. Faltinsen, Sea Loads on Ships and Offshore Structures, pp. 23-26.
Author
Knut Morten Okstad
Date
29 Jan 2007

◆ stokes2wave()

subroutine, public wavefunctionsmodule::stokes2wave ( real(dp), dimension(:,:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  d,
real(dp), intent(in)  x,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
logical, intent(in)  noWheelerStretching,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dw 
)

Evaluates the wave profile according to 2nd order Stokes theory.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc4
[in]gGravity constant
[in]dWater depth
[in]xCurrent horizontal position
[in]zCurrent vertical position, positive upwards (z= 0 means free surface level)
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[in]noWheelerStretchingIf .true., switch off Wheeler stretching
[out]hCurrent wave height (depends on x, y and t only)
[out]uCurrent particle velocity in local x direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dwCurrent particle acceleration in local z direction

References:

  1. J. F. Wilson, "Dynamics of Offshore Structures", Table 3.2, page 71.
Author
Knut Morten Okstad
Date
4 Apr 2011
Here is the caller graph for this function:

◆ stokes5wave()

subroutine, public wavefunctionsmodule::stokes5wave ( real(dp), dimension(:), intent(in)  RFUNC,
real(dp), intent(in)  d,
real(dp), intent(in)  x,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dw 
)

Evaluates the wave profile according to 5th order Stokes theory.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc7
[in]dWater depth
[in]xCurrent horizontal position
[in]zCurrent vertical position, positive upwards (z= 0 means free surface level)
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[out]hCurrent wave height (depends on x and t only)
[out]uCurrent particle velocity in local x direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dwCurrent particle acceleration in local z direction

Based on code from j.r.c.nosp@m.hapl.nosp@m.in@so.nosp@m.ton..nosp@m.ac.uk See http://www.civil.soton.ac.uk/hydraulics/download/downloadtable.htm Note: This web-page no longer exists (January 2015).

Author
Knut Morten Okstad
Date
23 May 2011
Here is the caller graph for this function:

◆ streamwave()

subroutine, public wavefunctionsmodule::streamwave ( real(dp), dimension(:), intent(in)  RFUNC,
real(dp), intent(in)  d,
real(dp), intent(in)  x,
real(dp), intent(in)  z,
real(dp), intent(in)  t,
logical, intent(in)  atSurface,
real(dp), intent(out)  h,
real(dp), intent(out)  u,
real(dp), intent(out)  w,
real(dp), intent(out)  du,
real(dp), intent(out)  dw 
)

Evaluates the nonlinear wave profile according to streamline theory.

Parameters
[in]RFUNCReal wave data, output from wavefunctionsmodule::initfunc8
[in]dWater depth
[in]xCurrent horizontal position
[in]zCurrent vertical position, positive upwards (z= 0 means free surface level)
[in]tCurrent time
[in]atSurfaceIf .true., evaluate at water surface instead of z
[out]hCurrent wave height (depends on x, y and t only)
[out]uCurrent particle velocity in local x direction
[out]wCurrent particle velocity in local z direction
[out]duCurrent particle acceleration in local x direction
[out]dwCurrent particle acceleration in local z direction

This subroutine evaluates the wave profile and the associated particle velocity and acceleration at a given spatial point and time. Assuming nonlinear streamline wave theory.

Based on code from j.r.c.nosp@m.hapl.nosp@m.in@so.nosp@m.ton..nosp@m.ac.uk See http://www.civil.soton.ac.uk/hydraulics/download/downloadtable.htm Note: This web-page no longer exists (January 2015).

Author
Knut Morten Okstad
Date
9 May 2011
Here is the caller graph for this function:

◆ userdefinedwave()

subroutine, public wavefunctionsmodule::userdefinedwave ( integer, intent(in)  ikf,
integer, dimension(3), intent(in)  IFUNC,
real(dp), dimension(:), intent(in)  RFUNC,
real(dp), intent(in)  g,
real(dp), intent(in)  d,
real(dp), dimension(4), intent(in)  Xt,
logical, intent(in)  atSurf,
real(dp), intent(out)  h,
real(dp), dimension(3), intent(out)  u,
real(dp), dimension(3), intent(out)  du,
integer, intent(out)  ierr 
)

Evaluates the user-defined wave profile.

Parameters
[in]IKFFunction identifier
[in]IFUNCInteger wave data
[in]RFUNCReal wave data
[in]gGravity constant
[in]dWater depth
[in]XtCurrent position and time
[in]atSurfIf .true., evaluate at water surface instead of z
[out]hCurrent wave height (depends on x and t only)
[out]uCurrent particle velocity
[out]duCurrent particle acceleration
[out]ierrError flag

This subroutine evaluates the wave height and associated particle velocity and acceleration at a given spatial point and time, by invoking a user-defined function from a separate plugin.

Author
Knut Morten Okstad
Date
22 Jun 2016
Here is the caller graph for this function:

◆ wavenumber()

real(dp) function, public wavefunctionsmodule::wavenumber ( real(dp), intent(in)  omega,
real(dp), intent(in)  g,
real(dp), intent(in)  d 
)

Calculates the wave number for finite depth waves.

Parameters
[in]omegaAngular frequency
[in]gGravity constant
[in]dWater depth
Returns
The wave number k

The wave number is calculated by solving a nonlinear equation by Newton-Raphson iterations. If the water depth is zero, infinite depth is assumed and the wave number is calculated explcitly.

Author
Arne Rekdal
Date
5 Oct 2010
Here is the caller graph for this function:

Variable Documentation

◆ dp

integer, parameter, public wavefunctionsmodule::dp = kind(1.0D0)

8-byte real (double)

◆ pi

real(dp), parameter wavefunctionsmodule::pi = 3.141592653589793238_dp
private

The value of π.

◆ twopi

real(dp), parameter, public wavefunctionsmodule::twopi = pi+pi

The value of 2π.