Difference between revisions of "Contrib/waves2Foam"

From OpenFOAMWiki
(Modifications to the Source Code (History))
(Modifications to the Source Code (History))
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The library waves2Foam is a toolbox used to generate and absorb free surface water waves. Currently the method applies the relaxation zone technique (active sponge layers) and a large range of wave theories are supported and the relaxation zones can take arbitrary shapes.
 
The library waves2Foam is a toolbox used to generate and absorb free surface water waves. Currently the method applies the relaxation zone technique (active sponge layers) and a large range of wave theories are supported and the relaxation zones can take arbitrary shapes.
  
The library also comes with pre- and postprocessing utilities tailored for use for free surface flows within the fields of coastal, marine and maritime engineering.
+
<b>Release of the waves2Foam Manual</b>
 +
 
 +
As of the 17th of August 2017, the waves2Foam Manual is released. Consequently, the content of this Wiki-page is reduced.
 +
 
 +
It is still possible to find download/installation instructions and information on the code contributions.
  
 
<noinclude>
 
<noinclude>
 
[[Category:FeaturedArticle]]
 
[[Category:FeaturedArticle]]
== waves2Foam ==
+
== waves2Foam - Information ==
The package is to be used in the modelling of free surface water waves. The package contains the following:
+
* One library <tt>libwaves2Foam</tt>. See description below.
+
* Solver(s) to be used with 1.5 and 1.6+ (see below in section "Compatibility"). The foundation in the solvers is interFoam, where the relaxationZone part of <tt>libwaves2Foam</tt> has been added to the solver.
+
* Preprocessing tools used to:
+
** <tt>setWaveParameters</tt>: Sets the wave parameters for a given wave theory based on a set of input variables. E.g. for Airy wave theory, the period, water depth, and magnitude of the gravitational acceleration produces the wave number. The utility goes through all sub-dictionaries in <tt>waveProperties</tt> file, see below.
+
** <tt>setWaveField</tt>: This utility sets initial conditions in the files <tt>U</tt> and <tt>gamma</tt> (v. 1.5)/<tt>alpha1</tt> (v. 1.6 and more recent) based on a runTime selectable wave theory.
+
** <tt>relaxationZoneLayout</tt>: Produces an overview of the spatial layout of the relaxation zone.
+
* Tutorials
+
* Since <tt>setWaveParameters</tt> is not working for all wave theories, a set of Matlab&reg; functions are provided for the missing wave theories (Currently: stream function waves and cnoidal first waves).
+
  
=== Supported Versions of OF ===
+
==== Link to the manual ====
{{VersionInfo}}{{Version2.1}}{{Version2.1.1}}{{Version2.2.0}}{{Version2.2.1}}{{Version2.2.2}}{{Version2.3.0}}{{Version2.4.0}}{{Version3.0.0}}{{Version3.0-ext}}{{Version3.1-ext}}{{Version3.2-ext}}
+
The waves2Foam Manual is freely available through ResearchGate. Click here for download [https://www.researchgate.net/publication/319160515_waves2Foam_Manual].
 
+
<b>NB:</b> The code is <b>only</b> compatible with OpenFoam version 1.5 up to and including svn-revision number 1950.
+
 
+
<b>NB:</b> The code is also compilable this the version 2.0 of OpenFoam, however, the solvers are not distributed along with the SVN-repository. Nevertheless, minor changes are needed in order to modify interFoam to get it to work; see below.
+
 
+
<b>NB:</b> The code might be compatible with the version OF-1.6-ext, OF-1.7 and OF-1.7.1 and OF2.0, but this is no longer tested as of svn revision 2072.
+
 
+
Please report on successful applications of the toolbox.
+
 
+
==== Miscellaneous on Cross-Version Compatibility ====
+
The toolbox has been tested successfully with the following releases of OpenFoam:
+
* 1.5.x (up to revision 1950)
+
* 1.5-dev (up to revision 1950)
+
* 1.6.x (Notice, that the release solves for total pressure, and the pressure boundary condition is given in excess pressure. It ought not change anything, however, it has not been tested)
+
* 1.6-ext
+
* 1.7.1
+
* 2.0.x
+
* 2.1.x
+
* 2.2.0
+
 
+
Throughout the code, pre-processor statements are used based on the argument <tt>OFVERSION</tt>, which is given as
+
if [ `uname` == "Darwin" ]
+
then
+
    version=`echo $WM_PROJECT_VERSION"-0" | sed -s 's/\.x/-0/' -e 's/\./\'$'\n/g' -e 's/-/\'$'\n/g' | grep "[0-9]" | head -3 | tr -d '\n'`
+
else
+
    version=`echo $WM_PROJECT_VERSION"-0" | sed -e 's/\.x/-0/' -e 's/\./\n/g' -e 's/-/\n/g' | grep "[0-9]" | head -3 | tr -d '\n'`
+
fi
+
export WM_PROJECT_VERSION_NUMBER=$version
+
which strips anything but the first three digits from <tt>$WM_PROJECT_VERSION</tt> (and in case it only contains 2, it is zero-padded). This also take into account that the scripting arguments are different on Linux and Darwin. Also note, that the <tt>OFVERSION</tt> is used to distinguish between options-files for the compilation, since the needed number of include-statements differs, as a result of a restructuring of the code as of OpenFoam version 2.2.
+
 
+
Furthermore, a pre-processor flag called <tt>EXTBRANCH</tt> is introduced in the more recent versions. This is introduced to take differences in class names between the two branches into account.
+
 
+
=== Referencing ===
+
Whenever used please do make proper referencing to the following journal paper:
+
@article { jacobsenFuhrmanFredsoe2011,
+
Author = {Jacobsen, N G and Fuhrman, D R and Freds\o{}e, J},
+
title = {{ A Wave Generation Toolbox for the Open-Source CFD Library: OpenFoam\textregistered{} } },
+
Journal = {{ Int. J. Numerl. Meth. Fluids} },
+
Year = {2012},
+
Volume = {70},
+
Number = {9},
+
Pages = {1073-1088},
+
DOI = {{10.1002/fld.2726} },
+
}
+
 
+
The paper has now been published.
+
 
+
http://onlinelibrary.wiley.com/doi/10.1002/fld.2726/abstract
+
 
+
=== Ideas / Improvements / Suggestions / Contributions ===
+
If you have any ideas on how to improve this toolbox, or if you have developed pieces of code/functionalities, which you think would fit nicely into the framework, then please do not hesitate contacting me, e.g. via the cfd-online forum, where my user name is <i>ngj</i>.
+
  
 
==== Report Bugs via the Mantis on Sourceforge ====
 
==== Report Bugs via the Mantis on Sourceforge ====
Line 77: Line 21:
 
There is a subsection for waves2Foam. This will make it easier to keep track of issues, which needs attention.
 
There is a subsection for waves2Foam. This will make it easier to keep track of issues, which needs attention.
  
=== Discussions on cfd-online.com ===
+
==== Discussions on cfd-online.com ====
 
There are two main threads on cfd-online.com, which are related to waves2Foam.
 
There are two main threads on cfd-online.com, which are related to waves2Foam.
 +
 
For announcements please consider
 
For announcements please consider
 
[http://www.cfd-online.com/Forums/openfoam-news-announcements-other/94251-release-wave-generation-absorption-toolbox.html]. Note that questions will generally not be answered here. It is a source of communication on development/release topics.
 
[http://www.cfd-online.com/Forums/openfoam-news-announcements-other/94251-release-wave-generation-absorption-toolbox.html]. Note that questions will generally not be answered here. It is a source of communication on development/release topics.
 
For enquiries, discussion, etc., please use
 
For enquiries, discussion, etc., please use
 
[http://www.cfd-online.com/Forums/openfoam-solving/100091-waves2foam-related-topics.html].
 
[http://www.cfd-online.com/Forums/openfoam-solving/100091-waves2foam-related-topics.html].
 
=== Also Used in These Works ===
 
* Bredmose, H. and Jacobsen, N. G. (2010). Breaking Wave Impacts on Offshore Wind Turbine Foundations: Focused Wave Groups and CFD. <i>Proceedings of the 29th ASME International Conference on Ocean, Offshore and Arctic Engineering</i>, Shanghai, China, <b>3</b>, 397-404
 
* Bredmose, H. and Jacobsen, N. G. (2011). Vertical wave impacts on offshore wind turbine inspection platforms. <i>Proceedings of the 30th ASME International Conference on Ocean, Offshore and Arctic Engineering</i>, Rotterdam, The Netherlands (on CD)
 
* Gadelho, J.H.M., Lavrov, A. and Guedes Soares, C. (2014). Modelling the effect of obstacles on 2D wave propagation with OpenFOAM. Developments in Maritime Transportation and Exploitation of Sea Ressources, 1057-1065.
 
* Jacobsen, N. G. (2011). A Full Hydro- and Morphodynamic Description of Breaker Bar Development. <i>Ph.D. Thesis</i>. DCAMM Special Report no. S136, Technical University of Denmark, Deparment of Mechanical Engineering. Available at [http://orbit.dtu.dk/getResource?recordId=313371&objectId=2&versionId=1]
 
* Jacobsen, N. G. and Fredsoe, J. (In print). Cross-Shore Re-Distribution of Nourished Sand Near a Breaker Bar. <i>J. of Waterway, Port, Coastal and Ocean Engineering - ASCE</i>, --, --
 
* Jacobsen, N. G. and Fredsøe, J (2011). A Full Hydrodynamic Modelling of 2D Breaker Bar Development. <i>Proceedings to Coastal Sediments</i>, Miami, Florida, U.S.A.
 
* Jensen, B., Jacobsen, N.G., Christensen, E.D. (2014). Investigation on the porous media equations and resistance coefficients for coastal structure. <i>Coastal Engineering</i>, <b>84</b>, 56-72.
 
* Li, L, Tan, M. and Blake, J. (2012). OpenFoam Simulation of Regular Wave and Wave Load on Cylinder. <i>15th Numerical Towing Tank Symposium</i>, 7th-9th of October 2012, Cortona, Italy
 
* Paulsen, B. T., Bredmose, H. and Bingham, H. B. (2012). Accurate computation of wave loads on a bottom fixed circular cylinder. <i>International Workshop on Water Waves and Floating Bodies</i>, Copenhagen, Denmark (http://www.iwwwfb.org)
 
* Paulsen, B. T., Bredmose, H. and Bingham, H. B. (2013). Focused Wave Impact on a Vertical Cylinder: Experiment, Numerical Reproduction and a Note on Higher Harmonics. <i>International Workshop on Water Waves and Floating Bodies</i>, Marsaille, France (http://www.iwwwfb.org)
 
* Piro, D. J. and Maki, K. J. (2013). Whipping Response of a Box Barge in Oblique Seas. <i>International Workshop on Water Waves and Floating Bodies</i>, Marsaille, France (http://www.iwwwfb.org)
 
* Ransley, E., Hann, M., Greaves, D., Raby, A. and Simmonds, D. (2013).Numerical and physical modelling of extreme waves at Wave Hub. In: Conley, D.C., Masselink, G., Russell, P.E. and O'Hare, T.J. (eds), <i>Proceedings 12th International Coastal Symposium</i> (Plymouth, England), <i>Journal of Coastal Research</i>, Special Issue No. 65, 1645-1650
 
* Stahlmann, A. and Schlurmann, T. (2012). Investigations of Scour Development at Tripod Foundations for Offshore Wind Turbines: Modeling and Application. <i>Proceedings of the International Conference on Coastal Engineering</i>, Santander, Spain (http://journals.tdl.org/icce)
 
* Vyzikas, T., Ransley, E., Hann, M., Magagna, D., Greaves, D., Simmonds, D., Magar, V. and Conley, D. (2013). Integrated Numerical Modelling System for Extreme Wave Events at the Wave Hub Site. <i>Inst. of Civil Engineers Conference: Coasts, Marine Structures and Breakwaters</i>, Edinburgh, September 2013.
 
* Winden, B., Turnock, S. R. and Hudson, D. (2012). Validating Force Calculations using OpenFoam on a Fixed Wigley Hull in Waves. <i>15th Numerical Towing Tank Symposium</i>, 7th-9th of October 2012, Cortona, Italy
 
 
== Distributed Library ==
 
=== Overview of Content ===
 
[[File:SourceCodeStructure.png|thumbnail|400x189px|Schematics of the code structure in the library]]
 
The library <tt>libwaves2Foam</tt> contains the following functionality:
 
* A namespace called <tt>waveTheories</tt>, where the abstract base class, <tt>waveTheory</tt>, defines the interface for the implementation of free surface water waves. At present the interface requires the definition of the velocity, the surface elevation, and the surface normal pressure gradient (the last only used on the boundaries). It is optional to implement the actual pressure. The set of wave theories presently available is given below.
 
:It is extremely simple to extend the number of implemented wave theories, as long as the needed algebraic expressions are available.
 
* An abstract base class called <tt>setWaveProperties</tt>. From this a definition file to each of the wave theories is implemented. These are addressed from the utility <tt>setWaveParameters</tt>, which sets the needed wave parameters for each wave theory based on a minimum of input parameters. See below.
 
* A relaxation framework around the class <tt>relaxationZone</tt>, where combinations of relaxation techniques and the shape of relaxation zones can be chosen. See details below.
 
* <tt>convexPolyhedral</tt> This set of files carries out intersection routines between faces/convex polyhedrals and the water surface given in terms of e.g. an algebraic equation such as <math>\eta=a\sin (\omega t - \mathbf{k}\cdot\mathbf{x})</math>, where <math>\eta</math> is the water surface elevation, <math>a</math> is the wave amplitude, <math>\omega</math> is the cyclic frequency, <math>t</math> is time, <math>\mathbf{k}</math> is the horizontal wave number vector, and <math>\mathbf{x}</math> is a spatial coordinate. It should be noted that the intersection routine is <i>not</i> implemented in <tt>convexPolyhedral</tt>, but rather the relaxation zones and boundary conditions is derived from this class, and the virtual methods for the distance function is implemented. These again are based a pointer, namely <tt>autoPtr<waveTheories::waveTheory></tt>, hence there is a decoupling of the relaxation zone techniques/boundary conditions and the actual wave theory used in the simulation.
 
* Furthermore, available trough this library is:
 
** Boundary conditions for the velocity, the void fraction ratio and the pressure gradient (the last is not fully implemented in all wave theories)
 
** A class for setting initial conditions
 
** A class which is used for either runTime or post-processing of the surface elevation
 
 
=== Available Wave Theories ===
 
A set of different wave theories are implemented in waves2Foam. Besides stating the required wave type in the <tt>waveProperties.input</tt> file, each wave theory have different additional required information, such as wave height, wave period, water depth, etc. The detailed information are gather here:
 
 
[[Contrib/waves2Foam/waveTheories|Wave Theories and Specifications]].
 
 
The following wave theories are implemented to date:
 
* Current type
 
** Potential current
 
* Regular waves
 
** Stokes first order theory
 
** Stokes first order theory (standing)
 
** Stokes second order theory
 
** Modulated stokes second order theory
 
** Stokes fifth order theory
 
** First order cnoidal theory
 
** Stream function wave theory
 
* Solitary waves
 
** Solitary first
 
* Irregular waves
 
** First order bichromatic wave (wave group)
 
** Second order bichromatic wave
 
** First order irregular super-position
 
* Other
 
** Mixed boundary
 
 
=== Relaxation Techniques ===
 
Relaxation techniques generally cover the method of removing reflected or internally generated wave components adjacent to vertical boundaries. One method is currently fully functioning and the framework have been made ready for another type. Both of these are a part of the overall relaxation framework, which is implemented into <tt>relaxationZone</tt>. The latter is the one implemented into the solvers to add the relaxation functionalities.
 
 
The relaxation zones are updated each and every time step in case a topological change has found place. It is updated based on <tt>mesh.changing()</tt>. The relaxation weight is recomputed each time step to accommodate for small changes in the cell position originating from mesh motion. Big mesh motions are not recommended inside the relaxation zones.
 
 
The relaxation methods are:
 
==== Explicit Relaxation ====
 
The explicit relaxation techniques is performed before the momentum equation is solved in the following manner:
 
 
<math>\mathbf{u} = (1-w)\mathbf{u}_{target}+w\mathbf{u}_{computed}</math>
 
 
<math>\alpha = (1-w)\alpha_{target}+w\alpha_{computed}</math>
 
 
where <math>w\in[0,\,1]</math> is a weigthing function. One particular method is implemented, however, everything is done with runTime-selection, so it should be rather easy to make another method and test it.
 
 
<b>Interface:</b>
 
void relaxationZone::correct()
 
==== Numerical Beach ====
 
The numerical beach considers the addition of an artificial viscosity into the momentum equation.
 
 
A framework has been made ready with runTime selection, however, presently only a dummy-beach is implemented, which does not alter the artificial viscosity from the default value of 0.0. The numerical beach has direct access to the local distance function, <math>\sigma</math>, in the relaxation zone, thus it ought to be straight forward to implement a given method.
 
 
<b>Interface:</b>
 
tmp<volScalarField> relaxationZone::numericalBeach()
 
 
==== Relaxation Weights ====
 
Several relaxation weights are implemented into the current framework, where all of them can also be subject to a correction, which make the weight dependent on the local Courant number (see below).
 
===== Exponential Weight (Default) =====
 
The exponential weight is given as <ref>Jacobsen, N. G., Fuhrman, D. R. and Fredsoe, J. (In print). A Wave Generation Toolbox for the Open-Source CFD Library: OpenFoam&reg; Int. J. of Numerl. Meth. Fluids. DOI: 10.1002/fld.2726</ref>
 
 
<math>w = 1 - \frac{\exp(\sigma^{p})-1}{\exp(1) - 1}</math>
 
 
where the exponent <math>p\in\mathcal{R}_+</math>. Default value is 3.5.
 
 
===== Free Polynomial Weight =====
 
The free polynomial weight is given as <ref name="engsigKarup2006">Engsig-Karup, A. P. (2006). Unstructured Nodel DG-FEM Solution of High-order Boussinesq-type Equations. Ph.D. Thesis, Technical University of Denmark.</ref>
 
 
<math>\quad{}w = 1 - \sigma^{p}</math>
 
 
where <math>p\in\mathcal{N}</math>. There is no default value.
 
 
===== Third Order Polynomial Weight =====
 
The third order polynomial weight is given as <ref name="engsigKarup2006" />
 
 
<math>w = -2 \tilde{\sigma}^3 + 3 \tilde{\sigma}^2</math>
 
 
where <math>\tilde{\sigma} = 1 - \sigma</math>. This shape is particularly derived to be used for relaxation zones, which are both generating and absorption waves.
 
 
===== Additional Temporal correction =====
 
The temporal correction is that of Sopheak Seng et al.<ref>Seng, S., Jensen, J.J. and Pedersen, P.T. (2012). <i>Numerical prediction of slamming loads</i>. Institution of Mechanical Engineers. Proceedings. Part M: Journal of Engineering for the Maritime Environment, <b>226</b>(2), 120-134</ref>, and is based on the local Courant number, <math>Co</math>, where the corrected weight, <math>\tilde{w}</math> is given as
 
 
<math>\tilde{w}=1 - (1 - w^*)^{Co/Co_{max}}</math>
 
 
where <math>w^* = 1 - w</math>.
 
 
==== Relaxation Shapes ====
 
Relaxation shapes defines the shape and relaxation direction of the relaxation zone. The available shapes and their input format are
 
===== Rectangular =====
 
relaxationZone
 
{
 
    relaxationShape Rectangular;
 
 
    relaxType  INLET;
 
    startX      (90 90 0);
 
    endX        (100 100 0);
 
    orientation (0 1 0);
 
}
 
Generates a rectangular relaxation zone, which primary axis in the plane is along <tt>orientation</tt>. If the target solution is wanted in <tt>startX</tt>, then <tt>relaxType</tt> should read <tt>INLET</tt>. If the target solution is wanted in <tt>endX</tt>, then <tt>relaxType</tt> should read <tt>OUTLET</tt>. It holds for the inner product <math>(\mathbf{x}_{end}-\mathbf{x}_{start})\boldsymbol{\cdot}\mathbf{e}_{orientation}>0</math>.
 
===== Cylindrical =====
 
relaxationZone
 
{
 
    relaxationShape Cylindrical;
 
   
 
    centre  (70 70 0);
 
    rInner  15;
 
    rOuter  25;
 
}
 
Generates a cylindrical relaxation zone, where the target solution is enforced along the outer radii.
 
===== SemiCylindrical =====
 
relaxationZone
 
{
 
    relaxationShape SemiCylindrical;
 
   
 
    centre            (30 30 0);
 
    rInner            5;
 
    rOuter            25;
 
    zeroAngleDirection (1 0 0);
 
    angleStart        45;
 
    angleEnd          220;
 
}
 
Generates a semi-cylindrical relaxation zone, where the target solution is enforced along the outer radii. In addition the user needs to specify the direction of primary axis in the unit circle, <tt>zeroAngleDirection</tt>. The two angles, <tt>angleStart</tt> and <tt>angleEnd</tt>, must be in the interval <math>[-180^\circ,\,+180^\circ]</math>.
 
 
== Applications ==
 
=== waveFoam ===
 
<tt>waveFoam</tt> is based on the original implementation of <tt>interFoam</tt>. Modifications are made to make it possible to use the relaxation zone framework with the solver.
 
 
=== waveFoam - How to Modify <tt>interFoam</tt> ===
 
<b>NB!</b> The guide is somewhat outdated, but the general idea is the same. The differences are in how to modify the options-file. Please consult existing solvers for inspiration. <b>NB!</b>
 
 
For more recent versions of OpenFoam, the toolbox is not straightforward applicable, as the user (for the time being), needs to create <tt>waveFoam</tt> him-/herself from <tt>interFoam</tt>. Here are the necessary steps:
 
 
* Copy the files, which belong to <tt>interFoam</tt> into a new folder. E.g. disregard all files related to the derived multiphase solvers. Rename <tt>interFoam.C</tt> to <tt>waveFoam.C</tt>
 
 
* Add the following line in <tt>waveFoam.C</tt>
 
#include "relaxationZone.H"
 
 
* Inside main in <tt>waveFoam.C</tt> add the following two lines just below <tt>#include "initContinuityErrs.H"</tt> and above <tt>createFields.H</tt>
 
#include "readGravitationalAcceleration.H"
 
#include "readWaveProperties.H"
 
 
* After the line in <tt>waveFoam.C</tt> stating <tt>#include "alphaEqnSubCycle.H"</tt> add
 
relaxing.correct();
 
 
* Furthermore in <tt>createFields.H</tt>, one should delete the line stating
 
#include "readGravitationalAcceleration.H"
 
* And add the following at the very bottom
 
relaxationZone relaxing(mesh, U, alpha1);
 
* The output should be placed in FOAM_USER_APPBIN, so modify <tt>Make/files</tt> so it reads
 
waveFoam.C
 
 
EXE = $(FOAM_USER_APPBIN)/waveFoam
 
 
* In order to make it compilable one should add the following in <tt>Make/options</tt> under <tt>EXE_INC</tt>:
 
-DOFVERSION=<Replace brackets with the first three digits in the OF-version number> \
 
-I./../../../../src/lnInclude
 
If the version number only contain 2 digits, then add a third digit being 0.
 
 
* and similar below the <tt>EXE_LIBS</tt> part:
 
-L$(FOAM_USER_LIBBIN) \
 
-lwaves2Foam
 
 
* Do remember to add the necessary "\" in <tt>Make/options</tt> for it to read the additional lines.
 
 
=== waveDyMFoam - How to couple <tt>waves2Foam</tt> with <tt>dynamic mesh motion</tt>===
 
<b>NB!</b> The guide is somewhat outdated, but the general idea is the same. The differences are in how to modify the options-file. Please consult existing solvers for inspiration. <b>NB!</b>
 
 
Step-by-step guide about how to couple the CFD ToolBox waves2Foam with dynamic mesh motion
 
 
1. Copy the folder of solver interDyMFoam in the wave2Foam solver folder for version which you use, for example, for version 1.7.1:
 
 
cp -r $WM_PROJECT_DIR/applications/solvers/multiphase/interFoam/interDyMFoam $WM_PROJECT_USER_DIR/applications/solvers/waves2Foam/applications/solvers/solvers17/waveFoam/
 
 
2. Now modify the name of copied folder to waveDyMFoam (or whatever name you want... but it looks fine):
 
 
cd $WM_PROJECT_USER_DIR/applications/solvers/waves2Foam/applications/solvers/solvers17/waveFoam
 
mv interDyMFoam/ waveDyMFoam
 
 
3. Clean the compiled solver and modify the name of C file:
 
 
cd waveDyMFoam
 
wclean
 
mv interDyMFoam.C waveDyMFoam.C
 
 
4. Now we must follow the guidelines in section 3.2 (but with some difference, as for example, we don’t need modify createFields.H since it’s read from one level-up):
 
 
* Add the following line in waveDyMFoam.C
 
 
#include "relaxationZone.H"
 
 
* Inside main in waveDyMFoam.C add the following two lines just below #include "initContinuityErrs.H" and above createFields.H
 
 
#include "readGravitationalAcceleration.H"
 
#include "readWaveProperties.H"
 
 
* After the line in waveDyMFoam.C stating #include "alphaEqnSubCycle.H" add
 
 
relaxing.correct();
 
 
5. Now we need set properly the Make files. First, open and modify ‘Make/files’:
 
 
waveDyMFoam.C
 
 
EXE = $(FOAM_USER_APPBIN)/waveDyMFoam
 
 
6. And in ‘Make/options’ do:
 
 
* After -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ add:
 
 
-I./../../../../../src/lnInclude
 
 
* And add the following lines at the very bottom
 
 
-L$(FOAM_USER_LIBBIN) \
 
-lwaves2Foam
 
 
* REMEMBER to add the two new needed \ at the end of lines:
 
 
-I$(LIB_SRC)/meshTools/lnInclude
 
-ltopoChangerFvMesh
 
 
7. At main directory, compile the new solver typing:
 
 
wmake
 
 
8. '''It’s done ;)'''
 
 
''This tutorial section is an adaptation to wiki from:''
 
 
https://sites.google.com/site/jordimuela/openfoam/how-to-couple-waves2foam-with-dynamic-mesh-motion
 
 
== Utilities ==
 
=== Pre-processing ===
 
==== faceSetToSTL ====
 
A simple program, which can be used to create simple STL-surfaces. The user defines a closed cell with an arbitrary number of faces or defines one face and an extrude direction. Based on this an STL-file is written.
 
 
The program relies on the face triangulation inside OpenFoam.
 
 
In the input dictionary, and arbitrary number of STL-definitions can be specified.
 
 
==== waveGaugesNProbes ====
 
This utilities allows for simple creation of a set of wave gauges. Several types are distributions are available, and the output is
 
 
* A set file, which contains all of the wave gauges
 
* A code snippet, which can be copy-pasted into the controlDict, such that runTime sampling is activated. This code snippet comes with some default settings, which the user should consider
 
* A surfaceElevationDict, such that sampling of the free surface can be done as a post-processing step
 
* A VTK-file, such that it is easy to visualise the location of the wave-gauges in e.g. ParaView.
 
 
The the input dictionary, several sets of wave gauges can be defined. This is interesting, if e.g. five specific gauges are used for reflection analysis, and the other e.g. 100 gauges are for dense measuring. This split makes the post-processing of the reflection analysis faster and less error-prone.
 
 
This utility is prepared for the creation of probe location files as well, however, this is work to be carried out.
 
 
==== setWaveParameters ====
 
This utility runs through every sub-dictionary (SD) in the dictionary <tt>waveProperties.input</tt>. A pointer to a derived class of <tt>setWaveProperties</tt> is generated for each SD; the pointer is based on the entry <tt>waveType</tt>. If the necessary input is available, the additional wave parameters are computed.
 
 
The derived data and the other needed input are written to the file <tt>waveProperties</tt>, which is subsequently used in the simulations.
 
 
As of revision 1982 the utility has become independent on the mesh, so unnecessary time for loading the computational mesh is avoided. This loading could potentially take a long time and on really big meshes prevent the execution on a serial machine.
 
 
==== relaxationZoneLayout ====
 
A tool for visualising the relaxation fields in the computational domain. It also depicts the orientation of the relaxation zone. A tutorial is availabel.
 
==== setWaveField ====
 
This utility sets the initial condition in the computational domain. The entry <tt>initializationName</tt> in <tt>waveProperties</tt> defines which sub-dictionary is used for initialising the wave field.
 
 
<b>NB!</b> Note that the ramp-up factor is multiplied onto the expressions also during initialization of the computational domain. Hence, in order not to get a horizontal water surface and stagnant water, the parameter <tt>Tsoft</tt> should be given a value of 0.0; <tt>Tsoft</tt> is typically set to the wave period as default and is not required by most of the wave theories.
 
 
=== Post / Run-Time Data Extraction ===
 
==== surfaceElevation ====
 
This utility is a specialisation of the <tt>OpenFoam/src/sampling/sampledSet/sampledSets</tt> in such a way that the sampled (scalar) quantity is integrated along a line defined in the file <tt>surfaceElevationDict</tt>. The utility is intended to by used as a post-processing utility, where the void ratio field is integrated along a vertical line, which yields the location of the free surface.
 
 
Since it is a specialisation of the native <tt>sample</tt>-utility, it runs both in serial and parallel modes. The two calls are as
 
surfaceElevation [-latestTime] [-time ranges]
 
mpirun -np NPROCS surfaceElevation -parallel [-latestTime] [-time ranges]
 
 
===== Input File =====
 
An example of the input file is placed in <tt>applications/utilities/postProcessing/surfaceElevation</tt>. The rules are the same as for <tt>sampleDict</tt>, however, it only makes sense to sample the void ratio field, e.g. <tt>gamma</tt> or <tt>alpha1</tt>.
 
 
The utility only considers scalar fields.
 
 
===== Output File =====
 
The output file is placed in <tt>surfaceElevation/startTime/surfaceElevation.dat</tt>, and it contains all the sampled data for all sampled time steps. The formatting is as follows:
 
Time lineName0 lineName1 lineName2 // Merely some string references
 
-1  x0        x1        x2        // The x-coordinates of the first point on the sampling line. -1 has no meaning.
 
-2  y0        y1        y2        // The y-coordinates of the first point on the sampling line. -2 has no meaning.
 
-3  z0        z1        z2        // The y-coordinates of the first point on the sampling line. -3 has no meaning.
 
0.0  eta0      eta1      eta2      // The elevation for Time = 0.0 s
 
0.1  eta0      eta1      eta2      // The elevation for Time = 0.1 s
 
0.2  eta0      eta1      eta2      // The elevation for Time = 0.2 s
 
0.3  eta0      eta1      eta2      // The elevation for Time = 0.3 s
 
0.4  eta0      eta1      eta2      // The elevation for Time = 0.4 s
 
0.5  eta0      eta1      eta2      // The elevation for Time = 0.5 s
 
 
===== Why -1e15 ? =====
 
The value <tt>-1e15</tt> is written to the output file under the following circumstances:
 
* The number of points along the integration line is less than 2.
 
* Both the top and the bottom integration points are either 0 or 1 within a tolerance of 0.0001. -1e15 is preferred as this suggests the integration line to be fully inside or outside of the water column.
 
 
===== Used as FunctionObject =====
 
The utility can also be used as a <tt>functionObject</tt>. The tutorial <tt>waveFlume</tt> includes an example on how to use it.
 
 
In this mode a couple of additional time controls has been implemented into <tt>surfaceElevation</tt>. These are
 
samplingStartTime <scalar>; // Default value: 0.0
 
This stalls the sampling of the interface location until the specified starting time is exceeded.
 
surfaceSampleDeltaT <scalar>; // Default value: -1.0
 
This value only has an effect, if it is strictly larger than 0.0. It modifies the output time for the sampling, so it is not control by neither a constant number of time steps nor the global output time. This allows for a sub-time step output of the surface elevation and thus saves disk space. This delta time does not feed back into the global setting of the time step, thus the output is only at intervals of approximately <tt>surfaceSampleDeltaT</tt>, where the accuracy obviously increases with decreasing <tt>deltaT</tt> / <tt>surfaceSampleDeltaT</tt>. So forth this ratio exceeds 1, one or more outputs is simply omitted.
 
 
For optimal uses of the <tt>surfaceSampleDeltaT</tt>, it is also recommended to specify the following
 
outputControl timeStep;
 
outputInterval 1;
 
 
===== Compatibility =====
 
This utility has been tested for compatibility with OF-1.6, OF-1.7, OF-2.0 and OF-2.1.
 
 
The utility does not compile with OF-1.5.
 
 
=== postProcessWaves2Foam ===
 
The post-processing utility <tt>postProcessWaves2Foam</tt> can be used to analyse various kinds of probes data. The utility can read data extracted from a simulation both as runTime and as a post-processing step from the following data times:
 
 
* The surfaceElevation (using the native <tt>waves2Foam</tt> utility)
 
* The forces (using the native <tt>OpenFoam</tt> utility <tt>forces</tt>)
 
* The velocities in points (using the native <tt>OpenFoam</tt> utility <tt>probes</tt>)
 
* The overtopping flux (using the native <tt>waves2Foam</tt> utility)
 
 
Furthermore, the utility can perform the following types of analysis on the data sets:
 
 
* Evalutation of powerSpectra (FFT and least squares methods)
 
* Decomposition into reflected and incident wave components (FFT and least squares methods)
 
 
Other miscellaneous methods are described below.
 
 
==== Basic Layout of Input File ====
 
All the control is defined in the file <tt>constant/postProcessingProperties</tt>. As a global choice, the following entry is needed:
 
deleteParentOutputDirectory false;
 
This option deletes the output directory (<tt>postProcessedWaves2Foam</tt>) used for all the post-processing.
 
 
It can contain any number of sub-dictionaries of the following example (description of each method is described below):
 
interpData
 
{
 
    // Folder name for the output in <tt>postProcessesWaves2Foam</tt>
 
    callName interp;
 
 
    // A wordList of actions to be performed in the user defined order
 
    actionList ( removeSubDirs interpolateSurfaceElevation powerSpectraFFT write2Ascii );
 
 
    // The indices of the data sets used in the analyses "powerSpectraFFT" and "reflectionAnalysis2DFFT"
 
    allDataSets yes;
 
 
    // Specs for the interpolation of the raw data sets.
 
    // Equidistant data sets are needed for some of the post-processing methods
 
    deltaT 0.25;
 
    tMin  1033.0;
 
    tMax  3600;
 
     
 
    // Spectral windowing details - used by FFT-methods
 
    freqBins 1024;
 
    windowShiftFraction 0.5;
 
}
 
One potentially important feature is that a given operation do not need to begin with reading of the raw data. One could e.g. add the following sub-dictionary to work on the same interpolated data set:
 
interpDataCont
 
{
 
    // Note that the operation know works on the same read data
 
    callName interp;
 
     
 
    // A wordList of actions to be performed in the user defined order
 
    actionList ( reflectionAnalysis2DFFT removeData);
 
 
    // The indices of the data sets used in the analyses "powerSpectraFFT" and "reflectionAnalysis2DFFT"
 
    indices 3(4 5 6);
 
   
 
    // Spectral windowing details - used by FFT-methods
 
    freqBins 1024;
 
    windowShiftFraction 0.5;
 
 
    // Physical properties needed for the reflection analysis
 
    // The depth is for computation of linear wave number and coordName is the
 
    // direction of the reflection analysis. Currently, an arbitrary direction is not supported,
 
    // however, it does not seem so important in the case of 2D reflection analysis.
 
    depth 50;
 
    coordName x;
 
 
    // Removal of outputted data in the <callName> directory
 
    removeOF false;    // Default value = true;
 
    removeAscii false; // Default value = false;
 
}
 
The benefit of having two dictionaries is that the reflection analysis works on very specific sets of data, so a specific list of indices must be stated for the analysis to make sense. The computation of the power spectra on the other hand, can easily be performed on all of the data sets in one go.
 
 
==== Reading and Writing of Raw Data ====
 
Four method is available, and they are all capable of reading from a set of time folders, so in case of a restart of the simulation, the probes data can be concatenated:
 
inputDir <inputDirName>; // Depending of input data, this option has a default value
 
timeDirs ("0" "10.34");  // This is not required. Default is all time directories
 
===== rawSurfaceElevation =====
 
This method reads the surface elevation. The option <tt>inputDir</tt> has a default value of <tt>surfaceElevation</tt>.
 
 
===== rawVelocityProbes =====
 
This method reads the velocities probes in runTime. The option <tt>inputDir</tt> has a default value of <tt>probes<tt>.
 
 
===== rawAlphaProbes =====
 
This method reads the alpha1 probes in runTime. The option <tt>inputDir</tt> has a default value of <tt>probes<tt>.
 
 
===== rawOvertopping =====
 
This methods reads the overtopping flux. The option <tt>inputDir</tt> has a default value of <tt>overtopping</tt>.
 
 
Furthermore, the method has an additional option called <tt>overtoppingScaling</tt>, which has a default value of 1.0. This is used to scale the overtopping flux from m3/s to m3/s/m, which is needed in e.g. 2-dimensional simulations, where the width of the domain differs from 1.0 m.
 
 
===== rawForcesAndMoments =====
 
This method reads the forces and moment extracted using the forces-<tt>functionObject</tt>. The option <tt>inputDir</tt> has no default value, and only the values for one patch is read per <tt>inputDir</tt>.
 
 
==== Reading and Writing of Interpolated Data ====
 
The writing of interpolated data is based on the input method in the raw-data methods, hence those inputs for those described above is also required, when interpolating the data.
 
 
Furthermore, the following input is required by the user
 
deltaT <scalar>; // The equidistant time step for the interpolation
 
tMin  <scalar>; // Not required. Default = the smallest logged time instance
 
tMax  <scalar>; // Not required. Default = the largest logged time instance
 
 
The reading of forces and moments outputs two data files, where the forces are outputted with index 0 and moments are outputted with index 1.
 
 
The available methods are the following:
 
* interpolateSurfaceElevation
 
* interpolateVelocityProbes
 
* interpolatedAlphaProbes
 
* interpolateOvertopping
 
* interpolateForcesAndMoments
 
 
==== Naming of Main Data ====
 
The data read (and written) using the raw and interpolated methods is outputted using the naming scheme
 
postProcessedWaves2Foam/<callName>/<callName>_<index>
 
Here, <tt>index</tt> runs from 0 to N-1, with N being the number of data sets.
 
 
==== Other IO Data Manipulation ====
 
===== write2Ascii =====
 
If <tt>write2Ascii</tt> is put in the action list, then data outputted from any of the <tt>raw*</tt> or <tt>interpolate*</tt> are outputted in ASCII format with none of the header OF-header files.
 
 
The OF-formatted filename is followed by the string <tt>.txt</tt>, when outputted.
 
 
No options.
 
 
==== Choice of Indices ====
 
Several of the methods below acts on data sets, which do not necessarily include all of the data sets. Therefore, it should be possible only to target a sub-set of the indices, so the choice on indices are as follows:
 
allDataSets no; // Default value = false / no
 
indices 6( 1 3 4 5 6 7);
 
If <tt>allDataSets</tt> is set to <tt>yes</tt>, then the input <tt>indices</tt> is ignored.
 
 
==== Ensemble Averaing ====
 
The method <tt>ensembleAverage</tt> performs an ensemble average of the data set. The following options are needed
 
period <scalar>; // The return period
 
The output is an ensemble average with a time step of <tt>deltaT</tt>, however, this is not a needed option, because it comes from the interpolation routine, also if an interpolation method is not in the action list.
 
 
This method is only valid, if <tt>period / deltaT</tt> is an integer.
 
 
Data is outputted in <tt>postProcessedWaves2Foam/<callName>/ensembleAverage</tt>
 
==== Spectral Methods ====
 
 
 
 
 
===== Output =====
 
Data is outputted in <tt>postProcessedWaves2Foam/<callName>/<spectralMethod></tt>
 
 
==== Cleaning Methods ====
 
===== removeData =====
 
If <tt>removeData</tt> is put in the action list, then files of the type <tt>Foam::fileName::FILE</tt> are removed in the directory <tt>postProcessedWaves2Foam/<callName>/</tt>.
 
 
Options:
 
removeOF false;    // Default value = true. Removes data files with OF format.
 
                                            E.g. as written by rawSurfaceElevation or interpolateSurfaceElevation;
 
removeAscii false; // Default value = false. Removes data files of ASCII format as written by write2Ascii.
 
 
 
===== removeSubDirs =====
 
If <tt>removeSubDirs</tt> is put in the action list, then all the directories in <tt>postProcessedWaves2Foam/<callName>/</tt> are removed.
 
 
No options.
 
 
== waveProperties File ==
 
The file: <tt>waveProperties</tt> is to be placed in <tt>constant</tt> and must contain the following:
 
seaLevel 0.0; // Defines the still water level
 
 
wind (0.0 0.0 0.0); // Defines the velocity in the air part. Not needed. Default value:= vector::zero.
 
 
relaxationNames ( <word0> <word1> ); // The list of names of the relaxation zones used in the simulation
 
 
initializationName <wordN>; // Used by setWaveField and it is the sub-dictionary,
 
                            // which defines which wave theory to be used for initialization
 
 
pName <word>;
 
 
Furthermore, sub-dictionaries are needed for every boundary, which uses any of the boundary conditions:
 
waveAlphaFvPatchScalarField    (type: waveAlpha)
 
wavePressureFvPatchScalarField (type: wavePressure)
 
waveVelocityFvPatchVectorField (type: waveVelocity)
 
and for all of the <tt>relaxationNames</tt> and the <tt>initializationName</tt>. The name of the sub-dictionaries are e.g.
 
<word0>+Coeffs
 
Please note that if an boundary called <tt>inlet</tt> uses one or several of the boundary conditions, then it is allowed for instance to have a relaxation zone called <tt>inlet</tt> in order not to duplicate the input.
 
 
An example of a combined boundary and relaxation zone input is given here, where Stokes first order wave theory (Airy wave) is the input
 
inletCoeffs
 
{
 
    // Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
 
    waveType    stokesFirst; 
 
   
 
    // Ramp time of 2 s
 
    // Foam::sin(2 * mathematicalConstant::pi / (4.0 * Tsoft_) * Foam::min(Tsoft_, runTime.time().value() ))
 
    // and explicitly "1" for Tsoft = 0
 
    Tsoft      2;
 
 
    // Water depth at the boundary and in the relaxation zone
 
    depth      0.400000;
 
 
    // Period - needed by setWaveParameters -> yields omega
 
    period      2.0;
 
 
    // Cyclic wave frequency
 
    omega      3.141593;
 
 
    // Phase shift in the wave
 
    phi        0.000000;
 
 
    // Wave propagation direction - needed by setWaveParameters -> yields k with period and depth
 
    direction  (1 0 0);
 
 
    // Wave number vector, k.
 
    waveNumber  (1.70048 0.0 0.0);
 
 
    // Wave height
 
    height      0.1;
 
   
 
    // Specifications on the relaxation zone shape and relaxation scheme
 
    relaxationZone
 
    {
 
        relaxationScheme Spatial;
 
        relaxationShape  Rectangular;
 
        beachType        Empty;
 
   
 
        startX          (0 0.0 -1);
 
        endX            (5 0.0  1);
 
        orientation      (1.0 0.0 0.0);
 
 
        // Additional optional arguments
 
        relaxationWeight Exponential; //Default and otherwise: FreePolynomial, ThirdOrderPolynomial
 
        courantCorrection off; // Default and otherwise: on
 
    }
 
};
 
 
== Tutorials ==
 
=== Overview ===
 
This table shows, which tutorials are set up to use the different functionalities functionalities:
 
{| class="wikitable" style="color:black"
 
|-
 
! Name of tutorial !! relaxationZoneLayout !! relaxationZones !! setWaveParameters !! setWaveField !! faceSetToSTL !! waveGaugesNProbes !! waveFoam || surfaceElevation !! postProcessingWaves !! Validation
 
|-
 
| relaxationZoneLayout || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>|| bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>
 
|-
 
| waveFlume || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>|| bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes (runTime)</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>  || bgcolor="red" align="center" | <font color=white>No</font>
 
|-
 
| standingWave || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>|| bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>
 
|-
 
| 3Dwaves || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>|| bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>
 
|-
 
| periodicSolitary || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>
 
|-
 
| squarePile || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>|| bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>|| bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="red" align="center" | <font color=white>No</font>
 
|-
 
| bejiBattjes || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>|| bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="red" align="center" | <font color=white>No</font>|| bgcolor="limegreen" align="center" | <font color=white>Yes</font> || bgcolor="limegreen" align="center" | <font color=white>Yes (runTime)</font> || bgcolor="red" align="center" | <font color=white>No</font> || bgcolor="limegreen" align="center" | <font color=white>Yes</font>
 
|}
 
 
=== Use of <tt>relaxationZoneLayout</tt> ===
 
==== Relaxation Zone Layout ====
 
* Name: <tt>tutorials/relaxationZoneLayout</tt>
 
* Utility: <tt>relaxationZoneLayout</tt>
 
* Description: This tutorial will show how to use the utility to obtain a visual on the relaxation zones. This could be helpful to detect potential problems in the setup.
 
=== Use of <tt>waveFoam</tt> ===
 
==== Wave Flume ====
 
* Name: <tt>tutorials/waveFoam/waveFlume</tt>
 
* Solver: <tt>waveFoam</tt>
 
* Description: This tutorial will show the user how to use the <tt>constant/waveProperties</tt> dictionary to set-up the wave properties, relaxation zones and initialization specifications.
 
 
==== Standing Wave ====
 
* Name: <tt>tutorials/waveFoam/standingWave</tt>
 
* Solver: <tt>waveFoam</tt>
 
* Description: This tutorial shows how to handle wave generation and a fully reflecting sea wall utilising the relaxation zone technique.
 
 
==== 3D Wave Flume with a Seawall ====
 
[[File:threeDimWaveField.png|thumbnail|300x122px|An example of the surface elevation with waves from 3 directions onto a vertical structure.]]
 
* Name: <tt>tutorials/waveFoam/3Dwaves</tt>
 
* Solver: <tt>waveFoam</tt>
 
* Description: This tutorial shows the use of relaxation zones in 3 dimensions. There are 3 inlet relaxation zones and one outlet relaxation zone. In the middle of the wave tank there is a vertical internal wall on which the waves are reflected. The waves, which are generated in the 3 inlet relaxation zones, have different directions relative to the <math>x</math>-axis.
 
 
<b>NB:</b> Some reflection does occur on the wall perpendicular to the wave outlet.
 
 
==== Periodic Solitary ====
 
* Name: <tt>tutorials/waveFoam/periodicSolitary</tt>
 
* Solver: <tt>waveFoam</tt>
 
* Description: This tutorial uses the method for initialising a wave profile, which is different from a flat water surface with a sea-level, which differs from 0 m. The computational domain is cyclic in the direction of wave propagation and the initial field is a solitary wave.
 
 
<b>NB:</b> In the simulation a portion of the wave propagates in the opposite direction of the actual wave propagation. It is considered to be due to the fact that the solitary wave theory does not fulfil the non-linear wave problem accurately enough, which is why a part of the wave energy is reflected on the wave itself. It has been tested to initialise with and without the analytical expression for the excess pressure, however, it does not make a difference. Experimental evidence of this behaviour is reported in <ref>Grilli, ST, Subramanye, R, Svendsen, IA and Veeramony, J (1994). Shoaling of Solitary Waves on Plane Beaches, <i>Journal of Waterway, Port, Coastal and Ocean Engineering</i>, <b>120</b>(6), 609-628</ref>.
 
 
==== Square Pile in Cylindrical Domain ====
 
[[File:squarePileElevation.png|thumbnail|300x248px|The surface elevation around a square pile in a constant and unidirectional current. The gray area is the relaxation zone.]]
 
* Name: <tt>tutorials/waveFoam/squarePile</tt>
 
* Solver: <tt>waveFoam</tt>
 
* Description: This tutorial shows how to use the cylindrical relaxation zone. A unidirectional current is the target function all the way around, hence <i>one</i> relaxation zone acts as both generation and absorption. The relaxation zone removes the internally generated surface disturbances. It could be interesting to have it tested for ships waves. Alternatively, a better shape for that purpose, e.g. an elliptical relaxation zone shape could be implemented.
 
 
<b>NB:</b> Generating waves in the computational domain in this tutorial will give bad results. This is a direct consequence of the huge variation in cells per wave length depending on the location in the domain and not the relaxation method! Particular attention should be given to circular domains with waves.
 
 
==== Wave Transformation over Submerged Bar ====
 
* Name: <tt>tutorials/waveFoam/bejiBattjes</tt>
 
* Solver: <tt>waveFoam</tt>
 
* Description: This tutorial provides the experimental setup from <ref>Beji, S. and Battjes, J.A. (1993). Experimental Investigation of Wave-Propagation over a Bar. Coastal Engineering, Volume 19(1-2), 151-162</ref> and a Matlab script, which can be used to compare the experimental data and the simulations.
 
 
== Development / On-going and Future ==
 
* In connection with each of the wave theories in <tt>src/waveTheories/</tt>, there should be a corresponding file in <tt>src/setWaveProperties/</tt>, which computes all of the necessary properties based on a minimum number of inputs, e.g. have height, <math>H</math>, water depth, <math>h</math>, and wave period, <math>T</math>.
 
:This work is still ongoing, hence for those waves missing a property-file, the pre-processing tool <tt>setWaveParameters</tt> will fail.
 
* Tests with other outlet boundary types <ref>Clement, A (1996). Coupling of two absorbing boundary conditions for 2D time-domain simulations of free surface gravity waves. Journal of Computational Physics, pp. 139-151</ref><ref>Ducloc, G, Clement, AH, Chatry, G (2001). Absorption of outgoing waves in a numerical wave tank using a self-adaptive boundary condition. International Journal of Offshore and Polar Engineering, pp. 168-175.</ref>
 
* The pressure gradient points in the direction of the boundary face, irrespectively of the fact that it should be corrected for the angle between wave propagation and the direction of the boundary face.
 
* The pressure gradient is not implemented in all of the wave theories - returns instead <math>\partial p/\partial n = 0.0</math>.
 
  
 
== Download and Installation ==
 
== Download and Installation ==
=== Dependencies ===
+
==== Dependencies ====
Besides the standard dependencies in OpenFoam, <tt>waves2Foam</tt> also depend on Gnu Scientific Library (GSL). This is needed for two reasons:
+
Besides the standard dependencies in OpenFoam, <tt>waves2Foam</tt> also depend on a number of additional third-party packaged. These are:
* In the cnoidal wave theory one has to evaluate Jacobian elliptic functions and complete elliptic integrals. These are not natively available in OpenFoam.
+
* A pre-processing tool, which is currently being developed, computes the needed wave parameters giving the minimal number of input parameters. This quickly results in a set of <math>N</math> non-linear sets of equations in <math>N</math> unknowns. For this purpose GSL is currently being used.
+
  
GSL can e.g. be downloaded using the following commands<ref>Obtained from: http://lavandula.imim.es/adun-new/?page_id=186</ref>
+
* GNU Scientific Library (GSL)
Ubuntu: sudo apt-get install libgsl0-dev gfortran
+
* Subversion (SVN)
Fedora: sudo yum install gsl-devel
+
* git
Suse:  sudo zypper install gsl-devel
+
* gfortran
  
Please be aware that the location for GSL might differ between OS's, hence the include paths in the <tt>options</tt>-files could be wrong. If you have successfully installed GSL and the compilation complains over missing header files or libraries, this is the first place to look.
+
Make sure that these dependencies are installed on the system prior to installation of <tt>waves2Foam</tt>. Refer to the manual for further installation instructions.
 
+
Additional dependencies:
+
* gfortran
+
* git
+
  
=== SVN on SourceForge ===
+
==== SVN on SourceForge ====
 
The toolbox is available through the OpenFoam-Extend SourceForge SVN. Check out the code in the following manner:
 
The toolbox is available through the OpenFoam-Extend SourceForge SVN. Check out the code in the following manner:
 
  svn co http://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/other/waves2Foam
 
  svn co http://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/other/waves2Foam
  
=== Installation ===
+
==== Installation ====
* Install GSL as described above
+
* Install all third-party dependencies
 
* Obtain the source code via SVN as described above
 
* Obtain the source code via SVN as described above
 
* Execute the <tt>Allwmake</tt> script in the folder waves2Foam
 
* Execute the <tt>Allwmake</tt> script in the folder waves2Foam
Line 755: Line 52:
  
 
== Modifications to the Source Code (History) ==
 
== Modifications to the Source Code (History) ==
 +
*2019-11-12 18:28:00 : (r2136) Minor code changes to support ISAMBARD - Reported by Scott Brown/Ed. Ransley
 +
* 2019-08-01 10:58:14: (r2135) Resolved parallel computing bug overtopping under SamplingNew
 +
* 2019-07-31 09:43:43: (r2134) Added waveIsoFoam to 1812 and overtopping functionality for waves2FoamSamplingNew
 +
* 2019-07-22 14:10:15: (r2133) Minor interface update to waveTheory.H
 +
* 2019-06-05 15:39:46: (r2132) Updated waves2Foam to v1812 with waveFoam solver
 +
* 2018-11-30 12:09:25: (r2131) Added irregularFast + Make file
 +
* 2018-11-30 12:05:48: (r2130) Added irregularFast
 +
* 2018-10-11 19:59:00: (r2129) Consistency update of FOAM_USER to WAVES. Decay function to streamFunction (optional)
 +
* 2018-09-28 11:17:21: (r2128) IOstream flushing bug in surface elevation sampling resolved
 +
* 2018-09-21 10:15:36: (r2127) Bug resolved in bichromaticSecond in evaluation of eta
 +
* 2018-07-01 10:24:09: (r2125) Libraries compile on OFv1806; solvers to follow
 +
* 2018-06-10 11:25:40: (r2124) Added flag to waveTheories for non-initialising theories
 +
* 2018-05-27 13:02:23: (r2123) Removed ddxPd method from waveTheory, changed name from p to pExcess for clarity, and added additional pExcess implementation. Removed wavePressure boundary condition; never used/finalised
 +
* 2018-05-25 11:36:12: (r2122) Added rAUf to cross version compatibility
 +
* 2018-05-15 09:54:00: (r2121) Minor changes to setWaveParameters and sampleIncidentWaveField
 +
* 2018-03-29 15:51:32: (r2120) sampleIncidentWaveField also writes the velocity field in the specified points
 +
*  2018-03-06 19:55:01: (r2119) Missing file for porousDamBreak
 +
* 2018-03-05 17:49:43: (r2118) New implementation of surfaceElevation to work on newer versions. Solvers for 1712
 +
* 2018-01-24 21:16:02: (r2116) Part compatibility with OF1712. Solvers and surfaceElevation support to follow
 +
* 2017-10-16 09:14:35: (r2115) Minor edit in jjc2014Zones.C
 +
* 2017-09-15 11:48:27: (r2114) Added porousWaveFoam 1606PLUS
 +
* 2017-07-23 19:46:17: (r2113) Continue adding pressures to wave theories: Now chappelear and corrects for still water level
 +
* 2017-07-15 22:07:26: (r2112) Added solitary wave theory (Chappelear) and fixed bug in solitaryFirst
 +
* 2017-07-14 18:01:19: (r2111) Adding pressure distribution to stokesSecond
 +
* 2017-05-17 17:12:03: (r2107) Added a small interface correction to waveTheory.H
 +
*  2017-05-07 21:53:13: (r2106) Added utility to compute the (analytical) wave field in a multiple of points: sampleIncidentWaveField
 +
* 2017-04-09 20:23:26: (r2105) Added breeder version of catenary mooring line (v1606). Also coded pressure to StokesFirst
 +
* 2017-01-15 18:50:23: (r2104) Support for foam-extend-4.0
 +
* 2016-11-08 18:41:24: (r2103) waves2Foam available for v1606+
 +
* 2016-10-13 16:00:22: (r2102) Preparing for better treatment of KC; no functional change
 +
* 2016-09-27 07:31:45: (r2101) porousWaveFoam for OpenFoam-v3.0+ (only explicit advection of alpha.water)
 
* 2016-08-12 15:48:56: (r2100) Added compatibility with OpenFoam-v3.0+ and solvers for foam-extend-3.2
 
* 2016-08-12 15:48:56: (r2100) Added compatibility with OpenFoam-v3.0+ and solvers for foam-extend-3.2
 
* 2016-07-08 10:40:35: (r2096) Minor change to pEqn.H for foam-extend-3.1 to support on-going developments. No functional change.
 
* 2016-07-08 10:40:35: (r2096) Minor change to pEqn.H for foam-extend-3.1 to support on-going developments. No functional change.
Line 863: Line 191:
 
* 2011-11-10 11:30:30: (r1923) Initial release of waves2Foam - all files
 
* 2011-11-10 11:30:30: (r1923) Initial release of waves2Foam - all files
  
== References ==
 
<references/>
 
  
 
</noinclude>
 
</noinclude>
 
--[[User:NGJ|NGJ]] 20:10, 04 December 2011 (CET)
 
--[[User:NGJ|NGJ]] 20:10, 04 December 2011 (CET)

Latest revision as of 18:26, 12 November 2019

The library waves2Foam is a toolbox used to generate and absorb free surface water waves. Currently the method applies the relaxation zone technique (active sponge layers) and a large range of wave theories are supported and the relaxation zones can take arbitrary shapes.

Release of the waves2Foam Manual

As of the 17th of August 2017, the waves2Foam Manual is released. Consequently, the content of this Wiki-page is reduced.

It is still possible to find download/installation instructions and information on the code contributions.

1 waves2Foam - Information

1.1 Link to the manual

The waves2Foam Manual is freely available through ResearchGate. Click here for download [1].

1.2 Report Bugs via the Mantis on Sourceforge

Please report bugs (not compilation errors, unless they are bugs) here:

https://sourceforge.net/apps/mantisbt/openfoam-extend

There is a subsection for waves2Foam. This will make it easier to keep track of issues, which needs attention.

1.3 Discussions on cfd-online.com

There are two main threads on cfd-online.com, which are related to waves2Foam.

For announcements please consider [2]. Note that questions will generally not be answered here. It is a source of communication on development/release topics. For enquiries, discussion, etc., please use [3].

2 Download and Installation

2.1 Dependencies

Besides the standard dependencies in OpenFoam, waves2Foam also depend on a number of additional third-party packaged. These are:

  • GNU Scientific Library (GSL)
  • Subversion (SVN)
  • git
  • gfortran

Make sure that these dependencies are installed on the system prior to installation of waves2Foam. Refer to the manual for further installation instructions.

2.2 SVN on SourceForge

The toolbox is available through the OpenFoam-Extend SourceForge SVN. Check out the code in the following manner:

svn co http://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/other/waves2Foam

2.3 Installation

  • Install all third-party dependencies
  • Obtain the source code via SVN as described above
  • Execute the Allwmake script in the folder waves2Foam
    • The Allwmake script might cast an error in terms of instructions. Merely follow these.
    • Other errors could be a lot of things:)

3 Modifications to the Source Code (History)

  • 2019-11-12 18:28:00 : (r2136) Minor code changes to support ISAMBARD - Reported by Scott Brown/Ed. Ransley
  • 2019-08-01 10:58:14: (r2135) Resolved parallel computing bug overtopping under SamplingNew
  • 2019-07-31 09:43:43: (r2134) Added waveIsoFoam to 1812 and overtopping functionality for waves2FoamSamplingNew
  • 2019-07-22 14:10:15: (r2133) Minor interface update to waveTheory.H
  • 2019-06-05 15:39:46: (r2132) Updated waves2Foam to v1812 with waveFoam solver
  • 2018-11-30 12:09:25: (r2131) Added irregularFast + Make file
  • 2018-11-30 12:05:48: (r2130) Added irregularFast
  • 2018-10-11 19:59:00: (r2129) Consistency update of FOAM_USER to WAVES. Decay function to streamFunction (optional)
  • 2018-09-28 11:17:21: (r2128) IOstream flushing bug in surface elevation sampling resolved
  • 2018-09-21 10:15:36: (r2127) Bug resolved in bichromaticSecond in evaluation of eta
  • 2018-07-01 10:24:09: (r2125) Libraries compile on OFv1806; solvers to follow
  • 2018-06-10 11:25:40: (r2124) Added flag to waveTheories for non-initialising theories
  • 2018-05-27 13:02:23: (r2123) Removed ddxPd method from waveTheory, changed name from p to pExcess for clarity, and added additional pExcess implementation. Removed wavePressure boundary condition; never used/finalised
  • 2018-05-25 11:36:12: (r2122) Added rAUf to cross version compatibility
  • 2018-05-15 09:54:00: (r2121) Minor changes to setWaveParameters and sampleIncidentWaveField
  • 2018-03-29 15:51:32: (r2120) sampleIncidentWaveField also writes the velocity field in the specified points
  • 2018-03-06 19:55:01: (r2119) Missing file for porousDamBreak
  • 2018-03-05 17:49:43: (r2118) New implementation of surfaceElevation to work on newer versions. Solvers for 1712
  • 2018-01-24 21:16:02: (r2116) Part compatibility with OF1712. Solvers and surfaceElevation support to follow
  • 2017-10-16 09:14:35: (r2115) Minor edit in jjc2014Zones.C
  • 2017-09-15 11:48:27: (r2114) Added porousWaveFoam 1606PLUS
  • 2017-07-23 19:46:17: (r2113) Continue adding pressures to wave theories: Now chappelear and corrects for still water level
  • 2017-07-15 22:07:26: (r2112) Added solitary wave theory (Chappelear) and fixed bug in solitaryFirst
  • 2017-07-14 18:01:19: (r2111) Adding pressure distribution to stokesSecond
  • 2017-05-17 17:12:03: (r2107) Added a small interface correction to waveTheory.H
  • 2017-05-07 21:53:13: (r2106) Added utility to compute the (analytical) wave field in a multiple of points: sampleIncidentWaveField
  • 2017-04-09 20:23:26: (r2105) Added breeder version of catenary mooring line (v1606). Also coded pressure to StokesFirst
  • 2017-01-15 18:50:23: (r2104) Support for foam-extend-4.0
  • 2016-11-08 18:41:24: (r2103) waves2Foam available for v1606+
  • 2016-10-13 16:00:22: (r2102) Preparing for better treatment of KC; no functional change
  • 2016-09-27 07:31:45: (r2101) porousWaveFoam for OpenFoam-v3.0+ (only explicit advection of alpha.water)
  • 2016-08-12 15:48:56: (r2100) Added compatibility with OpenFoam-v3.0+ and solvers for foam-extend-3.2
  • 2016-07-08 10:40:35: (r2096) Minor change to pEqn.H for foam-extend-3.1 to support on-going developments. No functional change.
  • 2016-07-01 22:41:30: (r2095) Added support for OpenFoam-4.0.0. porousWaveFoam not created and sampling library broken in OpenFoam-4.0.0
  • 2016-05-19 22:05:52: (r2094) Support for stream function wave theory
  • 2016-05-19 10:27:57: (r2093) Debug overtopping: results of rhoU2A were bugged, not the overtopping rate itself.
  • 2016-04-29 11:11:26: (r2092) Minor cosmetic changes. Only functional change: Extruded faceSetToSTL always have outward pointing normal.
  • 2016-04-04 14:52:42: (r2091) Changed source location for OceanWave3D. New version resolves bugs with respect to wave generation with the use of a paddle signal. Otherwise no functional effects are expected.
  • 2016-04-04 09:48:18: (r2090) Resolved need for dual compilation, if WAVES_LIBBIN does not exist at the beginning of the compilation. WAVES_LIBBIN and WAVES_APPBIN are made manually.
  • 2016-03-08 11:05:46: (r2089) Minor downstream dependencies. No functional change
  • 2016-02-03 10:58:03: (r2088) Minor bug corrected in compilation procedure; effect on foam-extend branch
  • 2016-02-02 10:50:34: (r2087) Corrected minor bug in oceanWave3D-coupling.
  • 2016-01-08 17:42:13: (r2086) Update tutorial porousDamBreak + porousWaveFoam for OF2.3.0
  • 2015-12-18 18:29:10: (r2085) Added time control checks to oceanWave3D.C
  • 2015-11-23 07:27:38: (r2084) Added solver for OpenFoam-3.0.0
  • 2015-11-20 18:50:30: (r2083) Preparation of compatibility with OpenFoam-3.0.0 - do not use this revision
  • 2015-10-15 22:09:38: (r2082) Debugging of ThirdParty/Allwmake compile script
  • 2015-10-15 21:17:44: (r2081) Additional of OceanWave3D coupling + related tutorial + documentation in 'doc'
  • 2015-10-01 20:00:40: (r2080) src+utilities compiles with foam-extend-3.2. Solvers to follow
  • 2015-09-16 09:27:48: (r2079) Minor issues with options and file for solvers
  • 2015-09-09 16:07:37: (r2078) Added the possibility of using the sea level as vertical reference. Tutorials and setWaveParameters modified accordingly.
  • 2015-08-24 17:10:42: (r2077) Added '- phi' to the argument in stokesFifth.C
  • 2015-07-27 09:44:25: (r2073) Minor changes related to external wave forcing (e.g. nicer closing in solver + works with setWaveField)
  • 2015-07-12 13:48:09: (r2072) waves2Foam compiles on OF2.4 + waveFoam solver
  • 2015-06-06 18:22:46: (r2068) Added zero-crossing functionality + porosity model can be used for non-wave related things
  • 2015-04-14 21:24:03: (r2066) Streamlined the code (removed duplication) for the setWaveProperties and related classes. Change in input format in waveProperties.input.
  • 2015-03-25 09:05:40: (r2064) surfaceElevation now gives correct results on moving meshes in runTime (tested on foam-extend-3.1). Increase computational time.
  • 2015-03-16 14:38:06: (r2063) Small change to porosityCoefficients. NO functional change. Also, corrected bug in surfaceElevation.C, which affected foam-extend branch.
  • 2015-03-12 15:14:46: (r2062) Small change in the interface for the porosity module. No functional change.
  • 2015-02-05 13:28:26: (r2060) Added porousWaveFoam for foam-extend-3.1
  • 2014-10-30 11:01:34: (r2057) Resolving naming match between waves2Foam and 2+ OF-versions [DO NOT USE REVISION 2056]
  • 2014-10-30 10:18:49: (r2056) Made the porosity runTime-selectable. Currently only one method available. Commit includes derived modifications.
  • 2014-10-24 22:03:27: (r2055) Directional check on wave directions in wave theories. 3Dwaves tutorial corrected accordingly
  • 2014-09-09 14:41:16: (r2051) Small interface change in the external wave classes (constructs now with fvMesh as well)
  • 2014-09-04 14:43:15: (r2050) Modified options files so the compilation works with local installations of GSL
  • 2014-09-04 11:36:01: (r2049) Changes to the output location of some applications and libraries. Now uses WAVES_APPBIN/WAVES_LIBBIN
  • 2014-06-21 18:04:47: (r2045) Compiling on foam-extend-3.1, waveFoam 3.1 and waveFoam/porousWaveFoam added directly from OF2.2.1 to OF2.2.2
  • 2014-05-31 22:02:48: (r2044) waveFoam support to foam-extend 3.0 + minor bug-fixes + new relaxation zone shape
  • 2014-05-17 11:28:34: (r2043) Minor maintanence, i.e. waveProperties.input in waveFlume tutorial.
  • 2014-04-12 17:35:52: (r2042) Corrected OF2.3.0 issue with the test case bejiBattjes
  • 2014-04-06 12:33:09: (r2041) Release to facilitate planned future open-source contribution(s) [No functional change in execution].
  • 2014-03-27 21:17:38: (r2040) Additional corrections to the tutorials to run in 2.3.0. Also corrected periodicSolitary, so the tutorial runs for recent cyclic definition.
  • 2014-03-26 19:22:46: (r2039) Corrected tutorials, such that they can actually execute (adding the 0.org-directory)
  • 2014-03-20 11:11:40: (r2038) Added a single post-processing functionality (writeIndexLocation)
  • 2014-03-11 20:57:55: (r2037) Updated structure of tutorials to easier accommondate future changes. Now runs for OF2.3 with alpha.water.
  • 2014-03-01 19:05:46: (r2036) Adjusted to be used with OF2.3. Furthermore, the porousDamBreak case now offers comparison with experiments. The tutorials are not yet adjusted to work with the changes from OF2.2 -> OF2.3.
  • 2014-01-26 16:13:27: (r2026) Compatibility of waves2Foam libraries and utilities with foam-extend-3.0. Still no solver (waveFoam)
  • 2013-12-28 11:43:19: (r2025) Porosity module with solvers (OF1.6, 2.1.0, 2.1.1, 2.2.0, 2.2.1) and a single tutorial.
  • 2013-11-25 19:35:06: (r2024) Modified the fatal error message in the compilation, such that it is easy to understand how to resolve the issue with a wrong WAVES_DIR environmental variable.
  • 2013-10-24 09:11:15: (r2022) Added a new relaxationScheme and a new relaxationShape
  • 2013-10-07 20:36:24: (r2021) Modified src/waves2Foam*/Make/options.* to include XVERSION flag
  • 2013-09-15 09:37:28: (r2020) Added phase focusing as an option for irregular waves.
  • 2013-09-05 13:31:41: (r2019) Trivial bug-fix, not affecting results (Thanks: Bjarne Jensen)
  • 2013-09-03 10:38:12: (r2018) Increased flexibility for setting wave spectra for JONSWAP.
  • 2013-08-12 14:40:19: (r2017) Minor bug-fix in src/waves2Foam/waveTheories/irregular/irregular/irregular.C
  • 2013-08-07 23:34:24: (r2016) Faster evaluation of irregular waves
  • 2013-08-06 21:59:56: (r2015) A bit of code maintenance/simplification
  • 2013-07-28 12:15:35: (r2014) Fourth revision on code style change according to: www.openfoam.org/contrib/code-style.php. [No functionality change]
  • 2013-07-27 22:03:15: (r2013) Third revision on code style change according to: www.openfoam.org/contrib/code-style.php. [No functionality change]
  • 2013-07-27 19:31:35: (r2012) Second revision on code style change according to: www.openfoam.org/contrib/code-style.php. [No functionality change]
  • 2013-07-22 22:53:39: (r2011) First revision on code style change according to: www.openfoam.org/contrib/code-style.php. [No functionality change]
  • 2013-07-15 13:09:08: (r2010) Corrected missing files in src/waves2FoamProcessing/Make/files
  • 2013-07-13 11:32:48: (r2009) waves2Foam now compiles under OF2.2.1
  • 2013-07-09 15:12:25: (r2008) Added an additional point distribution (user-defined) for wave gauges
  • 2013-07-07 19:28:45: (r2007) Release of pre- and post-processing utilities, overtopping sampling and modified tutorials.
  • 2013-07-07 18:37:43: (r2004-r2006) Temporary revision: Restructuring the src-directory
  • 2013-07-07 17:41:18: (r2003) Bug in bichromatic second.
  • 2013-06-11 20:46:14: (r2000) Resolve incompatibility between version 2.2.0 and 2.2.x for waveFoam header files
  • 2013-06-09 09:13:39: (r1997) Added a small script for the creation of new wave theories in waves2Foam/doc/templateWaveTheory
  • 2013-06-08 21:11:23: (r1996) Updated compilation system
  • 2013-06-07 21:38:02: (r1991-r1995) Temporary commit during updating to new SVN
  • 2012-12-03 12:52:40: (r1984) Added second order bichromatic waves. Set numerical beach type to "Empty" as defalt.
  • 2012-11-29 15:10:18: (r1983) Added wave theory. Automatic enhanced write precision for cnoidal waves parameters. Slight change to waveTheory interface.
  • 2012-11-23 15:52:01: (r1982) Changed setWaveParameters so (i) parameters are read from waveProperties.input and written to waveProperties and (ii) it does not depend on the mesh. The latter speeds up the execution (a lot!).
  • 2012-11-18 21:48:17: (r1981) Added a check for validity of second order stokes in the properties file
  • 2012-10-31 15:29:27: (r1980) Bug in compiling setWaveParameters for OFVERSION >= 17. Added pre-processor statement
  • 2012-10-31 14:38:18: (r1979) (i) Bug in bichromaticFirstProperties.C. (ii) Cosmethics in the *Properties files, when writing waveProperties-file
  • 2012-10-18 17:00:21: (r1977) (i) Added solvers for 2.1. (ii) Changed the approach used by setWaveParameters to write waveProperties file. (iii) Updated headers with publication data on the journal article. (iv) Added the file sourceCodeStructure_r1923.svg in the doc directory.
  • 2012-10-17 12:04:01: (r1976) Removed all pre-processing if's related to version 15. Altered the OFVERSION pre-processor to work on e.g. 211 and 160 rather than 21 and 16.
  • 2012-10-01 11:49:20: (r1975) Modified the tutorials, so they are also running under OF2.1
  • 2012-09-10 21:29:21: (r1973) Corrected infinite loop in the computation of the wave number, when kh > 60 (extreme deep water).
  • 2012-08-16 09:44:50: (r1972) Added an option for a local sealevel in potentialCurrent
  • 2012-07-13 20:51:52: (r1969) Added the following: (i) runTime selection of relaxation zone weights, (ii) a local correction to relaxation weight based on the local Courant number, (iii) update of relaxationZoneLayout to show the weight and (iv) added interface for numerical beach in UEqn.H but still not functional.
  • 2012-06-08 12:09:21: (r1967) Added some post-processing utilities to be used in matlab and modified the misc/matlab file structure. Minor bug-fix in generateStreamFile.m so the output file is consistent with the format in waves2Foam.
  • 2012-05-16 10:44:43: (r1966) Corrected bug in matlab script for stream function theory (previous results correct, if the program could finalise!)
  • 2012-05-15 12:01:18: (r1965) Additional output time control for the surfaceElevation utility. Especially needed under functionObject functionality
  • 2012-05-10 14:37:47: (r1961) Added a optional starting time for the surface elevation sampling
  • 2012-05-09 14:18:23: (r1960) Added phase-lag (phi_) in streamFunction.C
  • 2012-05-03 13:22:43: (r1953) Added functionObject functionality for sampledSurfaceElevation. Included in the tutorial waveFlume.
  • 2012-05-02 10:11:01: (r1952) Modification to Allwmake and src/Allwmake so "sed" also works under Mac OSX.
  • 2012-04-30 21:28:20: (r1951) Added a post-processing utility, which can be used to extract the surface elevation. As of now, version 1.5 is no longer supported.
  • 2012-04-11 10:13:10: (r1947) Bug in Allwmake script
  • 2012-03-26 21:45:20: (r1945) Changed the way setWaveProperties output irregular wave properties. Adjusted irregular waveTheory accordingly.
  • 2012-03-17 15:56:02: (r1944) Solved bug in convexPolyhedral. Furthermore added an addition relaxation shape (semiCircular)
  • 2012-03-13 16:13:42: (r1943) Minor changes
  • 2012-02-19 14:45:14: (r1940) Added the possibility of a wind vector, which is constant in space and time.
  • 2012-01-29 19:15:41: (r1938) Changed the Make/files and Make/options to have the output files in FOAM_USER_LIBBIN and FOAM_USER_APPBIN.
  • 2012-01-28 15:55:34: (r1937) Added a Pierson-Moskowitz spectrum
  • 2012-01-27 13:28:00: (r1936) Added framework for irregular wave spectra - properties and wave theory
  • 2012-01-24 13:20:58: (r1935) Small changes to src/Make/files and the overall Allwmake script in order to avoid the recompilation of waves2Foam on non-dev/ext versions of OF
  • 2012-01-19 16:50:48: (r1934) Modified the code, so PI can be used both in pre- and post-2.0 versions of OpenFoam. It is replaced by PI_(4.0*atan(1.0)) a few neccesary places as a protected member variable.
  • 2011-12-04 20:07:35: (r1932) Added a tutorial showing how to generate a standing wave from a fully reflecting sea wall
  • 2011-11-22 10:02:44: (r1929) Added a tutorial utilising the cylindrical relaxation zone
  • 2011-11-19 01:01:19: (r1928) Added "waveFoam" for 1.7, modified Allwmake script and added necessary files to tutorials due to above change.
  • 2011-11-16 19:22:22: (r1937) setWaveParameters now also works for cnoidalFirst
  • 2011-11-14 20:04:08: (r1926) Added matlab tools for cnoidal and stream function waves
  • 2011-11-14 17:52:52: (r1925) Added a 3D wave tank tutorial
  • 2011-11-10 11:30:30: (r1923) Initial release of waves2Foam - all files


--NGJ 20:10, 04 December 2011 (CET)