|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | The library is distributed with the following wave theories.
| + | <b>Release of the waves2Foam Manual</b> |
| | | |
− | Besides stating the name of the waveType, the list also contain the information required by "<tt>setWaveParameters</tt>". It is recommended to use this pre-processing tool to evaluate e.g. the wave number based on the wave period and water depth.
| + | As of the 17th of August 2017, the waves2Foam Manual is released. Consequently, the content of this Wiki-page is reduced. |
− | ==== Current-type ====
| + | |
− | ===== Potential current type (uniform velocity distribution from bottom to <tt>seaLevel</tt>) =====
| + | |
− | waveType potentialCurrent;
| + | |
− | Tsoft <scalar>;
| + | |
− | U <vector>;
| + | |
− | localSeaLevel <scalar>; // Not required. Default = seaLevel;
| + | |
| | | |
− | ==== Regular waves ====
| + | Visit the main Wiki-page [https://openfoamwiki.net/index.php/Contrib/waves2Foam] for instructions on how to find the manual. |
− | ===== Stokes first order wave theory (Airy wave) =====
| + | |
− | waveType stokesFirst;
| + | |
− | depth <scalar>;
| + | |
− | period <scalar>;
| + | |
− | direction <vector>;
| + | |
− | phi <scalar>;
| + | |
− | height <height>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | | + | |
− | ===== First order Stokes standing wave theory =====
| + | |
− | waveType stokesFirstStanding;
| + | |
− | depth <scalar>;
| + | |
− | period <scalar>;
| + | |
− | direction <vector>;
| + | |
− | phi <scalar>;
| + | |
− | height <scalar>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− |
| + | |
− | ===== Stokes second order wave theory =====
| + | |
− | waveType stokesSecond;
| + | |
− | depth <scalar>;
| + | |
− | period <scalar>;
| + | |
− | direction <vector>;
| + | |
− | height <scalar>;
| + | |
− | phi <scalar>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | debug <bool>;
| + | |
− | | + | |
− | ===== Modulated Stokes second order wave theory =====
| + | |
− | waveType stokesSecondModulation;
| + | |
− | depth <scalar>;
| + | |
− | period <scalar>;
| + | |
− | direction <vector>;
| + | |
− | height <scalar>;
| + | |
− | epsilon <scalar>;
| + | |
− | modN <scalar>;
| + | |
− | phi <scalar>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | debug <bool>;
| + | |
− | | + | |
− | Computes the second order wave theory with a temporal and spatial modulation on the wave height. The modulation is defined as <math>H(1+\epsilon \sin((\omega t - \mathbf{k}\cdot\mathbf{x} + \phi)) / N_{\text{mod}})</math>, so the modulation is bound to the second order stokes wave.
| + | |
− | ===== Stokes fifth order wave theory =====
| + | |
− | waveType stokesFifth;
| + | |
− | height <scalar>;
| + | |
− | period <scalar>;
| + | |
− | depth <scalar>;
| + | |
− | stokesDrift <scalar>;
| + | |
− | direction <vector>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | phi <scalar>;
| + | |
− | | + | |
− | ===== First order cnoidal theory =====
| + | |
− | waveType cnoidalFirst;
| + | |
− | height <scalar>;
| + | |
− | depth <scalar>;
| + | |
− | period <scalar>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | direction <vector>;
| + | |
− | | + | |
− | <b>NB:</b> As of revision 1983 the setWaveProperties file for the wave theory is automatically enhanced, when writing <math>m</math>.
| + | |
− | | + | |
− | <b>NB:</b> Note for prior version, if the wave is extremely shallow, <math>m\rightarrow1</math>, so in order not to evaluate <math>K(m=1)=\infty</math>, the write precision in the <tt>controlDict</tt> should be sufficiently high in order to write e.g. 0.9999999999 in stead of 1.0.
| + | |
− | | + | |
− | ===== Stream function wave theory =====
| + | |
− | +++ Example - setWaveParameters +++
| + | |
− | // Currently not working
| + | |
− |
| + | |
− | +++ Example - Running +++
| + | |
− | waveType streamFunction;
| + | |
− | omega <scalar>;
| + | |
− | depth <scalar>;
| + | |
− | phi <scalar>;
| + | |
− | waveNumber <vector>;
| + | |
− | uBar <scalar>;
| + | |
− | N <scalar>;
| + | |
− | A <scalarField>;
| + | |
− | B <scalarField>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | Tstart <scalar>; // Not required (Default 0.0);
| + | |
− | Tend <scalar>; // Not required (Default GREAT);
| + | |
− | | + | |
− | ==== Solitary waves ====
| + | |
− | ===== Solitary First =====
| + | |
− | waveType solitaryFirst;
| + | |
− | height <scalar>;
| + | |
− | depth <scalar>;
| + | |
− | direction <vector>;
| + | |
− | x0 <vector>;
| + | |
− | ==== Irregular waves ====
| + | |
− | ===== First order bi-chromatic wave train (wave group) =====
| + | |
− | waveType bichromaticFirst;
| + | |
− | depth <scalar>;
| + | |
− | period1 <scalar>;
| + | |
− | period2 <scalar>;
| + | |
− | direction1 <vector>;
| + | |
− | direction2 <vector>;
| + | |
− | height1 <scalar>;
| + | |
− | height2 <scalar>;
| + | |
− | phi1 <scalar>;
| + | |
− | phi2 <scalar>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | | + | |
− | ===== Second order bi-chromatic wave train (wave group) =====
| + | |
− | waveType bichromaticSecond;
| + | |
− | depth <scalar>;
| + | |
− | period1 <scalar>;
| + | |
− | period2 <scalar>;
| + | |
− | direction1 <vector>;
| + | |
− | direction2 <vector>;
| + | |
− | height1 <scalar>;
| + | |
− | height2 <scalar>;
| + | |
− | phi1 <scalar>;
| + | |
− | phi2 <scalar>;
| + | |
− | Tsoft <scalar>; // Not required
| + | |
− | | + | |
− | ===== General irregular wave theory =====
| + | |
− | This wave theory reads the needed <tt>scalarField</tt>s and <tt>vectorField</tt>s from <tt>waveProperties</tt> and generates an irregular wave field through superposition of wave components based on linear wave theory. If higher order components are needed, it is suggested to modify the interface to make it generic; e.g. parsing ampEta, ampU, and ampV instead of merely ampEta.
| + | |
− | waveType irregular;
| + | |
− | spectrum <word>;
| + | |
− | N <label>; // Number of frequencies
| + | |
− | Tsoft <scalar>;
| + | |
− | writeSpectrum <bool>; // Not required. Default:= false. Writes the target spectrum.
| + | |
− | phaseMethod <word>; // Not required. Default: randomPhase,
| + | |
− | | + | |
− | Furthermore, information requested by the individual spectra is needed. The list of implemented spectra is:
| + | |
− | * JONSWAP
| + | |
− | Hs <scalar>;
| + | |
− | Tp <scalar>;
| + | |
− | gamma <scalar>;
| + | |
− | depth <scalar>;
| + | |
− | direction <vector>;
| + | |
− | lowerFrequencyCutoff <scalar>; // Not required. Default: 1/(3*Tp)
| + | |
− | upperFrequencyCutoff <scalar>; // Not required. Default: 3/Tp
| + | |
− | equidistantFrequencyAxis <bool>; // Choose between an equidistant or stretched axis toward the peak
| + | |
− | | + | |
− | * Pierson-Moskowitz
| + | |
− | Hs <scalar>;
| + | |
− | Tp <scalar>;
| + | |
− | depth <scalar>;
| + | |
− | direction <vector>;
| + | |
− | lowerFrequencyCutoff <scalar>; // Not required. Default: 1/(3*Tp)
| + | |
− | upperFrequencyCutoff <scalar>; // Not required. Default: 3/Tp
| + | |
− | equidistantFrequencyAxis <bool>; // Choose between an equidistant or stretched axis toward the peak
| + | |
− | | + | |
− | ====== Phasing Methods ======
| + | |
− | There are two phasing methods for irregular incident waves, and their settings are as follows:
| + | |
− | * <tt>randomPhase</tt> (The option <tt>seedForRandomPhase</tt> is not required, but it can be used in studies, where the wave height changes, but one want to have the same phasing).
| + | |
− | phaseMethod randomPhase;
| + | |
− | seedForRandomPhase <label>; // Not required.
| + | |
− | * <tt>focusingPhase</tt>
| + | |
− | phaseMethod focusingPhase;
| + | |
− | focusTime <scalar>;
| + | |
− | focusPoint <vector>;
| + | |
− | | + | |
− | ==== Other ====
| + | |
− | ===== <tt>combinedWaves</tt>, which allows for a combination of any of the above =====
| + | |
− | waveType combinedWaves;
| + | |
− | combinedWaveNames <workList>; // A list of names of the other sub-dictionaries without the Coeffs-part
| + | |
As of the 17th of August 2017, the waves2Foam Manual is released. Consequently, the content of this Wiki-page is reduced.