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 Tree82Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 25, 2013, 11:45
Default
  #361
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
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   Reply With Quote

Old   April 25, 2013, 12:02
Default
  #362
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
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   Reply With Quote

Old   April 25, 2013, 12:22
Default
  #363
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
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   Reply With Quote

Old   April 25, 2013, 14:13
Default
  #364
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
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   Reply With Quote

Old   April 26, 2013, 05:25
Default
  #365
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
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   Reply With Quote

Old   April 26, 2013, 09:33
Default
  #366
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
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   Reply With Quote

Old   April 26, 2013, 10:22
Default
  #367
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
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   Reply With Quote

Old   April 26, 2013, 17:24
Default
  #368
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
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   Reply With Quote

Old   April 27, 2013, 02:13
Default
  #369
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
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   Reply With Quote

Old   April 29, 2013, 00:59
Default
  #370
Member
 
YS
Join Date: Jan 2010
Posts: 67
Rep Power: 7
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 03:11.
Ya_Squall2010 is offline   Reply With Quote

Old   April 29, 2013, 05:44
Default
  #371
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
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   Reply With Quote

Old   April 29, 2013, 09:05
Default
  #372
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
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   Reply With Quote

Old   April 29, 2013, 09:24
Default
  #373
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
Niels,

I have also discovered something. When I compile the "waveDyMFoam" and immediately after that if I try to run the solver in the same terminal window, then it runs pretty fine.

But if I close that terminal window and open a new one, then it gives the "waveDyMFoam: command not found" error when I try to run the solver.

I am really confused.

Kilroy
kilroy is offline   Reply With Quote

Old   April 29, 2013, 09:28
Default
  #374
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
If you do source OpenFoam each time you open a new terminal, then I cannot come up with an explanation for your problem, since you are having a successful compilation.

Kind regards

Niels
ngj is offline   Reply With Quote

Old   April 29, 2013, 09:38
Default
  #375
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
Niels,

Thank you very much. Is there anything looks unusual to you in the compilation log?

Kilroy.
kilroy is offline   Reply With Quote

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

I solved the problem. I was making the binary file in root bin so when I
open new terminal, I am not root any more! so I can not find binary file!
When I first run the command "sudo bash", then I start to be able to use "waveDyMFoam".

Thank you so much for your time and help,

Kilroy
kilroy is offline   Reply With Quote

Old   April 30, 2013, 00:39
Default
  #377
Member
 
YS
Join Date: Jan 2010
Posts: 67
Rep Power: 7
Ya_Squall2010 is on a distinguished road
Quote:
Originally Posted by ngj View Post
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
Hi Niels,

Many thanks for your comments. It would be a little difficult for us to find ananalytical expression of coupled waves+sheared current, as we have searched for long time and still got no clue. As to the third-party tools, could you them share with us some of them that you are aware of. I will then do some research. many thansk!

Best,
Ya_Squall2010 is offline   Reply With Quote

Old   April 30, 2013, 01:04
Default
  #378
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

I am unfortunately only aware of potential solver, i.e. without viscosity, and it is also one of these, which has already been coupled to waves2Foam. Unfortunately, the third-party software is to my knowledge closed source.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   April 30, 2013, 01:12
Default
  #379
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Kilroy,

You do not want to run your simulations as root. It is simply too dangerous in terms of you ending up deleting files of vital importance or similar scary things.

Instead: Compile waveDyMFoam, when you are logged in as your own user. This should be done by placing all of waves2Foam in your own directory rather than /opt/<ETC>/waves2Foam

Kind regards

Niels
ngj is offline   Reply With Quote

Old   April 30, 2013, 10:36
Default problem with compiling waveDyMFoam
  #380
New Member
 
Cathelain
Join Date: Apr 2013
Posts: 11
Rep Power: 4
mcathela is on a distinguished road
Dear all,

I have OF 2.2.0, I ran the waveFlume tutorial, no problem with waveFoam.
I tried to compile the waveDyMFoam solver using the wiki page, got this error:

openfoam@openfoam-VirtualBox:~/OpenFOAM/openfoam-2.2.0/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam$ wclean
openfoam@openfoam-VirtualBox:~/OpenFOAM/openfoam-2.2.0/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam$ wmake
linux64GccDPOpt/options:6: *** missing separator. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /home/openfoam/OpenFOAM/openfoam-2.2.0/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam

I saw on a previous post that the code -I..\ is the path for createFields.H which is placed in the waveFoam directory. I have a createFields.H in the waveFoam directory but no src/lnInclude (this one is in the waves2Foam directory). I am a bit lost...! Thank you for your help!

My options file is:
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)/dynamicFvMesh/lnInclude \
-I$./home/OpenFOAM/openfoam-2.2.0/waves2Foam/src/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

EXE_LIBS = \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lmeshTools \
-lfvOptions \
-lsampling
-L$(FOAM_USER_LIBBIN) \
-lwaves2Foam
mcathela 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 11: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 19:37.