CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Waves2Foam Related Topics

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

Like Tree46Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   November 12, 2012, 10:39
Default
  #201
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
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   Reply With Quote

Old   November 12, 2012, 11:28
Default
  #202
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 7
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   Reply With Quote

Old   November 12, 2012, 11:35
Default
  #203
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
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   Reply With Quote

Old   November 13, 2012, 11:01
Default
  #204
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Thank you so much, both of you.
Sagun is offline   Reply With Quote

Old   November 14, 2012, 12:03
Default
  #205
mf.
New Member
 
Marco Fitzner
Join Date: Nov 2012
Posts: 3
Rep Power: 3
mf. is on a distinguished road
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
mf. is offline   Reply With Quote

Old   November 14, 2012, 14:33
Default
  #206
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   November 14, 2012, 15:18
Default
  #207
mf.
New Member
 
Marco Fitzner
Join Date: Nov 2012
Posts: 3
Rep Power: 3
mf. is on a distinguished road
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
mf. is offline   Reply With Quote

Old   November 14, 2012, 16:14
Default
  #208
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   November 19, 2012, 13:17
Default waveFoam install
  #209
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 4
rosswin is on a distinguished road
Dear Niels,

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

Quote:
/opt/openfoam171/bin/tools/RunFunctions: line 45: waveFoam: command not found
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
rosswin is offline   Reply With Quote

Old   November 19, 2012, 13:57
Default
  #210
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   November 19, 2012, 14:08
Default
  #211
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 4
rosswin is on a distinguished road
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'
Thank you for your help.

Regards
Ross
rosswin is offline   Reply With Quote

Old   November 19, 2012, 14:16
Default
  #212
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   November 19, 2012, 15:00
Default
  #213
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 4
rosswin is on a distinguished road
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=<Replace brackets with the first two digits in the OF-version number> -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
rosswin is offline   Reply With Quote

Old   November 19, 2012, 15:09
Default
  #214
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Ross,

Please try to read the following line. This is incorrect

Code:
-DOFVERSION=<Replace brackets with the first two digits in the OF-version number> \
Replace it with

Code:
-DOFVERSION=171 \
/ Niels

P.S. Wiki is updated, as it should read "the first three digits".
ngj is offline   Reply With Quote

Old   November 19, 2012, 15:16
Default
  #215
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 4
rosswin is on a distinguished road
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
rosswin is offline   Reply With Quote

Old   November 19, 2012, 15:23
Default
  #216
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   November 20, 2012, 13:15
Default
  #217
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 7
kev4573 is on a distinguished road
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
kev4573 is offline   Reply With Quote

Old   November 20, 2012, 13:43
Default
  #218
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   November 20, 2012, 14:53
Default
  #219
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 7
kev4573 is on a distinguished road
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
kev4573 is offline   Reply With Quote

Old   November 20, 2012, 15:40
Default
  #220
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,531
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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 <case>/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
ngj is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Other Topics at OpenFOAM Workshop Milan 2008 hjasak OpenFOAM 2 October 26, 2013 04:33
Sections / Topics in CFD Wiki Roberthealy1 CFD-Wiki 6 August 23, 2007 17:58
CFD Related Educational Programmes Jonas Larsson Main CFD Forum 3 February 9, 2007 10:11
project topics vivekanand CFX 0 October 27, 2004 05:17
Advanced Topics in Aerodynamics Antonio Filippone Main CFD Forum 0 August 28, 1999 12:16


All times are GMT -4. The time now is 15:53.