|
[Sponsors] |
May 27, 2011, 05:55 |
GroovyBC for 2D wave flume!
|
#1 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi
My goal is to establish a 2D wave flume in OpenFOAM. As a start, I would try groovyBC for wave generation. I have downloaded groovyBC from the swak4Foam wiki page (http://openfoamwiki.net/index.php/Contrib/swak4Foam). I, then, aim to run the groovyWaveTank example from the Contrib groovyBC wiki page (http://openfoamwiki.net/index.php/Co...e_implemented:). I have installed bison (2.4.1) and flex. I have gcc ver 4.4.5. I work on Ubuntu 10.10 64bit. It seems I have compiled the library for the groovyBC successfully. I cannot find any ".so" file but as I run "wmake all" inside the swak4Foam directory I get a message that all .so files are up to date. As I run the script in ./copySwakFilesToSite.sh I get: .: 3: theFiles.sh: not found What does this error mean? Can I copy the ".o" files to /opt/openfoam171/lib/linux64GccDPOpt manually? Best regards, Hisham ElSafti |
|
May 30, 2011, 08:53 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
May 30, 2011, 09:24 |
|
#3 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi Bernhard,
I found the libraries after a "wmake all" in /home/<UserName>/lib/linux64GccDPOpt Is that enough for a user to include a library in the ControlDict? Or should I include a copy of the libraries somewhere else? I tried to run the groovyWaveTank example ... Due to different versions (I think) I changed gamma into alpha1 ... pd into p_rgh As I run interFoam (after blockMesh & setFields) I get: Reading field p_rgh Reading field alpha1 Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian --> FOAM FATAL IO ERROR: keyword cAlpha is undefined in dictionary "/home/numubuntu/ElSaftiOpenFoamRuns/groovyWaveTank/system/fvSolution::PISO" file: /home/numubuntu/ElSaftiOpenFoamRuns/groovyWaveTank/system/fvSolution::PISO from line 115 to line 126. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 395. FOAM exiting Please advise! |
|
May 30, 2011, 11:10 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Hisham
The solution is given by OF. It tells you that the parameter cAlpha is unknown in fvSolution in the sub-dictionary PISO. If you go into that file, you will find that the parameter is called cGamma. Make the appropriate changes to all gamma-parameters, and you should be able to run the case. Best regards Niels |
|
May 30, 2011, 12:20 |
|
#5 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi Niels
Thanks a lot for the tip. After some tedious modifications, the problem ran OK. Nevertheless, the output is not. Changing wave's amplitude (A) & length (l) do not change the output. Also the wave maker seems to fluctuate OK but the wave does not propagate ... strange https://picasaweb.google.com/1169016...28954537872258 Any ideas? Best regards, Hisham El Safti |
|
June 1, 2011, 11:35 |
|
#6 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi
Thanks a lot .. I figured it out ... For some reason the equation was written only in the alpha1 but not also in the U file ... I re-downloaded the case and it's OK. I have a question about using grrovyBC with turbulence models ... How does one define the boundaryField in the parameters files for turbulence models (e.g. the 'k' file for the LES model) Best regards, Hisham El Safti |
|
June 7, 2011, 08:02 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
August 1, 2011, 04:22 |
|
#8 | |
Member
bojiezhang
Join Date: Jan 2010
Posts: 64
Rep Power: 16 |
Quote:
Have you soloved the problem of using grrovyBC with turbulence models? I do not know how to set it, could you tell me something or send me your successful case? Thank you in advance! bojiezhang |
||
January 18, 2012, 06:44 |
groovyBC and some *.so errors
|
#9 |
New Member
Stefan
Join Date: Jan 2011
Location: Bremen
Posts: 20
Rep Power: 15 |
Hi Foamers,
I am currently installing swak4Foam in order to use groovyBC for some interFoam simulations. I installed OF in $HOME/OpenFOAM/OpenFOAM-1.7.1 and build the sources with $WM_PRECISION_OPTION=SP. I have Bison 2.5 and flex 2.5.35 installed. I downloaded the swak4Foam files into $HOME/pingu-1.7.1/applications/swak4Foam. I also included the swak4Foam_M_PI_patch for single precision support in this directory. ./Allwmake goes well. Libraries are in $HOME/OpenFOAM/pingu-1.7.1/lib/linux64GccSPOpt. Only SWAK_PYTHON_INCLUDE is not defined. Now, I would like to run a numerical wave tank using the interFoam solver, but I get the following error: PHP Code:
Best regards Stefan Last edited by holodeck10; January 18, 2012 at 07:08. |
|
January 18, 2012, 18:11 |
|
#10 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
January 18, 2012, 23:58 |
|
#11 |
New Member
Stefan
Join Date: Jan 2011
Location: Bremen
Posts: 20
Rep Power: 15 |
Hi Bernhard,
thanks for your hint! I replaced groovyBC with somethign else (could not find out what stock BC is, so I replaced it with some fixedValue and zeroGradient conditions). ...and the problem persists. It does not occur with double Precision. So, I guess my problem is not related to swak4Foam. I should add, that I previously ran the dambreak test case with single precision. It works well. In search for an indication where the error might lie I started from scratch. So far, I did not do blockMesh and setFields with the SP installation. I just took the cases as I prepared them with a DP installation. So, I switched back to DP and did the same as in SP. Here is a summary: 2D case: blockMesh with SP and DP: same warning PHP Code:
same error: PHP Code:
3D case: blockMesh in DP and SP: runs well checkMesh in DP: runs well checkMesh in SP: PHP Code:
I have no clue what to do next. Do you have a suggestion for me? Best regards Stefan Last edited by holodeck10; January 19, 2012 at 03:11. |
|
January 19, 2012, 20:03 |
|
#12 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
Apart from the obvious ("use ldd to check that you're not using a DP-library by accident") my only advice I can give you is to write a bug-report to the OpenCFD-Mantis. We've agreed that it is not a swak-issue and I don't have a SP-installation so I can't reproduce it Bernhard |
|||
January 19, 2012, 22:15 |
|
#13 |
New Member
Stefan
Join Date: Jan 2011
Location: Bremen
Posts: 20
Rep Power: 15 |
Thank you again Bernhard!
Beside realizing now what stock car racing is, I learnt to use ldd. Referring to your previous answer, I typed ldd $FOAM_LIBBIN/libfiniteVolume.so and got PHP Code:
I will wrote a bug report to mantis. While double-checking on the files I uploaded, I noticed something interesting: When I forget to "setFields", then the time loop is started correctly and the simulation seems to run normally ... Best regards Stefan Last edited by holodeck10; January 19, 2012 at 22:55. |
|
January 20, 2012, 06:04 |
|
#14 |
New Member
Stefan
Join Date: Jan 2011
Location: Bremen
Posts: 20
Rep Power: 15 |
Hi Bernhard,
fyi, this is the reason why the status of my bug report has been changed from "new" to "closed": "Transient complex physics problems should be run double precision; single precision is generally not sufficient to represent the important small changes and interactions going on in the system." i asked for some more details and here is then the final answer, which I will accept: "We cannot guarantee that VoF can be run single-precision and would recommend that you run interFoam double-precision. When we release OpenFOAM we first run the test-loop both double-precision and single-precision and while we require that all of the cases run double-precision some of the complex physics cases fail single-precision due to the limitations of this floating-point representation. We invest a fair amount of time testing and maintaning the single-precision operation of OpenFOAM and maybe for some cases under some conditions it would be possible to extend the range of applicability of this mode of operation by tuning stabilisation factors for example, or adding boundedness clipping ... However it is unlikely that this would work for VoF which is VERY sensitive to round-off error for cases with large density ratio." FYI, I will still try to use OF 2.1 and Ubuntu 10.10 to see how the result looks like in SP, hoping that in my case it may not be very good, but maybe good enough for my needs. Best regards Stefan Last edited by holodeck10; January 20, 2012 at 07:09. |
|
Tags |
groovybc, swak4foam, wave flume, wave tank |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[waves2Foam] Waves2Foam Related Topics | ngj | OpenFOAM Community Contributions | 660 | August 20, 2018 13:39 |
Outlet boundary condition for wave flume with interFoam solver | Arnoldinho | OpenFOAM | 9 | July 10, 2018 06:15 |
water depth descend in the numerical wave flume | G++ | FLOW-3D | 3 | April 23, 2015 11:09 |
wave dissipates through the flume | gxu2 | FLUENT | 0 | May 2, 2012 13:10 |
[swak4Foam] Wave generation with 1.7.x and groovyBC | nuovodna | OpenFOAM Community Contributions | 14 | September 14, 2010 06:31 |