Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
gducrozet edited this page Nov 18, 2014 · 19 revisions

HOS-Ocean

Here is detailed the procedure to download and use HOS-ocean as well as the documentation of the current installation

Overview

HOS-ocean is available to download as a single program to compile and execute. This is written in Fortran language. Basic outputs are: free surface elevation and potential, modal amplitudes...

Theory and references

Any publication/report/... using HOS-ocean have to refer to the corresponding publications

  • Ducrozet, G., Bonnefoy, F., Le Touzé, D., and Ferrant, P.: 3-D HOS simulations of extreme waves in open seas, Nat. Hazards Earth Syst. Sci., 7, 109-122, doi:10.5194/nhess-7-109-2007, 2007. pdf
  • Bonnefoy, F., Ducrozet, G., Le Touzé, D., Ferrant, P.: Time-domain simulation of nonlinear water waves using spectral methods. In Advances in Numerical Simulation of Nonlinear Water Waves, Vol. 11, Advances in Coastal and Ocean Engineering. World Scientific, 2009; 129–164. google book

We also refer to the different PhD thesis at LHEEA Lab. of Ecole Centrale de Nantes (in french):

  • Le Touzé, D.: PhD Thesis (in french). Méthodes spectrales pour la modélisation non-linéaire d'écoulements à surface libre instationnaires, 2003. pdf
  • Bonnefoy, F.: PhD Thesis (in french), Modélisation expérimentale et numérique des états de mer complexes, 2005. pdf
  • Ducrozet, G.: PhD Thesis (in french), Modélisation des processus non-linéaires de génération et de propagation d'états de mer par une approche spectrale, 2007. pdf

Installation

Source Code

Code development uses Git for version control. If you wish to contribute to code development, it is advised to clone this Git repository and use the same version control tool.

Linux/Unix environment

A Makefile is provided with the source code for compiling HOS-ocean in Linux/Unix environment. The GNU Fortran compiler gfortran or Intel Fortran compiler ifort shall be used. Other Fortran compilers may be used with small adjustments of compiler options, libraries...

Makefile makes use of executable $makedepf90$ to extract automatic dependencies available here

Windows environment

Description of compilation, linking... with Windows environment will be completed later.

External libraries

Different external libraries are needed for the compilation of HOS-ocean

  • FFTW 3.3.4: available here
  • BLAS: available here
  • LAPACK: available here

Linux/Unix users

The location of the compiled libraries have to be specified in the Makefile under the following flag (default is libraries located in /usr/local/lib/)

LIBDIR=/usr/local/lib/

Windows users and other platforms

To be completed

Running HOS-ocean

HOS-ocean has been developed for command-line run with an input file containing all specifications needed

All output files will be created in a directory Results that has to be created before the run by the user

Input file

The input file has the following form and is assumed to be named input_HOS.dat

Choice of computed case :: i_case :: 3 --- Geometry of the horizontal domain Length in x-direction :: xlen :: 80.0 Length in y-direction :: ylen :: 20.0 --- Time stuff Duration of the simulation :: T_stop :: 5.0 Sampling frequency (output) :: f_out :: 5.0 Tolerance of RK scheme :: toler :: 1.0e-7 Dommermuth initialisation :: n :: 4 Dommermuth initialisation :: Ta :: 0.0 --- Physical dimensional parameters Gravity :: grav :: 9.81 Water depth :: depth :: 35. --- Irregular waves (i_case=3) Peak period in s :: Tp_real :: 10.0 Significant wave height in m :: Hs_real :: 4.5 JONSWAP Spectrum :: gamma :: 3.3 Directionality (Dysthe) :: beta :: 0.785398 --- Output files Tecplot version :: tecplot :: 11 Output: 1-dim. ; 0-nondim. :: i_out_dim :: 1 3d free surface quantities :: i_3d :: 0 3d modes :: i_a_3d :: 1
2d free surface, center line :: i_2d :: 0 Wave probes in domain :: i_prob :: 0 Swense output 1='yes',0='no' :: i_sw :: 1

Description of initial conditions

  • i_case=1 : Starting from rest (useless for now)
  • i_case=2 : Progressive natural mode which has to be specified by hand in initial_condition.f90
  • i_case=21 : Standing natural mode which has to be specified by hand in initial_condition.f90
  • i_case=3 : Irregular directional sea-state (linear) from spectrum defined as {{latex(S(\omega,\theta)=F(\omega).G(\theta))}}
  • {{latex(F(\omega))}} is a JONSWAP spectrum
  • {{latex(G(\theta))}} is a directional function defined as {{latex( G(\theta)=\frac{1}{\beta} ~ \cos^2\left(\frac{2\pi\theta}{4\beta} \right))}}
  • i_case=31 : Irregular directional sea-state (linear) from spectrum file from WAVEWATCH III®
  • Filename to specify by hand in initial_condition.f90
  • Bilinear or bicubic interpolation to go from {{latex(S(f,\theta))}} to {{latex(S(k_x, k_y))}}
  • i_case=32 : Irregular directional sea-state (linear) from previous HOS-ocean simulation
  • Temporal surface quantities are read from a file named 3d_ini.dat
  • i_case=8x : Nonlinear regular wave from stream function theory
  • x=[09,1,2,3,4]
  • ka=0.x ==> For instance i_case=82 means ka=0.2
  • Needs the presence of stream function coefficients in an external file named waverf_L628_inf_ka0x_[...].cof

Geometry of the horizontal domain

  • xlen and ylen are interpreted as integer and represent the number of wavelengths (i_case=8x) or peak wavelengths (i_case=3x) in the domain

Time stuff

  • T_stop and f_out are defined with respect to the wave period (i_case=8x) or peak period (i_case=3x)
  • toler gives the tolerance of the adaptative Runge-Kutta scheme
  • n and Ta are the parameters of the relaxation at initial stages of computations (see Dommermuth, Wave Motion, 2000).

Output files

Depending on the choices made in the input file (see above), different output files are created. They are created in a specific folder Results with a specific format dedicated to Tecplot visualization (version of Tecplot may be specified in tecplot). The parameter i_out_dim specifies if output are dimensional(=1) or nondimensional(=0).

  • 3d.dat gives the 3D free surface quantities ({{latex(\eta)}} and {{latex(\phi^s)}}) as function of time
  • a_3d.dat gives the modal amplitudes of free surface quantities ({{latex(\eta)}} and {{latex(\phi^s)}}) as function of time
  • 2d.dat gives the 2D free surface quantities ({{latex(\eta)}} and {{latex(\phi^s)}}) as function of time: i_2d=1
  • 2dpt.dat gives the 2D+t free surface elevation: i_2d=2
  • vol_energy.dat gives the temporal evolution of volume and energy
  • modes_HOS_SWENSE.dat gives the file containing modal information of volumic HOS field for visualization,physical interpretation of wavefield... or possible coupling between HOS and wave-structure interactions model for instance (SWENS method): see post-processing section
  • probes.dat gives the free surface elevation at specific location given in file prob.inp: i_prob=1
  • phase_shift.dat gives the phase shift between computed solution and reference Rienecker & Fenton solution: i_case=8x

Post-processing

Typical post-processing will be provided in next future

Description of kinematics inside fluid domain

modes_HOS_SWENS.dat

Velocity field, pressure field...

SWENS method...

Reference

Analysis of wavefield

TO COME

Wave-by-wave analysis, statistics about the computed wavefield...

Examples

Some input files examples will be provided

Modification to HOS-ocean core

For developers/contributors to the HOS-ocean project, a GIT repository has been set-up. In order to avoid any issues concerning the main subroutines (representing the so-called High-Order Spectral method), benchmarking procedure of this main core is provided.

General recommendations

It is asked for anyone contributing to HOS core, i.e. following routines

  • resol_HOS.f90
  • variables_3D.f90
  • filters.f90
  • Makefile: especially compilation otpions

to run the benchmark and ensure that results are not modified.

Use of benchmark program

Benchmark program consists of two specific files with a corresponding Makefile

  • check_W_DYue.f90
  • variables_3D_DYue.f90
  • Makefile_test_W_DYue

Linux/Unix environment: the compilation of the benchmark program is made with typical instructions

make -Bf makefile_test_DYue

Windows environment: to be completed

Run and results

The program is executed in command line.

TO BE COMPLETED