# Waves2Foam Related Topics

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

 July 3, 2013, 12:22 energy dissipation with waveFlume simulation #381 New Member   Abdel Abdel Join Date: Jun 2013 Location: UE Posts: 4 Rep Power: 2 Hi everyone, currently, I'm running waveFlume with 10sec of creation of wave. However, I observe that my waves (StokesFirst model) disappear progressively. I think it's because of energy dissipation. waveProperties : timeShift 0.0; seaLevel 0.00; relaxationNames (); initializationName init; pName p_rgh; inletCoeffs { waveType stokesFirst; Tsoft 2; depth 0.700000; omega 7.853981634; phi 0.000000; waveNumber (6.283185307 0.0 0.0); height 0.05; initCoeffs { waveType potentialCurrent; U (0 0 0); Tsoft 2; }; I want to know if it is possible to suppress this phenomena. (I tryed to modify my equations in the src/waveTheory/regular/stokesFirst but without results .. maybe my waves are too short) Thank You in advance Kind regards, Abdel Last edited by Abdel; July 8, 2013 at 04:11. Reason: not complete

 July 4, 2013, 06:46 #382 New Member   Romain Euvrard Join Date: Jul 2013 Location: Saint-Nazaire, France Posts: 4 Rep Power: 2 To add to my post of yesterday, I have two problems : A-I can't run the tutorials in any other directory than in the one I installed waves2Foam. and I don't want to run the calculations in the opt/ directory. B-I can't run at all waveDyMFoam I installed using the wiki A- -it is only possible for me to run cases with waveFoam put in the directory I installed openFoam and waves2Foam. I presume this is linked to a call for files, but I am not able to find which ones : I modified all "./../../" in the Allmake files of the tutorials to go to the correct position, but, I think I made a mistake since It says : sh: 0: Can't open opt/openfoam211/applications/utilities/waves2Foam/bin/prepareCase.sh But the case runs for a few second (8 iterations, instead of the 200 asked), then crashed. The only error I found is "/opt/openfoam211/bin/tools/RunFunctions: ligne 47: faceSet : commande introuvable" in the "log.faceSet" file. B- -still unable ti run waveDyMFoam, I don't understand what I missed in the tutorial (well, if I knew the source of my problem, i would'nt be there). Could someone help me understanding what to do to install waveDyMFoam

 July 5, 2013, 05:43 #383 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 Hi Rye, Only the tutorials rely on a bash script, which makes the relative location to the waves2Foam installation directory very important. Simulations in general can be conducted in any directory. The bash-script ensures compatibility of the tutorials across a multiple of OF-versions. With respect to waveDyMFoam I hope that other users will help you, since I have not even written that particular part of the wiki. Kind regards Niels

 July 6, 2013, 06:06 #384 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 @Kumar: Sorry for the long wait, though I have not been able to see your movies until know (lack of internet). The only thing I can assume is that you are using a turbulence model without the density terms included. This leads to excessive diffusion of turbulence across the interface. Furthermore, as you know from my article, I get poor results for the wave breaking, when I am using an aspect ratio of anything but 1. Good luck Niels

 July 6, 2013, 22:46 Installing Waves2FOAM on OpenFOAM 2.2.0 and Ubuntu 13.04 #385 New Member   Masoud Hayatdavoodi Join Date: Sep 2012 Location: University of Hawaii Posts: 4 Rep Power: 3 Hi Niels and others, I am trying to install Waves2FOAM on a new machine which runs OpenFOAM 2.2.0 on an Ubuntu 13.04 OS machine (I've been enjoying using Waves2FOAM toolbox on my current system, which runs OpenFOAM 2.1.0 on Ubuntu 12.04 OS). OpenFOAM 2.2.0 is installed and runs with no problem. I am, however, running to issues with installing Waves2FOAM. After downloading the toolbox, and when I try ./Allwmake I receive the following error: FATAL ERROR. The directory path /applications/utilities/waves2Foam does not exist. Correct the path in bin/bashrc This error makes sense, as there is actually no such directory (there is no 'waves2Foam' under 'utilities')! I created an empty directory to see whether that would resolve anything, no luck! I thought it may matter where waves2Foam is being downloaded and installed. So I tried to install it under 'root' directory, and this time I receive the following similar error: FATAL ERROR. The directory path /root/OpenFOAM/root-2.2.0/applications/utilities/waves2Foam does not exist. Correct the path in bin/bashrc which, the error makes sense, again! As there is no directory called 'root-2.2.0', but instead 'OpenFOAM-2.2.0'! I do not understand why bashrc would look for 'root-2.2.0'. I am afraid whether the problem is how 'WAVES_DIR'=$WM_PROJECT_USER_DIR' in the bashrc file defined. I could not figure out how this variable is defined and/or how to modify it, if that is the problem. Any chance you would have an idea on what the problem is, and how can I fix it to install waves2Foam properly? Has anyone run to this issue? Any help is highly appreciated. Please let me know if more information is needed. Thank you, Masoud  July 7, 2013, 05:05 #386 Senior Member Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 Hi Massoud, All you need to do is to type the absolute path to the waves2Foam directory, so simply modify to Code: export WAVES_DIR= Kind regards Niels diadiadia2008 likes this.  July 7, 2013, 17:21 #387 Member kumar Join Date: Mar 2009 Posts: 98 Rep Power: 6 Hi Niels, Thank you very much for your reply and checking out the animation. I had modified the default incompressible k-omega model in OpenFOAM. In the default k-omega model, the density is not 'visible' since the coding is with viscosity/density. From you reply, it looks like this will not work and I need to bring density into the formulation. Am I correct ? And would modifying the 'compressible default kOmegaSST' be a good option? I believe that the wall functions that you used are not present by default in OpenFOAM. Did you make your own custom made wall function or did you implement them inside the turbulence model? ( perhaps by getting rid of omega_.boundaryField().updateCoeffs(); and setting the patches to the k, omega and nut values) Sorry I am asking you so many questions. Best regards Kumar July 7, 2013, 20:58 floatingObject with waves #388 New Member chris goody Join Date: Jan 2013 Location: Kaaawa, Hawaii Posts: 5 Rep Power: 2 Kilroy, in case you were not able to get the floatingObject with waves simulation to complete yet; I had it going successfully for the full 15 seconds a while back, so I've added a link to the compressed foam files. You can download them and compare with what you're using. Right off the bat, i noticed that your dynamicMeshDict is different by one line -- i don't have the line included in your file. Hope this helps... mahalo, chris https://www.dropbox.com/s/c9u7w57rs2...tWaves.org.zip Quote:  Originally Posted by kilroy I think I pin-point the problem. It is not because of the waves, it is because of the moving mesh. My original "dynamicMeshDict" file looks like below: Do you think playing with the value of "dynamicFvMesh" will work? Can you please give me some suggestions? Thank you very much for your help and time. Kilroy  July 9, 2013, 03:15 #389 New Member Masoud Hayatdavoodi Join Date: Sep 2012 Location: University of Hawaii Posts: 4 Rep Power: 3 Hi Niels, your solution worked well. Thank you very much for your quick response. Masoud  July 9, 2013, 03:32 #390 Senior Member Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 Good morning Rotto (and others), Please be aware that I updated the svn substantially this weekend, so you might want to do an update of your files. Kind regards Niels  July 11, 2013, 05:53 Waves2foam installation error #391 New Member srirao Join Date: May 2009 Posts: 5 Rep Power: 6 Hi Neils, I tried to install waves2Foam in my CAElinux 2011 syatem and I recived the ebelow error after I run the ./Allwmake in waves2Foam folder :~$ source /opt/.bashrc-OpenFOAM m:~$cd Desktop/waves2Foam/ m:~/Desktop/waves2Foam$ ./Allwmake ===================================== ENVIRONMENTAL VARIABLES ===================================== WAVES_XVERSION=0 WM_PROJECT_VERSION_NUMBER=201 WAVES_SOL=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam/applications/solvers/solvers201 WAVES_POST=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam/applications/utilities/postProcessing WAVES_UTIL=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam/applications/utilities EXTBRANCH=0 WAVES_APPBIN=/home/mvr/OpenFOAM/mvr-2.0.1/platforms/linux64GccDPOpt/bin WAVES_TUT=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam/tutorials WAVES_GSL_INCLUDE=/usr/include WAVES_GSL_LIB=/usr/lib64 WAVES_PRE=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam/applications/utilities/preProcessing WAVES_SRC=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam/src WAVES_DIR=/home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam WAVES_LIBBIN=/home/mvr/OpenFOAM/mvr-2.0.1/platforms/linux64GccDPOpt/lib FATAL ERROR. The directory path /home/mvr/OpenFOAM/mvr-2.0.1/applications/utilities/waves2Foam does not exist. Correct the path in bin/bashrc Please note that once bin/bashrc is created, bin/bashrc.org is only an inactive file. The latter is also the only of the two files, which is updated through the SVN-repository. EXITING In your earlier replies (reply to Masoud), you have suggested the below command export WAVES_DIR= Since I am new to linux and openFoam, please help me to solve this problem and guide me for proper installation. Thankyou very much. regards Sri

 July 12, 2013, 18:40 #392 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 Hi Sri, In your specific case it should read Code: export WAVES_DIR=$HOME/Desktop/waves2Foam Kind regards Niels sri_fmlab likes this. July 12, 2013, 19:11 #393 Senior Member Join Date: Mar 2013 Location: USA Posts: 117 Rep Power: 2 Quote:  Originally Posted by goodster Kilroy, in case you were not able to get the floatingObject with waves simulation to complete yet; I had it going successfully for the full 15 seconds a while back, so I've added a link to the compressed foam files. You can download them and compare with what you're using. Right off the bat, i noticed that your dynamicMeshDict is different by one line -- i don't have the line included in your file. Hope this helps... mahalo, chris https://www.dropbox.com/s/c9u7w57rs2...tWaves.org.zip Thanks Chris, I got my floating object fully working. I am using a completely different solver though. Kilroy  July 13, 2013, 07:14 #394 New Member srirao Join Date: May 2009 Posts: 5 Rep Power: 6 Hi Neils, Thank You very much. I successfully compiled the ./Allwmake. but under COMPILE SOLVERS it has shown the below message ========================== COMPILE SOLVERS ========================== ls: cannot access /...../solver201/*: No such file or directory Now, as you explained in wiki I am going to prepare application waveFoam from interFoam. Here, my doubt is where should I create waveFoam folder? because openfoam201 source folder is situated in /opt folder in CAELinux2011 and interFoam folder is situated like here given below \opt\openfoam201\applications\solver\multiphase\in twerFoam Kindly help me in this issue. Thank you. regards Sri  July 13, 2013, 09:08 #395 New Member srirao Join Date: May 2009 Posts: 5 Rep Power: 6 Hi Neils, Now I successfully compiled the waves2Foam toolbox. I also tried to couple waves2Foam with dynamic mesh. I followed the wiki tutorial carefully. Now I received the following error. mvr@mvr-laptop:~/waves2Foam/applications/solvers/solvers201/wavesFoam/waveDyMFoam$ wmake 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/openfoam201/src/transportModels -I/opt/openfoam201/src/transportModels/incompressible/lnInclude -I/opt/openfoam201/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam201/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/dynamicMesh/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude \ -I/opt/openfoam201/src/dynamicFvMesh/lnInclude -I./../../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveDyMFoam.o g++: -I/opt/openfoam201/src/dynamicFvMesh/lnInclude: No such file or directory waveDyMFoam.C:36:27: error: dynamicFvMesh.H: No such file or directory waveDyMFoam.C:51:37: error: createDynamicFvMesh.H: No such file or directory waveDyMFoam.C:107:39: error: meshCourantNo.H: No such file or directory In file included from waveDyMFoam.C:53: /opt/openfoam201/src/finiteVolume/lnInclude/readGravitationalAcceleration.H: In function ‘int main(int, char**)’: /opt/openfoam201/src/finiteVolume/lnInclude/readGravitationalAcceleration.H:8: error: ‘mesh’ was not declared in this scope /opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:38: warning: unused variable ‘maxDeltaT’ make: *** [Make/linux64GccDPOpt/waveDyMFoam.o] Error 1 mvr@mvr-laptop:~/waves2Foam/applications/solvers/solvers201/wavesFoam/waveDyMFoam$ Please help me. Kind regards Sri

July 13, 2013, 14:23
#396
New Member

chris goody
Join Date: Jan 2013
Location: Kaaawa, Hawaii
Posts: 5
Rep Power: 2
aloha Niels-
during the process of updating waves2Foam, i noticed in the updated svn that the solvers go from "solvers170" to "solvers210" -- are any of these compatible with OF 2.0.x?
mahalo,
chris

Quote:
 Originally Posted by ngj Good morning Rotto (and others), Please be aware that I updated the svn substantially this weekend, so you might want to do an update of your files. Kind regards Niels

 July 13, 2013, 15:25 #397 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 Hi Chris, I have never had a version 2.0, so I cannot answer that question. But. The libraries and file location seem to change between every version update, which means that the options-file changes every time. This makes it unlikely that the solvers can compile on 2.0.. The only advice I can give is to follow the (slightly outdated) guide on the wiki on how to modify interFoam into waveFoam. Kind regards Niels __________________ Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

 July 16, 2013, 03:20 #398 New Member   srirao Join Date: May 2009 Posts: 5 Rep Power: 6 Hi Niels, I am requesting your kind help. I am using CAELinux 2011 and my openFoam is situated in /opt/openfoam201. I have successfully compiled the Waves2Foam tool box and tried the tutorial waveFlume. Unfortunately I received the following error: Create mesh for time = 0 --> FOAM FATAL IO ERROR: cannot open file file: /home/mvr/waves2Foam/tutorials/waveFoam/3Dwaves/system/fvSchemes at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 87. FOAM exiting I also checked the Allrun file in waveFlume folder (as you suggested in earlier replies) but still I am receiving the same error. Please help me in resolving the error. Thank you Sri

 July 16, 2013, 13:15 #399 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Rotterdam, The Netherlands Posts: 1,376 Rep Power: 21 Hello, I have tried executing the Allrun script in the case 3Dwaves, and it runs smoothly. Do you execute the Allrun-script or do you simply type "blockMesh; waveFoam" in the command line? The latter procedure will generate the error you see. Kind regards Niels __________________ Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

July 19, 2013, 23:16
#400
Member

kumar
Join Date: Mar 2009
Posts: 98
Rep Power: 6
Quote:
 Originally Posted by ngj @Kumar: Sorry for the long wait, though I have not been able to see your movies until know (lack of internet). The only thing I can assume is that you are using a turbulence model without the density terms included. This leads to excessive diffusion of turbulence across the interface. Furthermore, as you know from my article, I get poor results for the wave breaking, when I am using an aspect ratio of anything but 1. Good luck Niels
Hi Niels,

I have to thank you for all the important pointers that you have given me. I was finally able to 'bring' the density term into the k omega model and it really improved the results. Please check out this video{http://youtu.be/l6pIlYbp9OY }.

I have a question about Equation 14. Let us say the near wall Unw is about 0.1 m/s (see for instance, Figure 11, H, AR=2), and the delY in this region are about 0.0002m. Then we can get nut negative (and very small), and this seems to be happening in my case. Did you have similar results? And I wonder if the negative value led you to call the eddy viscosity "artificial".

Best regards

Kumar

 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 05:33 Roberthealy1 CFD-Wiki 6 August 23, 2007 18:58 Jonas Larsson Main CFD Forum 3 February 9, 2007 11:11 vivekanand CFX 0 October 27, 2004 06:17 Antonio Filippone Main CFD Forum 0 August 28, 1999 13:16

All times are GMT -4. The time now is 01:59.