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:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user