# [waves2Foam] Waves2Foam Related Topics

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

 December 3, 2012, 10:43 wave theories and wave2Foam #241 Member   Albert Tong Join Date: Dec 2010 Location: Perth, WA, Australia Posts: 76 Blog Entries: 1 Rep Power: 15 Hi Niels, This maybe not relevant to this topic, but I would much appreciate if you can confirm or correct the following list of my understandings about the wave theories used in wave2Foam. 1, some wave theories were derived based on assumptions such as irrotational and inviscid flow (airy and stokes wave theories, for instance), but as they are only served as an inlet boundary condition to NS equations, the solution is a rotational and viscous flow field. 2, The reason to use these wave theories as inlet condition is because that the wave in reality can be roughly described by the equations in different wave theory (or cannot be precisely describe by a standard and general method). 3, different wave theory has its own validity range, which can be found here: http://en.wikipedia.org/wiki/File:Wa...e_theories.svg 4, the "potential current" as defined at the inlet or outlet is really a uniformly distributed velocity, and has nothing to do with potential flow. 5, Even with wave theory based on potential flow, wave breaking around ocean structure (highly non-linear) can be achieved. Many thanks. __________________ Kind regards, Albert

 December 3, 2012, 11:16 #242 Member   Sagun Tripathi Join Date: Aug 2012 Location: Amherst, USA Posts: 78 Rep Power: 13 Hi Niels, I suppose my question was incorrect. If I want to extract any field on the surface of the structure, say pressure with a view to calculate the net hydrodynamic force acting on it, then could you tell me how should I go about it? Thanks, Sagun

December 3, 2012, 15:25
#243
Senior Member

Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,901
Rep Power: 37
Hi Albert,

On the contrary I find the questions very relevant, so let me try to answer them:

Quote:
 Originally Posted by tfuwa 1, some wave theories were derived based on assumptions such as irrotational and inviscid flow (airy and stokes wave theories, for instance), but as they are only served as an inlet boundary condition to NS equations, the solution is a rotational and viscous flow field.
All the wave theories, which to present date are implemented (as of revision 1984; Big Brother is watching!), are based on irrotational theory also termed potential wave theory. This is a reasonable approximation as the effect of internal friction and wave boundary layers only has a minor effect of the wave. Wind, on the other hand, as already discussed somewhere above, has an important effect on the wave shape and kinematics, but it is not considered in waves2Foam (as of revision 1984 ).

Quote:
 Originally Posted by tfuwa 2, The reason to use these wave theories as inlet condition is because that the wave in reality can be roughly described by the equations in different wave theory (or cannot be precisely describe by a standard and general method).
Yes, they roughly describe the kinematics, however, irregular waves are still limited to low order wave theories. As far as I know, potential wave theory is also used in all laboratory facilities around the world to describe the motion of the paddle (however, these might also include evanescence modes, but that would be a very elongated story to tell on this forum).

Quote:
 Originally Posted by tfuwa 3, different wave theory has its own validity range, which can be found here: http://en.wikipedia.org/wiki/File:Wa...e_theories.svg
Yes, and they are not necessarily derived from the same fundamental equation. E.g. first order stokes (Airy) theory carries an assumption of infinitesimal wave height, whereas first order cnoidal wave theory accept a finite wave height. This also means that whereas the first order Stokes theory originates from a linear set of equations, even the first order cnoidal theory is a solution to a non-linear PDE.

Quote:
 Originally Posted by tfuwa 4, the "potential current" as defined at the inlet or outlet is really a uniformly distributed velocity, and has nothing to do with potential flow.
The potential current is a horizontal velocity, which is constant in time and space. This is a solution to the potential wave theory (e.g. the Laplace equation), so it has all to do with potential wave theory; hence the name.

Quote:
 Originally Posted by tfuwa 5, Even with wave theory based on potential flow, wave breaking around ocean structure (highly non-linear) can be achieved.
Yes, out of many examples you can consult our paper, which describe the release of this toolbox. Please find the reference on the wiki: http://openfoamwiki.net/index.php/Contrib/waves2Foam
You will also find references to previous works on the modelling of wave breaking using VOF and other methods in this paper.

Hope this helps,

Niels

 December 3, 2012, 15:30 #244 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Hi Sagun, You should investigate the many post-processing utilities available in the standard OF distribution. Especially, what you request are either available through the sample utility: /applications/utilities/postProcessing/sampling/sample or the forces application: /src/postProcessing/functionObjects/forces As far I know, the latter is best run during the simulation, but I might be mistaken, as I have never used it myself. Plenty information on the use of these utilities are available on this Forum. Kind regards Niels

December 11, 2012, 05:58
#245
New Member

Luca Bonfiglio
Join Date: Oct 2011
Posts: 9
Rep Power: 14
Quote:
 Originally Posted by rosswin I have been getting this error in my log files for waveFoam.
Hi Ross,
I'm stuck in the same trouble with OF171. Have you finally solved your problem?

 December 12, 2012, 12:59 Solitary wave velocity components derivation #246 New Member   Qicheng Join Date: Dec 2012 Posts: 3 Rep Power: 13 Hi Niels, Thank you very much for your wonderful work. I am a new PhD student. And I am going to do research on solitary wave. I have sucessfully operated the solitary wave tutorial. I am now learning the program you have made. But I face the same problem as Masoud. I cannot understand how you derived the velocity components of particle. I have worked it on several days and there is no clue to derive the form you use in the program. Could you please give me some detailed derivation about it? Yours, Qicheng Meng

 December 13, 2012, 04:28 #247 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Good morning, Please do read the description in waves2Foam/src/waveTheories/solitary/solitaryFirst/solitaryFirst.H on how the vertical velocity field is derived. Kind regards, Niels

December 13, 2012, 06:59
The horizontal particle velocity
#248
New Member

Qicheng
Join Date: Dec 2012
Posts: 3
Rep Power: 13
Dear Niels,

What I cannot understand is the horizontal particle velocity field, for it is different from what is taught in the text book about the first order solitary wave theory. The horizontal velocity is only the first order of expansion without magnitude change in the vertical direction. However, your expression contains the vertical coordinate in the expression. So I tried to include the second order of the velocity expansion. But I still cannot derive your expression.

So could you help me to understand the derivation of the horizontal particle velocity? The problem is neither can I find the reference nor can I derive it by myself.

Best regards!

Qicheng

Quote:
 Originally Posted by ngj Good morning, Please do read the description in waves2Foam/src/waveTheories/solitary/solitaryFirst/solitaryFirst.H on how the vertical velocity field is derived. Kind regards, Niels

 December 14, 2012, 09:32 #249 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Good evening Qicheng, I have not derived the solitary wave theory myself and I do unfortunately not have the reference in a digital format. I suggest that you implement your favourite solitary wave theory, which should not be difficult once you have a set of algebraic equations, and you will know, where the terms originate from. I will gladly incorporate such an implementation of yours into waves2Foam. Kind regards, Niels

December 15, 2012, 07:27
The gratitude for Niels' suggestions
#250
New Member

Qicheng
Join Date: Dec 2012
Posts: 3
Rep Power: 13
Dear Niels,

Thank you very much! I will follow your instructions, modify the code and validate the results. I believe I will have fun with it. Your code does give me a lot of help for the research. I am going to study the internal solitary wave. So it would be great if we could exchange the ideas in the future.

Yours,
Qicheng

Quote:
 Originally Posted by ngj Good evening Qicheng, I have not derived the solitary wave theory myself and I do unfortunately not have the reference in a digital format. I suggest that you implement your favourite solitary wave theory, which should not be difficult once you have a set of algebraic equations, and you will know, where the terms originate from. I will gladly incorporate such an implementation of yours into waves2Foam. Kind regards, Niels

 December 15, 2012, 07:47 #251 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Your are welcome. Good luck, Niels

 December 19, 2012, 08:26 #252 New Member   Galchenko Olga Join Date: Nov 2012 Posts: 16 Rep Power: 13 Good afternoon! I'm having problems with coupling waves2Foam with dynamic mesh motion. I've followed all the instructions, but still can't compile my waveDyMFoam solver. When I type wmake, I got this error message: "command not found". I tried to "make" it, but I was told that thereis nothing needed to be done with this files. Though when I try to run this solver, I stil got same message "command not found" . can someone help me to solve this problem? Regards, Olga Last edited by Galchenko; December 19, 2012 at 08:46.

 December 20, 2012, 04:57 #253 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Hi Olga, You need to source the entire OpenFoam, before you can compile anything. Please look on the descriptions on how to set-up OpenFoam on your computer here (Section: Setting Environment Variables): http://openfoam.org/download/source.php Just to be clear, the problems you encounter have nothing to do with waves2Foam in specific, but rather the initiation of system variables, which are related to OpenFoam. Kind regards, Niels

 December 20, 2012, 11:11 #254 New Member   Galchenko Olga Join Date: Nov 2012 Posts: 16 Rep Power: 13 Thanks a lot for your answer, Niels. But I have no problems with using waveFoam(also a grand thanks for a great work you've done) or any other solvers, so I suppose the problem is coonected exactly with implementing waveDyMFoam. Anyway,I repeated all the actions to set the environment variables, but it didn't help. Regards, Olga

 December 21, 2012, 02:41 #255 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Good morning Olga, It sounds a bit weird, however, I do not have the faintest idea about the actual problem, since the error "command not found" would suggest that "wmake" is not in the search path. As you have compiled waves2Foam successfully disprove that wmake cannot be found. Try to compile a fresh interDymFoam in the new waveDymFoam directory and see if it works, i.e. do not make any changes to the files (except the output location in Make/files). This must work. Kind regards Niels

January 4, 2013, 15:10
Problems compiling waves2Foam
#256
Member

carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
Hi All!,

I have been straggling to compile waves2Foam for a long time with no success.
I use cae-linux and my openFoam instalation is in /opt/openfoam211.
waves2Foam was placed in /home/carlos/OpenFOAM/carlos-2.1.1/waves2Foam and a copy of all files is in
/opt/openfoam211/applications/solvers/multiphase
I attach the errors reported.
Thanks a lot for your help!
Carlos.
Attached Files
 Errors compiling waveFoam.zip (1.8 KB, 15 views)

 January 5, 2013, 04:35 #257 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Hi Carlos, I would recommend that you do not add any solvers to begin with - this is not necessary to begin with for version 2.1.1. If you need dynamic meshes then you need to follow the instructions on the wiki, however, take this step, when the basic package is compiled correctly. Make a new checkout from the svn, and you should be able to compile it all without any problems. E.g. the library libwaves2Foam.so is compiled correctly and so are all of the utilities. Kind regards, Niels

January 5, 2013, 05:34
#258
Member

carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
Quote:
 Originally Posted by ngj Hi Carlos, I would recommend that you do not add any solvers to begin with - this is not necessary to begin with for version 2.1.1. If you need dynamic meshes then you need to follow the instructions on the wiki, however, take this step, when the basic package is compiled correctly. Make a new checkout from the svn, and you should be able to compile it all without any problems. E.g. the library libwaves2Foam.so is compiled correctly and so are all of the utilities. Kind regards, Niels
Hi Niels,

Thanks for your quick answer. In fact I have started the wrong way, as I downloaded the 2012 workshop pack which included the other solvers.
As you suggest, I will start from clean and only with waves2Foam, to add later what I need.
I will report the result.
Regards,
Carlos.

 January 5, 2013, 06:00 #259 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Hi Carlos, Good luck. What source package is the 2012 Workshop one? I do not think that I have ever heard about it. Best regards, Niels

January 5, 2013, 07:23
#260
Member

carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
Quote:
 Originally Posted by ngj Hi Carlos, Good luck. What source package is the 2012 Workshop one? I do not think that I have ever heard about it. Best regards, Niels
Hi Niels,

There is a special group for ships hydro with OF "OpenFOAM-7th-Workshop-2012" and there is a version of caelinux only for OFoam that includes your wave2Foam, but is not compiled during the installation.
I am not working in this version of caelinux but with the complete one.

I have tried to clean as much as possible and then svn update.
It only complains about one file in one tutorial.

I noticed the addition of one number in the solvers version, so mine should be 211, but the Allwmake was pointing to 21, with "file not found", so I did modify to 211. If I understand the result on the attached file, waveFoam did compile, but failed on the utilities.
Carlos.
Attached Files
 Errors.txt (10.3 KB, 5 views)