volumetricFlowRateTriSurface: Corrected pre-configuration, and added an example
A volumetric flow rate through a tri-surface can now be obtained using
the volumetricFlowRateTriSurface preconfigured function object, using
the following entry in system/controlDict:
fuctions
{
#includeFunc "volumetricFlowRateTriSurface(name=surface.stl)"
}
Where "surface.stl" is a tri-surface file in the constant/triSurface
directory. An example of this has been added to the
incompressible/pimpleFoam/RAS/impeller tutorial case.
Note that when possible, it is preferable to use the flowRatePatch or
flowRateFaceZone functions, as these make direct use of the flux and
therefore report a value that is exactly that computed by the solver.
volumetricFlowRateTriSurface, by contrast, does interpolation of the
velocity field which introduces error.
In addition, a minor fix has been made to the underlying
surfaceFieldValue function object so that it does not need a zone/set
name when values on a searchable surface are requested.
This commit is contained in:
@ -13,8 +13,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
triSurface <triSurfaceFile>;
|
name <triSurfaceFileName>;
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg"
|
#includeEtc "caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg"
|
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg"
|
||||||
|
|
||||||
fields (U);
|
fields (U);
|
||||||
operation areaNormalIntegrate;
|
operation areaNormalIntegrate;
|
||||||
@ -13,7 +13,7 @@ regionType sampledSurface;
|
|||||||
sampledSurfaceDict
|
sampledSurfaceDict
|
||||||
{
|
{
|
||||||
type triSurfaceMesh;
|
type triSurfaceMesh;
|
||||||
surface $triSurface;
|
surface $name;
|
||||||
source cells;
|
source cells;
|
||||||
interpolate true;
|
interpolate true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -426,23 +426,24 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
dict.lookup("name") >> regionName_;
|
|
||||||
|
|
||||||
switch (regionType_)
|
switch (regionType_)
|
||||||
{
|
{
|
||||||
case regionTypes::faceZone:
|
case regionTypes::faceZone:
|
||||||
{
|
{
|
||||||
|
dict.lookup("name") >> regionName_;
|
||||||
setFaceZoneFaces();
|
setFaceZoneFaces();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case regionTypes::patch:
|
case regionTypes::patch:
|
||||||
{
|
{
|
||||||
|
dict.lookup("name") >> regionName_;
|
||||||
setPatchFaces();
|
setPatchFaces();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case regionTypes::sampledSurface:
|
case regionTypes::sampledSurface:
|
||||||
{
|
{
|
||||||
sampledSurfaceFaces(dict);
|
sampledSurfaceFaces(dict);
|
||||||
|
regionName_ = surfacePtr_().name();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -49,5 +49,12 @@ adjustTimeStep yes;
|
|||||||
|
|
||||||
maxCo 1.0;
|
maxCo 1.0;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
#includeFunc "flowRatePatch(name=inlet)"
|
||||||
|
#includeFunc "flowRatePatch(name=outlet)"
|
||||||
|
#includeFunc "volumetricFlowRateTriSurface(name=surface0.stl)"
|
||||||
|
#includeFunc "volumetricFlowRateTriSurface(name=surface1.stl)"
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user