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

[waves2Foam] Overtopping function

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree6Likes
  • 1 Post By gpouliasis
  • 1 Post By gpouliasis
  • 1 Post By gpouliasis
  • 1 Post By gpouliasis
  • 1 Post By gpouliasis
  • 1 Post By Metqeu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2019, 14:01
Default Overtopping function
  #1
New Member
 
Join Date: Aug 2019
Posts: 1
Rep Power: 0
jfmae is on a distinguished road
Hello all!

I am now using Waves2foam as part of my research project on breakwaters. I have encountered some problems with the overtopping function, which I have implemented using the notes on the manual and one of the answers in this forum. The OpenFOAM version I am using is 2.3.0.

Attached I send a screenshot of the error message I get in the first iteration for waveFoam. At the bottom, where it says "in file /home/yl1181/OpenFOAM/... ": that directory does not exist. When I run the same case in different computers I also get non-existent directories under the following format: /home/foam/OpenFOAM/... .

Here I attach a sample basic case consisting of a flume with a slope and a box inside. It would be great if you could have a look at it and give me some advice on the case and what could be causing the error. The case runs perfectly without the overtopping function.

Additionally, I would like to have some information on how to apply porosity in waves2foam. My next stage would be to remove the box and replace it with the breakwater structure and to include porosity. However, I am a beginner with code in general and OpenFOAM and waves2foam in particular; I get quite lost without sample dictionaries or tutorials.


Any help is very much appreciated. Thank you!!!



Case.tar.gz

screenshot.png
jfmae is offline   Reply With Quote

Old   January 23, 2020, 10:52
Default
  #2
New Member
 
Ingmar Scholte
Join Date: Oct 2019
Posts: 2
Rep Power: 0
IngmarScholte is on a distinguished road
Hi all,

I also encountered the same problem when using the overtopping function and got the same error. I found that it uses rho*phi as a default input parameter, but I can't find where I could give the input of rhoPhi to the overtopping function.

Can somebody please help me with this

Kind regards,

Ingmar
IngmarScholte is offline   Reply With Quote

Old   February 3, 2020, 11:30
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,885
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi all,

It is possible to specify your own "rhoPhiName" in the overtopping dictionary; the use of "rho*phi" is only the default value.

Please see the constructor in the overtopping.C file for additional information.

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 29, 2020, 06:34
Default rho*phi solution
  #4
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 15
Rep Power: 3
gpouliasis is on a distinguished road
Hi all,

I was able to correct this issue by renaming rho*phi to rhoPhi in the overtopping.C source files and then recompiling the package. I am not sure if this is the fastest way, however it was straightforward and it worked just fine.

Kind Regards
ngj likes this.
gpouliasis is offline   Reply With Quote

Old   January 1, 2021, 11:12
Default
  #5
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,885
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Please note that the search string "rho*phi" is the default (due to definition in older versions), but it is possible to define a new keyword in the functionObject using the keyword "rhoPhiName". This means that one does not need to recompile or change the code.

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   January 2, 2021, 08:46
Default
  #6
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 15
Rep Power: 3
gpouliasis is on a distinguished road
Dear Niels,

Thanks a lot for the responce, I had already re-compiled the code before I found this post. Obviously defining "rhoPhiName" is better. (recompilation was a bit quick and dirty)

Thanks for the info and happy new year!

Kind Regards
gpouliasis is offline   Reply With Quote

Old   January 13, 2021, 04:34
Thumbs up hope to get an example
  #7
New Member
 
Ethan
Join Date: Feb 2019
Location: Australia
Posts: 5
Rep Power: 4
ethan13 is on a distinguished road
Quote:
Originally Posted by ngj View Post
Please note that the search string "rho*phi" is the default (due to definition in older versions), but it is possible to define a new keyword in the functionObject using the keyword "rhoPhiName". This means that one does not need to recompile or change the code.

Kind regards

Niels
Hi Niels,

I just encountered this problem now. Thanks for your solution to this problem. As I am new to this utility. I don't know how to implement what you suggested here. is it that I need to insert one more segment under functions in controlDict like below or other ways? Could you please show me one example? Thanks in advance.

Code:
functions
{
    rhoPhiName
    {
        type ...;

    }

}

Ethan
ethan13 is offline   Reply With Quote

Old   March 14, 2021, 17:07
Default
  #8
New Member
 
Mateusz
Join Date: Jan 2020
Posts: 10
Rep Power: 3
Metqeu is on a distinguished road
Hello Niels,
I'm having a problem with the overtopping function. I also had a problem with rho*phi as some of my predecessors in this topic, but I fixed it now by modifying the relevant .C file. Unfortunately it still does not work, I'm getting this error message:
Code:
Write the overtopping


--> FOAM FATAL ERROR:
Not implemented

    From function Overtopping not implemented for boundaries
    in file overtopping/overtopping.C at line 203.
I did create the required face set, and then converted it to a face zone. It seems that this expression returns a false value:

Code:
if (mesh.isInternalFace(faceI))
Apparently, it means that the face label is not internal to the mesh. Unfortunately, I don't really know what it means. Please let me know if you have any ideas

Mateusz

Last edited by Metqeu; March 15, 2021 at 13:39.
Metqeu is offline   Reply With Quote

Old   March 15, 2021, 17:28
Default
  #9
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 15
Rep Power: 3
gpouliasis is on a distinguished road
Quote:
Originally Posted by Metqeu View Post
Hello Niels,
I'm having a problem with the overtopping function. I also had a problem with rho*phi as some of my predecessors in this topic, but I fixed it now by modifying the relevant .C file. Unfortunately it still does not work, I'm getting this error message:
Code:
Write the overtopping


--> FOAM FATAL ERROR:
Not implemented

    From function Overtopping not implemented for boundaries
    in file overtopping/overtopping.C at line 203.
I did create the required face set, and then converted it to a face zone. It seems that this expression returns a false value:

Code:
if (mesh.isInternalFace(faceI))
Apparently, it means that the face label is not internal to the mesh. Unfortunately, I don't really know what it means. Please let me know if you have any ideas

Mateusz
Hi Metqeu,

this error occurs when the overtopping face zones include boundary faces. That is the obvious, faces that are part of the boundaries and not the internal mesh. You can regulate this by playing with the bounding box in your topoSet dictionary. A nice way to visualize your overtopping faces is by using the Read Zones option in paraview. You will find this option when loading a case. Thus, before running your case you can play around with different settings in your topoSet dictionary, visualize them and repeat until you arrive at a satisfying result.

Hope it helps
ngj likes this.
gpouliasis is offline   Reply With Quote

Old   March 21, 2021, 15:38
Default
  #10
New Member
 
Mateusz
Join Date: Jan 2020
Posts: 10
Rep Power: 3
Metqeu is on a distinguished road
Quote:
Originally Posted by gpouliasis View Post
Hi Metqeu,

this error occurs when the overtopping face zones include boundary faces. That is the obvious, faces that are part of the boundaries and not the internal mesh. You can regulate this by playing with the bounding box in your topoSet dictionary. A nice way to visualize your overtopping faces is by using the Read Zones option in paraview. You will find this option when loading a case. Thus, before running your case you can play around with different settings in your topoSet dictionary, visualize them and repeat until you arrive at a satisfying result.

Hope it helps
Thanks a lot George! Got it all working well now.
I have noticed that the total overtopped volume varies quite a lot between simulations with different courant numbers. For example for max Co. of 0.25, the total volume is around 40 litres in my case, but for the max. Co of 0.7, the volume drops down to around 20 litres.
I've used the same grid, solver setup, wave input parameters for these simulations and yet I'm getting this large difference. Does anyone has an idea what's the reason for this? Also the overtopped volume for larger timesteps is actually closer to the experimental data.
Metqeu is offline   Reply With Quote

Old   April 2, 2021, 09:14
Default
  #11
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 15
Rep Power: 3
gpouliasis is on a distinguished road
Hi Metque,

I am not sure about this. Are you using the MULES (waveFoam) or isoAdvector (waveIsoFoam) method?

It is advised to use small CFL numbers in order to avoid numerical diffusion. You could verify that by plotting the wave spectrum near your structure for both cases and comparing.

I can refer you to the following works, related to overtopping with OF.
https://repository.tudelft.nl/island...8-996c18867221

https://repository.tudelft.nl/island...2-25e7fa6cf575
Metqeu likes this.
gpouliasis is offline   Reply With Quote

Old   April 2, 2021, 12:38
Default
  #12
New Member
 
Mateusz
Join Date: Jan 2020
Posts: 10
Rep Power: 3
Metqeu is on a distinguished road
Quote:
Originally Posted by gpouliasis View Post
Hi Metque,

I am not sure about this. Are you using the MULES (waveFoam) or isoAdvector (waveIsoFoam) method?

It is advised to use small CFL numbers in order to avoid numerical diffusion. You could verify that by plotting the wave spectrum near your structure for both cases and comparing.

I can refer you to the following works, related to overtopping with OF.
https://repository.tudelft.nl/island...8-996c18867221

https://repository.tudelft.nl/island...2-25e7fa6cf575
Thank you for your help. These dissertations will certainly be useful.
I am using MULES as I'm working on v1912 due to some problems I encountered during compilation. Do you think it would be worthwhile to switch to v2012 and try that new isoAdvector scheme?
Metqeu is offline   Reply With Quote

Old   April 2, 2021, 15:21
Default
  #13
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 15
Rep Power: 3
gpouliasis is on a distinguished road
Hi Metque,

no need to change to the new edition. You just need to compile the waveIsoFoam solver. This is what I did my self and it is working great.
Metqeu likes this.
gpouliasis is offline   Reply With Quote

Old   April 2, 2021, 16:09
Default
  #14
New Member
 
Mateusz
Join Date: Jan 2020
Posts: 10
Rep Power: 3
Metqeu is on a distinguished road
Quote:
Originally Posted by gpouliasis View Post
Hi Metque,

no need to change to the new edition. You just need to compile the waveIsoFoam solver. This is what I did my self and it is working great.
Hi George, Did you do that on the v1912 version? I'm asking because the source files are in the v1812 and v2012 folders but not for the v1912. I'm wondering if there will be any compatibility issues.
Metqeu is offline   Reply With Quote

Old   April 2, 2021, 16:14
Default
  #15
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 15
Rep Power: 3
gpouliasis is on a distinguished road
Yes exactly. I just copied the folder from v1812 to 1912 and compiled the solver. Be carefull you will need to change the name of your OF version in the options file of the solver you copied. Check the bash script from the wave2foam compilation to figure out the necessary changes.
Metqeu likes this.
gpouliasis is offline   Reply With Quote

Old   August 4, 2021, 17:27
Default Regarding computing of overtopping for 2D models
  #16
New Member
 
Edwin Rajeev
Join Date: Dec 2019
Location: Florida
Posts: 12
Rep Power: 3
edwinrajeev is on a distinguished road
Quote:
Originally Posted by gpouliasis View Post
Hi Metqeu,

this error occurs when the overtopping face zones include boundary faces. That is the obvious, faces that are part of the boundaries and not the internal mesh. You can regulate this by playing with the bounding box in your topoSet dictionary. A nice way to visualize your overtopping faces is by using the Read Zones option in paraview. You will find this option when loading a case. Thus, before running your case you can play around with different settings in your topoSet dictionary, visualize them and repeat until you arrive at a satisfying result.

Hope it helps
Hi George,
A quick question: Does this mean we cant to do an overtopping post processing for 2D simulations? Because the front and back faces are boundaries and the internal mesh would contain these? Has anyone computed overtopping for a 2D simulation?

Thanks
edwinrajeev is offline   Reply With Quote

Old   August 4, 2021, 17:54
Default
  #17
New Member
 
Mateusz
Join Date: Jan 2020
Posts: 10
Rep Power: 3
Metqeu is on a distinguished road
Quote:
Originally Posted by edwinrajeev View Post
Hi George,
A quick question: Does this mean we cant to do an overtopping post processing for 2D simulations? Because the front and back faces are boundaries and the internal mesh would contain these? Has anyone computed overtopping for a 2D simulation?

Thanks
Hi Edwin, you can use overtopping function on a 2D case. Works great for me
ngj likes this.
Metqeu is offline   Reply With Quote

Old   August 4, 2021, 18:00
Default
  #18
New Member
 
Edwin Rajeev
Join Date: Dec 2019
Location: Florida
Posts: 12
Rep Power: 3
edwinrajeev is on a distinguished road
Quote:
Originally Posted by Metqeu View Post
Hi Edwin, you can use overtopping function on a 2D case. Works great for me
Hi Mateusz,
Thanks for your response. I was trying to implement the overtopping on top of a breakwater in 2D and i was getting the same error as you.

I did the following steps:
topoSet:

Code:
actions
(
    {
        name    overtopping.0;
        type    faceSet;
        action  new;
        source  boxToFace;
        box     (330 -1 15) (380 0 30);
    }
);

setsToZones -noFlipMap

But i received the error:

Code:
Write the overtopping


--> FOAM FATAL ERROR:
Not implemented

    From function Overtopping not implemented for boundaries
    in file overtopping/overtopping.C at line 203.
I am not sure what I am doing wrong. COuld you let me know what I might be missing or doing wrong or the procedure that you followed?



Thank you for your response again.
edwinrajeev is offline   Reply With Quote

Old   August 5, 2021, 03:48
Default
  #19
New Member
 
Mateusz
Join Date: Jan 2020
Posts: 10
Rep Power: 3
Metqeu is on a distinguished road
Quote:
Originally Posted by edwinrajeev View Post
Hi Mateusz,
Thanks for your response. I was trying to implement the overtopping on top of a breakwater in 2D and i was getting the same error as you.

I did the following steps:
topoSet:

Code:
actions
(
    {
        name    overtopping.0;
        type    faceSet;
        action  new;
        source  boxToFace;
        box     (330 -1 15) (380 0 30);
    }
);

setsToZones -noFlipMap

But i received the error:

Code:
Write the overtopping


--> FOAM FATAL ERROR:
Not implemented

    From function Overtopping not implemented for boundaries
    in file overtopping/overtopping.C at line 203.
I am not sure what I am doing wrong. COuld you let me know what I might be missing or doing wrong or the procedure that you followed?



Thank you for your response again.
Okay, I've got 2 tips that will hopefully make it work for you. Your faceset needs to start at 2nd cell with respect to the wall, i.e. it could be (330.5 -1 14.5), depends on your grid of course. I know this is not ideal as I imagine some overtopping volume will be lost, but that is the only solution that worked for me. The effect might be marginal if your insert a thin grid layer next to wall.
Second, if that is a 2D case then your topoSet limits should be set to [0,0] in the 3rd dimension.
Metqeu is offline   Reply With Quote

Old   August 5, 2021, 15:26
Default
  #20
New Member
 
Edwin Rajeev
Join Date: Dec 2019
Location: Florida
Posts: 12
Rep Power: 3
edwinrajeev is on a distinguished road
Quote:
Originally Posted by Metqeu View Post
Okay, I've got 2 tips that will hopefully make it work for you. Your faceset needs to start at 2nd cell with respect to the wall, i.e. it could be (330.5 -1 14.5), depends on your grid of course. I know this is not ideal as I imagine some overtopping volume will be lost, but that is the only solution that worked for me. The effect might be marginal if your insert a thin grid layer next to wall.
Second, if that is a 2D case then your topoSet limits should be set to [0,0] in the 3rd dimension.
Hi Mateusz,

Thank you for your response.

I tried both your suggestions and I am getting the same error for this problem I even tried it even for a 3D case and still getting the same error. I am sure I am doing something out of the ordinary for it to happen like that.

I even tried it with bejibattjes tutorial cases and had the same thing happening.

Is it possible for you to share your topoDict and controlDict file for the problem? Or is there any other file I should be thinking about?

Link for the problem setup: https://drive.google.com/file/d/1lBi...ew?usp=sharing

Thank you

Last edited by edwinrajeev; August 6, 2021 at 11:59.
edwinrajeev is offline   Reply With Quote

Reply

Tags
overtopping, porosity, toposetdict, waves2foam

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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


All times are GMT -4. The time now is 20:08.