|
[Sponsors] |
April 8, 2013, 14:57 |
|
#321 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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) Code:
word dictName( ends.components(':')[1] ); Code:
wordList subnames( ends.components('.') ); word dictName( subnames[ subnames.size() - 1] ); Kind regards, Niels |
|
April 9, 2013, 04:35 |
|
#322 |
New Member
Silvan Brändli
Join Date: Aug 2009
Posts: 27
Rep Power: 17 |
Hi Niels,
thanks a lot for your fast reply. it works for me as well. Best regards Silvan |
|
April 9, 2013, 05:59 |
|
#323 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good. Glad I could help.
/ Niels |
|
April 10, 2013, 04:41 |
|
#324 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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] ); Niels |
|
April 11, 2013, 08:28 |
|
#325 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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 |
|
April 11, 2013, 09:08 |
|
#326 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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. |
|
April 11, 2013, 09:13 |
|
#327 |
New Member
Jan Löhrmann
Join Date: Sep 2010
Posts: 21
Rep Power: 16 |
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 08:56. Reason: updated the link to the other post, given the transfer of posts from the news thread |
|
April 11, 2013, 09:28 |
|
#328 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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 |
|
April 11, 2013, 10:05 |
|
#329 | |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
Quote:
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 |
||
April 11, 2013, 11:03 |
|
#330 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Andrea
Please see above. The error should be corrected in the most recent and static version of waves2Foam. / Niels |
|
April 11, 2013, 12:54 |
|
#331 | |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
Quote:
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 |
||
April 15, 2013, 06:32 |
|
#332 | ||
Member
|
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:
so here is my options Quote:
-I./../../../../../src/lnInclude don't look like to work |
|||
April 15, 2013, 11:27 |
|
#333 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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 |
|
April 16, 2013, 04:19 |
|
#334 |
Member
|
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 08:57. Reason: fixed broken link |
|
April 16, 2013, 05:21 |
|
#335 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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.. \ Kind regards Niels |
|
April 17, 2013, 03:59 |
|
#337 |
Member
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16 |
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 |
|
April 17, 2013, 05:44 |
|
#338 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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. |
|
April 22, 2013, 06:32 |
|
#339 |
Member
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16 |
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 |
|
April 24, 2013, 03:36 |
Monopile
|
#340 |
New Member
Jonas Kastrup
Join Date: Apr 2013
Posts: 3
Rep Power: 13 |
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:
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 |
|
|
|
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 06:29 |
Re-Project topics | protocol | STAR-CCM+ | 0 | March 22, 2016 06:25 |
Waves2Foam Related Topics | seoseonguk | OpenFOAM Running, Solving & CFD | 0 | March 1, 2016 23:18 |
Waves2Foam Related Topics | seoseonguk | OpenFOAM Running, Solving & CFD | 0 | March 1, 2016 23:14 |
Error: "Cannot find file points" related to changing parallelized code to serial? | Suyf | OpenFOAM Running, Solving & CFD | 0 | February 12, 2015 05:31 |