
[Sponsors] 
October 9, 2012, 01:48 

#161 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Good morning Kevin,
I can see that there are fewer preprocessor statements in the source code than I recalled and most of them related to OF15, so it would be rather easy to change it to compile differently for 2.1.0 and 2.1.1. I will put it on my TODO, but it would be nice if the 2.1.0 version compiles on 2.1.1., so a release can be made of waves2Foam under the current structure of the source. Thank you for your help, Niels 

October 10, 2012, 18:02 
Comments and question about the Solitary wave maker

#162 
New Member
Masoud Hayatdavoodi
Join Date: Sep 2012
Location: University of Hawaii
Posts: 4
Rep Power: 6 
I have three comments about the Solitary wave maker:
Niels: Thank you for your response to my question about the reference used in writing the solution of the Solitary wave in the waves2Foam package. The reference you provided (Ib A. Svendsen and Ivar G. Jonsson (1982) Hydrodynamics of Coastal Regions), does not give any expression for vertical particle velocity for a solitary wave. And the expression given for horizontal particle velocity is different with what is used in the waves2Foam Solitary wave maker. So it is still not clear to me where are the equations coming from. Unless you (or Bjarne Jensen according to solitaryFirst.H) have derived the equations for solitary wave as a limit of Cnoidal wave theory, which in this case I guess it would be useful (at least to me ) to provide a reference in which the derivations are given. The numerical wave tank with solitary wave maker in waves2Foam package suffers from formation of small amplitude waves traveling to the opposite direction of the main wave. In the Wiki page of waves2Foam package, a comment given by NB under section 6.5 (Periodic Solitary) is misleading, and in fact I would even say it is incorrect. First, formation of these small amplitude waves is not related to beach slope, seafloor is flat here. Thus it is misleading to refer to the paper (Grilli et al. (1994), JWPCOE, 120(6)), which only discusses deformation of solitary wave due to the beach slope, which is not the case or the reason here. Second, solitary wave is a complete nonlinear wave to begin with, so it is not correct to say formation of the small amplitude waves is because solitary wave theory does not fulfill the nonlinear wave theory, even in their first order of approximation. I wrote a new code for the solitary wave maker in waves2Foam package, using the GreenNaghdi waterwave equations. These equations satisfy the boundary conditions exactly. Similar problem is occurring using this wave maker. Changing grid resolution, water depth, tank dimension and initial position of the wave, although affect the form of the small amplitude waves, do not fully resolve the issue. So, the problem should be somewhere else, not above options nor the wave theory used to create the solitary wave. Also, I have noticed that initially there is a sudden drop in the wave amplitude, which I could not understand the reason/solution. As the wave propagates, however, it gradually recovers to the desired wave amplitude. Any input, comment or suggestion to resolve these issues would be highly appreciated. Niels et al., I enjoy the wave tank very much. If it was not because of your work we would not have these discussions. So, thank you again. Masoud 

October 11, 2012, 04:35 

#163 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Hi Masoud,
1. With respect to the implemented velocity field, I think that we used Hydrodynamics in Coastal Regions as a source  but I might be mistaken; I do not have the book at hand, so I will not be able to check the correctness of the implemented velocities. This source, however, does indeed only give the horizontal velocities, but it is easy to derive the vertical velocity component through an integration over the vertical of the continuity equation. This is what has been done in this case. 2. If you look in the figure in Grilli et al depicting the wave elevation on the flat part of their physical wave flume, you can identify a set of trailing waves. These must have been generated in the horizontal part of the flume, hence, experimental evidence of them being generated, when using a loworder solitary wave theory. 3. With respect to the accuracy of the wave theory, both the cnoidal and solitary waves have been implemented using 1st order theory based on the solution to the KdV equations. Since it is a perturbation theory of 1st order, it does not fulfil entirely the full nonlinear wave equations, so I am still convinced that the spurious waves could be due to a nonexact fulfilment, just as spurious waves are generated, when 1st order Stokes waves of finite amplitude are generated in shallow water. You could e.g. test using a stream function wave with a very large period. Here, the solution would tend toward the solitary solution, and having a sufficient number of harmonics, the solution is an exact solution to the nonlinear wave problem. Good luck, I hope you find a solution, since it could be nice to find a correct explanation. If you are interested, I would be happy to include your GreenNaghdi implemetion in waves2Foam. Best regards, Niels P.S. Thanks to all, who have been using waves2Foam and shown an interest in the source package. Today, the Wiki exceeded 10,000 hits  a number reached in less than a year 

October 11, 2012, 05:14 

#164 
New Member
Feng
Join Date: Oct 2011
Posts: 6
Rep Power: 7 
Hi Niels,
I have try to generate focus wave as post #47 suggested with combineWaves. The focus wave is really generated, but I am confused with the focus time and focus point. With newwave method, when you input focus time and focus point, the focus wave will be generated at focus point on focus time. But with combineWaves, the focus time and focus point seems not on the input value. I have shift each wave phase with omega(i)*t(focus)k(i)*x(focus). Any suggestion? Best Regards Feng 

October 11, 2012, 10:23 
5th order Stokes wave issue

#165 
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 10 
Hi Niels,
I am trying to use the 5th order Stokes theory to simulate deep water waves. However it seems that the mean water level gets shifted by about the amplitude of the wave. I'd expect some shift of the mean level on the order of the second/third order wave amplitudes, but the results I am seeing seem odd to me. Case: https://www.dropbox.com/s/q60gv6pcuq9z2k8/wfd_5th_problem.tar.gz Kind regards, Kevin 

October 12, 2012, 10:22 

#166 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Hi Kevin,
I agree, it does look weird  do not think I ever tried running 5th order  merely implemented it for fun I am out of the office for a couple of days, but I will try to get a change to look into it. If you stumble over a bug before that time, please report it here. Kind regards, Niels P.S. What is the vertical resolution/sample accuracy relative to the reported error? 

October 15, 2012, 10:24 

#167 
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 10 
Niels,
The cell size in the vertical is 0.00333m and the shift in mean water level is about equal to the wave amplitude (0.0125m). Cheers, Kevin 

October 15, 2012, 20:10 

#168  
New Member
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6 
Quote:
Sorry for the late reply and thank you for trying to help me out. I have uninstalled all openFOAM versions and reinstalled OpenFOAM 171. AS of yet I haven't run any waves2Foam tutorials but I have managed to run A few OpenFOAM tutorials and they worked. At the moment I am reinstalling waves2Foam: I am stuck on Instruction 2 of this installation https://github.com/ogoe/waves2Foam I have run ./Allwmake and I get this response Code:
make: Target `application' not remade because of errors. for which I got this response Code:
make: Target `application' not remade because of errors. Regards Ross 

October 16, 2012, 09:48 

#169 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Hi all,
@Kevin: You are using a solution to the linear dispersion relation, however, you are using a fifth order stokes theory. This does not match, which results in a negative stokes drift in your case, hence a lowering of the water level. In the attached figure, the black line is with correct k(period,depth,height), whereas the white line is the incorrect linear dispersion relation. @Ross: You give far too little information to resolve your problem and furthermore, you have achieved the source code from a to me unknown source. Try download the latest release directly from the SVN given on the wiki. Kind regards, Niels 

October 16, 2012, 11:16 

#170 
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 10 
Hi Niels,
Great, thank you for taking the time to look at this. I noticed the negative flow from the domain and now it makes sense. Kind regards, Kevin 

October 16, 2012, 11:36 

#171 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
No problem  I can really recommend using setWaveParameters, because it does resolve this type of problems, and the dispersion relation for the specific wave theory is already implemented.
/ Niels 

October 16, 2012, 12:03 

#172 
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 10 
That's what I started using for the fifth order waves and it seems to be working well now.
By the way, I did take a good look through the 5th order theory implementation and was unable to find any mistakes . 

October 17, 2012, 03:15 

#173 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Kevin,
Did you find the time to test the compilation of waveFoam based on 2.1 on 2.1.1? / Niels 

October 18, 2012, 09:40 

#174 
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 10 
Niels,
Yes the waveFoam solver based on 2.1.0 is cross compatible with 2.1.1 (no changes required). Kevin 

October 18, 2012, 10:52 

#175 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Hi Massoud,
I have been going through the solitary and as I see it, it is implemented as it is given in the reference already discussed. I have updated the header, and it will come out later today with a large update. Please see the announcement thread. Kind regards, Niels 

October 22, 2012, 10:21 

#176 
Member
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 7 
Hi,ngj:
I'm now working on windwave interaction problems for wind engineering application as my master's thesis, and my foremost concern is wind profile over waves rather than wave itself. I've read your paper about the wave generation toolbox, very nice job. But I wonder whether your toolbox can take into account of wind forces on waves(given a natural wind field rather than a uniform zero) and whether the coupling effect of air and water can be considered. I wanna use LES but your toolbox is based on RANS(if I'm right), is that compatible with LES for upper wind field? Thank you in advance! 

October 22, 2012, 11:16 

#177 
Member
Dave
Join Date: Jul 2010
Posts: 97
Rep Power: 8 
Sunliming,
Currently only uniform wind velocity has been implemented by adding: wind (0 0 0) into the waveProperties file (default is uniform zero if omitted). The addition of uniform wind was made primarily with moving objects (ships) in mind as before then only uniform zero was present. You could utilize existing boundary conditions like swak4foam to produce a wind gradient, however you would likely have to develop a modified version of wave2foam to avoid the profile being overwritten in the domain. Regarding LES and RANS, wave2foam is built on the interFoam solver which is generic in the choice of turbulence model (RANS, LES, Laminar). 

October 22, 2012, 23:47 

#178  
Member
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 7 
Quote:
Thank you for your reply! But I'm still a little bit confused of "swak4foam to produce a wind gradient", I want to add uniform pressure gradient as a driving force for wind (like in channelFoam), can swak4Foam fullfil that? In interFoam twophase flow is solved using a general Uequation, how to add the pressure gradient to air alone excluding the water part since the interface is unknown brefore solving? 

October 23, 2012, 16:51 

#179 
Member
Dave
Join Date: Jul 2010
Posts: 97
Rep Power: 8 
Sunliming,
Swak4foam is a library that combines groovyBC and funkysetfields. It is a very flexible way to define boundary conditions and field values. This would be your best bet for being able to define a pressure gradient for air and not water (you could define a function for it). I can't really offer any specifics on how you actually go about setting up this with swak4foam since I haven't really used it. There is plenty of post about swak4foam and a OF wiki article on it. 

October 24, 2012, 03:33 

#180 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,736
Rep Power: 29 
Good morning,
Another option is that the boundary condition, wavePressure, in waves2Foam is based on the mixed type boundary condition, so it is relatively easy to give a pressure gradient in the air or an absolute value of the pressure. How this would interact with the relaxation zones is not very clear on the other hand, but an inlet relaxation zone might not be of your interest? Anyway, good luck Niels 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Other Topics at OpenFOAM Workshop Milan 2008  hjasak  OpenFOAM  2  October 26, 2013 04:33 
Sections / Topics in CFD Wiki  Roberthealy1  CFDWiki  6  August 23, 2007 17:58 
CFD Related Educational Programmes  Jonas Larsson  Main CFD Forum  3  February 9, 2007 11:11 
project topics  vivekanand  CFX  0  October 27, 2004 05:17 
Advanced Topics in Aerodynamics  Antonio Filippone  Main CFD Forum  0  August 28, 1999 12:16 