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   September 3, 2018, 20:53
Default
  #61
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,

it is not that simple, it can certainly be done, but the solver needs to be changed completely. Moreover, probably starting from interFoam is not the best choice, I would use a simpler solver instead.

I suggest that you search this forum to learn how to create your own solver and implement your own equations.

Best,

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

Old   September 4, 2018, 00:43
Default WaveMakerFlume Tutorial
  #62
New Member
 
dietlind
Join Date: Aug 2018
Posts: 4
Rep Power: 7
dietlind is on a distinguished road
Dear Pablo,


now that I am using the newer version of OpernFoam, the wavemakerFlume tutorial case works and I am making some changes to use my own data.


I am using a 30m long rectangular flume with 0.6m water depth and generate waves using the wavemaker paddle position. The first wave gauge is situated 5m from the paddle, the second one 10m away and in 14.55m distance there is a hanging horizontal plate.
When looking at the results, for the first gauge (5m) , the experimental data and the numerical data seem to be similar. However, looking at the next gauge in 10m distance, the numerical wave is much lower than the experimenetal data. In the visualization with paraview I could see that the wave is breaking at some point which did not occur in the experiment.
Do you have any suggestion what I changes I could make?
I did not change the absorption settings from the tutorial. Do you think that could be a reason?


I attached the graphs of gauge 1 and 2.



Furthermore I am not sure if I am using the right sampling method for recording the pressure on the horizontal plate (there is no overtopping of the plate, the wave just hits the plate from underneath). I looked at the breakwater tutorial where you used the presssure sampling. If I want to sasmple the pressure on the plate, are the following settings in the sampleDictPres correct?


//horizontal plate located at (14.55 -0.01 0.785) to (15.55 -0.01 0.785)


interpolationScheme cellPointFace;

setFormat raw;

surfaceFormat raw;

sets
(
GaugesP
{
type patchCloud; //how do I know which type to use?
axis xyz;
patches 1(platebottom);
points ((14.60 -0.01 0.78)
(14.60 -0.01 0.785)
(14.80 -0.01 0.785)
(15.00 -0.01 0.785)
(15.20 -0.01 0.785)
(15.30 -0.01 0.78)
(15.40 -0.01 0.785)
(15.50 -0.01 0.785));
maxDistance 100; // what does this mean?
}
);

surfaces ();

fields ( p );

// For OpenFOAM 4.0.0
type sets;
libs ("libsampling.so");





Many thanks in advance!


Dietlind
Attached Files
File Type: pdf f1_olaflow_experimental_gauge1.pdf (86.0 KB, 46 views)
File Type: pdf f1_olaflow_experimental_gauge2.pdf (84.6 KB, 17 views)
dietlind is offline   Reply With Quote

Old   September 4, 2018, 01:40
Default
  #63
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Dietlind,

without knowing all the details of the case, I would suggest using: square cells, smaller cell size and smaller Courant number (~0.15). A proper grid convergence test is usually needed to make sure that such nonlinear waves are accurately represented.

Regarding sampling, yes, you are using the right setup. patchCloud indicates that you are selecting a cloud of points that are then going to be projected (perpendicularly, minimum distance) onto your surface if they are closer than 100 m (maxDistance). I would suggest smal shifts: (14.60000001 -0.01 0.784)... to ensure that they are inside the mesh and do not coincide with any mesh face.

Best,

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

Old   September 7, 2018, 01:02
Default WaveMakerFlume Tutorial
  #64
New Member
 
dietlind
Join Date: Aug 2018
Posts: 4
Rep Power: 7
dietlind is on a distinguished road
Dear Pablo,


thank you for the explanation.


I have one more question concerning this case.
When I visualize the case with Paraview it looks like there is some reflection at the outlet.
Can you tell me, what boundary conditions (for the parameters in the 0 folder) I should apply for creating an open outflow at the outlet without any absorption or reflection?


Kind regards!
dietlind is offline   Reply With Quote

Old   September 7, 2018, 04:08
Default
  #65
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Dietlind,

let me refer you to this post: The OLAFOAM Thread

If you apply an open outflow condition (the same as at the atmosphere) all your water will flow away, you need the active wave absorption conditions, as you are using.

Best,

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

Old   September 9, 2018, 05:19
Default
  #66
New Member
 
M.W.G.
Join Date: Sep 2018
Posts: 7
Rep Power: 7
M.W.G. is on a distinguished road
Dear Pablo,

First of all, I would like to express my sincere thanks for providing your invaluable contributions.

I have gone through your thesis, publications, manual and replies related to wave making and absorption. As I can see, if not mistaken, the active wave absorption boundary condition is intended for shallow water water waves.
So my questions are:
1: have you developed deep wave absorption boundary condition yet ?
2: If no, in your opinion what should I do if I am intending to simulate deep water waves ?

Thanks in advance,

Best Wishes...

Mwg.
M.W.G. is offline   Reply With Quote

Old   September 10, 2018, 04:05
Default
  #67
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi MWG,

you're welcome!

The underlying assumption for the present implementation of active wave absorption is indeed shallow water water waves. This does not mean that the active wave absorption BC cannot be used outside shallow waters, it means that performance will decrease.

It is often true that reflection coefficients for deep waters can be larger than 20%. Right now I am testing a couple of alternatives, keep tuned.

Best,

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

Old   September 13, 2018, 11:54
Default Solitary wave - time lag
  #68
New Member
 
Marc Batlle
Join Date: Mar 2017
Posts: 9
Rep Power: 9
Marc Batlle is on a distinguished road
Dear Pablo,

Congrats for your olaFlow improvements.

I am working on solitary waves these days and, for the moment, understanding your implementation in the generation boundaries. As far as I understood from olaFoam reference manual your are choosing a time lag in order not to start generating the wave from the top part of the crest.

Your time lag chosen is [3.5/sqrt(H/h)] according to the reference, but when looking at:

~/olaFlow/genAbs/common/waveFun.C , line 1787:

ts = waveLength(H, h)/2.0;

and, line 1776:

4.0*PII/sqrt(3)*h/sqrt(H/h);

I expected to find here this lag. I am not an expert in OpenFOAM and c++; so probably i am looking at the wrong place.

I would appreciate some advice.

Thanks
Marc Batlle is offline   Reply With Quote

Old   September 14, 2018, 03:49
Default
  #69
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Marc,

thanks!

You are totally right, after recent changes the reference manual is out of date. I am working in a new version which should be out next year.

The new changes were introduced to be consistent between the 3 solitary wave theories implemented: Boussinesq, McCowan and Grimshaw. The space shift is equivalent to half a wavelength, which is different for each theory. They are all defined on the same basis that the free surface starts at an X percentage of H. I think X was 1%, but I would need to double check that .

Best,

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

Old   September 16, 2018, 03:37
Default
  #70
New Member
 
M.W.G.
Join Date: Sep 2018
Posts: 7
Rep Power: 7
M.W.G. is on a distinguished road
Thank you Pablo for the answer.

I have one more if you don't mind. Does the waterDepth entry in the waveDict affect the correction velocity calculation at the pure-absorbing boundary too?

I can see from the reference manual that the waveDict only affects the wave-generation boundary, while the absorption-boundary is controlled only from within the U file.

In other words, If the waterDepth entry is modified, will the correction-velocity be modified on both generation and absorption boundaries? or will it be modified only on the generation boundary?

Best Wishes...

M.W.G.
M.W.G. is offline   Reply With Quote

Old   September 16, 2018, 06:21
Default wave profile
  #71
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo

how can I plot wave profile in paraview?
arashghgood is offline   Reply With Quote

Old   September 17, 2018, 05:35
Default
  #72
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi M.W.G.

as far as I remember, waterDepth is not read from the waveDict file neither for the wave generation or absorption BCs. The water depth is measured and set at the first time step. You could in principle change it in the U file, but mind you, I see no reason for a user to set it.

Hi Arash,

It is true that you can, in principle, sample free surface elevation, store it as a time series and plot as a 2D graph it in ParaView, although I have never done it. I always use other software like python or gnuplot; see the breakwater tutorial for the relevant scripts.

Best,

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

Old   September 20, 2018, 11:05
Default wave profile
  #73
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
Thank you for your reply. In fact, I could not make a wave profile. I would appreciate it if let me know
1- how can I plot wave profile with Gnuplot in basewaveFlum tutorial
2- installing python is needed for running py script in breakwater example
3- how can I install Python in Ubuntu
4- is it possible just to copy py files in basewaveFlum and how can I run them to have a wave profile
arashghgood is offline   Reply With Quote

Old   September 21, 2018, 01:12
Default
  #74
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,

you can google most of that questions, since they are not olaFlow-related.

Please do your homework and learn how sampling works on the breakwater case. Remember that there is a runCase script with all the steps needed to complete the case, postprocess and plot the results. In the end what you obtain is a file for each gauge with [t eta] in columns, easy to load in any program.

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

Old   September 21, 2018, 11:11
Default wave profile
  #75
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 can google most of that questions, since they are not olaFlow-related.

Please do your homework and learn how sampling works on the breakwater case. Remember that there is a runCase script with all the steps needed to complete the case, postprocess and plot the results. In the end what you obtain is a file for each gauge with [t eta] in columns, easy to load in any program.

Pablo
Dear Pablo
it is not my homework
I think it is better off explaining my issue in details.
In fact, after running ./runCaseSST of the breakwater example an error occurred which indicates sample command on line 53 of the script not found.
I use OF version6. there is no sample file in opt/openfoam6/platforms/linux.../bin directory.

my question is about this error and the failure of the running script. I also looked for the issue on the net but I couldn't find anything.
arashghgood is offline   Reply With Quote

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

now I see, indeed it is always better to explain the issue with as much details as possible.

It seems like sample has been deprecated in version 6. In previous versions you still had a message telling you what to do:

Code:
sample has been superseded by the postProcess utility:
    postProcess -func sample

To re-use existing 'sampleDict' files simply add the following entries:
    type sets;
    libs ("libsampling.so");
and run
    postProcess -func sampleDict
So that is what you need to do to make it work.

Best,

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

Old   October 3, 2018, 13:06
Default wave profile
  #77
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear pablo
thank you for your help. I changed what you said in the runcase scripts. However there I two issues
1- Where I have to add
type sets;
libs ("libsampling.so");
in sampleDicVOF it is added at the end for example. is it correct ?
it it is, so the secend issue is important
2- the following error:

Traceback (most recent call last):
File "postSensVOF.py", line 21, in <module>
a = os.listdir('./'+postPath)
OSError: [Errno 2] No such file or directory: './postProcessing/sampleDictVOF'
Traceback (most recent call last):
File "postSensPres.py", line 21, in <module>
a = os.listdir('./'+postPath)
OSError: [Errno 2] No such file or directory: './postProcessing/sampleDictPres'

I have to make this directory and file or it should be created by OF

=============
out put of the echo $WM_PROJECT_VERSION goes 6
arashghgood is offline   Reply With Quote

Old   October 5, 2018, 04:19
Default
  #78
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,

to learn OpenFOAM you must try and repeat and make mistakes. Run the sampling:

Code:
postProcess -func sampleDictVOF
read the error and try to solve it. Namely change midPointAndFace by lineCellFace in system/sampleDictVOF . Run sampling again:

Code:
postProcess -func sampleDictVOF
Now it worked, go for processing the free surface elevation data and plot it:

Code:
./postSensVOF.py
./plotSensVOF.py
Done

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

Old   October 19, 2018, 04:42
Default errors after rebuilding olaflow
  #79
New Member
 
Weather
Join Date: Apr 2014
Posts: 9
Rep Power: 12
jovenitta is on a distinguished road
I was running many cases on olaFlow without any problems so far. However, as soon as I realized there are some updates, I wanted to download them. I somehow failed with the comment git checkout. I couldn't merge files. So I decided to delete olaflow and re-build it. I did the necessary compilations and it says that it compiled successfully. However, I keep seeing the same error when I run any tutorial in olaflow, starting with "Cannot open mesh description file...". What is this about? I have OF 2.3 on Ubuntu 14.04. I use command of230 when I open a terminal and I can run cases from OF230.
jovenitta is offline   Reply With Quote

Old   October 19, 2018, 04:50
Default
  #80
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi,

this is normal, please check the changelogs. What happens is that there were too many tutorials for different OpenFOAM versions, so I moved the older ones to another repository and just kept the latest version in the main olaFlow repository. You can get them here:

https://github.com/phicau/olaFlow_oldVersionTutorials

and run them normally.

Please, do also note that it is most often recommended to use recent OpenFOAM versions due to bug fixes. Bug fixes and new developments in olaFlow are back-compatible so far.

Best,

Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau 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 01:33.