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   April 24, 2013, 04:55
Default
  #341
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 Jonas,

Not considering the current, you are more or less on the stability limit for waves, see e.g. any diagram for the validity range for mono-chromatic waves, which could be Fenton (1990), Nonlinear Wave Theories, chapter 1, in "From the Sea. Ideas and Observations on the Progress in the Study of the Seas". Wiley.

A co-directed current would probably stabilise the wave against breaking, whereas an opposing current would make the wave steeper, and thus lower the breaking criterion. But I am not sure.

Have you successfully run with smaller waves? And also, your domain is quite high compared to the "small" water depth.

Kind regards

Niels
ngj is offline  

Old   April 24, 2013, 06:07
Default
  #342
New Member
 
Jonas Kastrup
Join Date: Apr 2013
Posts: 3
Rep Power: 13
josk is on a distinguished road
Hi Niels.

My domain is high because I did not change it after I ran with higher waves.
Just for info, the current is co-directed.

I think I have to run some tests on smaller waveheights to find the breaking limit for this waterdepth combined with the current.

Do you have any idea why the force/moment peak is so high?
josk is offline  

Old   April 24, 2013, 14:01
Default
  #343
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 Jonas,

With respect to the peaks in the force history, then I suppose it is related to the wave breaking. I have seen almost sinusoidal force histories under non-breaking waves.

Do recall that the near surface kinematics under breaking waves do have very large (in excess of the propagation speed) velocities in the surface roller, so this will give rise to large forces of short duration relative to the wave period. In your case the propagation speed is some 15 m/s.

Kind regards

Niels
ngj is offline  

Old   April 24, 2013, 16:25
Default
  #344
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

Thank you very much for the waveFoam solver. I am not an expert on Linux and I am having some issues while modifying "interFoam" to "waveFoam". If you could help me with that, I would appreciate it.

I followed exactly the same steps described in the wiki and made the necessary changes to the waveFoam.C and other files (http://openfoamwiki.net/index.php/Co...m#Applications).

I am using OF v2.2.0. My "Make/files" file looks like below:

waveFoam.C

EXE = $(FOAM_USER_APPBIN)/waveFoam


And my "Make/options" file looks like below:

EXE_INC = \
-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)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-DOFVERSION=220 \
-I./../../../../src/lnInclude

EXE_LIBS = \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling \
-L$(FOAM_USER_LIBBIN) \
-lwaves2Foam


The path of the solver is below:

/opt/openfoam220/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam

After all those modifications that I described above, I go the directory where "waveFoam.C" is located and run "wmake". After that I get the error below:

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/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -DOFVERSION=220 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveFoam.o
waveFoam.C:48:28: fatal error: relaxationZone.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/waveFoam.o] Error 1


Can you please help me to solve that problem?

Thanks,

Kilroy
kilroy is offline  

Old   April 24, 2013, 16:34
Default
  #345
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 Kilroy,

Since you are using waves2Foam with 2.2.0., then waveFoam is distributed in the waves2Foam package. If you by change have an older version, delete it and download the most recent here:

http://www.student.dtu.dk/~ngja/waves2Foam.tar.gz

Once you execute the Allwmake script in the waves2Foam directory, everything should be compiled correctly (as long as you have the needed dependencies).

Kind regards and good luck

Niels
ngj is offline  

Old   April 24, 2013, 17:31
Default
  #346
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

Thank you very much for the reply.

I did as you have told me and removed the older versions of "waves2Foam" and downloaded the most recent one. I ran "Allwmake" and everything is completed without any errors.

But when I try to run the tutorials, I see a message like below in the terminal before the run of "blockMesh":

sh: ../../../bin/prepareCase.sh: No such file or directory

Then again i can not see any errors but the tutorials complete the analysis less then a second and I can not see any results. In the tutorials folder there is only the folder "0" after the analysis. It appears like the mesh is generated but the solver is not running for some reason.

Thank you very much for your time,

Kilroy
kilroy is offline  

Old   April 25, 2013, 02:36
Default
  #347
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 Kilroy,

Good that you now have a compiled waves2Foam.

With respect to the tutorial, which one are you running? Or is the problem related to all of the tutorials?

If you are standing in the non-working tutorial and do

Code:
cd ../../../bin/
then you should be able to locate prepareCase.sh, which your system claims not to be able to find. If this is working, we probably need a bit of diagnostics, i.e. what is your operating system, what version, etc.

Kind regards,

Niels
ngj is offline  

Old   April 25, 2013, 11:04
Default
  #348
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Good morning Niels,

I searched for my "prepareCase.sh" file and found it. Then I applied the changes in there manually and now all my tutorial cases are working.

But I have a question. I am sorry about my lack of knowledge of Linux. My "prepareCase.sh" file is located in:

/opt/openfoam220/applications/solvers/waves2Foam/bin

To be able to make the "prepareCase.sh" file work automatically how should I modify the line below?

cd ../../../bin/

What does "../" mean? And how many of "../"s should I put in front of the "/bin" to make "prepareCase.sh" file work automatically?

By the way, my operating system is ubuntu 12.04 LTS

Thank you very much,

Kilroy

Last edited by kilroy; April 25, 2013 at 11:24.
kilroy is offline  

Old   April 25, 2013, 12:45
Default
  #349
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 Kilroy,

This hardly makes any sense. I tested it this morning on my own computer (running Ubuntu 10.04LTS) and there were no problems at all.

We are running the same version of the source code, though with a difference in the operating system. Are there someone out there, who have experienced the same problems? Have you resolved it? How?

Kind regards

Niels

P.S.
Code:
cd ../
means that you go one directory up, so

Code:
cd ../../../bin
means that you go three directories up and down again into the directory called "bin".
ngj is offline  

Old   April 25, 2013, 13:02
Default
  #350
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

I think I understand the problem now I copied all my tutorials to a completely different folder:

/home/Alpha/OpenFOAM/Kilroy-2.2.0/tutorials/waves2Foam/tutorials/waves2Foam/tutorials/waveFoam/squarePile

The linux-shell is trying to find the "prepareCase.sh" file in a bin folder which is located in my copied waves2Foam folder. Since I didn't copy anything but tutorials, it couldn't find the file and nothing works.

I will just modify that linux-shell code or just move the "prepareCase.sh" file to an appropriate location.

Thank you so much for your help and again sorry for being a Linux noob,

Kilroy
kilroy is offline  

Old   April 25, 2013, 13:22
Default
  #351
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 Kilroy

Pheew! This is really comforting, because I thought something fundamentally weird had happened between the two versions.

Your approach do work at the moment, however, as soon as the svn (http://en.wikipedia.org/wiki/Apache_Subversion) is up and running again, all modifications to the source code can be accessed through this, however, the svn will complain, if you move the different folders around.

As a simple example: If I add a new tutorial, or change the layout of the different directories, then you should not have made any few changes to the structure of waves2Foam, if you want the svn to work smoothly.

Kind regards

Niels
ngj is offline  

Old   April 25, 2013, 15:13
Default
  #352
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

Then I guess it is better for me to do everything manually like I did before

Or I can just run the tutorials from their original folder.

Thank you so much!

Kilroy
kilroy is offline  

Old   April 26, 2013, 06:25
Default
  #353
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 Kilroy,

Yes, exactly:
Quote:
Or I can just run the tutorials from their original folder.
Kind regards

Niels
ngj is offline  

Old   April 26, 2013, 10:33
Default
  #354
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
And to come with a small follow-up on the prepareCase.sh script.

This script allows for easy cross-version compatibility, so as you have settled on version 2.2, then you could merely execute the tutorials once in the original location, and afterwards copy the tutorials to another place and change whatever you like.
After the initial adaptation to your OF-version, then you should be able to run without the prepareCase.sh in your Allrun-script.

I hope this clarified things a bit.

All the best,

Niels
ngj is offline  

Old   April 26, 2013, 11:22
Default
  #355
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

I looked into the "prepareCase.sh" file and paid attention to the details. Now I understand how it makes the tutorials cross-version compatible.

The best way would be like you said, running the tutorials once in their original place, then copying them to another location if needed.

Thank you so much, I am running the tutorials right now and "waveFoam" looks like an excellent tool for my purpose.

After that I will try to compile waveDyMFoam, I will let you know if I encounter any problems.

Do you have any suggestions to how to do that?

Do you think the best way would be following the directions in the wiki? (http://openfoamwiki.net/index.php/Contrib/waves2Foam)

Kilroy
kilroy is offline  

Old   April 26, 2013, 18:24
Default
  #356
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

Right now I am having problems with waveDyMFoam

I followed the steps described in the wiki and the solver compiled without any errors. But right now when I try to run the waveDyMFoam. I get the error below:

waveDyMFoam: command not found

What else do you think I should do?

Thank you very much for your time and help,

Kilroy
kilroy is offline  

Old   April 27, 2013, 03:13
Default
  #357
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 Kilroy,

Please post the compilation log here, i.e. the text which is written to the screen, when you execute wmake.

Kind regards

Niels
ngj is offline  

Old   April 29, 2013, 01:59
Default
  #358
Member
 
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16
Ya_Squall2010 is on a distinguished road
Hi ngj,

With regards to the current generation, I am aware of the fact that wave2Foam is able to generate potential current + waves with a minor change of the code. Due to the project needs, I am keen to know the possibility of implementing more realistic wave + current with shear profile. It would be much appreciated if you could shed a light on this topic. Many thanks!

Regards,

Last edited by Ya_Squall2010; April 29, 2013 at 04:11.
Ya_Squall2010 is offline  

Old   April 29, 2013, 06:44
Default
  #359
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,

Yes, you can easily make another waveType, e.g. with waves and sheared current. You either need (i) an analytical expression for your combined waves and current, or (ii) you would need to couple with a simpler numerical model, which can act as a boundary condition.

ad i: Make a copy of one of the waveTheories and implement your analytical expressions.

ad ii: This requires that you link OpenFoam and some third-party software. It is no problem and has already been done (also in the context of waves2Foam). A couple of details, which you should be aware of:

- If the third-party tool is complex/computational heavy, make sure that you only initialise the solver once, even though it is used on multiple relaxation zones.
- You should sit down and think about parallel computing. Could you settle with multiple serial runs of the third-party tool, otherwise you should ensure that the decomposition of the domains in OF and third-party are the same.

Good luck,

Niels
ngj is offline  

Old   April 29, 2013, 10:05
Default
  #360
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Niels,

You can see the compilation log below:

root@meta-5:/opt/openfoam220/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam# wmake
Making dependency list for source file waveDyMFoam.C
SOURCE=waveDyMFoam.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/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/dynamicFvMesh/lnInclude -I./../../../../../src/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveDyMFoam.o
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H: In function ‘int main(int, char**)’:
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-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/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/dynamicFvMesh/lnInclude -I./../../../../../src/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/waveDyMFoam.o -L/opt/openfoam220/platforms/linux64GccDPOpt/lib \
-linterfaceProperties -ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -ldynamicMesh -ldynamicFvMesh -ltopoChangerFvMesh -lmeshTools -lfvOptions -lsampling -L/home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin/waveDyMFoam
root@meta-5:/opt/openfoam220/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam#


Thank you very much.

Kilroy
kilroy 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 07:13.