|
[Sponsors] |
March 10, 2020, 02:13 |
Running irregular wave by olaflow
|
#1 |
Member
Lewis
Join Date: Jun 2016
Posts: 34
Rep Power: 10 |
Dear Foamer,
I have a question about simulating a 2D irregular wave system by using olaflow. The wave period, wave height, and wave phase of singe wave are calculated under the Stokes I theory. The procedure is quite straightway, namely obtaining the wave height/wave period from S(f) function; calculating wave number (k) according to the dispersion relation. Although the k is not required to provide since it will calculate during simulation, the propose of this is to compare the results of free surface elevation between analytical one and the numerical one. Here, eta(x,t) = sum(H/2 * cos(k*x-2*pi*f*t + phi)). The comparison is attached below. However, there is some obvious difference between those two results. Since the input data of Tw, Hw and phi are the same in olaflow solver and analytical function, namely the variation of eta vs time should be in accordance with each other. But haven’t found out the potential reason/error for this qualitative difference so far. Do I miss something? or Can anyone give some advice and help? Best regards, Lewis |
|
March 10, 2020, 16:10 |
|
#2 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Lewis,
there are lot of things that can go wrong with simulations. Here are some key questions that you need to ask to yourself: - Are the inputs right? (e.g., phi in radians) - Is this really a linear sea state or is nonlinearity playing a significant role? - Where am I measuring close to the wave generation boundary or far away? - Are waves breaking? - Is wave reflection from the boundaries significant and may alter the results? - What is the water depth regime? (e.g. in deep water conditions ER-AWA performance is better) - Is the mesh good enough? Are cell sizes small enough? (e.g. performing grid convergence tests) Best, Pablo |
|
March 13, 2020, 09:16 |
|
#3 | |
Member
Lewis
Join Date: Jun 2016
Posts: 34
Rep Power: 10 |
Quote:
Thank you for your prompt suggestions. I'm sorry I didn't respond to you in time, because as soon as I saw your information, I modified my model (Hs=0.1m, Ts=1.2s, d=0.6m, JONSWAP spectrum including 100 wave components) based on your recommendation, and then the simulation took some time. Based on your suggestions in the previous post, here are my thoughts on each suggestion, and a new comparison between numerical and analytical results is shown: - Are the inputs right? (e.g., phi in radians) The random initial phase (phi) with radians unit is randomly distributed between (-pi, pi). phi = 2*pi*(rand(1,length(F))-0.5), where F here is the wave frequency. - Is this really a linear sea state or is nonlinearity playing a significant role? For checking the effect of nonlinearity of sea state, another case run with second order irregular wave generation is provided for comparison. - Where am I measuring close to the wave generation boundary or far away? 3 gauges are placed at 3m, 5m, and 10m in front of the inlet. As seen, the results at the first 2 locations overall agree with the analytical results. But the last one is not good, I think it should be due to the wave reflection, attenuation or breaking near region located in the middle of the wave flume. - Is wave reflection from the boundaries significant and may alter the results? The maximum wavelength among the 100 wave components is 3.7186m, and the entire length of the wave flume is 20m which is almost 6.5 times the L_max(3.7186m).On the other hand, the gauge used to sample eta is located at 3m which is far away from the outlet to avoid the wave reflection. Another two gauges will also set up to record the variation of free water surface. - What is the water depth regime? (e.g. in deep water conditions ER-AWA performance is better) The water depth is 0.6m. Based on the ration of d/L, 42 waves belong to intermediate water condition, while 38 waves belong to deep water condition. Since then, the original absorbing boundaries based on shallow water conditions have been less suitable in this case. - Are waves breaking? The criterion proposed by Miche (1951) is adopted: H_b≥0.142*L*tanh(2*pi*d/L). Thereafter, I found the wave heights which are used as input data for olaflow is much smaller than the critical weight height when breaking. - Is the mesh good enough? Are cell sizes small enough? (e.g. performing grid convergence tests) The mesh scheme is setup with delta x=0.02, delta z=0.01, which is same as the one in waveFlume tutorial case. To summary, the comparison between the numerical results and analytical one overall agree well at the first two gauges. Except for the difference in the height of the water surface at some time points, the general phase difference can be matched. However, the comparison at the third gauge is not good, possibly due to the wave reflection from the outlet boundary. For eliminating this reflection effect, a new absorption boundary (deep water conditions ER-AWA) is required (I will check this later). For the effect of sea state nonlinearity the difference between the first order and second order is not obvious. In terms of wave breaking, the input Hw of each wave component is much smaller than the critical breaking one. Thereafter, I was wondering the difference of eta at gauge located at x=3m is resulting from the numerical attenuation of the free water surface or not? Thanks for your time and attention! Best regards, Lewis |
||
March 15, 2020, 16:03 |
|
#4 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Lewis,
thanks for reporting back. - My comment on nonlinearity playing a significant role was to highlight that if the case is very nonlinear you cannot longer assume that the evolution of the sea state is linear far away from the generation boundary, so the procedure of adding linear components to calculate the theoretical solution at a point might not be valid any more. Your new sea state conditions and results I think reflect on this, it is probably quite linear. Running second order generation will just generate the sub-harmonics resulting from component interactions but in the end NS equations are totally nonlinear. - Your conditions are indeed in intermediate-deep waters, your reflections will decrease a lot and your results will be much better if you use ER-AWA ( see https://www.sciencedirect.com/scienc...41118719303566 ). - While individual components can be small enough not to break when they combine into an irregular sea state some of them might. You just need to watch your simulation for breaking events. Nevertheless, in this case it seems that you might be OK (deep water conditions) except if you get very steep waves. - Tthe mesh in the waveFlume tutorial case is just an example. Each time you start solving a new type of problem it is necessary to run a grid convergence analysis to check whether your mesh is adequate. Best, Pablo |
|
March 18, 2020, 03:43 |
|
#5 |
Member
Lewis
Join Date: Jun 2016
Posts: 34
Rep Power: 10 |
Dear Pablo,
Thank you for your previous suggestions and patient answers. A new case is set up for avoiding the appearance of wave nonlinear (Number of wave components, Ts) and wave breaking (Hs). In this case, wave properties: Hs=0.1m, Ts=10s, d=0.6m, M=11(totally 10 components), shallow water condition. It can be seen that the comparison of the first two scales is now very good. There is no obvious difference in waveform changes, due to the number of irregular waves which equals only 10. Such a wave state is closer to a linear superposition, and the wave height superposition is unlikely to reach the breaking wave threshold. In terms of the third gauge, a better agreement is achieved as well due to the shallow water condition. Next step, I will use ER-AWA boundary to double-check my first case as posted previously and Keep updating the results here soon. Thanks again for your time and help! Cheers! Lewis |
|
March 18, 2020, 16:00 |
|
#6 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Lewis,
glad to see that you are getting a grip on it. ER-AWA will make a difference in your simulation. If you cannot compare time series directly, due to nonlinearities and reflections playing an important role it might be useful to at least compare spectra if you run the simulation for long enough. Best, Pablo |
|
January 1, 2021, 06:14 |
|
#7 |
New Member
Join Date: Oct 2020
Posts: 2
Rep Power: 0 |
Hi Lewis,
I am also simulating a 2D irregular wave using olaflow, I have used the zero up crossing method to obtain the wave height and period from the wave gauge data which was gathered from physical modelling. I am wondering how did you achieve your wave phase data? You said the process was quite strightforward by using Stoke I theory. Can you explain a bit more expecially how did you obtain the time difference between waves as the equation for wave phase is (2pi*td)/T, where td is the time difference between waves and T is the wave period. |
|
April 12, 2022, 08:19 |
How to calculate wave height from S(f) function
|
#8 | |
New Member
Tarek Hadj Hassen
Join Date: Apr 2022
Posts: 6
Rep Power: 4 |
Quote:
Hi Lewis Can you help me how to calculate wave height H[m] from the spectral density S(f)[m²s]. In fact, I have the function of S(f). Best regard, Tarek |
||
August 27, 2023, 10:17 |
|
#9 | |
New Member
Ali
Join Date: Dec 2016
Location: Hong Kong
Posts: 12
Rep Power: 10 |
Quote:
You can find an m-file in my GitHub which generate waveDict for irregular wave in OlaFlow. https://github.com/abasrahmani/OlaFl...arWaveDict.git Best regards Ali |
||
December 3, 2024, 04:09 |
|
#10 |
Member
Haoran Zhou
Join Date: Nov 2019
Posts: 51
Rep Power: 7 |
Hi Ali,
Firstly, thank you for sharing such a helpful tool to generate waveDict! I tried this m-file recently and I found that the wave profile series generated using the code you provided were able to reach similarity with the spectrum of our experimental data, but the monitored wave profile time history during simulation using the corresponding waveDict differed significantly from the experimental spectrum. Also, there is an overall significant attenuation of wave height when compared with experiment data. The relevant parameters are as follows: Hs=0.1656m, Tp=2.1621s, duration=163.84s. The water depth is 0.716m and there are 32 grids along the wave height. I've tried two turbulence models k-epsilon and stablized k-omegaSST, the problems still remains. Have you ever encountered such problem? Any hints will be appreciated! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
troublshooting 2D finite diff solution of pressure wave | Fahraynk | Main CFD Forum | 5 | October 17, 2019 15:37 |
Simulating numerical wave tank and calculating wave load on vertical cylinder | Amit B | FLUENT | 0 | July 27, 2019 10:56 |
[waves2Foam] NWT wave generation problem | Alex song | OpenFOAM Community Contributions | 0 | April 24, 2016 05:54 |
[waves2Foam] Wave Flume tutorial | Dmitrjs | OpenFOAM Community Contributions | 5 | July 23, 2014 09:15 |
Scaling up a wave energy converter - free surface flow | mark_l | CFX | 3 | February 17, 2010 17:57 |