
[Sponsors] 
March 10, 2020, 01:13 
Running irregular wave by olaflow

#1 
Member
Lewis
Join Date: Jun 2016
Posts: 34
Rep Power: 5 
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*x2*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, 15:10 

#2 
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 535
Rep Power: 14 
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 ERAWA performance is better)  Is the mesh good enough? Are cell sizes small enough? (e.g. performing grid convergence tests) Best, Pablo 

March 13, 2020, 08:16 

#3  
Member
Lewis
Join Date: Jun 2016
Posts: 34
Rep Power: 5 
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 ERAWA 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 ERAWA) 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, 15:03 

#4 
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 535
Rep Power: 14 
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 subharmonics resulting from component interactions but in the end NS equations are totally nonlinear.  Your conditions are indeed in intermediatedeep waters, your reflections will decrease a lot and your results will be much better if you use ERAWA ( 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, 02:43 

#5 
Member
Lewis
Join Date: Jun 2016
Posts: 34
Rep Power: 5 
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 ERAWA boundary to doublecheck 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, 15:00 

#6 
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 535
Rep Power: 14 
Hi Lewis,
glad to see that you are getting a grip on it. ERAWA 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 

Thread Tools  Search this Thread 
Display Modes  


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 14:37 
Simulating numerical wave tank and calculating wave load on vertical cylinder  Amit B  FLUENT  0  July 27, 2019 09:56 
[waves2Foam] NWT wave generation problem  Alex song  OpenFOAM Community Contributions  0  April 24, 2016 04:54 
[waves2Foam] Wave Flume tutorial  Dmitrjs  OpenFOAM Community Contributions  5  July 23, 2014 08:15 
Scaling up a wave energy converter  free surface flow  mark_l  CFX  3  February 17, 2010 16:57 