CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Waves2Foam Related Topics

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

Like Tree49Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   November 12, 2013, 09:39
Default
  #621
New Member
 
Ed Ransley
Join Date: Jul 2012
Posts: 29
Rep Power: 4
Ed R is on a distinguished road
Dear Prasad,

When using the Stokes Second order wave type there is an option called 'debug' which (I think) gives you information about the quality of the stokes second approximation based on the wave properties you have asked for. This is a Boolean function which requires a true or false value. The reason for your error message is that you have not entered either. Try this

...
inlet1Coeffs
{

waveType stokesSecond;
depth 1.2;
period 1.13;
direction ( 1 0 0 );
phi 0;
height 0.35;
waveNumber (2.07997395 0 0);
omega 0.884956;
debug true;

....

Ed
Ed R is offline   Reply With Quote

Old   November 12, 2013, 10:22
Default
  #622
New Member
 
Prasad
Join Date: Oct 2013
Posts: 11
Rep Power: 3
mprasad is on a distinguished road
Dear Ed,

It worked! Had to tweak my waveheight value to obey second order navier stokes.

Thank you for your help.

Regards,
Prasad
mprasad is offline   Reply With Quote

Old   November 12, 2013, 11:14
Default TO install waves2Foam
  #623
New Member
 
Ji
Join Date: Oct 2013
Posts: 3
Rep Power: 3
aisy is on a distinguished road
Hi,
I want to install waves2Foam in OF221,but I am failed, it shows that

=====================================
COMPILE LIBRARY
=====================================
./Allwmake: line 29: wmake: command not found
./Allwmake: line 30: wmake: command not found
./Allwmake: line 31: wmake: command not found

=====================================
COMPILE SOLVERS
=====================================
ls: cannot access /home/jxr/OpenFOAM/waves2Foam/applications/solvers/solvers0/*: No such file or directory

=====================================
COMPILE PRE-PROCESSING
=====================================
./Allwmake: line 69: wmake: command not found

=====================================
COMPILE POST-PROCESSING
=====================================
./Allwmake: line 85: wmake: command not found

=====================================
COMPILATION DONE

WHO can tell me what should I do
Thanks
aisy is offline   Reply With Quote

Old   November 13, 2013, 09:57
Default
  #624
New Member
 
Hf
Join Date: Nov 2012
Posts: 22
Rep Power: 4
jasonchen is on a distinguished road
Quote:
Originally Posted by aisy View Post
Hi,
I want to install waves2Foam in OF221,but I am failed, it shows that

=====================================
COMPILE LIBRARY
=====================================
./Allwmake: line 29: wmake: command not found
./Allwmake: line 30: wmake: command not found
./Allwmake: line 31: wmake: command not found
Just a little note: try to add before wherever Allwmake appears
bash ./Allwmake
jasonchen is offline   Reply With Quote

Old   November 13, 2013, 12:52
Default
  #625
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Good evening,

I will try to address the questions below:

@Ed: Do you only experience this type of behaviour with the mixedType boundary condition, or is it the same if you use the focusing functionality in the irregular wave field? I have never noted these large velocities, so I am a bit at a loss.

@Maryam: waves2Foam only corrects the velocities in the relaxation zone, so the inner domain is left unaltered. From a code point of view, it should be possible to combine compressibleInterFoam with waves2Foam, but I do not have sufficient knowledge in compressible flow solutions to say, whether it will run (robustly).

@Aisy: You need to source OpenFoam, before you are compiling. I suspect this to be the issue, as it does not even recognize the OpenFoam make function: wmake.

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.
ngj is offline   Reply With Quote

Old   November 14, 2013, 10:54
Default
  #626
Member
 
Join Date: Dec 2009
Posts: 38
Rep Power: 6
katakgoreng is on a distinguished road
Quote:
Originally Posted by ngj View Post
Good morning Katakgoreng,

Yes, I am using Eclipse. It works quite nicely for something like development of new libraries, however, I have not been successful (and have hardly tried) in getting the auto-completion working within the solvers.

Good luck,

Niels
Hi Niels,

I have tried using Eclipse but abandoned it half way as I can't get auto-completion working. Currently I'm using Qt Creator, auto-completion work just fine. I'm new to c++, so getting the auto-completion working really help a lot. You should give it a try.



Kind regards,
katakgoreng
ngj likes this.
katakgoreng is offline   Reply With Quote

Old   November 14, 2013, 12:38
Default
  #627
New Member
 
Ed Ransley
Join Date: Jul 2012
Posts: 29
Rep Power: 4
Ed R is on a distinguished road
Hi Niels,

Thanks for the reply. I have not used the irregular wave focusing method but a quick experiment with a steep stream function (5th order and shallow water - T=14.3s, H=1m, 2m depth, 1m of air phase) and I can get similar behaviour (slightly less but still exists). I believe it is because the pattern of air flow over the wave is disrupted at the inlet as the air phase is set to zero and the relaxation zone has the target solution of zero. The air velocities above large waves are significant and I think setting them to zero causes some issues.

Furthermore, I believe some of my issues with the freesurface disruption is that my first order summation of wave components isn't getting the velocities quite right. Does the focusing method you've developed recently allow for a second order summation (like the bichromaticSecond wave type)? Also I need to add the phases for the components arbitrarily as in my experience real waves don't focus according to linear theory and some manipulation of the phases is required.

Any further suggestions and help are always appreciated.

Thanks,

Ed
Ed R is offline   Reply With Quote

Old   November 14, 2013, 13:41
Default
  #628
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi Ed,

Ok, thanks for the feed-back on the steep stream function. Then, testing whether no relaxation in the air helps, could be a next suitable step.

With respect to the focusing, it still relies on first order, as the only difference is that the computation of the phase lag is no longer just a random number, but is computed based on the focusing information.

Second order irregular waves are currently not in the pipeline, as it becomes very tedious to compute all of the wave-wave interactions. With N first order components, you will add N^2 second order components, why you quickly exceed a total of 1000 wave components. The number of evaluations of this inside the relaxation zone is huge, so the evaluation of these will actually become a bottleneck. You can verify this yourself by computing a first order irregular wave with 1000 components.
A recent addition to the svn is a relaxation method, which reduces this problem (svn revision 2022). This is used as follows:

Code:
relaxationScheme SpatialInterpolation;
relaxationShape Line;
N <some integer>;
Currently, it is only implemented for 2D problems (or 3D problems with incident long crested waves), but it should be straight forward to extend to general cases. The integer N is the number of points through the relaxation zone, where the wave height is pre-computed per each time step, such that the number of evaluation of the many wave components is reduced. However, this does not resolve the problem that the velocity has to be computed inside each cell in the water.

Good luck,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   November 15, 2013, 12:22
Default
  #629
New Member
 
Prasad
Join Date: Oct 2013
Posts: 11
Rep Power: 3
mprasad is on a distinguished road
Hi all,

I am looking to create stokes second waves and am confused with regards to the following. How do I input the wavelength and how is the wave number computed in the waveProperties file?

Thank you in advance.
mprasad is offline   Reply With Quote

Old   November 16, 2013, 11:51
Default
  #630
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi Prasad,

The wave number for second order stokes theory is identical to that of first order stokes theory. The setWaveParameters utility will do it for you.

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.
ngj is offline   Reply With Quote

Old   November 17, 2013, 13:21
Default
  #631
Member
 
maryam morta
Join Date: Sep 2013
Posts: 54
Rep Power: 3
mary mor is on a distinguished road
Hi Niel,
while ago I accomplished to run waveDyMFoam with no error. But now I can't wmake it again that I don't know why! Or maybe I was wrong that I thought it was running well!At first, It seems I have overwrited the option file. But after changing the option to the correct one it gives me the error below. (WaveFoam is working and its command is known in the terminal.)

The error is:
Code:
Making dependency list for source file waveDyMFoam.C
SOURCE=waveDyMFoam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam210/src/transportModels -I/opt/openfoam210/src/transportModels/incompressible/lnInclude -I/opt/openfoam210/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam210/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/dynamicMesh/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/dynamicFvMesh/lnInclude -I./../../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linuxGccDPOpt/waveDyMFoam.o
In file included from waveDyMFoam.C:54:
../createFields.H: In function ‘int main(int, char**)’:
../createFields.H:146: error: ‘relaxationZone’ was not declared in this scope
../createFields.H:146: error: expected ‘;’ before ‘relaxing’
In file included from ./../../../../../src/lnInclude/convexPolyhedral.H:55,
                 from ./../../../../../src/lnInclude/relaxationScheme.H:63,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/localFace.H:44: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/convexPolyhedral.H:56,
                 from ./../../../../../src/lnInclude/relaxationScheme.H:63,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/localCell.H:45: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/convexPolyhedral.H:57,
                 from ./../../../../../src/lnInclude/relaxationScheme.H:63,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/localCellNeg.H:45: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationScheme.H:63,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/convexPolyhedral.H:59: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationScheme.H:64,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/relaxationShape.H:68: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationWeight.H:63,
                 from ./../../../../../src/lnInclude/relaxationScheme.H:65,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/relaxationWeightCourantCorrection.H:55: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationScheme.H:65,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/relaxationWeight.H:67: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationScheme.H:66,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/numericalBeach.H:54: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationScheme.H:67,
                 from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/waveTheory.H:67: error: ‘namespace’ definition is not allowed here
In file included from ./../../../../../src/lnInclude/relaxationZone.H:44,
                 from waveDyMFoam.C:56:
./../../../../../src/lnInclude/relaxationScheme.H:72: error: ‘namespace’ definition is not allowed here
In file included from waveDyMFoam.C:56:
./../../../../../src/lnInclude/relaxationZone.H:49: error: ‘namespace’ definition is not allowed here
waveDyMFoam.C:122: error: ‘relaxing’ was not declared in this scope
/opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H:38: warning: unused variable ‘maxDeltaT’
make: *** [Make/linuxGccDPOpt/waveDyMFoam.o] Error 1
line 56 in file waveDyMFoam.C refers to #include "relaxationZone.H"

Could you please tell me what's my problem. My OF version is 2.1.0.
The option file is also here:
Code:
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)/meshTools/lnInclude \
    -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
    -I./../../../../../src/lnInclude


EXE_LIBS = \
    -ltwoPhaseInterfaceProperties \
    -lincompressibleTransportModels \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lfiniteVolume \
    -ldynamicMesh \
    -lmeshTools \
    -ldynamicFvMesh \
    -ltopoChangerFvMesh \
    -L$(FOAM_USER_LIBBIN) \
    -lwaves2Foam

Thanks for your the time and effort you put here.
Best regards
mary mor is offline   Reply With Quote

Old   November 17, 2013, 14:06
Default
  #632
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
You must have updated the svn. Approximately 5 month ago, I changed the file structure of waves2Foam. The errors you experience are related to this update.

Consider the Make/options-file in waveFoam, and you should be able to reproduce it for waveDyMFoam.

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.
ngj is offline   Reply With Quote

Old   November 17, 2013, 14:14
Default
  #633
Member
 
maryam morta
Join Date: Sep 2013
Posts: 54
Rep Power: 3
mary mor is on a distinguished road
Thanks Niel
Sorry but I didn't underestand you. Am I using the wrong version of wave2Foam?
What should I do now?

Regards
mary mor is offline   Reply With Quote

Old   November 17, 2013, 15:30
Default
  #634
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
The recent compilation errors are because you have updated your waves2Foam. As of revision 1996 from the 7th of June 2013 (see the Wiki), the compilation system and the file structure was changed. This change do cause the errors you experience.

You can look into the way the Make/options file is for waveFoam compared to the one you have for waveDyMFoam and adjust the latter accordingly.

I will generally recommend to stay as up to date as possible with the source code, so the more recent, the better.

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.
ngj is offline   Reply With Quote

Old   November 17, 2013, 16:03
Default
  #635
Member
 
maryam morta
Join Date: Sep 2013
Posts: 54
Rep Power: 3
mary mor is on a distinguished road
Hmm thanks
Somehow I'm getting now.
How can I delete the compiled files and install the toolbox from the source on wiki again?
mary mor is offline   Reply With Quote

Old   November 17, 2013, 16:34
Default
  #636
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi Maryam,

Performing the following two steps should suffice:

Code:
svn update
./Allwmake
However, if your original code are from the period, where the SVN-repository was closed, you will need to move the current waves2Foam to a backup-location, make a clean check-out as described on the Wiki, and subsequently perform the compilation.

If you want to make sure that you have a fresh start, then the library is placed here:

Code:
cd $FOAM_USER_LIBBIN
and the solvers and utilities are placed here:

Code:
cd $FOAM_USER_APPBIN
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.
ngj is offline   Reply With Quote

Old   November 18, 2013, 02:50
Default
  #637
Senior Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 102
Rep Power: 4
Maralady is on a distinguished road
Hello, I am working trough the validation of the secondStokes, so far I am getting good results, but I believe that the mesh needs to be improved, right now I am working with a 0.005 element size for both, x and y, with a tank size of 20m and a relaxation zone of 5m for both the inlet and the outlet, so here is my question: Does someone made an analysis about the recommended length for both the inlet and outlet relaxation zone? I am asking this because at my references they recommend to have an inlet relaxation zone equals to 1L (wave length) and an outlet relaxation zone equal to 3L, I am working with rectangular shapes, I would like to see some opinions, if no one knows I will run several testes by my own (thing that I do not want to do because each simulation is taking around 4-6 hours)

Here is an image of the results that I am getting for a 0.01 cell size in x and y direction, looks pretty good but still you can see that there is a small difference at the amplitude, the blue one is the theoretical wave the orange one is the results that I got from the simulation
Attached Images
File Type: jpg Teoria CFD online.jpg (44.7 KB, 28 views)

Last edited by Maralady; November 18, 2013 at 14:23.
Maralady is offline   Reply With Quote

Old   November 18, 2013, 02:52
Default
  #638
Senior Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 102
Rep Power: 4
Maralady is on a distinguished road
I forgot to say that my references did not work with waveFoam and that is why I am asking
Maralady is offline   Reply With Quote

Old   November 18, 2013, 03:05
Default
  #639
Member
 
maryam morta
Join Date: Sep 2013
Posts: 54
Rep Power: 3
mary mor is on a distinguished road
Hi Niel,
Yes my wave2Foam is from the time that svn was down. After running this waveFoam, I got a file from my friend that was from the updated file in wiki. I might ./Allwmake this file again after mine! Maybe this had made some problems, but waveFoam was running correctly.
As you told me at first I tried to modify the option file like the one in waveFoam, but again with no progress. Not successful to build waveDyMFoam.o
Then I tried to svn update in the wave2Foam folder but it said .skipped
After that I removed the libraries and binary files as you mentioned in the directory. I got the source from wiki and finally this the last version of my errors after ./Allwmake :|

Code:
=====================================
    ENVIRONMENTAL VARIABLES
=====================================
WAVES_XVERSION=0
WM_PROJECT_VERSION_NUMBER=210
WAVES_SOL=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam/applications/solvers/solvers210
WAVES_POST=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam/applications/utilities/postProcessing
WAVES_UTIL=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam/applications/utilities
EXTBRANCH=0
WAVES_APPBIN=/home/maryam/OpenFOAM/maryam-2.1.0/platforms/linuxGccDPOpt/bin
WAVES_TUT=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam/tutorials
WAVES_GSL_INCLUDE=/usr/include
WAVES_GSL_LIB=/usr/lib64
WAVES_PRE=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam/applications/utilities/preProcessing
WAVES_SRC=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam/src
WAVES_DIR=/home/maryam/OpenFOAM/maryam-2.1.0/applications/utilities/waves2Foam
WAVES_LIBBIN=/home/maryam/OpenFOAM/maryam-2.1.0/platforms/linuxGccDPOpt/lib


FATAL ERROR.
    The directory path /home/maryam/OpenFOAM/maryam-2.1.0/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
I don't have a utility folder in application folder. Should I have one?!

I'm amazed every little thing I do in OpenFoam I face with multiple errors!
Sorry for the whole incontinence I've made.
Thanks in advanced.
Best Regards
mary mor is offline   Reply With Quote

Old   November 18, 2013, 04:09
Default
  #640
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Good morning Maryam,

Your latest issue has been addressed multiple of times in this thread already.

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.
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 05:33
Sections / Topics in CFD Wiki Roberthealy1 CFD-Wiki 6 August 23, 2007 18:58
CFD Related Educational Programmes Jonas Larsson Main CFD Forum 3 February 9, 2007 11:11
project topics vivekanand CFX 0 October 27, 2004 06:17
Advanced Topics in Aerodynamics Antonio Filippone Main CFD Forum 0 August 28, 1999 13:16


All times are GMT -4. The time now is 22:34.