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   January 7, 2022, 12:26
Default
  #381
Senior Member
 
rupak504's Avatar
 
Lolita
Join Date: Aug 2016
Posts: 115
Rep Power: 9
rupak504 is on a distinguished road
hi Pablo,


Thanks for this wonderful solver, i was wondering if it also be incorporated for icoReactingMultiphaseInterFoam in openFoam2106.



regards
rupak504 is offline   Reply With Quote

Old   February 8, 2022, 05:54
Default Extended Range Active Wave Absorption
  #382
New Member
 
Ernane Silva
Join Date: Sep 2018
Posts: 2
Rep Power: 0
ernanesilva is on a distinguished road
Hello!


I followed the instructions to add the Extended Range Active Wave Absorption to olaFlow (https://olaflow.github.io/blog/new-b...ed-to-olaflow/) but it keeps not recognizing the waveAbsorptionVelocity boundary condition. It seems
the OlaFlow project wave generation boundary conditions compilation failed after following the commands:


git checkout
git pull
git checkout Dev


Then I started everything from scratch. I downloaded olaflow and compiled it again. It worked perfectly. Then, the three git commands aforementioned and ./allmake. This resulted the same message "OlaFlow project wave generation boundary conditions compilation failed" and when I run the simulation:


[2] --> FOAM FATAL IO ERROR:
[2] Unknown patchField type waveAbsorptionVelocity for patch type patch

Does anyone have an idea of the problem?
I am using OpenFOAM 9.


Best regards,
Ernane

Last edited by ernanesilva; February 9, 2022 at 05:07.
ernanesilva is offline   Reply With Quote

Old   February 9, 2022, 05:15
Default
  #383
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi All, I am just back from vacation. Let's clear the backlog

Hi Philip (Dec 1),
No idea. Perhaps that this may be an issue with your line coinciding with the side faces of cells?
Anyway, I wouldn't use nPoints parameter but use the lineCellFace type sampling. See the breakwater tutorial for an example.

Hi Haoran (Dec 5),
- Yes, if you program a BC to prescribe the flux (based on pressure drop or something else) it should work.
- I would suggest editing the coupling tool to handle the coordinate transformation, since gravity pointing in the -Z direction in olaFlow is a must.

Hi Felix (Dec 14, 21),
Quite an extreme example, but Niels is completely right.
Yes, the solution will be wrong because the wavelength computed and used in the calculations is also wrong, as it has not converged yet. A quick fix would be to change 100 into, say, 1 million. This may be overkill, but the performance of the solver will not be compromised, since this is only calculated once in the simulation and the loop is extremely fast to compute anyway.

Hi rupak504 (Jan 7),
I currently have no plans to port olaFlow to icoReactingMultiphaseInterFoam, but it works with multiphaseInterFoam under certain conditions, so perhaps you should try. You can check it out here: https://github.com/phicau/olaFlow_su...phaseInterFoam

Hi Ernane,
Unfortunately I have had no time to test/adapt the Dev branch to work with OpenFOAM 9 yet, so I presume that there might be a problem with the compilation of the BCs to start with. It shouldn't be too difficult to modify it following the steps that I have been performing in the master branch, though. Nevertheless, this will definitely be solved in the new release, but it is taking longer than I expected and cannot currently offer a tentative release date.

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

Old   February 9, 2022, 05:28
Default Extended Range Active Wave Absorption
  #384
New Member
 
Ernane Silva
Join Date: Sep 2018
Posts: 2
Rep Power: 0
ernanesilva is on a distinguished road
Hello Pablo!


Welcome back and thanks for the reply.


Which is the most recent version of OpenFOAM the Dev branch should work fine?


Best regards,
Ernane
ernanesilva is offline   Reply With Quote

Old   February 10, 2022, 03:17
Default corrABSfactor
  #385
Member
 
Felix S.
Join Date: Feb 2021
Location: Germany, Braunschweig
Posts: 85
Rep Power: 6
Felix_Sp is on a distinguished road
Hello Pablo!

Thanks for the clarification on the wave length! I have been able to fix that!

I have yet another question regarding the implementation. The correctional velocity in the waveVelocityFvPatchVectorField.C-file (https://github.com/phicau/olaFlow/tr...n/waveVelocity; line 710 and 728) is multiplied with a corrABSfactor, which is just the ratio of the calculated water level and the measured water level or vice versa.

In contrast to that does the code of IHFoam (waveModel.C) in the standard OpenFOAM implementation not use this factor (https://develop.openfoam.com/Develop...dels/waveModel; line 390).

What is the explanation of this implementation? As I cannot find this factor in the paper from 2013 (http://dx.doi.org/10.1016/j.coastaleng.2012.07.002).

Thank you in advance for helping me understand!

Have a nice day,

Felix
Felix_Sp is offline   Reply With Quote

Old   February 10, 2022, 06:15
Default
  #386
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
Hello, Phicau,
many thanks for the reply: I made another try, then it worked, but no idea why
anyway, great to see you again.
though late, but still Happy New Year to you

philip
philiplu is offline   Reply With Quote

Old   February 11, 2022, 05:00
Default
  #387
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Ernane,
I believe the latest supported version in the Dev branch at this point is OF6

Hi Felix,
this is a correction factor that I have found to work very well to reduce the reflection, especially for irregular wave simulations. It is a tuning factor acting on the input and output absorption velocities, useful when very high crests or deep troughs reach the absorption boundary.

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

Old   February 11, 2022, 05:14
Default
  #388
Member
 
Felix S.
Join Date: Feb 2021
Location: Germany, Braunschweig
Posts: 85
Rep Power: 6
Felix_Sp is on a distinguished road
Hey Pablo,

thanks for the clarification! I was just confused why both implementations had different velocity corrections.

Have a nice day,
Felix
Felix_Sp is offline   Reply With Quote

Old   February 16, 2022, 06:56
Default
  #389
Member
 
Callum Guy
Join Date: Dec 2019
Location: Scotland
Posts: 44
Rep Power: 6
CallumG is on a distinguished road
Hi All,

quick question, how is everyone tracking wave height? I'm looking to process wave height during runTime, but I'm getting some strange outputs. See this post:

runTime processing of water level (wave height)

Be interested to hear everyone else's thoughts!

Cheers,
Callum
CallumG is offline   Reply With Quote

Old   March 6, 2022, 07:00
Default
  #390
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
Hello, Phicau,
I tried the ola-tutorial in the turbulence modules, except with irregular waves (general wave steepness is checked) and bit mesh-refinement than your org

Both kOmegaSSTstable, kOmegaSSTbouyancy gave bit "backward breaking" immediately after inlet-patch (instead of breaking toward outlet-dir)

By your experience, it's permissible or still possible to mitigate such early backward breaking?

thank you in advance and also thank you for sharing us the excellent but easy2use tools
philip

@CallumG: hello CallumG, in ola-pkg, Phicau offered tutorial of tracing wave height, you can have a look
philiplu is offline   Reply With Quote

Old   March 15, 2022, 10:09
Default
  #391
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Philip,
Generally turbulence models are reported to induce wave breaking slightly earlier than expected, but I have never experienced them producing breaking at the wave generation boundary on their own. This phenomenon usually occurs when waves are "too" steep to simulate with a fixed boundary wave generation BC and is a known limitation in case the waves are not too steep to break in nature. Early breaking or back-breaking will normally compromise all further results. To simulate such conditions using a relaxation zone may be a solution.

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

Old   March 16, 2022, 04:49
Default
  #392
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
Hello, Phicau,
thank you for the reply.
Assuming, your advice doesn't imply me to "leave", as "ER-AWA + relaxationZone" not published yet, so I'll first try to fix it inside ola, especially besides easy2use, I never encountered "core dumped" in ola.

Btw. ER-AWA needs T-input, in irregular waves can I use Tp for wavePeriod? To save your time, pls. don't reply if I'm right.

thank you again for the info and ola-tools
philip
philiplu is offline   Reply With Quote

Old   March 25, 2022, 21:39
Lightbulb PSA for Mac users and olaFlow
  #393
New Member
 
Christopher Goody
Join Date: Sep 2018
Location: Koolauloa, Oahu, Hawaii
Posts: 14
Rep Power: 7
goodstah is on a distinguished road
Aloha-
It looked like there were maybe a few other unicorns out there that were trying to compile OlaFlow on Mac OS, so just thought I'd post this fix for everyone that is. The clang compiler throws ambiguity errors for some of the temp variables on the original code. This tweak fixed those errors and compiled successfully on Mac OS Monterey 12.2.1 using OpenFOAM-v2112. It may not be (likely is not) the cleanest or best way to make it compatible, but it does the trick. Should be easy to adapt for other versions, and I think this is good for v19xx and up on the ESI branch.

I tested it on a couple of the provided tutorials and it worked fine.

Just expand the attached *.tar.gz and merge with the source code from https://github.com/phicau/olaFlow.

BTW, thank you Pablo. Really like OlaFlow, its such a great utility.

Mahalo
Chris
Attached Files
File Type: gz olaFlow.macOS.clang.tar.gz (88.6 KB, 4 views)
goodstah is offline   Reply With Quote

Old   March 29, 2022, 13:28
Default Running opposing waves in the Wave Flume
  #394
Member
 
Callum Guy
Join Date: Dec 2019
Location: Scotland
Posts: 44
Rep Power: 6
CallumG is on a distinguished road
Hi Pablo,

I hope you are well!

I'm currently using the wave flume example you helped me to code in the shear profile for, and I'm interested in reversing the wave direction such that the current runs left to right say, and the waves run right to left.

Could you help me understand the easiest way of implementing this? I naively expected that setting waveDir to 180 would suffice!

As always, I appreciate any help you can give!

All the best,
Callum
CallumG is offline   Reply With Quote

Old   March 29, 2022, 19:55
Default
  #395
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Thanks a lot Chris! I have included your post in the olaFlow Github so that it is easier to find for the users https://github.com/phicau/olaFlow/wiki

Hi Callum,
the oppositeSolitariesFlume tutorial in olaFlow shows you how to run waves in the negative x direction and currentWaveFlume how to run currents in either direction. If this does still not help feel free to send me an email.

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

Old   April 6, 2022, 08:42
Default
  #396
Senior Member
 
rupak504's Avatar
 
Lolita
Join Date: Aug 2016
Posts: 115
Rep Power: 9
rupak504 is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi All, I am just back from vacation. Let's clear the backlog

Hi rupak504 (Jan 7),
I currently have no plans to port olaFlow to icoReactingMultiphaseInterFoam, but it works with multiphaseInterFoam under certain conditions, so perhaps you should try. You can check it out here: https://github.com/phicau/olaFlow_su...phaseInterFoam

Best,
Pablo

Thanks for the suggestion !


One more question i wanted to ask is, does the code works fine with AMR? I tried this with adaptive mesh refinement, and straightway it gives error, while without it, it is running fine What do you think the problem is?



regards
rupak504 is offline   Reply With Quote

Old   April 7, 2022, 22:23
Default Wave buoy data to drive generator boundary
  #397
New Member
 
Christopher Goody
Join Date: Sep 2018
Location: Koolauloa, Oahu, Hawaii
Posts: 14
Rep Power: 7
goodstah is on a distinguished road
Aloha,
Curious to know if anyone out there has successfully utilized wave buoy or probe time series data to drive a CFD wave generation boundary either through OlaFlow or other? For example, if one has a time series record of eta (free surface elevation) and u (velocity in the axis of propagation at the free surface, if they've been able to use the wave maker code to replicate those waves in a model? It seems like there should be a way to utilize the flapWaveGen.py script to generate the appropriate wavemakerMovement.txt input file.. if I figure it out, will post the method here.
Mahalo
Chris
goodstah is offline   Reply With Quote

Old   April 8, 2022, 19:15
Default How to draw the power spectrum density from time series ?
  #398
New Member
 
Tarek Hadj Hassen
Join Date: Apr 2022
Posts: 6
Rep Power: 4
Tarekhadj is on a distinguished road
Hi All,
I try to draw the spectral density of a time series in order to compare it with the JONSWAP spectrum.
The problem is the density value calculated by this script was divided by 1000.

Please can anyone check the script ?

Code:
#FFT Analysis
time=elevation[200:11070,0]
H=elevation[200:11070,1]

tfd=np.fft.fft(H)

fft_freq=np.fft.fftfreq(N,time[1]-time[0])

#Power spectral density
PSD=tfd * np.conj(tfd)/np.square(N) 


plt.plot(fft_freq,PSD)
plt.xlim(0,0.4)
#plt.title('spectral density')
plt.xlabel('frequency,f,[Hz]')
plt.ylabel('Spectral density [m**2 s]')
plt.show()
Best regard
Tarek
Attached Images
File Type: jpg S(f).JPG (20.2 KB, 9 views)
Tarekhadj is offline   Reply With Quote

Old   April 8, 2022, 22:04
Default
  #399
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi rupak504,
Yes, Adaptive Mesh Refinement should work. How to give enough info to get help

Hi Chris,
Yes, I have done that often. If waves are irregular I calculate FFT and feed the components (amplitude, frequency and phase) to the irregular wave module. If waves are regular and still clean at that location I often go for the expected regular wave theory for the given wave conditions. If waves are close to shallow water conditions you can use the static wavemaker module, in which you feed a time series of free surface elevation directly, see the reference manual for a full description.

Hi Tarek,
I normally use Welch’s method. Nevertheless, your question is probably a better fit for StackOverflow.

Best,
Pablo
goodstah and Tarekhadj like this.
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   April 9, 2022, 11:19
Default How can we generate an irregular wave
  #400
New Member
 
Tarek Hadj Hassen
Join Date: Apr 2022
Posts: 6
Rep Power: 4
Tarekhadj is on a distinguished road
Hi all,

I will generate an irregular wave.
I have the type of spectrum (JONSWAP with y=1.1), Hs=3m and Ts=8s
I use the formula in GODA 2000 to calculate the spectral density S(f).

The irregular wave was a superposition of multi regular waves.
To generate an irregular wave, I will have (H, T, phase) of each regular wave.
From the formula of the spectral density, I can have T = 1/f, but I seek how to calculate H from S(f)?
Can I choose a random phase for each regular wave ?

Is the spectral density in the book of GODA 2000 mean power spectral density? or they are different.

Best regard
Attached Images
File Type: jpg spectral density.JPG (25.4 KB, 14 views)
Tarekhadj 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 07:04.