Wave tank - what to do against the rising water?
Hi,
i just played around with the groovyBC. I got a wave tank pretty similar to the old "groovyWaveTank" tutorial. But as the waves progress and the time goes by, alpha1 is injected and the water is beginning to rise in the tank.. What possibilities do i have to keep the water height almost constant but to still generate some waves? I guess ill need a tricky outletBC? Thanks! Greetings Leech |
Hi,
very true, this is the result of the net in-flux of water, due to the excess of mass in the wave crests. Active wave absorption linked with your generation BC is what you need. We are preparing to release a wave generation and absorption BC bundle, which I hope will be available as soon as some papers are accepted. Regards Pablo |
Hi Pablo,
thanks for your answer! Will this boundle be released with the OpenFOAM package or will it be extra? Where do i have to look to get it? Anyway: is there a way to realise this functionality with the OpenFOAM 2.1.0 release? (+ swak4foam) Thanks! Greets Leech |
Hello,
it is an external boundary condition, as for example GroovyBC, there is only the need to compile it and it is ready to go. Unfortunately it cannot be released yet. I will post it when it is ready, but some results will be posted in advance for sure, as soon as a couple of papers get accepted. I have never used swak4foam, I guess it is not capable of such a thing, as it must support water level measurement in front of the patch. Regards Pablo |
Hi Leech
There is another possibility, as I have recently released a wave generation/absorption toolbox into OpenFoam. You can find the necessary information here: http://openfoamwiki.net/index.php/Contrib/waves2Foam @Pablo: In stead of having two 'competing' software lines, we might consider working together on one common toolbox. If you are interested, feel free to contact me, when the release date approaches. Kind regards, Niels |
Hi Leech
To answer your question posed by email: Yes, waves2Foam does indeed work with interDymFoam, however, the solver is not distributed along with waves2Foam, thus you need to modify interDymFoam into e.g. waveDymFoam by following the description on the wiki. Kind regards, Niels |
Hi,
thanks again for your fast answer. Last 2 questions before i will try to get waveDyMFoam. (1) In the wiki is a section 3.2 (how to modify interFoam). I guess this is the routine ill have to follow, as the wmake-script only works with interFoam? (2) In the compatibility-section only Foams up to the version 1.7.1 are mentioned. Anyways i red threads of users how got Foam 2.0 working. And in section 3.2 is described the way for more recent Foam-versions. Can i use Foam 2.0.0 or 2.1.0 and follow 3.2 to get waveDyMFoam? If you dont know, as it is not official, do you know if somebody already tried is? Thank you! Greets Leech |
Ad. 1: Yes, follow the Wiki but use interDymFoam as baseline instead.
Ad. 2: It is not by me officially released for 2.0/2.1 as I have neither, but people can compile it without any problems as of SVN revision no. 1934. That is the reason I added the "How-To", so the users could make make waveFoam for themselves. - Niels |
Thank you Niels.
I'll try to get it compiled tomorrow and will tell about my progress here! |
Quote:
I've been talking to my boss and, when the time comes, we will be willing to collaborate between both departments. We'll keep in touch. Regards |
Quote:
i am actually trying to install wavesDyMFoam. I changed the interDyMFoam files the way it is described in the wiki. I got them in a folder. I installed GSL (the version that was mentioned in the README from the svn checkout). I checked out waves2foam 1935 by svn. Now i got the start the allwmake script? But how can it know were my modified interDyMFOam files are located? How do i get sure it is using these files? Thank you! Leech |
Hi
@Pablo: Great! Good luck with the review process. @Leech: I am not quite sure what you are asking, however, the step by step is: 1. Instal GSL (DONE!) 2. Download waves2Foam (DONE!) 3. Run the Allwmake-script. This will compile libraries and the utilities but not the solvers, soforth you are using 2.0/2.1. 4. Locate interDymFoam and copy all the solver-files to e.g. a folder in your waves2Foam-installation. 5. Change the files as listed on the wiki - including Make/options and Make/files, where especially the output name in Make/files should be changed to avoid overwriting the original interDymFoam. 6. Type wmake in the waveDymFoam folder. Good luck, Niels |
Quote:
When i run the allwmake-script from waves2Foam i get the following: Quote:
I guess it doesn't worked, problem is that the error messages aren't that clear to me.. Nonetheless i copied the changed files from interDyMFOam to the waves folder and tried to run the script and then i get the following: Quote:
|
I tried the whole procedure again on a fresh installed Kubuntu-machine.
1. I installed GSL libgsl0-dev (by sudo apt-get) 2. I cheked out waves2foam 3. i typed wmake all He got the same error message. When i try then to run the script again the following is printed: Quote:
For me it looks like he isnt able to locate or create some files or libraries? |
Greetings to all!
That's a simple mistake people tend to make when developing software for OpenFOAM: one should never make the packages build by default onto the main OpenFOAM library and application folders! Always use the "user" ones ;) namely "FOAM_USER_LIBBIN" and "FOAM_USER_APPBIN". Using the main folders sort-of implies that you are distributing the code along with the original code, which isn't the usual scenario. The fix should be quite simple... OK, first go into the master folder of the "waves2Foam" source code and then run this command: Code:
find . -name files | xargs sed -i -e 's=FOAM_LIBBIN=FOAM_USER_LIBBIN=' Best regards, Bruno |
Hi Bruno,
i runned your suggested commands directly in the waves2foam folder (means no subfolder). But it didnt help :( I still get the same error messages when running wmake all... Could it be a problem that i allready runned the script and it crashed? Do I need a complete fresh beginning? |
Hi Bruno
Thanks for your comment. You go directly into one of my TODO's, but I have up to now not been able to successfully compile waves2Foam with "USER". The strange thing is that even though $FOAM_USER_LIBBIN is present in both $PATH and $LD_LIBRARY_PATH, then I cannot successfully compile, as it complains over the missing library, which is placed in $FOAM_USER_LIBBIN. I do not know if the following help, but the status is: Code:
waves2Foam $ locate libwaves2Foam.so Code:
waves2Foam $ which libwaves2Foam.so Kind regards, Niels |
Hi Bruno and Leech
Problem solved - I had a look at the SVN-rep, and what I was missing is the following in the options file, as it should read Code:
-L$(FOAM_USER_LIBBIN) \ Code:
-lwaves2Foam / Niels P.S. The SVN-repository for waves2Foam will be updated shortly. |
Hi Leech
Type Code:
svn update Code:
-DOFVERSION=<The first two digits in the OF-version number> \ Code:
-DOFVERSION=20 \ Code:
-DOFVERSION=21 \ Niels |
Quote:
Wmake worked now :) Now i got to get this solver compiled.. |
1 Attachment(s)
I hope this is the last help in installing waveFoam i will need :(
I changed the interDyMFoam files as described in the wiki. I got them in a folder in the waves2Foam folder. But when i run wmake this happens: Quote:
To show you how the files are changed i added them. Thank you! |
Hi Leech
Two things appear to be missing: 1. In Make/files: Do not make the executable named waveFoam, unless you want to overwrite the non-meshmoving solver. Furthermore, place the executable in FOAM_USER_APPBIN instead of FOAM_APPBIN. 2. In Make/options: You are missing some '\' between the lines. You have added some lines, but wmake does not recognise them, as it does not understand that the line continues unless you add those seperators: '\'. Kind regards, Niels |
Sorry, i inserted the "\" as you mentioned. But still it cant compile as it says "cant find relaxationZone.H". So i guess there is still something wrong with the path. My make/options looks like that:
Quote:
|
Hi Leech
The line [CODE] -I./../../../../src/lnInclude \ [\CODE] lets the compiler search for all the files in waves2Foam/src/lnInclude relative to the location of the solver you are compiling. Thus, if you have placed your solver at a different level than the other solvers, then you have to add/remove some of the ../ to make it fit your choice in location relative to waves2Foam/src/lnInclude. Kind regards, Niels |
Hi,
the first part worked now. But it says at createFields.H that the variable g is undefined. Should i worry about that? And the bigger problem: It still can't find the fvCFD.H, allthough it is located at /finiteVolume/lnInclude? I found the .H there and in the options files is a line -I$(LIB_SRC)/finiteVolume/lnInclude. ? |
Hi Leech
I do not know about fvCFD.H, however, the problem with g is simply that you have not done explicitly as stated on the wiki. The two includes MUST be directly below initContinuityErrs.H and above createFields.H (the latter part has just been added). / Niels |
The problem concerning g is solved. Still the error:
Quote:
And as I understand it this location stands in the make/options file? |
Hi Leech
I am a bit lost about that error message, however, try to compile interDymFoam as it is into FOAM_USER_APPBIN. If you are not successful, this will tell a lot, and if you are successful, then try modifying interDymFoam as follows: 1. Only modify options to its final form, but leave *C *H untouched. 2. Add the line "#include "relaxationZone.H"" 3. Add the gravity-include and remove it in createFields.H 4. Add readWaveProperties.H 5. Add the construction of relaxing in createFields.H 6. Add the line relaxing.update(); Between each of these steps do make a compile and when the compilation start to fail, you know where the problem is. Please start from a completely new copy of interDymFoam in order to avoid any changes you might have done. The list above should compile in that order, as I see it. Good luck, Niels |
Hi Niels,
as u suggested i copied thi InterFoam source files to a new folder and tried to compile them to FOAM_USER_APPBIN. This is what i get: Quote:
Quote:
Confusing.. |
First of all: You are trying to compile interFoam twice, is that what you want? The compilation of interFoam crashes for some to me unknown reason, since using the OF files directly should not cause you problems.
Secondly: interDymFoam complains merely over missing permissions, so you have not changed the Make/files for interDymFoam, as it still tries to place it in $FOAM_APPBIN. I do not have a 2.1 version, so I am not able to reproduce what you are doing in this end. Kind regards, Niels |
Hi,
i do not know excatly what i did but i reached finally to compile waveDyMFoam. Which is nice, cause i finally can continue my work. Greets and thanks you so much for your time helping me to compile it, i know that helping linux-noobs isnt fun :) So, I hope that i get the waves working. Guess ill shure have some questions about them later :) Leech |
Congratulations - I hope that waves2Foam will prove useful for your research/consultancy. Please do not hesitate, in case you have suggestions for further improvements.
- Niels |
Quote:
Could you upload and let me have a look at your final waveDyMFoam file since I got the same problem as yours. Regrads, Lee |
All times are GMT -4. The time now is 23:16. |