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 Members List Search Today's Posts Mark Forums Read

Like Tree46Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2021, 20:40
Default
  #361
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Erik,
isoAdvector ensures that the free surface is sharp without the need for dynamic mesh refinement. I don't remember if at that time the DyM solver version had been unified, but if that is the case it is highly likely that dynamic mesh refinement works on that version, which I am pretty sure is not compatible with 20xx. Nevertheless, isoAdvector has been integrated into OpenFOAM already, so if you need the olaFlow wave generation BCs and no porous media you can link them dynamically: https://openfoamwiki.net/index.php/C...ary_Conditions

Hi Peter,
Yes, there is a way to sample the function object gauges after completion.
If the case is in parallel you should run postProcess in parallel too (mpirun ... -parallel). If that does not work, try to use the -postProcess flag of olaFlow:

Code:
mpirun -np X olaFlow -postProcess -fields "(alpha1 U)" -func gaugesVOF -parallel
Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   October 4, 2021, 10:03
Question
  #362
Member
 
Grivalszki Péter
Join Date: Mar 2019
Location: Budapest, Hungary
Posts: 39
Rep Power: 7
GrivalszkiP is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Peter,
Yes, there is a way to sample the function object gauges after completion.
If the case is in parallel you should run postProcess in parallel too (mpirun ... -parallel). If that does not work, try to use the -postProcess flag of olaFlow:

Code:
mpirun -np X olaFlow -postProcess -fields "(alpha1 U)" -func gaugesVOF -parallel
Best,
Pablo
Hi!
Thank you but unfortunately none of them works. The former show its calculations like in the first picture, while the latter is the 2nd picture, but none of them writes the data, at least I do not find it anywhere. Any ideas?

Thank you in advance,

Peter
Attached Images
File Type: png Screenshot from 2021-10-04 15-48-49.png (45.5 KB, 19 views)
File Type: png Screenshot from 2021-10-04 15-57-03.png (88.8 KB, 16 views)
GrivalszkiP is offline   Reply With Quote

Old   October 4, 2021, 11:23
Default
  #363
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Peter,
I have just tested using
Code:
olaFlow -postProcess
with the Breakwater tutorial and it works in serial in OpenFOAM v8.
Before that you should check whether the gauges are actually inside your domain. It is easy to miss it and in that case OpenFOAM does not complain, but it does not produce any files either.

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

Old   October 4, 2021, 12:08
Default
  #364
Member
 
Grivalszki Péter
Join Date: Mar 2019
Location: Budapest, Hungary
Posts: 39
Rep Power: 7
GrivalszkiP is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Peter,
I have just tested using
Code:
olaFlow -postProcess
with the Breakwater tutorial and it works in serial in OpenFOAM v8.
Thank you, this works, just simply "olaFlow -postProcess"
GrivalszkiP is offline   Reply With Quote

Old   October 5, 2021, 23:06
Default
  #365
New Member
 
erickmartinez's Avatar
 
Erick D. Martinez
Join Date: Oct 2020
Location: Texas
Posts: 29
Rep Power: 5
erickmartinez is on a distinguished road
Hi,

Is there any inherent difference between olaFlow and olaDyMFlow in their solvers? I am able to run cases with AMI using olaFlow despite the moving mesh, but I am wondering if there is more differences between ola and olaDyM other than letting you use moving meshes.

Thanks,
Erick
erickmartinez is offline   Reply With Quote

Old   October 6, 2021, 19:21
Default
  #366
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Erick,
Since a couple of versions back when the DyM solvers were merged into the regular ones, olaDyMFlow is just a symbolic link to olaFlow. I did this to avoid breaking back compatibility with certain scripts.

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

Old   October 21, 2021, 23:13
Default Questions for using kOmegaSSTStable turbulence model
  #367
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Hi Pablo,
Recently I adopted the buoyancy correction and the stabilised version of kOmegaSST turbulence model which you implemented in olaFlow to run cases and verify the grid independence. I found that these two versions actually work and the results obtained from stabilised version was better. Thus, I want to thank you again for implementing such useful turbulence models.

Additionally, I have a few more questions about using kOmegaSSTStable turbulence model and I hope to get your advice:
1. Even though the wave height attenuation is solved, I found that the time history of wave height near the wave generation boundary has a rising trend. Besides, the wave height increases a little bit as well. For example, the preset wave height is 7m, after several periods, the height of wave crest and trough become 4.4m and -3.3m, respectively. I wonder if this is acceptable for wave-structure simulation?

2. It's a common sense that y+ plays an important role in determining the size of boundary layer mesh. Could we adopt a larger y+ value in the stablised version? (In general, it is suggested to have y+<5 or 30<y+<200) I used the calculator provided by CFD online(https://www.cfd-online.com/Tools/yplus.php) to calculate the thickness of first layer. My structure is a caisson breakwater with sloping revetment, as for the 'Freestream velocity' in this calculator, should I use the velocity on the sloping revetment or on the caisson? What about the 'Boundary layer length'? Do you have any comments?

Thanks in advance.
Stan Zhou is offline   Reply With Quote

Old   October 23, 2021, 07:07
Default
  #368
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
Hello, Phicau,
in irregular waves, what is the min. required field length, which won't results in an negative impact on ola's inlet, outlet BCs and high result-inaccuracy

forgive my shallow code-insight in ola, thank you in advance for the advice, otherwise the computation task will be horribly large
philip
philiplu is offline   Reply With Quote

Old   October 25, 2021, 11:57
Default
  #369
New Member
 
Join Date: Oct 2021
Posts: 1
Rep Power: 0
smiledon is on a distinguished road
Hi Phicau,

Thank you very much for this great toolbox! I have been testing the olaFlow new wave absorption feature and everything has been working great. The past couple of days, however, I noticed that I can't run the simulation at a different startTime (or using latestTime) other than 0. I got the following errors and not sure if you are familiar with or have any insights as to what causes this issue.

I'm using olaFlow with OpenFOAM-v2106.

Thank you!

Code:
Starting time loop

Courant Number mean: 0.0121579 max: 0.34433
Interface Courant Number mean: 0 max: 0
deltaT = 0.005
Time = 32.005

PIMPLE: iteration 1
MULES: Solving for alpha.water
alpha.water BC on patch inlet
Phase-1 volume fraction = 0.500001  Min(alpha.water) = -1.34637e-32  Max(alpha.water) = 1
alpha.water BC on patch inlet
MULES: Solving for alpha.water
alpha.water BC on patch inlet
Phase-1 volume fraction = 0.500002  Min(alpha.water) = -4.92693e-19  Max(alpha.water) = 1
alpha.water BC on patch inlet
MULES: Solving for alpha.water
alpha.water BC on patch inlet
Phase-1 volume fraction = 0.500003  Min(alpha.water) = -9.85387e-19  Max(alpha.water) = 1
DICPCG:  Solving for p_rgh, Initial residual = 0.993187, Final residual = 0.0884065, No Iterations 2
time step continuity errors : sum local = 0.0150299, global = 5.8382e-07, cumulative = 5.16745e-06
GAMG:  Solving for p_rgh, Initial residual = 0.762835, Final residual = 6.49207e-08, No Iterations 20
Active wave absorption BC on patch outlet
Selecting active wave absorption model extendedRangeAWA


--> FOAM FATAL ERROR: (openfoam-2106)
Not implemented

    From virtual Foam::Istream& Foam::ITstream::readRaw(char*, std::streamsize)
    in file db/IOstreams/Tstreams/ITstream.C at line 548.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::exitOrAbort(int, bool) at ??:?
#2  Foam::ITstream::readRaw(char*, long) at ??:?
#3  Foam::readRawScalar(Foam::Istream&, double*, unsigned long) at ??:?
#4  Foam::List<double>::readList(Foam::Istream&) at ??:?
#5  Foam::List<double> Foam::dictionary::getOrDefault<Foam::List<double> >(Foam::word const&, Foam::List<double> const&, Foam::keyType::option) const at ??:?
#6  Foam::activeWaveAbsorptionModel::initialise() at ??:?
#7  Foam::activeWaveAbsorptionModel::activeWaveAbsorptionModel(Foam::fvMesh const&, Foam::polyPatch const&, Foam::dictionary const&) at ??:?
#8  Foam::activeWaveAbsorptionModels::extendedRangeAWA::extendedRangeAWA(Foam::fvMesh const&, Foam::polyPatch const&, Foam::dictionary const&) at ??:?
#9  Foam::activeWaveAbsorptionModel::addpatchConstructorToTable<Foam::activeWaveAbsorptionModels::extendedRangeAWA>::New(Foam::fvMesh const&, Foam::polyPatch const&, Foam::dictionary const&) at ??:?
#10  Foam::activeWaveAbsorptionModel::New(Foam::fvMesh const&, Foam::polyPatch const&, Foam::dictionary const&) at ??:?
#11  Foam::activeWaveAbsorptionModel::lookupOrCreate(Foam::polyPatch const&, Foam::fvMesh const&, Foam::dictionary const&) at ??:?
#12  Foam::waveAbsorptionVelocityFvPatchVectorField::updateCoeffs() at ??:?
#13  Foam::fvPatchField<Foam::Vector<double> >::evaluate(Foam::UPstream::commsTypes) at ??:?
#14  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() at ??:?
#15  ? at ??:?
#16  __libc_start_main in /lib64/libc.so.6
#17  ? at ??:?
Aborted
smiledon is offline   Reply With Quote

Old   October 31, 2021, 19:22
Default
  #370
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Stan,
- Perhaps you should consider the impact of the wave reflections on the structure to evaluate whether that wave height is reasonable.
- It all comes down to assessing how important relatively turbulence is in your problem. I would suggest doing some 2D mesh sensitivity tests to test it.

Hi Philip,
- It all depends on how long your simulation is. I usually run simulations up to 1 h with 512 components, but you can always check how well your target time series is represented with the N highest energy components. Also check this paper out: https://eprints.hrwallingford.com/1355/1/HRPP776.pdf

Hi Smiledon,
Interesting, thanks for reporting. I will try to take a look in the next couple of weeks.

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

Old   November 1, 2021, 05:38
Default
  #371
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hello, Phicaum
thank you so much for the reply. No doubt, your advice is more theoretically correct.
To compromise the possible TB-scale results, can I set field length to 2-3L? L: estimated by Tp using deepwater condi, i.e. such 2-3L affects ola-inlet,-outlet BC much?
Btw. to save your time: if no your reply, means, 2-3L impact can be tolerated. thank you again.

philip
philiplu is offline   Reply With Quote

Old   November 2, 2021, 09:42
Default
  #372
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Hi Pablo,
Thanks for the suggestions.
Recently I've been trying to generate N wave(https://www.sciencedirect.com/scienc...78383918302060) which is a kind of tsunami wave to my knowledge. I wonder whether olaFlow is able to do so? At first, I wanted to adopt the piston/flap wavemaker but didn't know how to set the parameters in the python script to get a N wave... Besides, is the wavemaker only suitable for regular waves?

By the way, I know many colleagues adopted solitary waves to simulate tsunami waves and there have been some solitary wave theories implemented in olaFlow. However, AFAIK, N waves are quite different from solitary waves. Do you have any comments?
Stan Zhou is offline   Reply With Quote

Old   November 3, 2021, 06:04
Default
  #373
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Smiledon,
I have tried to replicate your problem but I have not been able. I tried restarting the baseWaveFlumeNewAbs tutorial after I stopped the computation and start renaming the 0 folder as 30, and I found no problems in doing so. I was using of2106.
Can you prepare and send me a small example with which I can replicate the problem to investigate?

Hi Philip,
Yes, in principle 2-3L sounds reasonable.

Hi Stan,
There is no N-wave theory coded in olaFlow, but you can easily develop one. You can also use the moving wavemaker to generate N-waves, since this moving BC can produce any time series. You just need to provide the time and displacement (and free surface elevation at the wavemaker, if available). The input format is very easy to understand: https://github.com/phicau/olaFlow/bl...BSMovementDict

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

Old   November 4, 2021, 02:52
Default
  #374
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Smiledon,
I have tried to replicate your problem but I have not been able. I tried restarting the baseWaveFlumeNewAbs tutorial after I stopped the computation and start renaming the 0 folder as 30, and I found no problems in doing so. I was using of2106.
Can you prepare and send me a small example with which I can replicate the problem to investigate?

Hi Philip,
Yes, in principle 2-3L sounds reasonable.

Hi Stan,
There is no N-wave theory coded in olaFlow, but you can easily develop one. You can also use the moving wavemaker to generate N-waves, since this moving BC can produce any time series. You just need to provide the time and displacement (and free surface elevation at the wavemaker, if available). The input format is very easy to understand: https://github.com/phicau/olaFlow/bl...BSMovementDict

Best,
Pablo
Hi Pablo,
Thank you for your detailed reply.
Yes, I've just seen the input format and it's very easy to understand. I'll adopt this wavemaker to start. Thanks again!
Stan Zhou is offline   Reply With Quote

Old   November 4, 2021, 05:21
Default
  #375
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hello Phicau,
many thanks,

philip
philiplu is offline   Reply With Quote

Old   December 1, 2021, 03:07
Default func obj in ola
  #376
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hello Phicau,
I run a case of irregular waves, ola works pretty good.
A strange but tiny issue: I used OF's run-time sample lines in controlDict, i.e. line1, 2, 3, e.g.
line1
{
type uniform;
axis distance;
start (60 0 0);
end (60 0 11);
nPoints 10000;
}
(all lines same, except line2, 3 at x=40, 20)

line1 worked very good, but line 2, 3 gave only 2 sampled values instead of "10000" at each TS.

do you know where i was wrong? thanks in advance,
philip
philiplu is offline   Reply With Quote

Old   December 5, 2021, 03:46
Default FSI coupling in multiphase
  #377
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Hi Pablo,
I'm currently doing FSI coupling adopting our in-house solver (solid part) and olaFlow (fluid part). However, there is a question that's been bothering me:

The case I want to simulate includes a porous media baffle, with water on the left side and no water on the right. I want to simulate the process that water on the left flows into the porous media and then flows into the right side. At present, I've got the displacement and the seepage velocity (calculated in our in-house solver) at the interface and passed to that boundary in OpenFOAM. I wonder whether OpenFOAM will automatically calculate the added water according to the boundary velocity I give at the interface? If not, how could I add the additional water due to the seepage velocity on the interface? (I guess it is similar to the process of making waves since there is more water due to the velocity on the wave generation boundary. However, I don't know the specific practice, could you please share some of your experience if you don't mind.)

By the way, since the coupling tool I'm using only support x-y plane for 2D cases, I've changed the gravity acceleration to y direction and created the mesh on x-y plane. However, the case crashed once I run olaFlow. Is there anything else that I need to modify to make olaFlow work for x-y plane?

Thanks in advance!

Last edited by Stan Zhou; December 13, 2021 at 20:31.
Stan Zhou is offline   Reply With Quote

Old   December 14, 2021, 03:01
Default Question regarding the wave length
  #378
Member
 
Felix S.
Join Date: Feb 2021
Location: Germany, Braunschweig
Posts: 85
Rep Power: 6
Felix_Sp is on a distinguished road
Hello everyone,

so I have a question regarding the computation of the wave length of Stokes-I-waves (sorry, if this topic came up, but I did not find anything by searching the thread). As far as I have understood, the wave length will be initially calculated with the dispersion relation:

L = L_0 * tanh\left(\frac{2*\pi*h}{L}\right)

To solve this equation, iteration is needed. I just found the code implemented in OpenFOAM for interFoam which seems to give the same result as in olaFlow, it reads:

83 for (int i=1; i<=100; i++)
84 {
85 L = L0*tanh(2.0*pi*h/L);
86 }
87
88 return L;
89 }

Source:
https://www.openfoam.com/documentati...8C_source.html

So my problem is that I wanted to try out a really long shallow wave with T= 60 s in shallow water with h= 0.31 m and H= 0.04 m, which leads to a wave length of L=T*\sqrt{g*h} = 104.63 m. The issue I encountered was, that the wave length is calculated to be 954.26384 m, which results from the 100 iteration steps (found in the log file of the solver of either interFoam or olaFlow). Since I am not too familiar with digging into the source-code, I just wanted to ask whether this is actually an issue for calculation or just a visual representation problem and the actual applied wave length is much shorter.

Either way, I would find it less confusing, if the wave length would be actually calculated with a while-loop and some stopping criteria, to actually display the right wave length even for really long waves! If I did something wrong, I would also be happy to be corrected by anyone .

Thanks for your help in advance!
Felix_Sp is offline   Reply With Quote

Old   December 14, 2021, 11:43
Default
  #379
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Felix,


I tried your problem in Matlab and the result is easy to recreate and you will find that the simulation jumps between a small and a big value and converges slowly to the solution. Even after 10,000 iterations, the solution had not converged.



I would propose to another solution procedure such as bisection (simple to implement) or non-linear root-finders as e.g. implemented in GNU Scientific Library. An example of the bi-section approach to the linear wave number can be found here for OpenFoam:


http://svn.code.sf.net/p/openfoam-ex...stProperties.C



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   December 21, 2021, 11:55
Default
  #380
Member
 
Felix S.
Join Date: Feb 2021
Location: Germany, Braunschweig
Posts: 85
Rep Power: 6
Felix_Sp is on a distinguished road
Hey Niels,


thanks for the response! I understand, that the dispersion relation converges quite slowly (I think 25000 iterations or so are needed for my problem).


It is also obvious that my problem can be solved by means of coding (I am no pro in that, just learning OpenFoam for fun, which means it takes some time). But increasing the number of iterations was no problem for me.


I think the point of my question is: If one uses the approaches which are now implemented in Openfoam or olaFlow with boundaries such as mine, will the solution be wrong? As far as I understand, is the applied wave length calculated incorrectly. But as one does not need the wave length for the application of shallow water waves (wave period is enough), I do not know whether this is an issue, but it looks like one in my simulation. My guess, after I looked into the documentation is, that the general equation for linear waves is used and no simplification. Therefore, wave length has an influence on the applied boundary condition and an additional boundary condition has to be coded by me or someone else for this application.

Happy holidays Niels and everyone else

Last edited by Felix_Sp; December 28, 2021 at 04:15.
Felix_Sp is offline   Reply With Quote

Reply

Tags
olaflow, waves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 16:37.