CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Waves2Foam Related Topics

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

Like Tree162Likes

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2013, 13:57
Default
  #321
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Silvan,

I can reproduce it. I have a temporary correction that you should be able to use straight away, though it is a hack, so I will have to come up with a better solution, once I have figured out, if it can be done "neat".

Well, the reason is that as of 2.2 the separator in dictionaries are now '.' (a dot/full stop) rather than a ':' (colon). Therefore, my implementation crashes. I have made a quick look, but I cannot see that a full stop is implemented in the token class (~/src/OpenFoam/lnInclude/token.H), why a bit of hard-coding with pre-processor flags might be needed for cross-version compatibility.

Good. Not that this necessarily concern you, so here is the solution. Open the file waves2Foam/src/setWaveProperties/setWaveProperties.C and in the method called

Code:
void setWaveProperties::writeBeginning( Ostream & os)
you remove the line (this is very the colon comes into play)

Code:
word dictName( ends.components(':')[1] );
and put the following lines instead (and this is the full stop)

Code:
wordList subnames( ends.components('.') );
word dictName( subnames[ subnames.size() - 1] );
I have successfully compile and executed. Thanks for pointing this out.

Kind regards,

Niels
ngj is offline  

Old   April 9, 2013, 03:35
Default
  #322
New Member
 
Silvan Brändli
Join Date: Aug 2009
Posts: 27
Rep Power: 16
s_braendli is on a distinguished road
Hi Niels,

thanks a lot for your fast reply. it works for me as well.

Best regards
Silvan
s_braendli is offline  

Old   April 9, 2013, 04:59
Default
  #323
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good. Glad I could help.

/ Niels
ngj is offline  

Old   April 10, 2013, 03:41
Default
  #324
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
The static waves2Foam (http://www.student.dtu.dk/~ngja/waves2Foam.tar.gz) have been updated with a couple of bug-fixes. One of which is the one in the previous post. It has been resolved by

Code:
#if OFVERSION<220
    char delim(':');
#else
    char delim('.');
#endif

    wordList subnames( ends.components( delim ) );
    word dictName( subnames[ subnames.size() - 1] );
Kind regards

Niels
ngj is offline  

Old   April 11, 2013, 07:28
Default
  #325
New Member
 
Join Date: Apr 2011
Posts: 28
Rep Power: 15
pepe.aero is on a distinguished road
Hi Niels and all foamers,

I have discovered waves2Foam few days ago and I'm keenly interested in it. It seems to be a great toolbox and suits my needs.
Particularly in this phase of my work I'm interested understand fully the 3Dwaves tutorial. But if I try to run it on OpenFOAM 2.2.0 it reports the following error:

faceSet: command not found

It's clear that command faceSet is not present in my system. I've investigated a little bit and I've read that in the more recent versions of foam command faceSet is included into setSet (or maybe also topoSet ? ). Anyway, I was not be able to find a way to run the tutorial properly...so the question is: how to run the 3Dwaves tutorial on OF v2.2.0 ?

Thanks in advance for your support!

Regards,

Andrea
pepe.aero is offline  

Old   April 11, 2013, 08:08
Default
  #326
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Andrea,

Welcome to the waves2Foam part of cfd-online

Thanks for reporting the bug, I have made a note of it, though to be honest it might take me some time to figure out a solution, so if you come up with a solution please tell me.

Good luck

Niels

P.S. To begin with you can merely remove the addition of the internal structure in the Allrun script, i.e. the three lines related to the creation of the internal wall. In this way you can at least consider the waves in a 3 dimensional domain.
ngj is offline  

Old   April 11, 2013, 08:13
Default
  #327
New Member
 
Jan Löhrmann
Join Date: Sep 2010
Posts: 21
Rep Power: 15
JanL is on a distinguished road
Dear Niels,

in Post #105 / #106 you were discussing the specific terms for omega when using combinedWaves consisting of potentialCurrent and stokesFirst. Could you shed some light into it, if the encounter frequency or the cyclic frequency should be used?
I was playing around a bit and when I used the cyclic frequency, the resulting amplitude looked ok, but the wave was out of phase (obviously).
When using for "period" and "omega" the respective terms for encounter conditions the wave was in phase but now the amplitude dropped to approx half after leaving the relaxationZone. That could be, as you might have mentioned back then, because the dispersion relation of omega^2/k=g isn't valid anymore, as long as k isn't changed accordingly. But if I change k, then I wouldn't have the original wavelenght anymore!?
Am I missing something here???

Best regards
Jan

Last edited by wyldckat; December 28, 2013 at 07:56. Reason: updated the link to the other post, given the transfer of posts from the news thread
JanL is offline  

Old   April 11, 2013, 08:28
Default
  #328
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jan,

I was more making enquiries, since I was also in doubt myself, hence I cannot answer your question.

If I recall correctly, I suggested to use stream function waves instead, where you can directly specify the net current and get the correct frequencies and wave lengths.

Kind regards

Niels
ngj is offline  

Old   April 11, 2013, 09:05
Default
  #329
New Member
 
Join Date: Apr 2011
Posts: 28
Rep Power: 15
pepe.aero is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Andrea,

Welcome to the waves2Foam part of cfd-online

Thanks for reporting the bug, I have made a note of it, though to be honest it might take me some time to figure out a solution, so if you come up with a solution please tell me.

Good luck

Niels

P.S. To begin with you can merely remove the addition of the internal structure in the Allrun script, i.e. the three lines related to the creation of the internal wall. In this way you can at least consider the waves in a 3 dimensional domain.

Hi Niels,

thanks for your very quicky reply!
As you suggested I have removed from Allrun the 3 lines regarding the internal walls but a critical segmentation fault is reported when I tryed to execute setWaveParameters command:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


Reading g

Reading waveProperties


Constructing: stokesFirstProperties
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) in "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
#4 Foam::setWaveProperties::writeBeginning(Foam::Ostr eam&) in "/home/andrea/OpenFOAM/andrea-2.2.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so"
#5 Foam::stokesFirstProperties::set(Foam::Ostream&) in "/home/andrea/OpenFOAM/andrea-2.2.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so"
#6
in "/home/andrea/OpenFOAM/andrea-2.2.0/platforms/linux64GccDPOpt/bin/setWaveParameters"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8
in "/home/andrea/OpenFOAM/andrea-2.2.0/platforms/linux64GccDPOpt/bin/setWaveParameters"
Segmentation fault


Do you have any idea about the reason of this error looking to such an output?
Thanks for your support!

Regards,

Andrea
pepe.aero is offline  

Old   April 11, 2013, 10:03
Default
  #330
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Andrea

Please see above. The error should be corrected in the most recent and static version of waves2Foam.

/ Niels
ngj is offline  

Old   April 11, 2013, 11:54
Default
  #331
New Member
 
Join Date: Apr 2011
Posts: 28
Rep Power: 15
pepe.aero is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Andrea

Please see above. The error should be corrected in the most recent and static version of waves2Foam.

/ Niels

Thanks Niels,

as was for Silvan setWaveParameters is now working well.
Sorry for not having noticed the thread before. Anyway, thanks for the support.

Best,

Andrea
pepe.aero is offline  

Old   April 15, 2013, 05:32
Default
  #332
Member
 
Gregoire Junqua
Join Date: Jun 2011
Location: China
Posts: 58
Blog Entries: 1
Rep Power: 14
gregjunqua is on a distinguished road
Hi there i am beginning with with waves2Foam.
I got to do the compilation by myself. But when i do it it seems to don't have the repertory for the different script needed

Quote:
could not open file createFields.H for source file waveDyMFoam.C
could not open file alphaCourantNo.H for source file waveDyMFoam.C
could not open file alphaEqnSubCycle.H for source file waveDyMFoam.C
could not open file UEqn.H for source file waveDyMFoam.C
i guess it's in the options
so here is my options

Quote:
EXE_INC = \
-I.. \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$./home/gregoire/Program_file/openfoam/waves2Foam/src/lnInclude/ \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$./home/gregoire/Program_file/openfoam/waves2Foam/src \
-lwaves2Foam

EXE_LIBS = \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lmeshTools \
-lfvOptions \
-lsampling
I know it's the bolted line how make trouble i tried several form (I must tell you that i am not a pro in wmake). If you could help me
-I./../../../../../src/lnInclude

don't look like to work
gregjunqua is offline  

Old   April 15, 2013, 10:27
Default
  #333
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi,

You would need to provide us with some more information, e.g.:

- OF-version number?
- what do you want to achieve (waves2Foam is distributed with waveFoam)?
- where have you place waveDyMFoam relative to waveFoam?
- did the supported (downloaded) part of waves2Foam compile correctly?

Kind regards

Niels
ngj is offline  

Old   April 16, 2013, 03:19
Default
  #334
Member
 
Gregoire Junqua
Join Date: Jun 2011
Location: China
Posts: 58
Blog Entries: 1
Rep Power: 14
gregjunqua is on a distinguished road
Hi, Thank you for your fast answer.
I am working on wind wave interactions, and now i am searching some tools for doing it with openFoam. I had done some experiment with fixed bottom but i would like to have a better fit with true condition.
The original allwmake don't work i use oF 2.2.0
I used the tutorial located at
http://openfoamwiki.net/index.php/Contrib/waves2Foam



waveDyMFoam is at this location :
/home/gregoire/Program_file/openfoam/waves2Foam/applications/solvers/solvers220/waveFoam
the src of waves2foam is here :
/home/gregoire/Program_file/openfoam/waves2Foam/src/lnInclude

thank you

Last edited by wyldckat; December 28, 2013 at 07:57. Reason: fixed broken link
gregjunqua is offline  

Old   April 16, 2013, 04:21
Default
  #335
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
OK, first thing first.

Other users above have successfully compiled waves2Foam on OF220 with the standard Allwmake script, so could you elaborate on your problems?

Secondly, the line in your options file for waveDyMFoam, which looks like this

Code:
-I.. \
is the relative path for e.g. createFields.H, which is placed in the waveFoam directory. Make sure that this relative path is correctly defined.

Kind regards

Niels
ngj is offline  

Old   April 17, 2013, 01:37
Default
  #336
Member
 
Gregoire Junqua
Join Date: Jun 2011
Location: China
Posts: 58
Blog Entries: 1
Rep Power: 14
gregjunqua is on a distinguished road
Hi Niels

It appear that at the first try to install the library
libgsl0-dev
wasn't correctly installed.
Thank you for your help and time
gregjunqua is offline  

Old   April 17, 2013, 02:59
Default
  #337
Member
 
YS
Join Date: Jan 2010
Posts: 93
Rep Power: 16
Ya_Squall2010 is on a distinguished road
I am using waveFoam to resolve the divergent and transverse waves behind ship hull moving above a steady potential current (U=1 m/s). By following the tutorial case "squarepile", I used a circular domain with cylinder relaxationZone. As you can see from the static picture below, there's strong reflextion of waves travelling from wake to the water incoming direction. I need you kind help on how to reduce the unphysical reflexed waves. Many thanks!


reflextion.jpg
Ya_Squall2010 is offline  

Old   April 17, 2013, 04:44
Default
  #338
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi,

It does indeed seem that you have too much reflection. The best explanation I can come up with is the fact that your waves have a large angle to the relaxation zone. Both active absorption and passive relaxation zone techniques have problems with damping oblique waves.

I know it would be sort of cheating, but what if you combined a couple of relaxation shapes (you might need to add a new shape-type), so your domain or at least relaxation layout looks something like the attached figure. This would give you a normal incident wave field and might limit the amount of reflection.

Kind regards,

Niels

P.S. Your figure does nevertheless look good, and it was especially for your type of application that I made the shape run-time selectable; though I have never tested it myself.
Attached Images
File Type: png compDomain.png (5.6 KB, 20 views)
ngj is offline  

Old   April 22, 2013, 05:32
Default
  #339
Member
 
YS
Join Date: Jan 2010
Posts: 93
Rep Power: 16
Ya_Squall2010 is on a distinguished road
Hi, ngj,

Here's a quick update.

I managed to superimpose two circular relaxation zones as you suggested. Things are much better. I assume if impose an elliptical one at the wake region, the visible weak reflection in my simulation should be gone completely.

sigma.png

vof.jpg
ngj and sail like this.
Ya_Squall2010 is offline  

Old   April 24, 2013, 02:36
Default Monopile
  #340
New Member
 
Jonas Kastrup
Join Date: Apr 2013
Posts: 3
Rep Power: 13
josk is on a distinguished road
Hi Niels.

I am analyzing the force and overturning moment on a monopile at different wave configurations.

The wave setup is done with stream function theory with the settings:
  • Wave height 13 m.
  • Water depth 21 m.
  • Period 10 s.
  • Eulerian drift velocity 1.5 m/s.

The free surface has been resolved with 2x2x2m cells.

The attached picture of the wave is at time 48 s where there has been 4 waveruns through the domain. It flows from left to right and the white boxes show the location of the relaxation zones.
As you can see on the picture the initial stream function wave in the relaxation zone starts to break and lose energy when it has traveled one to two wavelengths.
Is the physics of this behavior correct?
I understand that we are close to the range of shallow water, but shouldn't it only be possible for the stream function to generate the wave if the wave height to water depth where below the wave breaking point?

I have measured the force and overturning moment on the monopile (see attached image). For info the monopile is fully rigid and not moving. There is these short duration spikes in the force and moment which arise due to the wave breaking on the monopile. Are these physically correct or is the second spike with larger duration a more valid maximum force/moment?

I hope you can help answer the questions.

/Jonas
Attached Images
File Type: jpg wave.jpg (14.2 KB, 95 views)
File Type: jpg force_moment.jpg (49.5 KB, 70 views)
josk is offline  

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
Re-Project topics protocol STAR-CCM+ 0 March 22, 2016 05:25
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 22:18
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 22:14
Error: "Cannot find file points" related to changing parallelized code to serial? Suyf OpenFOAM Running, Solving & CFD 0 February 12, 2015 04:31


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