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 Tree76Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 3, 2013, 15:07
Default
  #541
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Good evening Ellie,

Have you successfully compiled the libraries, which come with waves2Foam. The error suggest that the libraries was not compiled successfully.
Also, the linking and include directories tells me that you are using an old version of waves2Foam. Please be aware that more recent versions carry bug fixes and new functionalities.

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 online now   Reply With Quote

Old   September 3, 2013, 17:58
Default
  #542
New Member
 
Join Date: Aug 2013
Posts: 8
Rep Power: 3
Ellie is on a distinguished road
Quote:
Originally Posted by ngj View Post
Good evening Ellie,

Have you successfully compiled the libraries, which come with waves2Foam. The error suggest that the libraries was not compiled successfully.
Also, the linking and include directories tells me that you are using an old version of waves2Foam. Please be aware that more recent versions carry bug fixes and new functionalities.

Kind regards,

Niels
Hi Niels,

Thanks so much for your quick reply! Could you lease provide the link for the more recent versions? Since now I am having a hard time finding the website again. Thanks

Ellie
Ellie is offline   Reply With Quote

Old   September 3, 2013, 21:52
Default
  #543
New Member
 
Join Date: Aug 2013
Posts: 8
Rep Power: 3
Ellie is on a distinguished road
Quote:
Originally Posted by ngj View Post
Good evening Ellie,

Have you successfully compiled the libraries, which come with waves2Foam. The error suggest that the libraries was not compiled successfully.
Also, the linking and include directories tells me that you are using an old version of waves2Foam. Please be aware that more recent versions carry bug fixes and new functionalities.

Kind regards,

Niels
You mentioned in other thread that we should not need to copy, e.g. relaxationZone.H to the solvers/solver220/waveFoam directory. As we need to change the Make/Option file as
-DOFVERSION=220 \
-I./../../../../src/lnInclude
But it doesn't work. And then I manually copied all the required .H files so that it can 'wmake'. My first reply is the error as a result of that.

And sorry that I am new to OpenFoam. But how to compile the libraries? Where is it?

Thanks.
Best,

Ellie
Ellie is offline   Reply With Quote

Old   September 4, 2013, 00:52
Default Update my question!
  #544
New Member
 
Join Date: Aug 2013
Posts: 8
Rep Power: 3
Ellie is on a distinguished road
Hi Niels,

I've tried the newest version of 'waves2Foam.tar.gz' I could find, and run './Allmake'. No error is showed. Thanks for your tips.

I am running the 3DWaves case in the tutorials and met a few errors.

the 'blockMesh' is good.

it presents some errors when running 'interFoam' and it seems that it's not compiling. Is it the exact solver for this case?

keyword PIMPLE is undefined in dictionary "/home/gfx/OpenFOAM/gfx-2.2.0/applications/solvers/waves2Foam/tutorials/waveFoam/3Dwaves/system/fvSolution"

and I follow someone's suggestion to change the keyword 'PISO' into 'PIMPLE'. I also need to remove the '.org' in the U and p_rgh file name. But another error appears:

--> FOAM FATAL IO ERROR:
Unknown patchField type waveVelocity for patch type patch

I do not know what to do next now! Sincerely hope you can help to see how to run that case! Thanks.

Ellie
Ellie is offline   Reply With Quote

Old   September 4, 2013, 12:27
Default wavefoam problem with 3D mesh
  #545
New Member
 
Luis Miguel
Join Date: Apr 2013
Location: Colombia
Posts: 13
Rep Power: 4
luigi21 is on a distinguished road
I have a big problem when I try to compile wavefoam with a 3D mesh generated in GMSH, the mesh consist of a flume with irregular geometry, the following lines are the error that I get always:

HP-Compaq-dc5800-Microtower:~/OpenFoam/irregularwaveFlume7$ #0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 Uninterpreted:
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#4
at ??:?
#5
at ??:?
#6
at ??:?
#7
at ??:?
#8 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#9
at ??:?

I've checked the mesh and the boundary conditions but everything seems ok, When I'm running the waveFoam utility the courant number goes out of the permisible range.

If somebody knows what the problem is.... I'd appreciate it so much....
luigi21 is offline   Reply With Quote

Old   September 9, 2013, 14:43
Default
  #546
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Hi Niels,

I have tested wave2foam for regular waves and so far the results is quite accurate (provided that I have enough mesh in the viscinity of the free surface).
I'm interested to try the irregular waves function (JONSWAP).
I have specify the JONSWAP spectrum in "waveProperties.input" as follows:

waveType : irregular;
spectrum : JONSWAP;
N : 151;
Tsoft : 3;
writeSpectrum : false;
Hs : 0.046;
Tp : 1.2;
gamma : 2.5;
depth : 0.7;
direction : ( 1 0 0 );

There is no information for the focusing time and location so I assume that the focused wave occur at xf = 0 and tf = 0, where (xf is the focusing location and tf is the focusing time). Is there any way that I could change the focusing location and time to a specified values?

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   September 9, 2013, 15:05
Default
  #547
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Good evening Katakgoreng,

I am glad to hear that you are so far happy with the results. The irregular wave is exactly an irregular wave train, so the phasing is set to a random value, i.e. there is not any focusing time/location as an option. To achieve this, it will require some implementation.

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 online now   Reply With Quote

Old   September 9, 2013, 15:48
Default
  #548
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
Good evening Katakgoreng,

I am glad to hear that you are so far happy with the results. The irregular wave is exactly an irregular wave train, so the phasing is set to a random value, i.e. there is not any focusing time/location as an option. To achieve this, it will require some implementation.

Kind regards,

Niels
Hi Niels,

Thank you for your clarification. I noticed when I run "setWaveParameters", in "waveProperties", sets of values (from the JONSWAP spectrum) are generated:

(a) amplitude
(b) frequency
(c) phaselag
(d) waveNumber

amplitude, frequency and wavenumber are typical values corresponding to the JONSWAP spectrum.

Would you mind clarifying what "phaselag" is?
Is this what you mean by random phasing?
Is "phaselag" equal to "phi" as in regular wave theory?

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   September 9, 2013, 16:29
Default
  #549
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Yes, phaselag is the same as phi in the regular wave theories. Sorry for the inconsistency in naming. Also, phaselag is the random variable.

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 online now   Reply With Quote

Old   September 10, 2013, 09:29
Default
  #550
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
Yes, phaselag is the same as phi in the regular wave theories. Sorry for the inconsistency in naming. Also, phaselag is the random variable.

Kind regards,

Niels
Hi Niels,

So I guess, I could calculate the phaselag for every waves so that they coincide at the focusing time and location that I want. Will try it. Thanks Niels.

Kind regards,
katakgoreng

# UPDATE

I managed to get the waves to focused based on focusing time and location that I prescribed. I do this by calculating the phase-lag of each individual waves so that they coincide at the prescribed values.
So the formula that I used for calculating phase-lag is as follows:
phi = k * xf - omega * tf
where
phi = individual phase-lag
k = individual waves number
omega = individual waves angular frequency given by 2*pi*f
f = individual waves frequency
xf = focusing location
tf = focusing time
I replace the calculated phase-lag from "setWaveParameter" with the new phase-lag.

The result shows excellent agreement with linear random wave theory.
BTW, this is TopHat spectrum (same amplitude for each individual waves, again I replace the value generated from "setWaveParameter")
The focusing location, xf = 8 m from inlet whilst focusing time, tf = 32 s.
Maximum amplitude error is 1.5%.
The trough before and after the focused event is slightly under-predicted whilst the focused location drifted just abit due to either non-linear effect or inadequate mesh resolution in the vertical and horizontal direction.



The legend supposed to be "waves2Foam"..sorry about that..

# UPDATE 2

Focused waves for JONSWAP spectrum at xf = 8m and tf = 32s.
The mesh used is the same as in TopHat spectrum. It is pretty evidence that the mesh is under-resolved as the short waves riding on longer waves is not being resolved properly, resulting in decreasing in maximum focused amplitude. Using denser mesh could result in much better result.


Last edited by katakgoreng; September 11, 2013 at 11:33. Reason: Result update
katakgoreng is offline   Reply With Quote

Old   September 14, 2013, 04:58
Default
  #551
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Katakgoreng,

Thanks for the updates. I would say that the results do look pretty nice, and I am happy to see the predictive capabilities validated.

Just out of curiosity, have you constructed the wave components inside or outside setWaveParameters? If still outside, then I do have some ideas on how to make it all work with as little work as possible. Essentially, if you post the code, which you use for creating the phases, i.e. required information from the user and the exact computation of the phases, then I could probably put it into waves2Foam during this weekend.

Please, also add the waveProperties- and waveProperties.input-files for JONSWAP, such that I can compare the created files.

Kind regards

Niels

EDIT: Sorry, after carefully reading your post from above, I can see that the equations are already there. I will make sure that it get integrated in the setWaveProperties.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

Last edited by ngj; September 14, 2013 at 19:25.
ngj is online now   Reply With Quote

Old   September 15, 2013, 03:50
Default
  #552
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

This morning I have added the option of focusing an incident irregular wave train in a given time and a given location as inspired by Katakgoreng. For the control, please see

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

If you are using standard random phasing of the incident irregular waves, then you do not have to do anything, but a slight increase in control is added through a manual choice of seeding for the random number generator.

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 online now   Reply With Quote

Old   September 16, 2013, 06:08
Default
  #553
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Hi Niels,

Sorry for not replying your previous post abit earlier. I haven't been online on the weekend.
The latest addition is pretty neat. No need to calculate the phaselag outside "setWaveParameters".

I have updated svn and recompile wave2Foam.
I have the following in "waveProperties.input"

phaseMethod focusingPhase;
focusTime 32;
focusPoint (8 0 0);


I have the following bug (not quite sure if its on my computer only) :

Bug 1:

When I run "setWaveParameters", I got

keyword equidistantFrequencyAxis is undefined in dictionary ...

I then add "equidistantFrequencyAxis" into the "waveProperties.input" and set the value to 1. The error then goes away. Is this new additional control that you add for irregular wave theory as I can't seem to find it ever mentioned in

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

Bug 2:

I have the following in "waveProperties.input".

outletCoeffs
{
waveType potentialCurrent;
U ( 0 0 0 );
Tsoft 2;

relaxationZone
{
relaxationScheme Spatial;
relaxationShape Rectangular;
beachType Empty;
relaxType OUTLET;
startX (15 0.0 -1);
endX (20 0.0 1);
orientation (1.0 0.0 0.0);
}
}


When I run "setWaveParameters", the "outletCoeffs" is not written in "waveProperties" file.

Do you experience similar problem or is it just on my system?

Kind regards,
katakgoreng

# UPDATE :

Thanks Niels for pointing things out.
Bug 1 : Not a bug, additional control added by Niels.
Bug 2 : Not a bug, using file provided by Niels, the code run just fine. It could be that I made some typo error in the input file.

Last edited by katakgoreng; September 17, 2013 at 05:58.
katakgoreng is offline   Reply With Quote

Old   September 16, 2013, 11:59
Default
  #554
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi,

With respect to "bug 1", then it is not a bug, but a new feature for increased control of the irregular wave spectrum. I have also added the option of user-defined frequency cut-offs. The description has now been updated on the wiki.

With respect to "bug 2", then I do not experience those type of problems. I made a quick test on the attached waveProperties.input file. This test, however, made me realise that not all the new information on phasing, etc, is carried along in the writing process. This does not have any consequence for the results, as they are purely pre-processing parameters, but they would be nice to have for future reference. This will be added in a future revision.

Kind regards,

Niels

P.S. I was not allowed to upload files called *.input, so merely rename.
Attached Files
File Type: txt waveProperties.txt (1.8 KB, 36 views)
katakgoreng and zhan 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 online now   Reply With Quote

Old   September 16, 2013, 17:16
Default
  #555
New Member
 
Pietro Danilo Tomaselli
Join Date: Oct 2012
Location: Lyngby, DTU
Posts: 8
Rep Power: 4
kobelak is on a distinguished road
Hi guys,

first of all, thanks to Niels for this useful toolbox!

I am working on breaking waves. I would like to use waves2Foam coupled with LES turbulence model; I don't know if someone did/is doing/is going to do something similar.

For the moment, I'm using a RASModel in order to obtain the same results of section 3.3 of Niels' journal publication (Validation case for breaking waves - Wave Generation toolbox ... ; International Journal for Num. Methods in Fluids , 2011).

I haven't found any tutorial with a turbulence model different from laminar, so I would like to receive some suggestions/hints about the case set-up, such as:

- type of RAS turbulence model that I should use (k-omega I guess)
- boundary/initial conditions of k, epsilon or omega, nut...
- changes on fvSolution and fvSchemes files (I need to consider the new terms of the equations of the turbulence model);
- dimensions of the computational domain (length of the swash zone in particular) and mesh size.

I searched through this thread and I found that just Kumar (pag. 19) tried to do the same. Anyone else?

Thanks in advance

Danilo
kobelak is offline   Reply With Quote

Old   September 17, 2013, 06:14
Default
  #556
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi,

With respect to "bug 1", then it is not a bug, but a new feature for increased control of the irregular wave spectrum. I have also added the option of user-defined frequency cut-offs. The description has now been updated on the wiki.

With respect to "bug 2", then I do not experience those type of problems. I made a quick test on the attached waveProperties.input file. This test, however, made me realise that not all the new information on phasing, etc, is carried along in the writing process. This does not have any consequence for the results, as they are purely pre-processing parameters, but they would be nice to have for future reference. This will be added in a future revision.

Kind regards,

Niels

P.S. I was not allowed to upload files called *.input, so merely rename.
Hi Niels,

Thanks. Both are not bugs. Using the file that you provided, I managed to get the waveProperties just fine.

Currently, I'm running quite an extensive simulation. I'm interested in the post-processing result given by waves2Foam such as the free surface elevation. If I stop the simulation, how can I continue from the latestTime and concatenated the result into "surfaceElevation.dat" file?

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   September 17, 2013, 12:40
Default
  #557
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Merely use the post-processing utility postProcessWaves2Foam. As you can see in the below link, the concatenation of data files is supported.

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

The Wiki is not fully accurate on the functionalities in postProcessWaves2Foam, but the most important things are described and the rest should easily be understood from the source code.

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 online now   Reply With Quote

Old   September 18, 2013, 15:45
Default Update waves2Foam failed
  #558
Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 55
Rep Power: 5
keepfit is on a distinguished road
I just update the latest waves2Foam, but it failed: (on 32-bit Ubuntu 12.04)

Code:
/usr/bin/ld: error: --add-needed is not supported but is required for libOpenFOAM.so in /home/dao/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/lib/libfiniteVolume.so
collect2: ld returned 1 exit status
make: *** [/home/DAO/OpenFOAM/dao-2.1.1/platforms/linuxGccDPOpt/lib/libwaves2FoamSampling.so] Error 1
When I compiled the old version the same error remains, it's really weird. Did I miss something else?


Anyway I installed the latest version successfully on the laptop (64-bit Ubuntu 13.04). Is this new version only for 64-bit system?

Best,

David
keepfit is offline   Reply With Quote

Old   September 18, 2013, 17:13
Default
  #559
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi David,

The error message suggests that the problem lies with OpenFoam itself, since the error is related to libOpenFoam.so. I have never tried compiling waves2Foam on a 32 bit machine, but I have not deliberately put any restrictions into the code.

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 online now   Reply With Quote

Old   September 18, 2013, 17:34
Default
  #560
Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 55
Rep Power: 5
keepfit is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi David,

The error message suggests that the problem lies with OpenFoam itself, since the error is related to libOpenFoam.so. I have never tried compiling waves2Foam on a 32 bit machine, but I have not deliberately put any restrictions into the code.

Kind regards,

Niels
I will try reinstall the OF 2.1.1 again and see what happens.

Best

Edit: problem caused by Gnu gold ( binutils-gold package ). Uninstall it and use the the old Gnu ld, everything goes fine.

David

Last edited by keepfit; September 18, 2013 at 22:33.
keepfit 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 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 16:21.