BUG: regionSizeDistribution: correct droplet volume calculation (fixes #2699)

This commit is contained in:
Konstantinos Missios
2023-03-22 16:33:48 +00:00
committed by Kutalmis Bercin
parent 34e36b83ab
commit 13bd644cf4

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2016-2022 OpenCFD Ltd. Copyright (C) 2016-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -30,8 +30,11 @@ License
#include "regionSplit.H" #include "regionSplit.H"
#include "volFields.H" #include "volFields.H"
#include "fvcVolumeIntegrate.H" #include "fvcVolumeIntegrate.H"
#include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
using namespace Foam::constant;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -97,7 +100,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
const volScalarField& alpha const volScalarField& alpha
) const ) const
{ {
const scalar maxDropletVol = 1.0/6.0*pow3(maxDiam_); const scalar maxDropletVol = 1.0/6.0*mathematical::pi*pow3(maxDiam_);
// Split alpha field // Split alpha field
// ~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~
@ -460,7 +463,7 @@ bool Foam::functionObjects::regionSizeDistribution::write()
<< endl; << endl;
const scalar meshVol = gSum(mesh_.V()); const scalar meshVol = gSum(mesh_.V());
const scalar maxDropletVol = 1.0/6.0*pow3(maxDiam_); const scalar maxDropletVol = 1.0/6.0*mathematical::pi*pow3(maxDiam_);
const scalar delta = (maxDiam_-minDiam_)/nBins_; const scalar delta = (maxDiam_-minDiam_)/nBins_;
Log << " Mesh volume = " << meshVol << nl Log << " Mesh volume = " << meshVol << nl