|
[Sponsors] |
May 19, 2016, 04:15 |
error in overtopping.C
|
#1 |
Member
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 11 |
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 |
|
May 19, 2016, 04:30 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
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. |
|
May 19, 2016, 08:45 |
overtopping used as a functionObject
|
#3 |
Member
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 11 |
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 |
|
May 19, 2016, 10:52 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
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. |
|
|
|