CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[OLAFLOW] The OLAFLOW Thread

Register Blogs Community New Posts Updated Threads Search

Like Tree46Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2019, 05:04
Default wave field initialisation
  #141
Member
 
Paul Palladium
Join Date: Jan 2016
Posts: 93
Rep Power: 10
Fauster is on a distinguished road
Dear Pablo Higuera,

First of all I would like to thank you for your OpenFOAM package and to have release it to the community.
If I am correct olaFlow is not provided with a pre-processor utility for wave field initialisation. Do you plane to add it ? (it's available with waves2foam and with standard wave libraries of OpenFOAM.org version)
This is very useful to deal with seakeeping analysis for example.
Thanks in advance,
Paul
Fauster is offline   Reply With Quote

Old   September 5, 2019, 02:25
Default
  #142
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Paul,

thanks. Right now the pre-processor utility for wave field initialization setOla is not included in the github release, but it will in the future. Drop me an email ( https://olaflow.github.io/contact/ ) if you want to have access to it.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   September 14, 2019, 13:31
Default How to create my own wave profile
  #143
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
as you mentioned in OlaFlow documents, there are different types of initial waves such as stokes I, stokes II, etc. How can I create my own wave profiles? to be more clear, suppose that my interesting profile is :
v_x=f'(z) * exp(i*k*x-i*w*t)
v_y=0
v_z=-i*k*f(z)*exp(i*k*x-i*w*t)
where f(z) is an arbitrary function that can be defined in "wavedict", k is the wavenumber and w is the wave angular frequency.

and How can I study the wave damping (it does not matter which profile is used) and dispersion w.r.t distance and w.r.t time

thank you in advance.
arashghgood is offline   Reply With Quote

Old   September 16, 2019, 20:25
Default
  #144
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,

adding a new wave profile is not difficult, you need to look for every place where 'stokesI' appears in the code and add a new if/else in the structure. Adding your own function in the program is straightforward, however, including an arbitrary function that needs to be read from waveDict is not so. You may find swak4foam more suitable for your purpose.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   October 15, 2019, 18:14
Default water wave problem
  #145
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
Enclosed I try to simulate simple water waves. I set nu=0 which means it is an inviscid flow and bottom boundary as noSlip which means u=0. however, there is 3 problem
1) there is a small wave at the beginning of the simulation and then there are big ones. what is this? and why does it happen?
2) the wave is damped? why? we expect that a cosine wave travels through the box
3) I think the no-slip boundary condition at the bottom is not applied! why? How can I apply this condition?
4) Some means to specify (and use) initial conditions for a
Navier-Stokes solver. These initial conditions include u(x,y,z), v(x,y,z), w(x,y,z), eta(x,y) (and perhaps p(x,y,z)) given on the grid. I believe that exactly such initial conditions are provided by e.g. the Stokes I. generator (in
the inviscid case) if applied to a single time step. It is a question, however, how these initial conditions should be handled and passed to a solver?

Thank you in advance
Attached Files
File Type: zip water-wave.zip (12.6 KB, 12 views)
arashghgood is offline   Reply With Quote

Old   October 20, 2019, 07:29
Default Tsunami wave using irregular wavedict on breakwater tutorial
  #146
New Member
 
Saffa
Join Date: Apr 2017
Posts: 4
Rep Power: 9
Plain21 is on a distinguished road
Hi Dr Higuera,

I am trying to run the breakwater tutorial with a tsunami. I used irregular wavedict to put in my tsunami profile like so:

Code:
waveType        irregular;

genAbs          1;

absDir          0.0;

nPaddles        1;

secondOrder	1; // 0/1, true/false, on/off

waveHeights
93(
0.00312
0.00168
0.00336
0.0192
0.03336
0.05064
0.08064
0.1392
0.18696
0.23064
0.25128
0.27672
0.27696
0.26136
0.2316
0.1884
0.15048
0.11808
0.07896
0.0372
0.00264
0.04272
0.07584
0.13656
0.19608
0.24072
0.2868
0.31776
0.36912
0.33336
0.29184
0.258
0.22176
0.18576
0.15648
0.12576
0.08208
0.06096
0.03384
0.01296
0.02832
0.0396
0.05136
0.04632
0.01944
0.00144
0.02904
0.0468
0.0576
0.07224
0.10272
0.126
0.14568
0.16056
0.15408
0.14376
0.12888
0.14232
0.1524
0.1164
0.078
0.0492
0.01296
0.01032
0.04872
0.09744
0.07992
0.05208
0.03072
0.00504
0.05856
0.15384
0.19752
0.25296
0.29928
0.32928
0.3756
0.42096
0.3804
0.31536
0.25296
0.21984
0.18288
0.13944
0.1116
0.06024
0.01776
0.01296
0.0444
0.06624
0.09648
0.1104
0.11832
);
wavePeriods
93(
47.6000
29.3000
44.1000
69.1000
58.8000
63.0000
58.8000
57.9000
36.3000
28.5000
55.3000
60.5000
44.9000
38.0000
25.1000
7.7000
22.5000
33.7000
18.1000
19.0000
23.4000
11.2000
21.6000
21.6000
24.2000
16.4000
31.1000
28.5000
48.4000
28.5000
32.0000
22.5000
30.2000
5.2000
38.0000
19.9000
19.8000
37.2000
25.9000
25.9000
21.6000
45.0000
33.7000
32.8000
36.3000
31.9000
38.1000
37.1000
31.1000
26.8000
30.2000
32.0000
25.9000
41.5000
27.6000
15.6000
25.9000
12.1000
42.4000
25.0000
22.5000
13.8000
42.3000
31.1000
28.5000
39.8000
38.9000
43.2000
32.8000
31.1000
31.1000
39.8000
31.9000
32.0000
27.6000
17.3000
12.1000
45.8000
34.6000
15.5000
54.5000
29.3000
20.8000
45.8000
20.7000
24.2000
23.3000
39.8000
43.2000
25.9000
44.9000
30.2000
30.2000
);
wavePhases
93(
6.031
0.448
4.733
4.063
3.981
1.722
5.597
5.440
6.123
5.029
1.612
0.478
3.856
3.846
3.726
3.559
4.287
4.558
0.713
1.751
1.739
0.578
0.632
0.420
4.547
1.600
0.838
0.225
5.969
1.028
2.670
3.168
0.889
0.889
1.015
0.892
0.019
0.103
0.471
5.316
0.669
1.317
1.831
5.503
3.030
0.963
3.674
3.422
6.053
4.098
3.665
4.696
5.042
0.198
2.192
0.733
0.450
5.616
0.709
3.558
6.164
5.356
5.443
4.793
6.229
4.799
5.176
4.276
6.136
1.861
1.834
2.879
5.352
6.242
5.113
0.233
4.639
0.084
4.782
0.977
4.386
5.598
0.968
1.448
5.431
3.779
1.650
3.107
0.991
3.069
4.046
1.852
5.574
);
waveDirs
93{ 0 };
After simulation finish, I have 2 sets of problems:

1. While the solver runs, I can't see any waves generated in Paraview, . Im expecting this surface elevation;

Mercator Time Series pic.PNG

2. The probing python codes does not work.

What should I provide in order for you to see the problems better?
Plain21 is offline   Reply With Quote

Old   October 21, 2019, 11:43
Default Wave models in OF and olaFlow
  #147
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
there is a wave folder in the tutorial directory in OpenFoam. there, one can define different wave models. these models are the same as olaFlow. What are the differences between wave models in OF and olaFlow? what are the important or significant features in olaFlow?
arashghgood is offline   Reply With Quote

Old   October 24, 2019, 00:30
Default
  #148
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Quote:
Originally Posted by arashghgood View Post
Dear Pablo
Enclosed I try to simulate simple water waves. I set nu=0 which means it is an inviscid flow and bottom boundary as noSlip which means u=0. however, there is 3 problem
1) there is a small wave at the beginning of the simulation and then there are big ones. what is this? and why does it happen?
2) the wave is damped? why? we expect that a cosine wave travels through the box
3) I think the no-slip boundary condition at the bottom is not applied! why? How can I apply this condition?
4) Some means to specify (and use) initial conditions for a
Navier-Stokes solver. These initial conditions include u(x,y,z), v(x,y,z), w(x,y,z), eta(x,y) (and perhaps p(x,y,z)) given on the grid. I believe that exactly such initial conditions are provided by e.g. the Stokes I. generator (in
the inviscid case) if applied to a single time step. It is a question, however, how these initial conditions should be handled and passed to a solver?

Thank you in advance

Hi Arash,

1) You are starting your case with wave phase 0, which corresponds to a crest, and have no smoothing time, so there is a jump. You want to avoid that. Either add a tSmooth that will ramp up the free surface elevation differences or use the phase provided by default (pi/2) or (3pi/2).
2) The first waves in a regular train always decay. This is normal, as they spend some of their energy in getting the orbital motions started.
3) It is set correctly, so most likely it is working correctly (99.9% chance) or it is a bug in OpenFOAM (0.01% chance). What makes you think that it is working as it should? Remember that the noSlip condition is enforced at the wall, so the first cell will still have a nonzero velocity. Moreover, you might not have enough resolution for the boundary layer to be distinguished.
4) I don't get your question. I am not sure if this is what you ask, but I have developed a utility to set waves as an initial condition in the same way as setFields works. It is called setOla and will be released soon.



Quote:
Originally Posted by arashghgood View Post
Dear Pablo
there is a wave folder in the tutorial directory in OpenFoam. there, one can define different wave models. these models are the same as olaFlow. What are the differences between wave models in OF and olaFlow? what are the important or significant features in olaFlow?
Take a look here: https://www.openfoam.com/releases/op...ave-generation and then compare the original code supplied with the olaFlow (still named IHFOAM back then) code at that time ( https://github.com/phicau/olaFlow/co...f23f1870610+34 )

I also invite you to take a look at this: https://olaflow.github.io/numerical-...al-references/

I am sure you will be able to take your own conclusions.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   October 24, 2019, 00:33
Default
  #149
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Quote:
Originally Posted by Plain21 View Post
Hi Dr Higuera,

I am trying to run the breakwater tutorial with a tsunami. I used irregular wavedict to put in my tsunami profile like so:

After simulation finish, I have 2 sets of problems:

1. While the solver runs, I can't see any waves generated in Paraview, . Im expecting this surface elevation;

Attachment 72875

2. The probing python codes does not work.

What should I provide in order for you to see the problems better?
Hi Saffa,

you can start by sending your case, or a minimal working example (e.g., if the case bathymetry is complex, a simple wave flume with the relevant dimensions will do) so that I can take a look and providing the version of OpenFOAM that you are using.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   October 25, 2019, 11:24
Default Tsunami wave using irregular wavedict on breakwater tutorial
  #150
New Member
 
Saffa
Join Date: Apr 2017
Posts: 4
Rep Power: 9
Plain21 is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Saffa,

you can start by sending your case, or a minimal working example (e.g., if the case bathymetry is complex, a simple wave flume with the relevant dimensions will do) so that I can take a look and providing the version of OpenFOAM that you are using.

Best,

Pablo
Hi Sir,

For your reference;
breakwater.zip

(i removed polymesh folder to make the size smaller to attach here. its the default polymesh folder)

Rgds
Plain21 is offline   Reply With Quote

Old   October 28, 2019, 01:41
Default
  #151
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Saffa,

the water depth in this case is unsuitable for the wave conditions that you provided, nevertheless I ran it for 0.3 seconds and can already see a wave propagating (touching the top boundary...).
You should consider 2 things, disconnect 2nd order wave generation for a faster performance, and considering wavemaker - tueta type of generation (see the manual).

Regarding the sampling, in the new version of OpenFOAM, some names have changed. When you run the sampling command it warns you:

Code:
Unknown sample set type midPointAndFace

The sample set type midPointAndFace has been renamed lineCellFace

Replace "type midPointAndFace;" with "type lineCellFace;"
If you do so, the problem is solved.

You should pay attention to the errors and explanations that OpenFOAM provide. They are most often very helpful.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   October 29, 2019, 10:02
Default
  #152
New Member
 
Saffa
Join Date: Apr 2017
Posts: 4
Rep Power: 9
Plain21 is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Saffa,

the water depth in this case is unsuitable for the wave conditions that you provided, nevertheless I ran it for 0.3 seconds and can already see a wave propagating (touching the top boundary...).
You should consider 2 things, disconnect 2nd order wave generation for a faster performance, and considering wavemaker - tueta type of generation (see the manual).

Regarding the sampling, in the new version of OpenFOAM, some names have changed. When you run the sampling command it warns you:

Code:
Unknown sample set type midPointAndFace

The sample set type midPointAndFace has been renamed lineCellFace

Replace "type midPointAndFace;" with "type lineCellFace;"
If you do so, the problem is solved.

You should pay attention to the errors and explanations that OpenFOAM provide. They are most often very helpful.

Best,

Pablo
Thank you sir, I will work as per your recommendations!
Plain21 is offline   Reply With Quote

Old   October 31, 2019, 19:58
Default wave propagation
  #153
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
enclosed, I upload a wave propagation case. During this simulation, something strange happened!!! I can not understand what happened here and what is set wrong! I believe that this behavior is not physically.
Could you please help me with this case
Attached Files
File Type: zip 06_02.zip (13.9 KB, 6 views)
arashghgood is offline   Reply With Quote

Old   October 31, 2019, 22:36
Default
  #154
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,

you should always give enough information: How to give enough info to get help

Your mesh is not good, the aspect ratio of your cells is too large. Try with 1V:2H. Probably having such fluid properties with very large surface tension and inviscid air don't help either in this case.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   October 31, 2019, 23:26
Default description
  #155
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Arash,

you should always give enough information: How to give enough info to get help

Your mesh is not good, the aspect ratio of your cells is too large. Try with 1V:2H. Probably having such fluid properties with very large surface tension and inviscid air don't help either in this case.

Best,

Pablo
Dear Pablo
first of all, please accept my apologies for the inconvenience. In fact, I tried to apply the stokes I model to a thin layer of Glycerin. the smallest depth, the most interesting. So, I inserted glycerin properties in "transportProperties".
I also tried to make a fine resolution in the surface. To do this, the height of the box is divided into three parts so that the middle one contains fine mesh size. after running it, there is something strange for me.
1) there some distortion in generated waves.
2) after a few seconds, I see an odd behavior like reflection!!! I don't know how to describe this behavior to be more clear.
I expect to see a sin/cos wave with damping.

thanks for your attention
arashghgood is offline   Reply With Quote

Old   November 4, 2019, 01:19
Default ola-compilation
  #156
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hello, Phicau,
first thx a lot for your olaflow and sharing your olaflow.

a small issue:

in Ubuntu (OFv1906 installed), "offlinewise" I compiled "olaFlow-master.zip" and ran an example-case with full success

in same manner, I compiled "olaFlow_supplementary-master.zip":
in the last of 3 available "allMake"s in it, came a msg.:
sth like '.....enter the isoAdvector path ...'

so i want to ask, how shall I deal with it? did I do sth wrong?

thank you in advance
philiplu is offline   Reply With Quote

Old   November 6, 2019, 09:34
Default complex number
  #157
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear publo
as you told me, to add the new namespace I made a copy of StokesI in waveFun.C and made necessary changes in other files. In new namespace, I want to use complex numbers and operations on them. to do this I did

#include "complex.H"
namespace myname
{
Foam::complex Q(a,b)
Foam::complex s=sinh(Q)*Q
Foam::complex m=Q*Q
return s
}

then I tried to compile the code by using ./allMake. there are errors during the compile process. does OpenFOAM or olaFlow support complex numbers and functions such as sinh(), cosh() and exp()?

if yes, then how?
Attached Images
File Type: jpg error01.jpg (140.9 KB, 7 views)
File Type: jpg error02.jpg (142.6 KB, 4 views)
File Type: jpg error03.jpg (130.7 KB, 6 views)

Last edited by arashghgood; November 6, 2019 at 17:31.
arashghgood is offline   Reply With Quote

Old   November 15, 2019, 18:54
Default failed to use run time functionObjects
  #158
New Member
 
M.W.G.
Join Date: Sep 2018
Posts: 7
Rep Power: 7
M.W.G. is on a distinguished road
Hi Pablo,

I am getting errors whenever I use functionObjects in my controlDict. For example, if the lines from 61 to 124, in the attached controlDict, are not commented out I get the following error from the decomposePar:
Code:
--> FOAM FATAL IO ERROR: 
keyword origin is undefined in dictionary "/home/student.uni.edu.eg/mwg/Desktop/testCaseOfPostProcessingForPablo/0/U.boundaryField.inlet"

file: /home/student.uni.edu.eg/mwg/Desktop/testCaseOfPostProcessingForPablo/0/U.boundaryField.inlet from line 26 to line 28.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 566.

FOAM exiting
Agian, when I run the solver application (mpirun -np 3 olaFlow -parallel) I get:
Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh staticFvMesh

PIMPLE: No convergence criteria found


PIMPLE: Operating solver in PISO mode

Reading field porosityIndex

Porosity NOT activated

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes

Reading g

Reading hRef
Calculating field g.h

No MRF models present


DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

Starting time loop

Reading surface description:
    topFreeSurface

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI COMMUNICATOR 3 SPLIT FROM 0
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
For now, I can use these functionObjects only after finishing the simulation (including reconstructPar) by using olaFlow -postProcess; Which is very inconvenient specially for large simulations.

I have tried that of two versions of OpenFOAM (5 and 6).

Looking forward to hearing from you.

MWG
Attached Files
File Type: c controlDict.c (2.7 KB, 5 views)

Last edited by M.W.G.; November 15, 2019 at 19:02. Reason: errors
M.W.G. is offline   Reply With Quote

Old   November 18, 2019, 02:54
Default three-dimensional wave-breakwater errors
  #159
New Member
 
Lin Cui
Join Date: Oct 2017
Posts: 6
Rep Power: 8
lincui is on a distinguished road
Dear Pablo,

Recently, I am simulating a three-dimensional case with breakwaters using olaFlow, the wave condition is: cnoidal wave, wave period=6s, wave height=2m, water depth=4m. The case works fine with no problem. However, when I just change the wave height to 1m (did not change anything else), the case will stop after outputting several time steps. and the error shows as:
Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#5  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#6  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#7  ? at ??:?
#8  __libc_start_main in "/lib64/libc.so.6"
#9  ? at ??:?
/var/spool/PBS/mom_priv/jobs/5393390.pbsserver.SC: line 33: 89449 Floating point exception(core dumped) olaFlow > olaFlow2.log
I have also noticed that the courant number at the time step that stopped becomes very large, something like e+40.

Do you have any idea what might cause this error? what else information should I provide to better describe the problem?

Thank you very much in advance!

Best regards,

Lin
lincui is offline   Reply With Quote

Old   November 18, 2019, 17:24
Default read transport properties in Stokes namespace
  #160
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
How can I read constant/transportproperties values such as viscosity nu and use it in namespace StokesI in waveFun.C

Thanks for attention.
arashghgood is offline   Reply With Quote

Reply

Tags
olaflow, waves


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
Divergence detected in AMG solver: k when udf loaded google9002 Fluent UDF and Scheme Programming 3 November 7, 2019 23:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 03:13
Error messages atg enGrid 7 August 30, 2013 11:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


All times are GMT -4. The time now is 12:06.