CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Waves2Foam Related Topics

Register Blogs Community New Posts Updated Threads Search

Like Tree162Likes

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2012, 05:44
Default
  #181
New Member
 
John Peng
Join Date: Oct 2012
Location: NL
Posts: 7
Rep Power: 14
janepen is on a distinguished road
Hi, Niels,

Thanks for your information. I found that paper and also the equations to get the wave number. I guess wave number can be easily gotten by using setWaveParameters.

However, from your wiki, you mentioned the input of stokesfifth wave type requires a stokesdrift scale, which is unknown before getting the wave number.

So how can I do? just calculate the wave number by hand?

Thanks,





But the thing is that we


Quote:
Originally Posted by ngj View Post
Hi John

Yes, I have found out that I lack some information in the header files. Here is the reference:

Code:
@article{ ISI:A1985AEB7500005,
Author = {FENTON, JD},
Title = {{A 5TH-ORDER STOKES THEORY FOR STEADY WAVES}},
Journal = {{JOURNAL OF WATERWAY PORT COASTAL AND OCEAN ENGINEERING-ASCE}},
Year = {{1985}},
Volume = {{111}},
Number = {{2}},
Pages = {{216-234}},
Publisher = {{ASCE-AMER SOC CIVIL ENGINEERS}},
Address = {{345 E 47TH ST, NEW YORK, NY 10017-2398}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{FENTON, JD (Reprint Author), UNIV NEW S WALES,SCH MATH,KENSINGTON,NSW 2033,AUSTRALIA..}},
ISSN = {{0733-950X}},
Research-Areas = {{Engineering; Water Resources}},
Web-of-Science-Categories  = {{Engineering, Civil; Engineering, Ocean; Water Resources}},
Number-of-Cited-References = {{13}},
Times-Cited = {{134}},
Journal-ISO = {{J. Waterw. Port Coast. Ocean Eng.-ASCE}},
Doc-Delivery-Number = {{AEB75}},
Unique-ID = {{ISI:A1985AEB7500005}},
}
The code is all implemented in waves2Foam.

Kind regards,

Niels
janepen is offline  

Old   November 7, 2012, 09:05
Default
  #182
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi John,

Yes, you have to decide for a stokesDrift, since it is one equation with two unknowns. I believe the Fenton states that in the paper (or another one of his papers) that it the current field is unknown, then it does not make sense to go above 2nd order Stokes theory. However, if you are modelling a wave flume, you explicitly know that the stokes drift equals 0 (read: zero).

Kind regards,

Niels
ngj is offline  

Old   November 7, 2012, 13:23
Default
  #183
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello Niels,

I'm a beginner level user of waves2Foam and OpenFOAM in general. I was just trying to understand the file contents and structure of waveFoam by doing the waveFlume tutorial. However, whenever I try to run the waveFoam solver by typing in the command in the terminal window, I get the message - 'command not found'.

Does this mean that waves2Foam is not properly installed? Please help.

I'm using OpenFoam version 2.1.1 on Ubuntu 11.10.

Regards,
Sagun
Sagun is offline  

Old   November 7, 2012, 17:43
Default
  #184
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Sagun

I probably means that either (i) you have not loaded OpenFoam as such (and therefore also waves2Foam) or (ii) waves2Foam, and thus waveFoam, is not correctly installed.

Kind regards,

Niels
ngj is offline  

Old   November 7, 2012, 19:17
Default
  #185
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello Niels,

Thank you for your reply.

As far as the installation is concerned, I followed the procedure which is mentioned on the wiki-page. I now have a waves2Foam folder in my home folder with all the relevant files in it. Does that mean it is properly installed?

And I'm not sure if I understand properly what you meant by 'loading OpenFoam'.
Could you be kind enough to write down the steps necessary to run a case?

Regards,
Sagun
Sagun is offline  

Old   November 8, 2012, 01:36
Default
  #186
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

With respect to loading OpenFoam, then there is a description here:

http://www.openfoam.org/download/source.php

in the section "Setting Environmental Variables".

You are a bit unclear on what you have done for installing waves2Foam. Have you done anything besides getting the files from the SVN? I am asking, since you would also need to compile the library and the applications. This is done by executing the "Allwmake" script.

You could also try to run the tutorials in the UserGuide coming with OpenFoam. These tutorials only rely on a correct installation of OpenFoam, and it is generally a good place to start.

Kind regards,

Niels
ngj is offline  

Old   November 8, 2012, 06:48
Default
  #187
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello Niels, good morning to you too.

I'm quite certain that I have installed OpenFoam correctly since I have had no problems in running the tutorials which came along with the installation. I was only concerned about whether I had installed waves2Foam properly or not.

I did execute the wmake all command in the waves2Foam directory. However, as I mentioned earlier, the waves2Foam folder is located in my home directory instead of where the OpenFoam files are located (which is File System/opt/openfoam211). Is that the default location for the waves2Foam folder?

Also, is there any check that I could do to make sure that waves2Foam is properly installed? Maybe then I can post the terminal output here for you to see.

Thank you for your time.

Regards,
Sagun
Sagun is offline  

Old   November 8, 2012, 08:58
Default
  #188
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Sagun

Yes, please post the compilation information. I will be out of office for the next couple of days, but other users might be able to help you.

Do you use the most recent svn repository, since the waveFoam solvers were not added for 2.1 until recently (details on the Wiki). If not, do a "svn update" and recompile.

Kind regards,

Niels
ngj is offline  

Old   November 8, 2012, 09:05
Default
  #189
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello Niels,

I updated the svn and recompiled. Here is the output:

stripathi@iwpc178:~/waves2Foam$ svn up
Restored 'tutorials/waveFoam/waveFlume/0/p_rgh.org'
Restored 'tutorials/waveFoam/waveFlume/0/gamma.org'
Restored 'tutorials/waveFoam/waveFlume/0/pd.org'
Restored 'tutorials/waveFoam/waveFlume/0/U.org'
Restored 'tutorials/waveFoam/waveFlume/0/alpha1.org'
Restored 'tutorials/waveFoam/waveFlume/system/fvSchemes.21'
Restored 'tutorials/waveFoam/waveFlume/system/fvSolution.21'
Restored 'tutorials/waveFoam/waveFlume/constant/waveProperties.17'
At revision 1980.
stripathi@iwpc178:~/waves2Foam$ wmake all
'/home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/lib/libwaves2Foam.so' is up to date.
make[1]: Entering directory `/home/stripathi/waves2Foam/applications/solvers/solvers211/waveFoam'
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/transportModels -I/opt/openfoam211/src/transportModels/incompressible/lnInclude -I/opt/openfoam211/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/lnInclude -DOFVERSION=210 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/waveFoam.o -L/opt/openfoam211/platforms/linuxGccDPOpt/lib \
-ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -L/home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/bin/waveFoam
make[1]: Leaving directory `/home/stripathi/waves2Foam/applications/solvers/solvers211/waveFoam'
make[1]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/misc'
make[2]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/misc/matlab'
make[3]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/misc/matlab/postprocessing'
make[3]: Nothing to be done for `application'.
make[3]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/misc/matlab/postprocessing'
make[3]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/misc/matlab/preprocessing'
make[3]: Nothing to be done for `application'.
make[3]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/misc/matlab/preprocessing'
make[2]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/misc/matlab'
make[1]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/misc'
make[1]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/postProcessing'
make[2]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/postProcessing/surfaceElevation'
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/finiteVolume/lnInclude -I/opt/openfoam211/src/meshTools/lnInclude -I/opt/openfoam211/src/sampling/lnInclude -I/opt/openfoam211/src/lagrangian/basic/lnInclude -DOFVERSION=211 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/surfaceElevation.o -L/opt/openfoam211/platforms/linuxGccDPOpt/lib \
-lfiniteVolume -lmeshTools -lsampling -lsurfMesh -ltriSurface -llagrangian -L/home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/bin/surfaceElevation
make[2]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/postProcessing/surfaceElevation'
make[1]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/postProcessing'
make[1]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing'
make[2]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
make[2]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
make[2]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/finiteVolume/lnInclude -DOFVERSION=211 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/relaxationZoneLayout.o -L/opt/openfoam211/platforms/linuxGccDPOpt/lib \
-lfiniteVolume -L/home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/bin/relaxationZoneLayout
make[2]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout'
make[2]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/setWaveField'
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/finiteVolume/lnInclude -DOFVERSION=211 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/setWaveField.o -L/opt/openfoam211/platforms/linuxGccDPOpt/lib \
-lfiniteVolume -L/home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/bin/setWaveField
make[2]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/setWaveField'
make[2]: Entering directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=211 -I/opt/openfoam211/src/finiteVolume/lnInclude -I./../../../../src/lnInclude -I./../../../../src/lnInclude -I/usr/local/include -I/include -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/setWaveParameters.o -L/opt/openfoam211/platforms/linuxGccDPOpt/lib \
-lfiniteVolume -lgsl -lgslcblas -L/home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/stripathi/OpenFOAM/stripathi-2.1.1/platforms/linuxGccDPOpt/bin/setWaveParameters
make[2]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing/setWaveParameters'
make[1]: Leaving directory `/home/stripathi/waves2Foam/applications/utilities/preProcessing'


Do you see anything out of the ordinary?

Thanks and regards,
Sagun
Sagun is offline  

Old   November 8, 2012, 10:46
Default
  #190
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello,

I am not sure what I was doing wrong before but somehow it is working now. Thanks for all the help.

I was doing the 3Dwaves tutorial and I observed that you haven't specified the value of omega in the waveProperties file and the solver doesn't run without it.

What should I do about it?

Thanks,
Sagun
Sagun is offline  

Old   November 8, 2012, 11:08
Default
  #191
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17
kev4573 is on a distinguished road
I think you're supposed to see "___ is up to date" statements for each binary built. If the 'waveFoam' executable is not being built for some reason, try changing to the waveFoam directory and building from there; this might give you more information as to what is going wrong.

Kevin
kev4573 is offline  

Old   November 8, 2012, 11:18
Default
  #192
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello Kevin,

I'm not sure what I did but the 'waveFoam' executable eventually worked!
Thanks anyways for the comment.

Btw, have you done the 3Dwaves tutorial? The value of omega hasn't been specified in the waveProperties file which is required by the solver. I was wondering what should I do about it.

Thanks,
Sagun
Sagun is offline  

Old   November 8, 2012, 12:24
Default
  #193
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17
kev4573 is on a distinguished road
Are you using the "Allrun" script?

Setting omega should have been done by the setWaveParameters utility. If not check the log files for errors.
ngj likes this.
kev4573 is offline  

Old   November 10, 2012, 14:52
Default
  #194
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hello Kevin,

Sorry for the late reply. To answer your question, no, I'm not using the "Allrun" script. Actually, I don't even know what it is. I'm running these tutorial cases following the only procedure that I know of, i.e. blockMesh->checkMesh->waveFoam.

This is the output that I am getting when I run the solver:

Reading g

Reading waveProperties
Reading field p_rgh

Reading field alpha1



--> FOAM FATAL IO ERROR:
keyword omega is undefined in dictionary "/home/stripathi/waves2Foam/tutorials/waveFoam/3Dwaves/constant/waveProperties::inlet0Coeffs"

file: /home/stripathi/waves2Foam/tutorials/waveFoam/3Dwaves/constant/waveProperties::inlet0Coeffs from line 31 to line 47.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 400.

FOAM exiting


Kindly advise.

Thanks,
Sagun
Sagun is offline  

Old   November 10, 2012, 15:45
Default
  #195
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17
kev4573 is on a distinguished road
There should be a script called 'Allrun' in the case directory. Is that missing?
kev4573 is offline  

Old   November 12, 2012, 06:53
Default
  #196
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
No it isn't. Any idea what's wrong?
Sagun is offline  

Old   November 12, 2012, 10:21
Default
  #197
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17
kev4573 is on a distinguished road
Run the 'Allrun' script to run the tutorial, there are a few additional steps needed when using waves2Foam. In general the process is: blockMesh, setWaveParameters, setWaveField, waveFoam. Take a look through the Allrun script, that should hopefully clear up what you are doing wrong.

Also, many of the tutorials also do some additional preprocessing, which are not waves2foam specific, but are required to run the tutorial (copying version specific input files, creating internal face baffles).
alia likes this.
kev4573 is offline  

Old   November 12, 2012, 11:39
Default
  #198
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
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
Sagun is offline  

Old   November 12, 2012, 12:28
Default
  #199
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17
kev4573 is on a distinguished road
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
kev4573 is offline  

Old   November 12, 2012, 12:35
Default
  #200
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline  

Closed Thread


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:27.