CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Wave tank - what to do against the rising water? (https://www.cfd-online.com/Forums/openfoam-solving/96551-wave-tank-what-do-against-rising-water.html)

Leech January 25, 2012 12:01

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

Phicau January 25, 2012 12:33

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

Leech January 25, 2012 15:03

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

Phicau January 25, 2012 15:23

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

ngj January 26, 2012 04:07

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

ngj January 26, 2012 06:41

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

Leech January 26, 2012 09:44

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

ngj January 26, 2012 09:54

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

Leech January 26, 2012 16:06

Thank you Niels.
I'll try to get it compiled tomorrow and will tell about my progress here!

Phicau January 27, 2012 03:57

Quote:

Originally Posted by ngj (Post 341238)
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,

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

Leech January 27, 2012 04:45

Quote:

Originally Posted by ngj (Post 341304)
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

Hi,

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

ngj January 29, 2012 04:10

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

Leech January 29, 2012 10:39

Quote:

Originally Posted by ngj (Post 341700)
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


When i run the allwmake-script from waves2Foam i get the following:
Quote:

make[2]: *** [/opt/openfoam210/platforms/linux64GccDPOpt/bin/relaxationZoneLayout] Fehler 1
make[2]: Verlasse Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
make[1]: *** [relaxationZoneLayout] Fehler 2
make[2]: Betrete Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveField'
Making dependency list for source file setWaveField.C
could not open file readEnvironmentalProperties.H for source file setWaveField.C
make[2]: Verlasse Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveField'
make[2]: Betrete Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveField'
SOURCE=setWaveField.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/finiteVolume/lnInclude -DOFVERSION=21 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/setWaveField.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/finiteVolume/lnInclude -DOFVERSION=21 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/setWaveField.o -L/opt/openfoam210/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lwaves2Foam -lOpenFOAM -ldl -lm -o /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveField
/usr/bin/ld: cannot open output file /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveField: Permission denied
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [/opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveField] Fehler 1
make[2]: Verlasse Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveField'
make[1]: *** [setWaveField] Fehler 2
make[2]: Betrete Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
Making dependency list for source file setWaveParameters.C
could not open file readEnvironmentalProperties.H for source file setWaveParameters.C
make[2]: Verlasse Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
make[2]: Betrete Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
SOURCE=setWaveParameters.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=21 -I/opt/openfoam210/src/finiteVolume/lnInclude -I./../../../../src/lnInclude -I./../../../../src/lnInclude -I/usr/local/include -I/include -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/setWaveParameters.o
setWaveParameters.C: In Funktion »int main(int, char**)«:
setWaveParameters.C:108:31: Warnung: Der Rückgabewert von »int system(const char*)«, der mit dem Attribut warn_unused_result deklariert wurde, wird ignoriert [-Wunused-result]
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=21 -I/opt/openfoam210/src/finiteVolume/lnInclude -I./../../../../src/lnInclude -I./../../../../src/lnInclude -I/usr/local/include -I/include -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/setWaveParameters.o -L/opt/openfoam210/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lgsl -lgslcblas -lwaves2Foam -lOpenFOAM -ldl -lm -o /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveParameters
/usr/bin/ld: cannot open output file /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveParameters: Permission denied
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [/opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveParameters] Fehler 1
make[2]: Verlasse Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
make[1]: *** [setWaveParameters] Fehler 2
make[1]: Das Target »application« wurde wegen Fehlern nicht aktualisiert.
make[1]: Verlasse Verzeichnis '/home/mstrlnxwindows/waves2Foam/applications/utilities/preProcessing'
make: *** [preProcessing] Fehler 2
make: Das Target »application« wurde wegen Fehlern nicht aktualisiert.

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:

mstrlnxwindows@mstrlnxwindows-VirtualBox:~/waves2Foam$ wmake
SOURCE=waveDyMFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=<The first two digits in the OF-version number> -I./../../../../src/lnInclude -I/opt/openfoam210/src/transportModels -I/opt/openfoam210/src/transportModels/incompressible/lnInclude -I/opt/openfoam210/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam210/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam210/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveDyMFoam.o
/bin/sh: cannot open The: No such file
make: *** [Make/linux64GccDPOpt/waveDyMFoam.o] Fehler 2

Leech January 29, 2012 11:14

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:

/usr/bin/ld: cannot open output file /opt/openfoam210/platforms/linux64GccDPOpt/lib/libwaves2Foam.so: Permission denied
collect2: ld gab 1 als Ende-Status zurück
make: *** [/opt/openfoam210/platforms/linux64GccDPOpt/lib/libwaves2Foam.so] Fehler 1
./Allwmake: Zeile 43: cd: applications/solvers/solvers21: Datei oder Verzeichnis nicht gefunden
make[1]: Betrete Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/misc'
make[2]: Betrete Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/misc/matlab'
make[2]: Für das Ziel »application« ist nichts zu tun.
make[2]: Verlasse Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/misc/matlab'
make[1]: Verlasse Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/misc'
make[1]: Betrete Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing'
make[2]: Betrete Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/finiteVolume/lnInclude -DOFVERSION=21 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/relaxationZoneLayout.o -L/opt/openfoam210/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lwaves2Foam -lOpenFOAM -ldl -lm -o /opt/openfoam210/platforms/linux64GccDPOpt/bin/relaxationZoneLayout
/usr/bin/ld: cannot open output file /opt/openfoam210/platforms/linux64GccDPOpt/bin/relaxationZoneLayout: Permission denied
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [/opt/openfoam210/platforms/linux64GccDPOpt/bin/relaxationZoneLayout] Fehler 1
make[2]: Verlasse Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
make[1]: *** [relaxationZoneLayout] Fehler 2
make[2]: Betrete Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing/setWaveField'
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/finiteVolume/lnInclude -DOFVERSION=21 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/setWaveField.o -L/opt/openfoam210/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lwaves2Foam -lOpenFOAM -ldl -lm -o /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveField
/usr/bin/ld: cannot open output file /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveField: Permission denied
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [/opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveField] Fehler 1
make[2]: Verlasse Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing/setWaveField'
make[1]: *** [setWaveField] Fehler 2
make[2]: Betrete Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=21 -I/opt/openfoam210/src/finiteVolume/lnInclude -I./../../../../src/lnInclude -I./../../../../src/lnInclude -I/usr/local/include -I/include -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/setWaveParameters.o -L/opt/openfoam210/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lgsl -lgslcblas -lwaves2Foam -lOpenFOAM -ldl -lm -o /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveParameters
/usr/bin/ld: cannot open output file /opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveParameters: Permission denied
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [/opt/openfoam210/platforms/linux64GccDPOpt/bin/setWaveParameters] Fehler 1
make[2]: Verlasse Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
make[1]: *** [setWaveParameters] Fehler 2
make[1]: Das Target »application« wurde wegen Fehlern nicht aktualisiert.
make[1]: Verlasse Verzeichnis '/home/mstrlnx64/waves2Foam/applications/utilities/preProcessing'
make: *** [preProcessing] Fehler 2
make: Das Target »application« wurde wegen Fehlern nicht aktualisiert.


For me it looks like he isnt able to locate or create some files or libraries?

wyldckat January 29, 2012 11:55

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='
find . -name files | xargs sed -i -e 's=FOAM_APPBIN=FOAM_USER_APPBIN='

It will replace all entries that are causing the issues. Now try building it again :)

Best regards,
Bruno

Leech January 29, 2012 12:07

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?

ngj January 29, 2012 12:47

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
/home/ngj/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/libwaves2Foam.so
/home/ngj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libwaves2Foam.so

and

Code:

waves2Foam $ which libwaves2Foam.so
/home/ngj/OpenFOAM/ngj-1.6-ext/lib/linux64GccDPOpt/libwaves2Foam.so

With respect to the 'locate' command, the first library does not exist, whereas the 'which' finds the correct library. I am really confused, so I hope you are able to shed a light onto this.

Kind regards,

Niels

ngj January 29, 2012 13:04

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) \
-lwaves2Foam

instead of

Code:

-lwaves2Foam
Now it compiles. Enjoy the rest of your weekend :)

/ Niels

P.S. The SVN-repository for waves2Foam will be updated shortly.

ngj January 29, 2012 13:28

Hi Leech

Type

Code:

svn update
in the waves2Foam folder, and you will get the most recent version. Furthermore, in the application you are trying to compile, the line in Make/options

Code:

-DOFVERSION=<The first two digits in the OF-version number> \
should not read that explicitly, but you have to replace <...> by whatever you current version is; e.g. 2.0.1 gives
Code:

-DOFVERSION=20 \
and version 2.1.x gives
Code:

-DOFVERSION=21 \
Good luck

Niels

Leech January 29, 2012 16:46

Quote:

Originally Posted by ngj (Post 341762)
Hi Leech

Type

Code:

svn update
in the waves2Foam folder, and you will get the most recent version. Furthermore, in the application you are trying to compile, the line in Make/options

Code:

-DOFVERSION=<The first two digits in the OF-version number> \
should not read that explicitly, but you have to replace <...> by whatever you current version is; e.g. 2.0.1 gives
Code:

-DOFVERSION=20 \
and version 2.1.x gives
Code:

-DOFVERSION=21 \
Good luck

Niels

Thanks for your great support!
Wmake worked now :)
Now i got to get this solver compiled..

Leech January 29, 2012 17:08

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:

mstrlnx64@mstrlnx64-P5Q-DELUXE:~/waves2Foam/waveFoam$ ./Allwmake
+ wmake
linux64GccDPOpt/options:12: *** missing separator. Schluss.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /home/mstrlnx64/waves2Foam/waveFoam
+ wmake waveFoam
linux64GccDPOpt/options:12: *** missing separator. Schluss.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /home/mstrlnx64/waves2Foam/waveFoam
So i guess i messed something in changing the files? Or i changed the wmake-script wrong?
To show you how the files are changed i added them.

Thank you!

ngj January 30, 2012 04:14

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

Leech January 30, 2012 08:55

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:

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)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-DOFVERSION=21 \
-I./../../../../src/lnInclude \

EXE_LIBS = \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume \
-ldynamicMesh \
-lmeshTools \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-L$(FOAM_USER_LIBBIN) \
-lwaves2Foam
Are there still errors in it?

ngj January 30, 2012 10:21

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

Leech January 30, 2012 10:36

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.

?

ngj January 30, 2012 10:43

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

Leech January 30, 2012 13:50

The problem concerning g is solved. Still the error:

Quote:

~/waves2Foam/waveFoam$ ./Allwmake
+ wmake
Making dependency list for source file waveFoam.C
SOURCE=waveFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam210/src/transportModels -I/opt/openfoam210/src/transportModels/incompressible/lnInclude -I/opt/openfoam210/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam210/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/dynamicMesh/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/dynamicFvMesh/lnInclude -DOFVERSION=21 -I./../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveFoam.o
/opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H: In Funktion »int main(int, char**)«:
/opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H:38:8: Warnung: Variable »maxDeltaT« wird nicht verwendet [-Wunused-variable]
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam210/src/transportModels -I/opt/openfoam210/src/transportModels/incompressible/lnInclude -I/opt/openfoam210/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam210/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/dynamicMesh/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/dynamicFvMesh/lnInclude -DOFVERSION=21 -I./../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/waveFoam.o -L/opt/openfoam210/platforms/linux64GccDPOpt/lib \
-ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -ldynamicMesh -lmeshTools -ldynamicFvMesh -ltopoChangerFvMesh -L/home/mstrlnx64/OpenFOAM/mstrlnx64-2.1.0/platforms/linux64GccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/mstrlnx64/OpenFOAM/mstrlnx64-2.1.0/platforms/linux64GccDPOpt/bin/waveFoam
+ wmake waveFoam
g++ waveFoam.C -o waveFoam
waveFoam.C:35:19: schwerwiegender Fehler: fvCFD.H: Datei oder Verzeichnis nicht gefunden
Kompilierung beendet.
make: *** [waveFoam] Fehler 1
comes up. I looked for the fvCFD.H. It is located at /opt/openfoam210/src/finiteVolume/lnInclude
And as I understand it this location stands in the make/options file?

ngj January 30, 2012 16:48

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

Leech January 31, 2012 06:18

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:

+ wmake
Making dependency list for source file interFoam.C
SOURCE=interFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/transportModels -I/opt/openfoam200/src/transportModels/incompressible/lnInclude -I/opt/openfoam200/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam200/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam200/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/interFoam.o
/opt/openfoam200/src/finiteVolume/lnInclude/readTimeControls.H: In function ‘int main(int, char**)’:
/opt/openfoam200/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/transportModels -I/opt/openfoam200/src/transportModels/incompressible/lnInclude -I/opt/openfoam200/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam200/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam200/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linuxGccDPOpt/interFoam.o -L/opt/openfoam200/platforms/linuxGccDPOpt/lib \
-ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/ecoprototype/OpenFOAM/ecoprototype-2.0.0/platforms/linuxGccDPOpt/bin/interFoam
Make/linuxGccDPOpt/interFoam.o: In function `main':
interFoam.C:(.text.startup+0xb4c): undefined reference to `Foam::interfaceProperties::interfaceProperties(Fo am::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::IOdictionary const&)'
interFoam.C:(.text.startup+0x309b): undefined reference to `Foam::interfaceProperties::calculateK()'
collect2: ld returned 1 exit status
make: *** [/home/ecoprototype/OpenFOAM/ecoprototype-2.0.0/platforms/linuxGccDPOpt/bin/interFoam] Error 1
+ wmake interFoam
g++ interFoam.C -o interFoam
interFoam.C:40:19: fatal error: fvCFD.H: No such file or directory
compilation terminated.
make: *** [interFoam] Error 1
+ wmake interDyMFoam
Making dependency list for source file interDyMFoam.C
SOURCE=interDyMFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam200/src/transportModels -I/opt/openfoam200/src/transportModels/incompressible/lnInclude -I/opt/openfoam200/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam200/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam200/src/finiteVolume/lnInclude -I/opt/openfoam200/src/dynamicMesh/lnInclude -I/opt/openfoam200/src/meshTools/lnInclude -I/opt/openfoam200/src/dynamicFvMesh/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/interDyMFoam.o
/opt/openfoam200/src/finiteVolume/lnInclude/readTimeControls.H: In function ‘int main(int, char**)’:
/opt/openfoam200/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam200/src/transportModels -I/opt/openfoam200/src/transportModels/incompressible/lnInclude -I/opt/openfoam200/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam200/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam200/src/finiteVolume/lnInclude -I/opt/openfoam200/src/dynamicMesh/lnInclude -I/opt/openfoam200/src/meshTools/lnInclude -I/opt/openfoam200/src/dynamicFvMesh/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linuxGccDPOpt/interDyMFoam.o -L/opt/openfoam200/platforms/linuxGccDPOpt/lib \
-ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -ldynamicMesh -lmeshTools -ldynamicFvMesh -ltopoChangerFvMesh -lOpenFOAM -ldl -lm -o /opt/openfoam200/platforms/linuxGccDPOpt/bin/interDyMFoam
/usr/bin/ld: cannot open output file /opt/openfoam200/platforms/linuxGccDPOpt/bin/interDyMFoam: Permission denied
collect2: ld returned 1 exit status
make: *** [/opt/openfoam200/platforms/linuxGccDPOpt/bin/interDyMFoam] Error 1
The Allwmake script looks like this:

Quote:

wmake
wmake interFoam
wmake interDyMFoam
The line wmake interFoam was added by me.. Again it asks for fvCFD.H.
Confusing..

ngj January 31, 2012 07:31

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

Leech February 1, 2012 12:49

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

ngj February 2, 2012 03:32

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

lilinghan8 February 7, 2012 05:52

Quote:

Originally Posted by Leech (Post 342317)
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

Hi Leech,

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.