CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Waves2Foam Related Topics

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree123Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   October 9, 2012, 01:48
Default
  #161
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Good morning Kevin,

I can see that there are fewer pre-processor 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
ngj is online now   Reply With Quote

Old   October 10, 2012, 18:02
Default 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
Rotto is on a distinguished road
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 Green-Naghdi water-wave 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
Rotto is offline   Reply With Quote

Old   October 11, 2012, 04:35
Default
  #163
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
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 low-order 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 non-linear wave equations, so I am still convinced that the spurious waves could be due to a non-exact 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 non-linear 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 Green-Naghdi 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
ngj is online now   Reply With Quote

Old   October 11, 2012, 05:14
Default
  #164
New Member
 
Feng
Join Date: Oct 2011
Posts: 6
Rep Power: 7
fg118 is on a distinguished road
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
fg118 is offline   Reply With Quote

Old   October 11, 2012, 10:23
Default 5th order Stokes wave issue
  #165
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 9
kev4573 is on a distinguished road
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
Attached Files
File Type: pdf alldata_set3.pdf (50.2 KB, 78 views)
kev4573 is offline   Reply With Quote

Old   October 12, 2012, 10:22
Default
  #166
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
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?
ngj is online now   Reply With Quote

Old   October 15, 2012, 10:24
Default
  #167
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 9
kev4573 is on a distinguished road
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
kev4573 is offline   Reply With Quote

Old   October 15, 2012, 20:10
Default
  #168
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6
rosswin is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Ross,

If you have tried the standard tutorial "damBreak", then you will see that you will get a directory for each time data is outputted.

If you do not have those in the output, when running waveFoam, then something is wrong. If you are running in 1.7.1. then all you need to do is to execute "./Allwmake" to compile library, utilities and solvers and nothing else; and it has proven to work.

Which tutorials in waves2Foam have you been running?

/ Niels
Hi Niels,

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.
I then changed my directory to /opt/openfoam171 and executed ./Allwmake again
for which I got this response
Code:
make: Target `application' not remade because of errors.
after a long list of errors.


Regards
Ross
rosswin is offline   Reply With Quote

Old   October 16, 2012, 09:48
Default
  #169
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
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
Attached Images
File Type: jpg mwlSlope.jpg (13.5 KB, 87 views)
ngj is online now   Reply With Quote

Old   October 16, 2012, 11:16
Default
  #170
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 9
kev4573 is on a distinguished road
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
kev4573 is offline   Reply With Quote

Old   October 16, 2012, 11:36
Default
  #171
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is online now   Reply With Quote

Old   October 16, 2012, 12:03
Default
  #172
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 9
kev4573 is on a distinguished road
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 .
ngj likes this.
kev4573 is offline   Reply With Quote

Old   October 17, 2012, 03:15
Default
  #173
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Kevin,

Did you find the time to test the compilation of waveFoam based on 2.1 on 2.1.1?

/ Niels
ngj is online now   Reply With Quote

Old   October 18, 2012, 09:40
Default
  #174
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 9
kev4573 is on a distinguished road
Niels,

Yes the waveFoam solver based on 2.1.0 is cross compatible with 2.1.1 (no changes required).

Kevin
kev4573 is offline   Reply With Quote

Old   October 18, 2012, 10:52
Default
  #175
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is online now   Reply With Quote

Old   October 22, 2012, 10:21
Default
  #176
Member
 
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 7
sunliming is on a distinguished road
Hi,ngj:
I'm now working on wind-wave 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!
sunliming is offline   Reply With Quote

Old   October 22, 2012, 11:16
Default
  #177
Member
 
Dave
Join Date: Jul 2010
Posts: 97
Rep Power: 8
daveatstyacht is on a distinguished road
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).
daveatstyacht is offline   Reply With Quote

Old   October 22, 2012, 23:47
Default
  #178
Member
 
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 7
sunliming is on a distinguished road
Quote:
Originally Posted by daveatstyacht View Post
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).
Hi, Dave:
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 two-phase flow is solved using a general U-equation, how to add the pressure gradient to air alone excluding the water part since the interface is unknown brefore solving?
sunliming is offline   Reply With Quote

Old   October 23, 2012, 16:51
Default
  #179
Member
 
Dave
Join Date: Jul 2010
Posts: 97
Rep Power: 8
daveatstyacht is on a distinguished road
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.
daveatstyacht is offline   Reply With Quote

Old   October 24, 2012, 03:33
Default
  #180
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is online now   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 CFD-Wiki 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


All times are GMT -4. The time now is 14:37.