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

[waves2Foam] error in overtopping.C

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2016, 04:15
Default error in overtopping.C
  #1
Member
 
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 11
zhxter is on a distinguished road
Hi Niels,

In order to learn how to calculate overtopping rate, I read the relevant file overtopping.C. And in the member function " void Foam:vertopping::computeAndWrite ()", the momentum flux is calculated as follows,

f[facei]=rho1_*q[facei]*Foam::mag( q[facei]/magSf[facei] );

And I wonder if the term magSf[facei] should be replaced by magSf[faceI]??

Regards
Xiantao
Center for offshore Foundation Systems, the University of Western Australia
zhxter is offline   Reply With Quote

Old   May 19, 2016, 04:30
Default
  #2
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
Hallo Xiantao,

Thank you for the bug report. The bug has been fixed and submitted to the svn.

Have a nice day,

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   May 19, 2016, 08:45
Default overtopping used as a functionObject
  #3
Member
 
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 11
zhxter is on a distinguished road
Hi Niels,

After reading the source file overtopping.C. My idea of how to use overtopping as a functionObject is as follows,

Adding the following sentences in the controlDict

overtoppingAnyName
{
type overtopping;
functionObjectLibs ("libwaves2Foam.so");
outputControl timeStep;
outputInterval 1;
}

And one thing to mention is that the name of the faceZone (used for extracting the overtopping rate) should be "overtopping".

Is it right for calculating overtopping rate??

Regards
Xiantao
zhxter is offline   Reply With Quote

Old   May 19, 2016, 10:52
Default
  #4
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 Xiantao,

Yes it looks correct, though you might need another library (the sampling one in waves2Foam).

Note that you can have multiple overtopping zones, and long as the faceZone starts with 'overtopping', e.g. overtopping01, overtopping02, etc.

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

Reply


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



All times are GMT -4. The time now is 21:18.