Commit Graph

7 Commits

Author SHA1 Message Date
c0da2a5eff waveModels: New irregular wave model
This model builds up phase fraction and velocity fields from multiple
first-order waves, sampled from a selectable wave spectrum.

Usage:

    Property  | Description                   | Required? | Default
    ----------+-------------------------------+-----------+-------------
    depth     | The water depth [m]           | no        | great
    spectrum  | The wave spectrum             | yes       |
    n         | The number of times to sample | yes       |
              | the spectrum                  |           |
    span      | The fractional range across   | no        | (0.01 0.99)
              | which to sample the spectrum  |           |
    setFormat | The format with which to plot | no        | none
              | the spectrum                  |           |

Example specification in constant/waveProperties:

    waves
    (
        irregular
        {
            spectrum    PiersonMoskowitz; // or JONSWAP

            PiersonMoskowitzCoeffs
            {
                U19_5       15;
            }

            JONSWAPCoeffs
            {
                U10         10;
                F           200e3;
            }

            n           16;
            span        (0.01 0.99);
        }
    );
2023-10-18 14:35:35 +01:00
559fe8ca7e waves: Optionally input period rather than length for Stokes-type waves
Stokes-type waves (i.e., Airy, Stokes2 and Stokes5) now support
specification in terms of wave period, as well as length. The following
specifications are therefore equivalent:

    Stokes2
    {
        length      300; // <-- Wave length specified
        amplitude   2.5;
        phase       0;
        angle       0;
        depth       50;
    }

    Stokes2
    {
        period      15.643; // <-- Wave period specified
        amplitude   2.5;
        phase       0;
        angle       0;
        depth       50;
    }

Note that the period is that of the wave in a reference frame with zero
mean flow. Specifying a doppler shifted period is not yet supported.

Exactly one of period or length must be specified. If both, or neither,
are provided then an error will be generated.

Corrections have also been made to the calculation of the celerity of
Stokes2 and Stokes5 waves.
2021-09-01 10:56:26 +01:00
96508b8406 waves: Removed unused pressure method and simplified handling of gravity 2021-09-01 10:55:51 +01:00
d41166187a writeEntry: Rationalised for consistency, ease of use and maintainability
The writeEntry form is now defined and used consistently throughout OpenFOAM
making it easier to use and extend, particularly to support binary IO of complex
dictionary entries.
2019-03-14 20:54:10 +00:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
079c4cf903 waves: Added Stokes5 and solitary wave models 2017-07-31 09:38:11 +01:00
e7e4683f96 waves: Added waves library and setWaves utility
This addition allows for theoretical wave models to be utilised for
initialisation and as boundary conditions. Multiple models can be used
simultaneously, each with differing phases and orientations. If multiple
models are used the shapes and velocities are superimposed.

The wave models are specified in the velocity boundary condition. The
phase fraction boundary condition and the set utility both look up the
velocity condition in order to access the wave model. A velocity
boundary may be specified as follows:

    inlet
    {
        type            waveVelocity;
        origin          (0 0 0);
        direction       (1 0 0);
        speed           2;
        waves
        (
            Airy
            {
                length      300;
                amplitude   2.5;
                depth       150;
                phase       0;
                angle       0;
            }
        );
        scale           table ((1200 1) (1800 0));
        crossScale      constant 1;
    }

The alpha boundary only requires the type, unless the name of the
velocity field is non-standard, in which case a "U" entry will also be
needed. The setWaves utility does not require a dictionary file; non-
standard field names can be specified as command-line arguments.

Wave models currently available are Airy (1st order) and Stokes2 (second
order). If a depth is specified, and it is not too large, then shallow
terms will be included, otherwise the models assume that the liquid is
deep.

This work was supported by Jan Kaufmann and Jan Oberhagemann at DNV GL.
2017-05-31 10:09:08 +01:00