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   November 20, 2019, 18:28
Default Flap Efforts
  #161
New Member
 
Matheus
Join Date: Nov 2019
Posts: 1
Rep Power: 0
fuba is on a distinguished road
Assuming I am interested in the efforts made by water in the flap (inlet) to calculate the required power supplied to the flap to produce a certain type of wave, disregarding the inertia of this flap. What would be the best way to get it?
fuba is offline   Reply With Quote

Old   November 21, 2019, 06:46
Default reading nu from transportProperties in olaFlow
  #162
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Quote:
Originally Posted by arashghgood View Post
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.
Dear Pablo
I am still working on reading files like transportProperties in namespace StokesI. I tried many different optioned people recommended in forums. However, I failed. Could you let me know how can I do this?
to be more precise, I want to do some calculations in namespace StokesI in waveFun.C
to do these calculations I need to use nu. I want to read its value from transportProperties.
Thanks in advance
arashghgood is offline   Reply With Quote

Old   November 22, 2019, 11:16
Default Change inlet location
  #163
New Member
 
Matheus Miguel
Join Date: Nov 2019
Posts: 1
Rep Power: 0
Matheus Miguel is on a distinguished road
Dear Pablo,

I have been trying to position the inlet between the walls of the tank for a while so that there is water on both sides of the flap. Could you give me a hint on how to do this?
Matheus Miguel is offline   Reply With Quote

Old   November 24, 2019, 20:03
Default
  #164
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 philiplu View Post
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
Hi philiplu,

please make sure what you compile before compiling automatically. It sounds like you are trying to compile the OpenFOAM 5 solver with your OpenFOAMv1906, which of course fails. I have just tested and the v17xx still compiles, although you have all the hints to get your own 1906 version modified to be compiled.

--------------------------------------------------------------

Hello arashghgood,

I have never worked with complex numbers in OpenFOAM, so I cannot be of help. I suggest that you post your programming questions in the Programming sub-forum (same goes for your reading nu question), since they are not directly related with this thread.

A small hint for your second question, try to look for subDict and lookup in the code, you might find some hints to get it working, for example:

" mesh.solutionDict().subDict("PISO").lookup("pRefVa lue")"

--------------------------------------------------------------

Hi M.W.G.,

please provide a minimal working example and I will take a look. Nevertheless, let me say that this postprocessing elements are external to olaFlow.

--------------------------------------------------------------

Hi lincui,

this can happen, numerical instabilities can arise almost out of nowhere with small variations of the initial/boundary conditions. The key here is that you should check your mesh and identify where the instability happens before knowing which action to take.

--------------------------------------------------------------

Hi fuba/Matheus,

try creating a baffle (i.e. infinitely thin wall).

Best,

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

Old   November 26, 2019, 06:39
Default
  #165
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hi, Phicau,

thank you for the reply
and
it looks like that "ola" does work (at least partially) with v1906


thanks, regards
philiplu is offline   Reply With Quote

Old   November 27, 2019, 10:29
Default reading dictionaries in olaFlow
  #166
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Quote:
Originally Posted by Phicau View Post
--------------------------------------------------------------

Hello arashghgood,

I have never worked with complex numbers in OpenFOAM, so I cannot be of help. I suggest that you post your programming questions in the Programming sub-forum (same goes for your reading nu question), since they are not directly related with this thread.

A small hint for your second question, try to look for subDict and lookup in the code, you might find some hints to get it working, for example:

" mesh.solutionDict().subDict("PISO").lookup("pRefVa lue")"

--------------------------------------------------------------

Best,

Pablo
Dear Pablo
First of all, thank you for your response.
as you recommended to me, I try to set your hint in waveFun.C. but it doesn't work. could you please let me know more details? for example
1)which #include "????" lines are needed?
2) the following lines does not work

Foam::dimensionedScalar.transportProperties.subDic t("water").lookup("nu");
double sca=Foam::blockMesh.meshDict().lookup("convertToMe ters");
//============================================
I have also another question. when convertToMeters is set to 1 every thing is right. when I set it to 0.1 for example, the box is converted. but the velocity component in StokesI model for example does not change. How can I fix this problem?
arashghgood is offline   Reply With Quote

Old   December 1, 2019, 17:55
Default
  #167
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,


again, this question is not related to olaFlow. You should open your own thread in the programming sub-forum so that more people may be able to help you.



convertToMeters is a factor that only has any influence at the mesh creation step. It is there to convert the arbitrary length units you used in blockMeshDict (for your point locations) to meters. Later it is never read again, because you should be already working in SI units (m, s, kg...), therefore, you don't need to multiply any velocities by it, olaFlow will read the relevant dimensions (always in SI units) and calculate the correct velocities automatically for you.


Best,


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

Old   December 24, 2019, 06:22
Default getting wave-height info in olaflow
  #168
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hello, Phicau,

when people want to know e.g. the wave height at certain time and certain location, if it's possible to let olaflow report it or people have to measure it "manually" from simulation results by means of post-processing?


hope this question won't be a burden in the current season
btw, wish u xmas
philiplu is offline   Reply With Quote

Old   December 24, 2019, 07:10
Default
  #169
New Member
 
Weather
Join Date: Apr 2014
Posts: 9
Rep Power: 12
jovenitta is on a distinguished road
If ı'm not wrong in breakwater tutorial there is a script for that written in phyton. At the end of the simulation you see the plots .


Quote:
Originally Posted by philiplu View Post
hello, Phicau,

when people want to know e.g. the wave height at certain time and certain location, if it's possible to let olaflow report it or people have to measure it "manually" from simulation results by means of post-processing?


hope this question won't be a burden in the current season
btw, wish u xmas
jovenitta is offline   Reply With Quote

Old   December 25, 2019, 19:43
Default thanx, jovenitta
  #170
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
Hello, jovenitta,
thank you indeed for the reply.
I read the py-file: it's great, all clear, thanx.

a further question if u don't mind:
instead of e.g. horizontal bed: as the (horizontal) bed turns e.g. 60 even 90 degrees, then how a reasonable water level (over sloped bed or near a vertical wall) can be estimated?



btw. wish u an excellent 2020

Last edited by philiplu; December 26, 2019 at 00:01.
philiplu is offline   Reply With Quote

Old   December 26, 2019, 01:56
Default
  #171
New Member
 
Weather
Join Date: Apr 2014
Posts: 9
Rep Power: 12
jovenitta is on a distinguished road
Hi philiplu,

Actually it is the same. You place the probes anywhere in the slope or in the vertical sea wall for instance and you get wave surface elevations. You may try some experimental wave runup tests in the literature and compare the results. Btw, I did one and the results agreed quite well..
Wish you a great year too!
jovenitta is offline   Reply With Quote

Old   December 26, 2019, 07:02
Default
  #172
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hey, jovenitta,
thank u for reply,
pardon, I didn't describe clearly:
if a probe line is defined at e.g. Point "A" in horizontal bed (till mesh top), then all the cells, the line "touches"(thus their alpha values), refer/belong to "A"
but
if bed is oblique or vertical, the probe line may sample the cells(thus their alpha), referring/belonging bed point(s) for horizontal bed

yes, as u said, the method is the same

I only wonder, how to assign/share the cells(thus the related alpha values), if the probes lines for oblique, vertical bed intersect with the probe lines for the horizontal bed.

hope u enjoy the holiday season
philiplu is offline   Reply With Quote

Old   January 7, 2020, 14:58
Default
  #173
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Philip,


I think I do not get your point. You just need to set your probes in the vertical direction, regardless whether the bed is horizontal or oblique, since the sampling and postprocessing scripts will take care of everything. Also, you don't need to worry if gauges intersect, everything is handled independently.


Best,


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

Old   January 9, 2020, 00:56
Default thanx, Phicau
  #174
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hi, Phicau,
merci!

I try to understand the {probe)+{post) as:
A probe-line e.g.(0.5 0.001 0)to(0.5 0.001 1.2) samples all alphas along it, so all sampled α "belong/refer" to pt(0.5 0.001 0)
"post" calculates a wLevel, i.e. a solid water-column elevation referring to pt(0.5 0.001 0)

As horizontal bed turns oblique/vertical and upon vertical wall there's also e.g. water-jet (run-up).
so, still sampling for a horizontal bed wLevel, if a vertical probe-line very near to(not inside) the "jet"(belonging to vertical wall), it could occasionally sample some α (spoondrift generated by "jet"/run-up belong to to the wall).

so my first question, how to deal with the oblique/vertical area
my second question:
without using probe-sampling, wLevel can also be estimated by directly post-process the olaflow's results(alpha.water file), thus I wonder how accurate the real-time(run-time) probe-sampling can be than just directly postprocessing the ola-output-files?


thank you, Phicau as well as jovenitta for your reply
philiplu is offline   Reply With Quote

Old   January 9, 2020, 15:36
Default
  #175
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Philip,


you should think of this in the same way as in laboratory measurements. If you place a probe near the wall it will be influenced by it; the flow will change, that is just how it is. Therefore, most of the times you want to place vertical probes, regardless of anything else.


There are only few instances in which probes may not be vertical. For example, a line gauge to measure runup, placed parallel to the bottom. In any case, the sampling procedure and postprocessing tools to use are the same.


Regarding your second question, if you apply the same methodology, you should get exactly the same results. The advantage of doing it doing runtime is that it allows you to check the results (and identify errors) before the simulation has finished.


Best,


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

Old   January 10, 2020, 06:43
Default merci
  #176
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 6
philiplu is on a distinguished road
hi, Phicau,

thank you indeed for the clear explanation.
now all is clear and is "Ok-la".


thanx, regards
philiplu is offline   Reply With Quote

Old   January 17, 2020, 20:02
Default olaFlow Floating point error
  #177
Member
 
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 7
arashghgood is on a distinguished road
Dear Pablo
I copied the case "oppositeSolitariesFlume" from the tutorial. It works well.
then I tried to change the case so that i) a slope is added in right end of the geometry. ii) only one wave moves from left to right.

the following error appears:
Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/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 "/lib/x86_64-linux-gnu/libc.so.6"
#9  ? at ??:?
./runCase: line 16:  2701 Floating point exception(core dumped) olaFlow > olaFlow.log
(it does not matter what the mesh size is)

the case is attached.
Attached Files
File Type: gz oppositeSolitariesFlume.tar.gz (3.7 KB, 3 views)
arashghgood is offline   Reply With Quote

Old   January 19, 2020, 15:09
Default
  #178
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Arash,


I am not surprised that the case fails, the mesh is terrible, even if checkMesh reports that it is OK.
Try using snappyHexMesh to make the slope or separating the mesh into 2 blocks and lifting the points on the right (like this _/ ).


Best,


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

Old   January 24, 2020, 09:21
Default replace PatchCloud
  #179
New Member
 
Mariano
Join Date: Jan 2020
Posts: 3
Rep Power: 6
Mariano_ is on a distinguished road
Hi Pablo and forum,

i try to run de tutorial Breakwater in olaflow (latest version) on openfoam 6 and output a fatal error because does not recognize the type of sample PatchCloud. Anyone knows which is the new sample for openfoam 6?

Other question, is possible using dynamic mesh and VOF in olaflow?



Thanks a lot!


Mariano.
Mariano_ is offline   Reply With Quote

Old   January 27, 2020, 21:29
Default
  #180
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Mariano,


the new sample type for "patchCloud" is "boundaryPoints". Also note that "midPointAndFace" is now "lineCellFace".


Yes, you can use dynamic mesh refinement, for example I used it in this paper: https://www.sciencedirect.com/scienc...464?via%3Dihub . Setting it up is quite simple, just follow the 3D dambreak tutorial case available in OpenFOAM.


Best,


Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread

Last edited by Phicau; January 28, 2020 at 02:15.
Phicau 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 21:47.