Giter Club home page Giter Club logo

hos-ocean's People

Contributors

gducrozet avatar gjacquenot avatar guillaumejacquenot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hos-ocean's Issues

reconstruction of surface elevation from modes

Hi
I am wondering how we can use results from modes to reconstruct surface elevation.
I found two data file, 3d.dat ,a_3d.dat, two files. for the former one get eta and phis while the latter according to file it gives wave number k, a, ..., blabla..., my understand is that I can use sum over nk a_i*sin(k_i) to reconstruct eta for each time. but seems it gives totally two different results. or do I miss something, like normallization ?while I noticed there is file modes_HOS_SWENSE.dat, do I need to use this data?

Error while making

Hi,

I am getting the following error while i run make.

admins-MacBook-Air:HOS-ocean-1.5 admin$ make
gfortran -O3 -J ./obj/ -c sources/HOS/runge_kutta.f90 -o obj/runge_kutta.o
sources/HOS/runge_kutta.f90:27:4:

USE type
1
Fatal Error: Can't open module file ‘type.mod’ for reading at (1): No such file or directory
compilation terminated.
make: *** [obj/runge_kutta.o] Error 1

I have followed same as written in the website. Can you please help me to solve this?

Regards,

Jithin

Running steps

Thank you so much for sharing the resource.

I am new to programming, could you please give me some guidance on how to run the simulation and generate data.

Breaking limit and adaptive time-step

Having gone through the literature and the source code, I have a couple of questions relating to the above:

  1. With regards to the breaking (or steepness) limit:
    On line 539 of HOS-ocean.f90, there is a check on the maximum slope of the surface and the simulation stops when the maximum absolute value of etax and etay exceed a threshold value of 10.0. I wasn't able to find what etax and etay correspond to, but I am assuming they correspond to
    image
    respectively. Aside from this though, what does the threshold value of 10.0 correspond to? Is it based on theoretical arguments similar to the arguments made here?

  2. With regards to the adaptive time-step:
    I am unsure about the conditions on which the time-step is adapted. Is it adapted to conserve energy or is it to minimise errors in some other way? Most of the literature simply states that "The two surface quantities are then marched in time using an efficient 4th-order Runge-Kutta scheme featuring an adaptive step-size control and in which the linear part of the equations is integrated analytically."

Thank you.

Can't open module file 'type.mod'

Bonjour,

je pense avoir respecté les étapes d'installation mais quand je compile j'obtiens l'erreur " Fatal Error : Can't open module file 'type.mod' for reading at (1) "
l'erreur se produit lorsqu'il veut compiler runge_kutta.o

j'ai vérifié, les libs et les installations de fftw et lapack sont bonnes,

auriez vous une idée du problème ?

Merci d'avance

Dirichlet-Neumann Operatior kappa

Hello
can anyone tell me how to solve phi_z in both equations.do you really need to solve the boundary value problem described by the Laplacian equation. or any tips like in Pan's paper, use DNO, kappa, to calculate that? but how to calculate kappa

[1]On high-order perturbation expansion for the study of long–short wave interactions J. Fluid Mech. (2018), vol. 846, pp. 902–915.

Thanks

Wei

I encountered an error during compilation.

Dear developers,

Greetings! I would like to inquire about an issue I encountered while compiling Hos-ocean on Ubuntu 20.04. Could you kindly assist me in understanding the root cause of the following error?
sources/HOS/velocities.f90:1259:41:

1256 | DO ii2=1,n2
| 2
......
1259 | k=SQRT(kx(ii1)**2+ky(ii2)**2)
| 1
Warning: Array reference at (1) out of bounds (64 > 1) in loop beginning at (2)
sources/HOS/velocities.f90:1260:63:

1256 | DO ii2=1,n2
| 2
......
1260 | M(index1,index2) = exp(i*(kx(ii1)*x(i1)+ky(ii2)*y(i2)))EXP(keta(i1,i2))
| 1
Warning: Array reference at (1) out of bounds (64 > 1) in loop beginning at (2)
sources/HOS/velocities.f90:1260:70:

1253 | DO i2=1,n2
| 2
......

sources/utilities/Bivar.f90:524:49:

524 | if ( vpdt(x1,y1,x2,y2,xii,yii) ) 36,25,26
| 1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
sources/utilities/Bivar.f90:530:50:

530 | if(vpdt(x2,y2,x3,y3,xii,yii)) 36,27,28
| 1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
sources/utilities/Bivar.f90:534:50:

534 | if(vpdt(x3,y3,x1,y1,xii,yii)) 36,29,30
| 1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
sources/utilities/Bivar.f90:648:50:

648 | if(vpdt(x1,y1,x2,y2,xii,yii)) 46,45,56
| 1

Installation in Windows environment - Microsoft Visual Studio

Hello,

I am trying to install HOS-ocean in Windows environment within the Microsoft Visual Studio. I followed the steps written in this page (https://github.com/LHEEA/HOS-ocean/wiki/Installation), but a lot of errors happened during the building of solution, such as:

error #7002: Error in opening the compiled module file. Check INCLUDE paths. [INITIAL_CONDITION]
error #7002: Error in opening the compiled module file. Check INCLUDE paths. [RANDOM_NUMBERS]
error #6638
error #7976
error #6404
error #6724
and a lot more.

Is there anyone having the same experience? Last year, I tried installation in Linux ubuntu, and there were no significant problems.

無題

Cordialement,
Ardhana

I meet errors during the install process

Hello

I am trying to install HOS-ocean , I have compiled LAPACK and FFTW3(installed when I install Gride2gride ),
Can someone tell me how I need to fix this?
errors

Simulation of nonlinear irregular waves

Hi again!

As I understand it from the wiki, the initial wavefield generated by case 3 is composed of only linear waves.
Is it possible with HOS-Ocean to generate an initial irregular wave field that is nonlinear?
Or how can this be added to the code?
(One Idea might be to use the mode-coupling method to combine two different wavefields generated by case 3, to create a second order wavefield?)

Or do the wavefield automatically become nonlinear as time advances in HOS-Ocean and the waves propagate (given that M>1)?
From my tests, I haven't been able to tell for sure yet.

I have some code that currently is based on linear wave theory and I would like to test it against nonlinear waves to find where the linear implementation becomes inadequate, (and later on, to verify a nonlinear implementation)
(This code is then supposed to generate initial conditions for HOS-Ocean that will be used to propagate the waves to predict them at a future point in time and space)

Many thanks for any help in this matter.
Best Regards,
Niclas

phisx value

Hello,

I am new to working with the HOS-Ocean model and I would like to kindly ask for a clarification.
I am trying to obtain the value of the \partial \phi^{s} / \partial x on the x-grid at each time step. I am outputting in the 'output_time_step' routine with the value calculated via the 'phisxy_etaxy' routine. I am outputting phisx(1:n1,1) (for 2D simulation). My clarification is: is this the correct value that I am looking for? I am asking as the size of phisx is larger (md1,1) depending on the order M of the solution.

Thank you for your time and help!

Kind regards,
Constantin

Resulting Hs for 2D simulations

Dear all,

I am learning HOS-Ocean and I am trying to reproduce the results from Ducrozet et al, 2007. However, while comparing the results of 2D simulations, I noticed that the significant wave height of my outputs is not what I expected in dimensional terms.

I did some simple tests with i_case=3, Tp=9.5s, Hs=1m, and nx=512. The figure below shows the results I get for the first time step. I am requesting dimensional outputs (i_out_dim=1) and I am computing the significant height as $Hs = 4\sqrt{\sigma}$, where $\sigma$ is the standard deviation of the wave elevation. As shown in the legend of the figure, I only get the specified Hs when M=1. Nonetheless, the outputs that HOS-Ocean writes to the terminal say that $Hs=1m$ regardless of the value of M I used.

image

I do not have this problem with 3D simulations, though:
image

My question is whether I am missing something when dealing with 2D simulations. Perhaps there is an extra postprocessing step that I should do?

Thank you,
Lucas

Simulation from external input

Hi!
I'm new to HOS-ocean (and wave theory, including HOS,) but we really like to use this powerful tool.

I and my colleague are currently writing our master thesis at the Mechatronics department, at the Royal Institute of Technology, Stockholm, Sweden.
We are researching wave prediction systems and their use for optimizing the performance of Wave Energy Converters (WEC), (and in particular systems based on Submerged Pressure Sensors (SPS) and HOSM)

We would like to use HOS-ocean to predict the development of a measured wave field (expressed in terms of eta and phis) through time and space. (Limited to 2D waves for now)
When going through the documentation and the code, I found input case (i_case) 32 that seems to be the type of function we need.

But when running a few tests, I found what I believe are some mistakes/bugs in the corresponding code.

First is regarding the reading of the input file (3d_ini.dat) that I managed to fix and have documented in this pull request:
568f52e

After doing the above changes I manage to start simulations based on a custom input file.
But, from looking at the code and doing tests with some regular waves, I have noticed that the simulation takes the parameter Tp from input_HOS.dat (for the JONSWAP) and uses it to calculate the length in x-direction how the waves propagate. (I.e if the Tp in input_HOS.dat doesn't match the initial wave field, the simulations looks wrong)
Is this the intended behaviour for case 32?
How does the inputted Tp relate to the calculations for the simulation of the wave field?

Is case 32 the best way of inputting a measured wave field as initial conditions?
Or can we use some other case?

Thank you for your time and sharing this software as opensource!
Best Regards, Niclas

error: "Slope along x is too large" for i_case 84

Trying to run with case 84 and input settings:

Restart previous computation :: i_restart :: 0
Choice of computed case :: i_case :: 84
--- Geometry of the horizontal domain
Length in x-direction :: xlen :: 16.0000000000000000e+00
Length in y-direction :: ylen :: 1.0
--- Time stuff
Duration of the simulation :: T_stop :: 1.0000000000000000e+01
Sampling frequency (output) :: f_out :: 5.0000000000000000e+01
Tolerance of RK scheme :: toler :: 1.0e-7
Dommermuth initialisation :: n :: 4
Dommermuth initialisation :: Ta :: 10.0
--- Physical dimensional parameters
Gravity :: grav :: 9.82
Water depth :: depth :: -1.

Gives this error:

CPU time for Output time step 0.08 5 4 10.783 0.500 0.097
***************** 58 % *****************
Slope along x is too large... 3.379E+01 9.558E+02
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO STOP 1

What is the cause for this error?
I have encountered it a few times before for other cases with manual inputs.
But then I have managed to get past the error by changing the inputs slightly.

For case 84 I can't find any combination that works.

(The end goal for me is to simulate some nonlinear waves that I can use to test my own functions)

Thanks in advance for any possible help!

Unidirectional results change with n2

When running unidirectional JONSWAP waves (beta = 0.0, case = 3), the result appears to be different when using n2=1 and n2>1. I would expect the value of n2 to make no difference to the result when beta=0.0.
In order to see the difference, change variables angle1, angle2 and angle to 0.0_rp. This would remove any randomness from the simulation and create a focused wave.

This issue is resolved if line 514 in initial_condition.f90 is changed from
IF(n2 == 1) THEN
to
IF ((n2 == 1) .OR.(ABS(beta).LE.tiny)) THEN

Implementing the above change means that the division by k_abs is ignored when beta=0.0. I am not sure if this is change is correct, because dividing by k_abs is the correct operation to transform the spectrum:

3D wave-field analysis

Wave-by-wave analysis of 3D wavefields may be enhanced.

For now, analysis is made along mean directions x and y. A 3D wave is defined when a given crest in x-direction is also a crest in the y-direction.

Main drawback of this approach is that if a wave crest is not align with y-direction (i.e. it present a given angle of propagation), algorithm will detect several waves for one real 3D wave.

How to run an example

Hello @gducrozet,

I am a beginner in HOS. What confuses me is how to run an example. It doesn't seem written on the wiki, although it could be a simple question. I have tried typing make into the terminals /HOS/HOS-ocean-1.5 and /HOS/HOS-ocean-1.5/sources/PostProcessing; however, I found no calculations in the Results.
Another question is, does the Tecplot version specified in input_HOS.dat refer to version 2011?

I would appreciate if you could reply to my message!

Best regards,
liujm

image

i_case=32

In the case where I would like to restart a previous simulation, I need to select i_case=32 and provide file 3d_ini.dat. What structure should this file have? How is it related to the files restart_data.dat and restart_FS_quantities.dat that are output in the Results directory?

Limits in setting n1 and n2

Hi,

I have been testing both HOS-ocean and HOS-nwt and tried to increase the resolution of the domain. It appears that there are limits of n1xn2. With gfortran, I get a compilation error, with ifort it compiles but gives a segmentation error. Do you have an explanation for that? Is it possible to run HOS-ocean with a grid 1024x1024 and if so, how do I need to proceed?

Thank you for your help!
Best regards
Susanne

Reason for omega_n2 being defined on extended x-grid and used on x-grid for irregular initialization

In variables_3d.f90


    REAL(RP), DIMENSION(md1o2p1,n2)  :: omega_n2,goomega_n2
    REAL(RP), DIMENSION(n2)          :: ky_n2

In HOS_ocean.f90

  goomega(1,1)    = 1.0_rp
   !
   DO i2 = 1, n2
       DO i1 = 1, Nd1o2p1
           k2                 = kx(i1) * kx(i1) + ky_n2(i2) * ky_n2(i2)
           omega_n2(i1,i2)    = SQRT(g_star * SQRT(k2) * TANH(SQRT(k2)*depth_star))
           IF (ABS(k2) > tiny) THEN
               goomega_n2(i1,i2)  = g_star / omega_n2(i1,i2)
           ELSE
               goomega_n2(i1,i2) = 1.0_rp
           ENDIF
       ENDDO
   ENDDO
   !
   goomega_n2(1,1) = 1.0_rp

Subsequently in initiate_irreg and initiate_irreg_f in initial_condition.f90 the initialization of eta and phis uses omega_n2 as

DO i1 = 2, n1o2p1
....
                   DO i1 = 2, n1o2p1
                  ...
                   END DO
....
END DO

For initializing phi_JONSWAP(n1o2p1,n2), i1 = 2, nd1o2p1 is not done. But what if one defines phi_JONSWAP(nd1o2p1,n2) and then using reduce_C initializes a_eta and a_phis. This seems more consistent. Is there any technical reason or merely a matter of choice?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.