CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [waves2Foam] error in overtopping.C (https://www.cfd-online.com/Forums/openfoam-community-contributions/205853-error-overtopping-c.html)

zhxter May 19, 2016 04:15

error in overtopping.C
 
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::overtopping::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

ngj May 19, 2016 04:30

Hallo Xiantao,

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

Have a nice day,

Niels

zhxter May 19, 2016 08:45

overtopping used as a functionObject
 
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

ngj May 19, 2016 10:52

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


All times are GMT -4. The time now is 16:13.