functionObjects: Added single patch option to functionObjects that operate on patches
functionObjects layerAverage, nearWallFields, wallHeatFlux, wallHeatTransferCoeff, wallShearStress and forcesBase now support both the 'patches' option for which a list of regular expressions to select the patches is specified and the new simple 'patch' option for which a single patch name is specified.
This commit is contained in:
@ -240,11 +240,7 @@ bool Foam::functionObjects::layerAverage::read(const dictionary& dict)
|
||||
{
|
||||
Info<< type() << " " << name() << ":" << nl;
|
||||
|
||||
patchIndices_ =
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
dict.lookupOrDefault<wordReList>("patches", wordReList())
|
||||
).toc();
|
||||
patchIndices_ = patchSet(dict, true).toc();
|
||||
|
||||
zoneIndices_ =
|
||||
findStrings
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,6 +54,7 @@ Usage
|
||||
Property | Description | Required | Default value
|
||||
type | Type name: layerAverage | yes |
|
||||
setFormat | Output plotting format | yes |
|
||||
patch | Patch that layers extrude from | no |
|
||||
patches | Patches that layers extrude from | no | ()
|
||||
zones | Face zones that the layers extrude from | no | ()
|
||||
axis | Component of the position to plot against | yes |
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -214,8 +214,7 @@ bool Foam::functionObjects::nearWallFields::read(const dictionary& dict)
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("fields") >> fieldSet_;
|
||||
patchSet_ =
|
||||
mesh_.boundaryMesh().patchSet(wordReList(dict.lookup("patches")));
|
||||
patchSet_ = patchSet(dict);
|
||||
distance_ = dict.lookup<scalar>("distance");
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,7 +50,7 @@ Description
|
||||
(U UNear)
|
||||
);
|
||||
|
||||
patches (movingWall);
|
||||
patch movingWall;
|
||||
|
||||
distance 0.13;
|
||||
}
|
||||
@ -61,7 +61,8 @@ Usage
|
||||
Property | Description | Required | Default value
|
||||
type | type name: nearWallFields | yes |
|
||||
fields | list of fields with corresponding output field names | yes |
|
||||
patches | list of patches to sample | yes |
|
||||
patch | patch to sample | no |
|
||||
patches | list of patches to sample | no |
|
||||
distance | distance from patch to sample | yes |
|
||||
\endtable
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -141,11 +141,7 @@ bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||
|
||||
patchSet_ =
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.lookupOrDefault("patches", wordReList()))
|
||||
);
|
||||
patchSet_ = patchSet(dict, true);
|
||||
|
||||
Info<< type() << " " << name() << ":" << nl;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,6 +47,7 @@ Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
type | type name: wallHeatFlux | yes |
|
||||
patch | patch to process | no |
|
||||
patches | list of patches to process | no | all wall patches
|
||||
region | region to be evaluated | no | default region
|
||||
\endtable
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,11 +109,7 @@ bool Foam::functionObjects::wallHeatTransferCoeff::read(const dictionary& dict)
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||
|
||||
patchSet_ =
|
||||
pbm.patchSet
|
||||
(
|
||||
wordReList(dict.lookupOrDefault("patches", wordReList()))
|
||||
);
|
||||
patchSet_ = patchSet(dict, true);
|
||||
|
||||
Info<< type() << ":" << nl;
|
||||
|
||||
|
||||
@ -125,16 +125,12 @@ bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
|
||||
|
||||
phaseName_ = dict.lookupOrDefault<word>("phase", word::null);
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||
|
||||
patchSet_ =
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.lookupOrDefault("patches", wordReList()))
|
||||
);
|
||||
patchSet_ = patchSet(dict, true);
|
||||
|
||||
Info<< type() << " " << name() << ":" << nl;
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||
|
||||
if (patchSet_.empty())
|
||||
{
|
||||
forAll(pbm, patchi)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,6 +57,7 @@ Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
type | type name: wallShearStress | yes |
|
||||
patch | patch to process | no |
|
||||
patches | list of patches to process | no | all wall patches
|
||||
phase | phase name | no |
|
||||
\endtable
|
||||
|
||||
@ -662,7 +662,7 @@ bool Foam::functionObjects::forcesBase::read(const dictionary& dict)
|
||||
|
||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||
|
||||
patchSet_ = pbm.patchSet(wordReList(dict.lookup("patches")));
|
||||
patchSet_ = patchSet(dict);
|
||||
|
||||
if (directForceDensity_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user