# Waves2Foam Related Topics

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

 November 12, 2012, 11:39 #201 Member   Sagun Tripathi Join Date: Aug 2012 Location: Amherst, USA Posts: 78 Rep Power: 5 Hello Kevin, Thank you so much for your help. I wasn't following the correct procedure before but now the tutorial is up and running. On another note, I was wondering if you could offer me some advice. At the moment I am trying to simulate multi-phase laminar flow including the effect of waves over a rectangular column which is attached to the base of the tank in 2D ('x' and 'z' being the dimensions of interest). Eventually I hope to include the 'y' dimension too so that I can simulate the flow 'around' the object and not just 'over' it. I wanted to ask you if that's even possible with waves2Foam. From what I have been able to infer, previous research work in this field has been mostly focused on 2D simulations. Also, I am having difficulty in understand how to define the relaxation zones, especially their orientation and start and end points. It would be great if you could explain that to me too. Thanks, Sagun

 November 12, 2012, 12:28 #202 Senior Member   Kevin Smith Join Date: Mar 2009 Posts: 103 Rep Power: 8 Sagun, Sure, glad to hear you have the case running. Yes, waves2Foam does 3D cases just fine. The 3Dwaves tutorial case you asked about originally may have some things in common with the 3D case you want to run. If you haven't found it already, the waves2foam documentation is here - http://openfoamwiki.net/index.php/Contrib/waves2Foam . You can think of the relaxation zones as planes that are defined at the free surface near the inlet and outlet of the domain. The relaxation is applied explicitly in these zones. The orientation is the direction the waves are propagating along. If you want to visually check the zones, use the relaxationZoneLayout utility. Check out the wiki for more info. Kevin

 November 12, 2012, 12:35 #203 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Sagun, Kevin has given the whole story, however, I saw on another thread that you want to look at a submerged monopile. This can easily be done, and I can tell that some of my colleagues are doing it on a regular basis both under regular and irregular, co-directional incident waves. I believe you can find an example in the following references: Bredmose, H. and Jacobsen, N. G. (2010). Breaking Wave Impacts on Offshore Wind Turbine Foundations: Focused Wave Groups and CFD. Proceedings of the 29th ASME International Conference on Ocean, Offshore and Arctic Engineering, Shanghai, China, 3, 397-404 Paulsen, B. T., Bredmose, H. and Bingham, H. B. (2012). Accurate computation of wave loads on a bottom fixed circular cylinder. International Workshop on Water Waves and Floating Bodies, Copenhagen, Denmark (http://www.iwwwfb.org) Kind regards, Niels

 November 13, 2012, 12:01 #204 Member   Sagun Tripathi Join Date: Aug 2012 Location: Amherst, USA Posts: 78 Rep Power: 5 Thank you so much, both of you.

November 14, 2012, 13:03
#205
New Member

Marco Fitzner
Join Date: Nov 2012
Posts: 3
Rep Power: 5
Dear Niels,

I'm interested in simulating moving ships in waves. For this I have experiment with waveFoam, stokes waves and combinedWaves and all looks fine for me.

Now to simulate the movement of the ship I will add a constant velocity to the wave velovities in x-dir and move the wave generating boundary time dependent.
To realize this I have tryed to create a new waveType like stokesFirstFwd. I create new folders in waveTheories and setWaveProperties out of the existing folders for stokesFirst. After renaming all files and entries I modify the files file and compiled all with wmake libso. (I have tryed this method, because creating new BC's will working in this way) The compiling works fine but when I uses the new wavetype I get this message.

Quote:
 [1] --> FOAM FATAL ERROR: [1] Unknown wave theory type stokesFirstFwd .. [1] From function waveTheory::New(const word &, const fvMesh &) [1] in file waveTheories/waveTheory/newWaveTheory.C at line 68.
After this I checked the linux64GccDPOpt folder and there are no files generated for the new wavetype. Could it be that I have to modify the newWaveTheory.C too? I guess I do something wrong.

Thank you for this toolbox, it looks like a lot of work till keep this code going. (out of my limited view in programming)

Kind regards
Marco

 November 14, 2012, 15:33 #206 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Marco, It sounds as if you have done the right thing. I do not know about the missing object file in case you have actually renamed all the files. What about the lines including Code: ```defineTypeNameAndDebug(stokesFirst, 0); addToRunTimeSelectionTable(waveTheory, stokesFirst, dictionary);``` have you remembered to change the name there? Otherwise, you might have made a mistake in your Make/files file. This is all I can think of. / Niels

November 14, 2012, 16:18
#207
New Member

Marco Fitzner
Join Date: Nov 2012
Posts: 3
Rep Power: 5
Hi Niels,

I checked the files again, it seems to be ok. I modify the Make/files file in the main folder of wave2Foam were the waveTheories and relaxationZone folders are locaded. There I added only the two lines

Quote:
 \$(waveTheories)/\$(regular)/stokesFirstFwd/stokesFirstFwd.C \$(waveProp)/\$(regular)/stokesFirstFwdProperties/stokesFirstFwdProperties.C
did I miss something? Only to make it clear I didn't need to modify the newWaveTheory.C.

thanks again
Marco

 November 14, 2012, 17:14 #208 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Marco, You are doing the same thing, as I would have done in the case of adding a new wave theory. Could I get you to type "wclean all" in the waves2Foam-directory and then recompile everything. You could also see, if you are able to run setWaveParameters, and if this is successful, then the problem is only related to the waveTheory. Correct, you do not need to change newWaveTheory.C - this is the beauty of the runtime selection in OpenFoam, which I am benefiting from. / Niels

November 19, 2012, 14:17
waveFoam install
#209
New Member

ross
Join Date: Aug 2012
Posts: 16
Rep Power: 5
Dear Niels,

I have been getting this error in my log files for waveFoam.

Quote:
I am assuming I have made a mistake in the install however I have followed all the instructions on the wiki.
I have the OpenFoam version: 1.7.1.
Linux version: Ubuntu 12.04

Is there any other information that I should provide?
I have tried searching the forum, but I haven't managed to find any similar threads.

Thanks
Regards
Ross

 November 19, 2012, 14:57 #210 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Ross, Can you provide us with the output from the run of the Allwmake script in the waves2Foam directory. It seems that something went wrong during the compilation somewhere. Kind regards, Niels

November 19, 2012, 15:08
#211
New Member

ross
Join Date: Aug 2012
Posts: 16
Rep Power: 5
Hi Niels

I don't have a record of the first compilation of ./Allwmake so I compiled it again. I hope this is ok. If not I can uninstall and reinstall waves2Foam.

Quote:
 ross@ubuntu:~/waves2Foam\$ ./Allwmake | tee log '/home/ross/OpenFOAM/ross-1.7.1/lib/linux64GccDPOpt/libwaves2Foam.so' is up to date. ./Allwmake: line 47: cd: applications/solvers/solvers171: No such file or directory make[1]: Entering directory `/home/ross/waves2Foam/applications/utilities/misc' make[2]: Entering directory `/home/ross/waves2Foam/applications/utilities/misc/matlab' make[3]: Entering directory `/home/ross/waves2Foam/applications/utilities/misc/matlab/postprocessing' make[3]: Nothing to be done for `application'. make[3]: Leaving directory `/home/ross/waves2Foam/applications/utilities/misc/matlab/postprocessing' make[3]: Entering directory `/home/ross/waves2Foam/applications/utilities/misc/matlab/preprocessing' make[3]: Nothing to be done for `application'. make[3]: Leaving directory `/home/ross/waves2Foam/applications/utilities/misc/matlab/preprocessing' make[2]: Leaving directory `/home/ross/waves2Foam/applications/utilities/misc/matlab' make[1]: Leaving directory `/home/ross/waves2Foam/applications/utilities/misc' make[1]: Entering directory `/home/ross/waves2Foam/applications/utilities/postProcessing' make[2]: Entering directory `/home/ross/waves2Foam/applications/utilities/postProcessing/surfaceElevation' make[2]: `/home/ross/OpenFOAM/ross-1.7.1/applications/bin/linux64GccDPOpt/surfaceElevation' is up to date. make[2]: Leaving directory `/home/ross/waves2Foam/applications/utilities/postProcessing/surfaceElevation' make[1]: Leaving directory `/home/ross/waves2Foam/applications/utilities/postProcessing' make[1]: Entering directory `/home/ross/waves2Foam/applications/utilities/preProcessing' make[2]: Entering directory `/home/ross/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout' make[2]: `/home/ross/OpenFOAM/ross-1.7.1/applications/bin/linux64GccDPOpt/relaxationZoneLayout' is up to date. make[2]: Leaving directory `/home/ross/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout' make[2]: Entering directory `/home/ross/waves2Foam/applications/utilities/preProcessing/setWaveField' make[2]: `/home/ross/OpenFOAM/ross-1.7.1/applications/bin/linux64GccDPOpt/setWaveField' is up to date. make[2]: Leaving directory `/home/ross/waves2Foam/applications/utilities/preProcessing/setWaveField' make[2]: Entering directory `/home/ross/waves2Foam/applications/utilities/preProcessing/setWaveParameters' make[2]: `/home/ross/OpenFOAM/ross-1.7.1/applications/bin/linux64GccDPOpt/setWaveParameters' is up to date. make[2]: Leaving directory `/home/ross/waves2Foam/applications/utilities/preProcessing/setWaveParameters' make[1]: Leaving directory `/home/ross/waves2Foam/applications/utilities/preProcessing'

Regards
Ross

 November 19, 2012, 15:16 #212 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Ross It is me being unaware of the 1.7.1 version. Could you please test the following for me: 1. Go to waves2Foam/applications/solvers 2. Do in the command line: Code: ```cp -r solvers170 solvers171 cd solvers171 find ./ -name ".svn" | xargs rm -rf cd waveFoam wclean wmake``` This should make a clean directory accessible for the Allwmake script. The "find" command is for cleaning it for svn-related files. If everything compiles nicely, then please notify me, and I will make it a part of the repository. If it does not work, then you have to follow the instructions on the wiki on how to modify interFoam into waveFoam. Kind regards, Niels

November 19, 2012, 16:00
#213
New Member

ross
Join Date: Aug 2012
Posts: 16
Rep Power: 5
Hi Niels

No luck with that unfortunately.

I followed the wiki instructions to modify interFoam to WaveFoam but that didn't work either.

I got this result after wclean and wmake
Quote:
 ross@ubuntu:~/OpenFOAM/waveFoam\$ wclean all wclean ./ ross@ubuntu:~/OpenFOAM/waveFoam\$ wmake /bin/sh: 1: cannot open Replace: No such file SOURCE=waveFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -I/opt/openfoam171/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -DOFVERSION= -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c \$SOURCE -o Make/linux64GccDPOpt/waveFoam.o /bin/sh: 1: cannot open Replace: No such file make: *** [Make/linux64GccDPOpt/waveFoam.o] Error 2
Thanks

Ross

 November 19, 2012, 16:09 #214 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Ross, Please try to read the following line. This is incorrect Code: `-DOFVERSION= \` Replace it with Code: `-DOFVERSION=171 \` / Niels P.S. Wiki is updated, as it should read "the first three digits".

November 19, 2012, 16:16
#215
New Member

ross
Join Date: Aug 2012
Posts: 16
Rep Power: 5
Hi Niels

Sorry to bother you again. I know I am making silly mistakes. I haven't been using OpenFoam for very long.

I have got another error.

Quote:
 ross@ubuntu:~/OpenFOAM/waveFoam\$ wclean all wclean ./ ross@ubuntu:~/OpenFOAM/waveFoam\$ wmake Making dependency list for source file waveFoam.C could not open file relaxationZone.H for source file waveFoam.C could not open file readWaveProperties.H 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-40 -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -I/opt/openfoam171/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -DOFVERSION=171 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c \$SOURCE -o Make/linux64GccDPOpt/waveFoam.o waveFoam.C:47:28: fatal error: relaxationZone.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPOpt/waveFoam.o] Error 1
Thanks
Ross

 November 19, 2012, 16:23 #216 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 The line Code: `-I./../../../../src/lnInclude` is a relative path pointing to the waves2Foam/src/lnInclude directory. If you place the solver in another relative location, then this line has to be changed accordingly. The relative path assumes that you places the solver-directory in the same location as waveFoam for the other OF-versions. In your case Code: `waves2Foam/applications/solvers/solvers171` / Niels

 November 20, 2012, 14:15 #217 Senior Member   Kevin Smith Join Date: Mar 2009 Posts: 103 Rep Power: 8 Hi Niels, I noticed that when using the setWaveParameters utility, a temporary file called wavePropertiesTEMP is written to, then moved to waveProperties. This is usually fine, though if the Foam::mv( ) operation fails, the utility does not report that back to the user. It might be good to have some error handling there, to either throw a fatal error, or at least alert the user that moving the file failed. Kind regards, Kevin

 November 20, 2012, 14:43 #218 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Kevin True. Have you experienced that the move is not successful? This would be extremely unfortunate, since you would loose everything? Or is the temp file still preserved? One of my colleagues asked for a backup of the old waveProperties file, which will be added to the repository at some time. Kind regards, Niels

 November 20, 2012, 15:53 #219 Senior Member   Kevin Smith Join Date: Mar 2009 Posts: 103 Rep Power: 8 This happened recently while I was working inside a virtualbox VM, with the case residing in a host OS shared folder.. So I was doing something a bit out of the ordinary . The temp file remained after running the utility and the original waveProperties file was intact. Once I moved the case to a guest partition on the VM, everything worked fine. I've been using the *.org file pattern to keep the original wave file around. Kevin

 November 20, 2012, 16:40 #220 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,660 Rep Power: 25 Hi Kevin I see. It was a bit of a special operation, but it should nonetheless be supported. So, I am thinking aloud; would this work: 1. Read from a waveProperties.input file. This file contains the needed input parameters. 2. Run setWaveParameters and the file waveProperties is written (no move operation). 3. Setting of wave parameters is done, and the two files waveProperties.input and waveProperties are still in /constant. It makes sense to do it this way, especially when using e.g. irregular waves, then the waveProperties.input gives the possibility of a quick view on the parameters. Kind regards, Niels

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hjasak OpenFOAM 2 October 26, 2013 04:33 Roberthealy1 CFD-Wiki 6 August 23, 2007 17:58 Jonas Larsson Main CFD Forum 3 February 9, 2007 11:11 vivekanand CFX 0 October 27, 2004 05:17 Antonio Filippone Main CFD Forum 0 August 28, 1999 12:16

All times are GMT -4. The time now is 06:11.