diff --git a/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface b/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface similarity index 87% rename from etc/caseDicts/postProcessing/flowRate/volFlowRateSurface rename to etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface index 20e40b6bea..eea56ae1af 100644 --- a/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface +++ b/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface @@ -13,8 +13,8 @@ Description \*---------------------------------------------------------------------------*/ -triSurface ; +name ; -#includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg" +#includeEtc "caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg b/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg similarity index 86% rename from etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg rename to etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg index 1abafdfcfb..c42101c141 100644 --- a/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg +++ b/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg @@ -6,7 +6,7 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg" fields (U); operation areaNormalIntegrate; diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg index bec4dde416..337849d690 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg @@ -13,7 +13,7 @@ regionType sampledSurface; sampledSurfaceDict { type triSurfaceMesh; - surface $triSurface; + surface $name; source cells; interpolate true; } diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C index 4c43b12b6d..0103e844fa 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -426,23 +426,24 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise const dictionary& dict ) { - dict.lookup("name") >> regionName_; - switch (regionType_) { case regionTypes::faceZone: { + dict.lookup("name") >> regionName_; setFaceZoneFaces(); break; } case regionTypes::patch: { + dict.lookup("name") >> regionName_; setPatchFaces(); break; } case regionTypes::sampledSurface: { sampledSurfaceFaces(dict); + regionName_ = surfacePtr_().name(); break; } default: diff --git a/tutorials/incompressible/pimpleFoam/RAS/impeller/constant/triSurface/surface0.stl.gz b/tutorials/incompressible/pimpleFoam/RAS/impeller/constant/triSurface/surface0.stl.gz new file mode 100644 index 0000000000..2e17a4d6f8 Binary files /dev/null and b/tutorials/incompressible/pimpleFoam/RAS/impeller/constant/triSurface/surface0.stl.gz differ diff --git a/tutorials/incompressible/pimpleFoam/RAS/impeller/constant/triSurface/surface1.stl.gz b/tutorials/incompressible/pimpleFoam/RAS/impeller/constant/triSurface/surface1.stl.gz new file mode 100644 index 0000000000..79ef60e03e Binary files /dev/null and b/tutorials/incompressible/pimpleFoam/RAS/impeller/constant/triSurface/surface1.stl.gz differ diff --git a/tutorials/incompressible/pimpleFoam/RAS/impeller/system/controlDict b/tutorials/incompressible/pimpleFoam/RAS/impeller/system/controlDict index c800ec51e9..3c0698186d 100644 --- a/tutorials/incompressible/pimpleFoam/RAS/impeller/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/RAS/impeller/system/controlDict @@ -49,5 +49,12 @@ adjustTimeStep yes; maxCo 1.0; +functions +{ + #includeFunc "flowRatePatch(name=inlet)" + #includeFunc "flowRatePatch(name=outlet)" + #includeFunc "volumetricFlowRateTriSurface(name=surface0.stl)" + #includeFunc "volumetricFlowRateTriSurface(name=surface1.stl)" +} // ************************************************************************* //