Difference between revisions of "Contrib/waves2Foam"

From OpenFOAMWiki
(Download)
(Download)
Line 63: Line 63:
  
 
Furthermore note, that the <tt>dev/ext</tt> branches has an additional library called <tt>liblduSolvers.so</tt>, hence in the <tt>Allwmake</tt> script, linking to this particular library is stripped from <it>all</it> solvers, if <tt>$WM_PROJECT_VERSION</tt> contain neither of the strings <tt>dev</tt> and <tt>ext</tt>. Moving to these versions it is henceforth recommended to make a clean checkout.
 
Furthermore note, that the <tt>dev/ext</tt> branches has an additional library called <tt>liblduSolvers.so</tt>, hence in the <tt>Allwmake</tt> script, linking to this particular library is stripped from <it>all</it> solvers, if <tt>$WM_PROJECT_VERSION</tt> contain neither of the strings <tt>dev</tt> and <tt>ext</tt>. Moving to these versions it is henceforth recommended to make a clean checkout.
 +
== 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.
 +
* Numerical beach type relaxation as part of the existing relaxation framework
 +
* Tests with other outlet boundary types [REF-NEEDED]
 +
 
== Download ==
 
== Download ==
 
At present the package is located on a non-public SVN. It will shortly be moved to a public SVN on SourceForge.
 
At present the package is located on a non-public SVN. It will shortly be moved to a public SVN on SourceForge.
Line 68: Line 74:
  
 
----
 
----
--[[User:NGJ|NGJ]] 10:23, 20 October 2011 (CEST)
+
--[[User:NGJ|NGJ]] 21:39, 29 October 2011 (CET)

Revision as of 19:40, 29 October 2011

1 waves2Foam

This web page will shortly contain information of how to use and download "waves2Foam".

The package is to be used in the modelling of free surface water waves. The package contains the following:

  • Two libraries called convexPolyhedral and waves2Foam. See description below.
  • Solver(s) to be used with 1.5 and 1.6+ (see below).
  • Preprocessing tools to initialise the wave field in a domain and visualise the setup of the relaxation zone
  • Tutorials on the use of waves2Foam
  • Until later notice, a set of Matlab® functions are provided, which compute the needed wave parameters for the different wave theories

2 Distributed Libraries

  • convexPolyhedral
This library carries out intersection routines between faces/convex polyhedrals and the water surface given in terms of e.g. an algebraic equation such as \eta=a\sin (\omega t - \mathbf{k}\cdot\mathbf{x}), where \eta is the water surface elevation, a is the wave amplitude, \omega is the cyclic frequency, t is time, \mathbf{k} is the horizontal wave number vector, and \mathbf{x} is a spatial coordinate.
  • waves2Foam
This library contains implementations of wave theories, wave boundary conditions for p, \mathbf{u} and \alpha, being pressure, velocity, and void-ratio respectively. Furthermore the library also contain the implementation of the relaxation zone technique, which is the method used for avoiding reflections from e.g. outlet boundaries. Finally it also contains an object to be used for initialising the velocity and void-ratio fields with e.g. an Airy wave.

2.1 Available Wave Theories

The library is distributed with the following wave theories

  • Current-type
    • Potential current type (uniform velocity distribution from bottom to seaLevel)
  • Regular waves
    • Stokes first order wave theory (Airy wave)
    • First order Stokes standing wave theory
    • Stokes second order wave theory
    • Stokes fifth order wave theory
    • First order cnoidal theory
    • Stream function wave theory
  • Irregular waves
    • First order bi-chromatic wave train (wave group)
  • Other
    • combinedWaves, which allows for a combination of any of the above

3 Tutorials

3.1 Relaxation Zone Layout

  • Name: tutorials/relaxationZoneLayout
  • Utility: relaxationZoneLayout
  • 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.

3.2 Wave Flume

  • Name: tutorials/waveFoam/waveFlume
  • Solver: waveFoam
  • Description: This tutorial will show the user how to use the constant/waveProperties dictionary to set-up the wave properties, relaxation zones and initialization specifications.

3.3 Periodic Solitary

  • Name: tutorials/waveFoam/periodicSolitary
  • Solver: waveFoam
  • 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.

4 Dependencies

Besides the standard dependencies in OpenFoam, waves2Foam also depend on Gnu Scientific Library (GSL). This is needed for two reasons:

  • 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 N non-linear sets of equations in N unknowns. For this purpose GSL is currently being used.

5 Compatibility

The toolbox has been tested successfully with the following releases of OpenFoam:

  • 1.5.x
  • 1.5-dev
  • 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

Because of considerable changes in the source code of OpenFoam between version 1.5 and 1.6, there exist a solvers15 and a solvers directory. Please also note that throughout the code, pre-processor choice are made based on the argument OFVERSION, which is given as

OFVERSION=`echo $WM_PROJECT_VERSION | sed -e 's/\./\n/g' -e 's/-/\n/' | grep "[0-9]" | tr -d '\n'`

which strips anything but the numbers from $WM_PROJECT_VERSION.

Furthermore note, that the dev/ext branches has an additional library called liblduSolvers.so, hence in the Allwmake script, linking to this particular library is stripped from <it>all</it> solvers, if $WM_PROJECT_VERSION contain neither of the strings dev and ext. Moving to these versions it is henceforth recommended to make a clean checkout.

6 Development / On-going and Future

  • In connection with each of the wave theories in src/waveTheories/, there should be a corresponding file in src/setWaveProperties/, which computes all of the necessary properties based on a minimum number of inputs, e.g. have height, H, water depth, h, and wave period, T.
This work is still ongoing, hence for those waves missing a property-file, the pre-processing tool setWaveParameters will fail.
  • Numerical beach type relaxation as part of the existing relaxation framework
  • Tests with other outlet boundary types [REF-NEEDED]

7 Download

At present the package is located on a non-public SVN. It will shortly be moved to a public SVN on SourceForge.



--NGJ 21:39, 29 October 2011 (CET)