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 Tree49Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   August 25, 2013, 05:37
Unhappy
  #521
New Member
 
rz
Join Date: Mar 2012
Posts: 25
Rep Power: 0
rezacfd1361 is on a distinguished road
Hi Dear Niels,
I am new wit waves2Foam and excuse me if I ask many questions. I explain what I did to run a test case like waveFloam from tutorial of waves2Foam. 1)I got the waves2Foam from this website:http://openfoamwiki.net/index.php/Contrib/waves2Foam 2)I put it in this address:/home/reza/OpenFOAM/OpenFOAM-2.1.1/applications/utilities 3) My openFOAM is v2.1.1 and I based on the rules in
made a new folder in this address: /home/reza/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/multiphase/interFoam/untitled folder
4) I copied all of interFoam contents to this folder 5) I followed all of other structures in aforementioned address. 6) I do not know what I have to do in this step? Should I go to the address of newfolder and write in terminal wmake or ./Allwmake. or ?

Thanks for your reply.
rezacfd1361 is offline   Reply With Quote

Old   August 25, 2013, 07:06
Default
  #522
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi RZ,

You do not need to do all that, because waves2Foam is compatible with OF v.2.1.1 as it is. With that I mean that the solver waveFoam is also part of the distribution.

Therefore, you only need to following the guidelines given here:

http://openfoamwiki.net/index.php/Co...d_Installation

Once you have completed these, you are able to execute the tutorials.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 25, 2013, 10:11
Smile
  #523
New Member
 
rz
Join Date: Mar 2012
Posts: 25
Rep Power: 0
rezacfd1361 is on a distinguished road
Thanks a lot Dear Niels. I compiled and I run the tutorials. Once again thanks.

RZ
rezacfd1361 is offline   Reply With Quote

Old   August 26, 2013, 09:05
Default
  #524
rye
New Member
 
Romain Euvrard
Join Date: Jul 2013
Location: Saint-Nazaire, France
Posts: 4
Rep Power: 3
rye is on a distinguished road
Is there any result we could you to check the correct calibration of the installation of waves2foam?
Since I got divergents results with an other solver from an other program, when running the same case on different computers, I feel the need for a simple calculation to check : like a cylinder on waves, on someone habing already done the set up?
rye is offline   Reply With Quote

Old   August 28, 2013, 12:05
Default Verification against linear waves
  #525
Member
 
Join Date: Dec 2009
Posts: 38
Rep Power: 6
katakgoreng is on a distinguished road
Hi Niels,

Thanks for your effort in developing the wave2Foam toolbox.
I'm new to OPENFOAM and wave2Foam (start using if two weeks ago). Luckily, I managed to get things up and running.
I want to assess the accuracy of wave2Foam for the stokesFirst case. Using really low wave steepness in intermediate water, I tried running the waveFlume tutorial. The phasing matches well with linear potential waves theory but the amplitude got shifted upward making it slightly larger than that of analytical solution. I tried using mesh twice denser but still got the same result.

WAVE PARAMETER USED
WaveType = stokesFirst
Depth, d = 0.4 m
Period, T = 2 s
Height, H = 0.01 m
WaveNumber, k = 1.70048
Omega, w = 3.14159

CORRESPONDING WAVE PROPERTIES
Wave amplitude, a = 0.005 m
Wave steepness, ak = 0.0085
Dispersion parameter, kd = 0.68

DOMAIN AND MESH PARAMETERS
Domain length = 18 m
Domain height = 0.6 m
Horizontal cell = 360
Vertical cell = 60
Delta x = 0.05 m
Delta y = 0.01 m

ANALYTICAL SOLUTION FOR LINEAR WATER WAVES (FREE SURFACE)
ZetaAnalytical = a * cos ( k*x - omega*t )

RESULTS
Phasing error ~ 0 %
Amplitude error ~ 4 %

Is there anything that I should tweak in order to get more accurate result?
Does viscosity and density between the water and air affect the result?



Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   August 28, 2013, 13:56
Default
  #526
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hello Katakgoreng,

Have you tried comparing your solution with second order Stokes? From my quick look into second order Stokes, then the second order amplitude is 2.7% of the first order amplitude for your conditions, so 4% off is not that bad

Kind regards,

Niels
katakgoreng and gregjunqua like this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 28, 2013, 14:36
Default
  #527
Member
 
Join Date: Dec 2009
Posts: 38
Rep Power: 6
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hello Katakgoreng,

Have you tried comparing your solution with second order Stokes? From my quick look into second order Stokes, then the second order amplitude is 2.7% of the first order amplitude for your conditions, so 4% off is not that bad

Kind regards,

Niels
Hi Niels,

Thank you for your suggestion.
Comparison with second order Stokes yield much better result.
With maximum amplitude error of 1.4 %.
Will try another case.



Kind regards,
katakgoreng

Last edited by katakgoreng; August 28, 2013 at 14:41. Reason: legend for figure
katakgoreng is offline   Reply With Quote

Old   August 28, 2013, 19:25
Default
  #528
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Considering the fact that you only have 1 cell over the wave height, the result is really, really good!

Kind regards,

Niels
katakgoreng likes this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 30, 2013, 02:02
Default internal waves
  #529
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 73
Blog Entries: 1
Rep Power: 6
tfuwa is on a distinguished road
Hi Niels,

I am trying to simulate internal waves with wave2Foam.The two phases would be phase1 sea water at 20 oC (bottom, nu = 1.056 e-6 m2/s, rho = 1028 kg/m3) and phase 2 fresh water at 20oC (top, nu = 1.004e-6 m2/s, rho = 1000 kg/m3). As you can see, both nu and rho are quite close. Would you please instruct that if it is possible to carry out the simulation with wave2Foam without modification?

I used the official waveFlume for the simulation, but the wave did not travel far in the flume and the wave height experienced a sudden decay within the inlet relaxationZone
__________________
Kind regards,

Albert

Last edited by tfuwa; August 30, 2013 at 02:08. Reason: Sorry for mis-spelling your name...
tfuwa is offline   Reply With Quote

Old   August 30, 2013, 03:33
Default
  #530
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Good morning Albert,

Since waves2Foam assumes that the velocities in the air air (0 0 0) (or a constant wind field), then waves2Foam cannot be used for internal waves as it is.

You can, however, make a new wave theory class, say internalWaveTheory, with related implementations of analytical solutions. On top of this you also have to modify the relaxation zones, as the current ones carries the assumption of the velocity as described above.

You will be able to reuse quite a bit of the existing code (cell intersection and knowledge of the structure of runTime selection), pre- and post-processing utilities. Therefore, I would definitely go for an extension of waves2Foam rather than for you to start from scratch.

Good luck,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 30, 2013, 08:29
Default
  #531
Member
 
Join Date: Dec 2009
Posts: 38
Rep Power: 6
katakgoreng is on a distinguished road
Hi Niels,

(# UPDATE : I MADE MISTAKES IN THIS SIMULATION. I INCREASE THE WATER DEPTH IN THE "waveProperties" FILE BUT I DON'T CHANGE THE SIZE OF THE DOMAIN. THANKS NIELS FOR POINTING THINGS OUT..)

After the success of running intermediate water waves, I tried running wave2Foam for deep water waves. It seems like for deep water, the dispersion is not properly resolved resulting in slower wave propagation (compared to Stokes 2nd Order). Furthermore, the maximum amplitude is damped a bit after propagate from the inlet and stays constant until the end. Below are the wave parameters that I used:

DOMAIN AND MESH PARAMETERS FOR BOTH CASES
Domain length = 18 m
Domain height = 0.6 m
Horizontal cell = 360
Vertical cell = 60
Delta x = 0.05 m
Delta y = 0.01 m

INTERMEDIATE WATER WAVE PROPERTIES
Water depth, d : 0.4
Wave period, T : 2
Wave height, H : 0.01
Wave number, k : 1.7005
Wave amplitude, a : 0.005
Wave frequency, omega : 3.1416
Wave steepness, ak : 0.0085024
Dispersion, kd : 0.68019



DEEP WATER WAVE PROPERTIES
Water depth, d : 3.1416
Wave period, T : 2
Wave height, H : 0.01
Wave number, k : 1.0096
Wave amplitude, a : 0.005
Wave frequency, omega : 3.1416
Wave steepness, ak : 0.0050481
Dispersion, kd : 3.1718



Note : Dash line (wave2Foam), solid line (Stokes 2nd Order)

Have you run parametric study on the range of validity of wave2Foam in terms of wave steepness as well as degree of dispersion?

Kind regards,
katakgoreng

Last edited by katakgoreng; August 30, 2013 at 12:08. Reason: figure labeling, mesh information
katakgoreng is offline   Reply With Quote

Old   August 30, 2013, 09:02
Default
  #532
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi,

It really looks strange. Good you upload the deep water case here, and I will try to have a look at it tonight.

The only thing, which I can think of: You have also increased the size of the computational domain, correct? Because it looks like the wave have the similar attributes as for the intermediate water depth. If not, then the model merely make the wave fit the water depth in the computational domain.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 30, 2013, 10:59
Default
  #533
Member
 
Join Date: Dec 2009
Posts: 38
Rep Power: 6
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi,

It really looks strange. Good you upload the deep water case here, and I will try to have a look at it tonight.

The only thing, which I can think of: You have also increased the size of the computational domain, correct? Because it looks like the wave have the similar attributes as for the intermediate water depth. If not, then the model merely make the wave fit the water depth in the computational domain.

Kind regards

Niels
Hi Niels,

I use the the same domain and mesh properties for both cases.

For the deep water case, I:
1. Change the water depth for the deep water case in "waveProperties.input"
2. Run "setWaveParameters" and obtain the wave properties.
3. Run wave2Foam ("./Allrun")
4. Verify with 2nd order Stokes

The wave number, k for both cases are different. However, when I do the verification, the analytical 2nd order Stokes uses values from each individual cases.

I have write a matlab code that
1. Extract the wave properties from "waveProperties" file
2. Extract free surface elevation from "surfaceElevation.dat"
3. Compare with 2nd Order Stokes
4. Produce gif animation

The code is attached with this post.
* If anyone interested to use the code, just copy the "Matlab" folder into "waveFlume" folder.

Kind regards,
katakgoreng
Attached Files
File Type: zip comparisonMatlab.zip (2.6 KB, 22 views)
gregjunqua likes this.

Last edited by katakgoreng; August 30, 2013 at 11:14. Reason: word mistakes
katakgoreng is offline   Reply With Quote

Old   August 30, 2013, 11:02
Default
  #534
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
The problem then is that the actual water depth is still 0.4 m, because the bottom is placed at this level. Therefore, the interior part of the computational domain will act accordingly, and that is why your comparison is as bad as it is.

Create a new mesh with the correct water depth, and I can assure you that the results will be substantially better.

Kind regards

Niels
katakgoreng likes this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 30, 2013, 11:25
Default
  #535
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 73
Blog Entries: 1
Rep Power: 6
tfuwa is on a distinguished road
Quote:
Originally Posted by ngj View Post
Good morning Albert,

Since waves2Foam assumes that the velocities in the air air (0 0 0) (or a constant wind field), then waves2Foam cannot be used for internal waves as it is.

You can, however, make a new wave theory class, say internalWaveTheory, with related implementations of analytical solutions. On top of this you also have to modify the relaxation zones, as the current ones carries the assumption of the velocity as described above.

You will be able to reuse quite a bit of the existing code (cell intersection and knowledge of the structure of runTime selection), pre- and post-processing utilities. Therefore, I would definitely go for an extension of waves2Foam rather than for you to start from scratch.

Good luck,

Niels
Hi Niels,

Many thanks for your detailed explanation and instruction.

Have a good weekend.
ngj likes this.
__________________
Kind regards,

Albert
tfuwa is offline   Reply With Quote

Old   August 30, 2013, 11:48
Default
  #536
Member
 
Join Date: Dec 2009
Posts: 38
Rep Power: 6
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
The problem then is that the actual water depth is still 0.4 m, because the bottom is placed at this level. Therefore, the interior part of the computational domain will act accordingly, and that is why your comparison is as bad as it is.

Create a new mesh with the correct water depth, and I can assure you that the results will be substantially better.

Kind regards

Niels
Hi Niels,

Owh. My bad. I totally missed that one. I should change the domain of the problem to reflect the increase in the water depth. That's why the simulation gave weird result.
So :
1. Increase water depth, d
2. Change the domain to reflect the increase in water depth (this is extremely important)
3. Change the vertical mesh resolution
4. Run wave2Foam

I will report back as soon as I get the result. Thanks Niels.


Kind regards,
katakgoreng

( # UPDATE )

Managed to get the deep water wave propagation right this time. Phase and amplitude shows good agreement with Stokes 2nd order. Although it seems that I should make the domain much longer to avoid wave reflection from polluting the solution.



Note : Dashed line (wave2Foam), solid line (Stokes 2nd order)
ngj likes this.

Last edited by katakgoreng; August 30, 2013 at 13:50. Reason: word mistakes, add verification figure
katakgoreng is offline   Reply With Quote

Old   August 30, 2013, 16:50
Default
  #537
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Thank you very much, Katakgoreng, for the disclaimer in your edited post.

Have a nice weekend.

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 31, 2013, 13:05
Default undertow current
  #538
New Member
 
rz
Join Date: Mar 2012
Posts: 25
Rep Power: 0
rezacfd1361 is on a distinguished road
Hi Niels,

Would you tell me how waves2Foam generate the undertow current in different wave theories? or in irregular waves. I read your paper about openFoam but I did not find a theoretical base for this.

Thanks a lot,

RZ
rezacfd1361 is offline   Reply With Quote

Old   September 1, 2013, 16:27
Default
  #539
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,552
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi RZ,

I do not quite understand, what your question is. The standard interFoam solver (and therefore waves2Foam) solves for the Navier-Stokes equations with the incompressible continuity equation. Therefore, the undertow is automatically included in the results, when waves are e.g. breaking on a cross-shore profile.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   September 3, 2013, 15:39
Default
  #540
New Member
 
Join Date: Aug 2013
Posts: 8
Rep Power: 3
Ellie is on a distinguished road
Hi Niels,

I meet the following error when compiling in OF 220 using your waves2foam packages.

gfx@ubuntu:~/OpenFOAM/gfx-2.2.0/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam$ wmake
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/transportModels -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/transportModels/incompressible/lnInclude -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/transportModels/interfaceProperties/lnInclude -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/turbulenceModels/incompressible/turbulenceModel -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/fvOptions/lnInclude -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/sampling/lnInclude -DOFVERSION=220 -I./../../../../src/lnInclude -IlnInclude -I. -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/gfx/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/waveFoam.o -L/home/gfx/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/lib \
-linterfaceProperties -ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lmeshTools -lfvOptions -lsampling -L/home/gfx/OpenFOAM/gfx-2.2.0/platforms/linux64GccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/gfx/OpenFOAM/gfx-2.2.0/platforms/linux64GccDPOpt/bin/waveFoam
/usr/bin/ld: cannot find -lwaves2Foam
collect2: ld returned 1 exit status
make: *** [/home/gfx/OpenFOAM/gfx-2.2.0/platforms/linux64GccDPOpt/bin/waveFoam] Error 1
gfx@ubuntu:~/OpenFOAM/gfx-2.2.0/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam$

I don't know what to do with this error. Please help me with that. Thanks.

Ellie
Ellie is offline   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 05:33
Sections / Topics in CFD Wiki Roberthealy1 CFD-Wiki 6 August 23, 2007 18:58
CFD Related Educational Programmes Jonas Larsson Main CFD Forum 3 February 9, 2007 11:11
project topics vivekanand CFX 0 October 27, 2004 06:17
Advanced Topics in Aerodynamics Antonio Filippone Main CFD Forum 0 August 28, 1999 13:16


All times are GMT -4. The time now is 16:25.