Rationalised and standardised cell, face and point set selection controls
The keyword 'select' is now used to specify the cell, face or point set
selection method consistently across all classes requiring this functionality.
'select' replaces the inconsistently named 'regionType' and 'selectionMode'
keywords used previously but backwards-compatibility is provided for user
convenience. All configuration files and tutorials have been updated.
Examples of 'select' from the tutorial cases:
functionObjects:
cellZoneAverage
{
type volFieldValue;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
writeInterval 1;
fields (p);
select cellZone;
cellZone injection;
operation volAverage;
writeFields false;
}
#includeFunc populationBalanceSizeDistribution
(
name=numberDensity,
populationBalance=aggregates,
select=cellZone,
cellZone=outlet,
functionType=numberDensity,
coordinateType=projectedAreaDiameter,
allCoordinates=yes,
normalise=yes,
logTransform=yes
)
fvModel:
cylinderHeat
{
type heatSource;
select all;
q 5e7;
}
fvConstraint:
momentumForce
{
type meanVelocityForce;
select all;
Ubar (0.1335 0 0);
}
This commit is contained in:
@ -42,7 +42,7 @@ Usage
|
||||
{
|
||||
type VoFSolidificationMeltingSource;
|
||||
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone solidZone;
|
||||
|
||||
alphaSolidT table
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -59,7 +59,7 @@ Usage
|
||||
weightType | weighting in case of field-dependent particle\\
|
||||
properties | no\\
|
||||
| numberConcentration
|
||||
regionType | cellZone or all | no | all
|
||||
select | cellZone or all | no | all
|
||||
name | name of cellZone if required | no |
|
||||
setFormat | output format | yes |
|
||||
\endtable
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -41,11 +41,11 @@ incompressibleFluid solver module executed by the foamRun application:
|
||||
|
||||
The MRF functionality has been further developed to replace SRF, enabled by
|
||||
setting the MRF zone to all the cells in the mesh using the optional
|
||||
'selectionMode' entry to 'all' in the constant/MRFProperties dictionary, e.g.
|
||||
'select' entry to 'all' in the constant/MRFProperties dictionary, e.g.
|
||||
|
||||
SRF
|
||||
{
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -41,11 +41,11 @@ incompressibleFluid solver module executed by the foamRun application:
|
||||
|
||||
The MRF functionality has been further developed to replace SRF, enabled by
|
||||
setting the MRF zone to all the cells in the mesh using the optional
|
||||
'selectionMode' entry to 'all' in the constant/MRFProperties dictionary, e.g.
|
||||
'select' entry to 'all' in the constant/MRFProperties dictionary, e.g.
|
||||
|
||||
SRF
|
||||
{
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
|
||||
type limitPressure;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
min <1e4>;
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
|
||||
type limitPressure;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
// limits can be specified absolute
|
||||
// min <200>;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
|
||||
type limitTemperature;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
min <200>;
|
||||
max <6000>;
|
||||
|
||||
@ -18,7 +18,7 @@ type explicitPorositySource;
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
type DarcyForchheimer;
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone <cellZoneName>; // Specify the name of the cellZone
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -14,6 +14,6 @@ writeInterval 1;
|
||||
|
||||
writeFields false;
|
||||
|
||||
regionType all;
|
||||
select all;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -29,9 +29,9 @@ weightType numberConcentration; // volumeConcentration,
|
||||
// relevant for field-dependent
|
||||
// particle properties, defaults to
|
||||
// numberConcentration
|
||||
regionType all; // cellZone
|
||||
select all; // cellZone
|
||||
// defaults to all
|
||||
cellZone cellZoneName; // relevant for regionType all
|
||||
cellZone cellZoneName; // relevant select cellZone
|
||||
|
||||
|
||||
setFormat raw;
|
||||
|
||||
@ -8,6 +8,6 @@
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg"
|
||||
|
||||
regionType faceZone;
|
||||
select faceZone;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -10,13 +10,13 @@
|
||||
|
||||
region1
|
||||
{
|
||||
regionType patch;
|
||||
select patch;
|
||||
name $patch1;
|
||||
}
|
||||
|
||||
region2
|
||||
{
|
||||
regionType patch;
|
||||
select patch;
|
||||
name $patch2;
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,6 @@
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg"
|
||||
|
||||
regionType patch;
|
||||
select patch;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
region1
|
||||
{
|
||||
regionType sampledSurface;
|
||||
select sampledSurface;
|
||||
|
||||
sampledSurfaceDict
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg"
|
||||
|
||||
regionType sampledSurface;
|
||||
select sampledSurface;
|
||||
|
||||
sampledSurfaceDict
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
fixedPower
|
||||
{
|
||||
type heatSource;
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
Q 100; // Set power (W)
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
fixedTemperature
|
||||
{
|
||||
type fixedTemperatureConstraint;
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
mode uniform;
|
||||
|
||||
|
||||
@ -41,15 +41,15 @@ template<>
|
||||
const char*
|
||||
Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::volRegion::regionTypes,
|
||||
Foam::functionObjects::volRegion::selectionTypes,
|
||||
2
|
||||
>::names[] = {"cellZone", "all"};
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::volRegion::regionTypes,
|
||||
Foam::functionObjects::volRegion::selectionTypes,
|
||||
2
|
||||
> Foam::functionObjects::volRegion::regionTypeNames_;
|
||||
> Foam::functionObjects::volRegion::selectionTypeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
@ -60,9 +60,9 @@ void Foam::functionObjects::volRegion::writeFileHeader
|
||||
Ostream& file
|
||||
)
|
||||
{
|
||||
wf.writeCommented(file, "Region");
|
||||
wf.writeCommented(file, "Selection");
|
||||
file<< setw(1) << ':' << setw(1) << ' '
|
||||
<< regionTypeNames_[regionType_] << " " << regionName_ << endl;
|
||||
<< selectionTypeNames_[selectionType_] << " " << cellZoneName_ << endl;
|
||||
wf.writeHeaderValue(file, "Cells", nCells_);
|
||||
wf.writeHeaderValue(file, "Volume", V_);
|
||||
}
|
||||
@ -77,13 +77,18 @@ Foam::functionObjects::volRegion::volRegion
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
regionType_
|
||||
selectionType_
|
||||
(
|
||||
dict.found("regionType")
|
||||
? regionTypeNames_.read(dict.lookup("regionType"))
|
||||
: vrtAll
|
||||
selectionTypeNames_
|
||||
[
|
||||
dict.lookupOrDefaultBackwardsCompatible<word>
|
||||
(
|
||||
{"select", "regionType"},
|
||||
"all"
|
||||
)
|
||||
]
|
||||
),
|
||||
regionID_(-1)
|
||||
cellZoneID_(-1)
|
||||
{
|
||||
read(dict);
|
||||
|
||||
@ -106,18 +111,19 @@ bool Foam::functionObjects::volRegion::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
switch (regionType_)
|
||||
switch (selectionType_)
|
||||
{
|
||||
case vrtCellZone:
|
||||
{
|
||||
dict.lookupBackwardsCompatible({"cellZone", "name"}) >> regionName_;
|
||||
dict.lookupBackwardsCompatible({"cellZone", "name"})
|
||||
>> cellZoneName_;
|
||||
|
||||
regionID_ = mesh_.cellZones().findZoneID(regionName_);
|
||||
cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_);
|
||||
|
||||
if (regionID_ < 0)
|
||||
if (cellZoneID_ < 0)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown cell zone name: " << regionName_
|
||||
<< "Unknown cell zone: " << cellZoneName_
|
||||
<< ". Valid cell zones are: " << mesh_.cellZones().names()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -125,9 +131,9 @@ bool Foam::functionObjects::volRegion::read
|
||||
if (nCells() == 0)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< regionTypeNames_[regionType_]
|
||||
<< "(" << regionName_ << "):" << nl
|
||||
<< " Region has no cells"
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< "(" << cellZoneName_ << "):" << nl
|
||||
<< " Selection has no cells"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
@ -142,8 +148,8 @@ bool Foam::functionObjects::volRegion::read
|
||||
default:
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown region type. Valid region types are:"
|
||||
<< regionTypeNames_
|
||||
<< "Unknown selection. Valid selections are:"
|
||||
<< selectionTypeNames_
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
@ -154,20 +160,20 @@ bool Foam::functionObjects::volRegion::read
|
||||
|
||||
const Foam::labelList& Foam::functionObjects::volRegion::cellIDs() const
|
||||
{
|
||||
if (regionType_ == vrtAll)
|
||||
if (selectionType_ == vrtAll)
|
||||
{
|
||||
return labelList::null();
|
||||
}
|
||||
else
|
||||
{
|
||||
return mesh_.cellZones()[regionID_];
|
||||
return mesh_.cellZones()[cellZoneID_];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::functionObjects::volRegion::nCells() const
|
||||
{
|
||||
if (regionType_ == vrtAll)
|
||||
if (selectionType_ == vrtAll)
|
||||
{
|
||||
return mesh_.globalData().nTotalCells();
|
||||
}
|
||||
@ -180,7 +186,7 @@ Foam::label Foam::functionObjects::volRegion::nCells() const
|
||||
|
||||
Foam::scalar Foam::functionObjects::volRegion::V() const
|
||||
{
|
||||
if (regionType_ == vrtAll)
|
||||
if (selectionType_ == vrtAll)
|
||||
{
|
||||
return gSum(mesh_.V());
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,8 +33,8 @@ Description
|
||||
{
|
||||
.
|
||||
.
|
||||
regionType cellZone;
|
||||
name c0;
|
||||
select cellZone;
|
||||
cellZone c0;
|
||||
.
|
||||
.
|
||||
}
|
||||
@ -43,7 +43,7 @@ Description
|
||||
{
|
||||
.
|
||||
.
|
||||
regionType all;
|
||||
select all;
|
||||
.
|
||||
.
|
||||
}
|
||||
@ -51,9 +51,9 @@ Description
|
||||
|
||||
Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
regionType | cellZone or all | no | all
|
||||
name | Name of cellZone if required | no |
|
||||
Property | Description | Required | Default value
|
||||
select | cellZone or all | no | all
|
||||
cellZone | Name of cellZone if required | no |
|
||||
\endtable
|
||||
|
||||
See also
|
||||
@ -101,28 +101,28 @@ public:
|
||||
// Public data types
|
||||
|
||||
//- Region type enumeration
|
||||
enum regionTypes
|
||||
enum selectionTypes
|
||||
{
|
||||
vrtCellZone,
|
||||
vrtAll
|
||||
};
|
||||
|
||||
//- Region type names
|
||||
static const NamedEnum<regionTypes, 2> regionTypeNames_;
|
||||
static const NamedEnum<selectionTypes, 2> selectionTypeNames_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Region type
|
||||
regionTypes regionType_;
|
||||
//- Selection type
|
||||
selectionTypes selectionType_;
|
||||
|
||||
//- Region name (patch, zone, etc.)
|
||||
word regionName_;
|
||||
//- Optional cellZone name
|
||||
word cellZoneName_;
|
||||
|
||||
//- Region ID (patch ID, zone ID, etc.)
|
||||
label regionID_;
|
||||
//- Optional cellZone ID
|
||||
label cellZoneID_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
@ -157,7 +157,7 @@ public:
|
||||
bool read(const dictionary&);
|
||||
|
||||
//- Return the region type
|
||||
inline const regionTypes& regionType() const;
|
||||
inline const selectionTypes& selectionType() const;
|
||||
|
||||
//- Return the local list of cell IDs
|
||||
const labelList& cellIDs() const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,10 +25,10 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::functionObjects::volRegion::regionTypes&
|
||||
Foam::functionObjects::volRegion::regionType() const
|
||||
inline const Foam::functionObjects::volRegion::selectionTypes&
|
||||
Foam::functionObjects::volRegion::selectionType() const
|
||||
{
|
||||
return regionType_;
|
||||
return selectionType_;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,26 +30,26 @@ Description
|
||||
|
||||
Currently supports cell selection from a set of points, a specified cellSet
|
||||
or cellZone or all of the cells. The selection method can either be
|
||||
specified explicitly using the \c selectionMode entry or inferred from the
|
||||
presence of either a \c cellSet, \c cellZone or \c points entry. The \c
|
||||
selectionMode entry is required to select \c all cells.
|
||||
specified explicitly using the \c select entry or inferred from the presence
|
||||
of either a \c cellSet, \c cellZone or \c points entry. The \c select entry
|
||||
is required to select \c all cells.
|
||||
|
||||
Usage
|
||||
Examples:
|
||||
\verbatim
|
||||
// Apply everywhere
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
// Apply within a given cellSet
|
||||
selectionMode cellSet; // Optional
|
||||
select cellSet; // Optional
|
||||
cellSet rotor;
|
||||
|
||||
// Apply within a given cellZone
|
||||
selectionMode cellZone; // Optional
|
||||
select cellZone; // Optional
|
||||
cellSet rotor;
|
||||
|
||||
// Apply in cells containing a list of points
|
||||
selectionMode points; // Optional
|
||||
select points; // Optional
|
||||
points
|
||||
(
|
||||
(2.25 0.5 0)
|
||||
|
||||
@ -53,7 +53,6 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
logFiles(obr_, name),
|
||||
dict_(dict),
|
||||
valueType_(valueType),
|
||||
regionName_(word::null),
|
||||
resultDict_(fileName("result"), dictionary::null)
|
||||
{
|
||||
read(dict);
|
||||
@ -72,7 +71,6 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
logFiles(obr_, name),
|
||||
dict_(dict),
|
||||
valueType_(valueType),
|
||||
regionName_(word::null),
|
||||
resultDict_(fileName("result"), dictionary::null)
|
||||
{
|
||||
read(dict);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,9 +76,6 @@ protected:
|
||||
//- The name of the type of value (volFieldValue, or surfaceFieldValue)
|
||||
const word valueType_;
|
||||
|
||||
//- Name of region (patch, zone, etc.)
|
||||
word regionName_;
|
||||
|
||||
//- List of field names to operate on
|
||||
wordList fields_;
|
||||
|
||||
@ -160,9 +157,6 @@ public:
|
||||
//- Return the reference to the construction dictionary
|
||||
inline const dictionary& dict() const;
|
||||
|
||||
//- Return the region name
|
||||
inline const word& regionName() const;
|
||||
|
||||
//- Return the list of fields required
|
||||
inline virtual wordList fields() const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,12 +34,6 @@ inline const Foam::dictionary& Foam::functionObjects::fieldValue::dict() const
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::word& Foam::functionObjects::fieldValue::regionName() const
|
||||
{
|
||||
return regionName_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::wordList Foam::functionObjects::fieldValue::fields() const
|
||||
{
|
||||
return fields_;
|
||||
|
||||
@ -54,7 +54,7 @@ namespace fieldValues
|
||||
template<>
|
||||
const char* Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes,
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypes,
|
||||
3
|
||||
>::names[] =
|
||||
{
|
||||
@ -90,9 +90,9 @@ const char* Foam::NamedEnum
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes,
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypes,
|
||||
3
|
||||
> Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypeNames_;
|
||||
> Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypeNames_;
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
@ -105,14 +105,15 @@ const Foam::NamedEnum
|
||||
|
||||
void Foam::functionObjects::fieldValues::surfaceFieldValue::setFaceZoneFaces()
|
||||
{
|
||||
label zoneId = mesh_.faceZones().findZoneID(regionName_);
|
||||
label zoneId = mesh_.faceZones().findZoneID(selectionName_);
|
||||
|
||||
if (zoneId < 0)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< type() << " " << name() << ": "
|
||||
<< regionTypeNames_[regionType_] << "(" << regionName_ << "):" << nl
|
||||
<< " Unknown face zone name: " << regionName_
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< "(" << selectionName_ << "):" << nl
|
||||
<< " Unknown face zone name: " << selectionName_
|
||||
<< ". Valid face zones are: " << mesh_.faceZones().names()
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
@ -175,14 +176,15 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::setFaceZoneFaces()
|
||||
|
||||
void Foam::functionObjects::fieldValues::surfaceFieldValue::setPatchFaces()
|
||||
{
|
||||
const label patchId = mesh_.boundaryMesh().findPatchID(regionName_);
|
||||
const label patchId = mesh_.boundaryMesh().findPatchID(selectionName_);
|
||||
|
||||
if (patchId < 0)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< type() << " " << name() << ": "
|
||||
<< regionTypeNames_[regionType_] << "(" << regionName_ << "):" << nl
|
||||
<< " Unknown patch name: " << regionName_
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< "(" << selectionName_ << "):" << nl
|
||||
<< " Unknown patch name: " << selectionName_
|
||||
<< ". Valid patch names are: "
|
||||
<< mesh_.boundaryMesh().names() << nl
|
||||
<< exit(FatalError);
|
||||
@ -360,7 +362,7 @@ combineSurfaceGeometry
|
||||
pointField& points
|
||||
) const
|
||||
{
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
const sampledSurface& s = surfacePtr_();
|
||||
|
||||
@ -396,7 +398,7 @@ combineSurfaceGeometry
|
||||
Foam::scalar
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::totalArea() const
|
||||
{
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
return gSum(surfacePtr_().magSf());
|
||||
}
|
||||
@ -414,33 +416,35 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
switch (regionType_)
|
||||
switch (selectionType_)
|
||||
{
|
||||
case regionTypes::faceZone:
|
||||
case selectionTypes::faceZone:
|
||||
{
|
||||
dict.lookupBackwardsCompatible({"faceZone", "name"}) >> regionName_;
|
||||
dict.lookupBackwardsCompatible({"faceZone", "name"})
|
||||
>> selectionName_;
|
||||
setFaceZoneFaces();
|
||||
break;
|
||||
}
|
||||
case regionTypes::patch:
|
||||
case selectionTypes::patch:
|
||||
{
|
||||
dict.lookupBackwardsCompatible({"patch", "name"}) >> regionName_;
|
||||
dict.lookupBackwardsCompatible({"patch", "name"}) >> selectionName_;
|
||||
setPatchFaces();
|
||||
break;
|
||||
}
|
||||
case regionTypes::sampledSurface:
|
||||
case selectionTypes::sampledSurface:
|
||||
{
|
||||
sampledSurfaceFaces(dict);
|
||||
regionName_ = surfacePtr_().name();
|
||||
selectionName_ = surfacePtr_().name();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< type() << " " << name() << ": "
|
||||
<< regionTypeNames_[regionType_] << "(" << regionName_ << "):"
|
||||
<< nl << " Unknown region type. Valid region types are:"
|
||||
<< regionTypeNames_.sortedToc() << nl << exit(FatalError);
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< "(" << selectionName_ << "):" << nl
|
||||
<< " Unknown selection type. Valid selection types are:"
|
||||
<< selectionTypeNames_.sortedToc() << nl << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,11 +452,12 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< type() << " " << name() << ": "
|
||||
<< regionTypeNames_[regionType_] << "(" << regionName_ << "):" << nl
|
||||
<< " Region has no faces" << exit(FatalError);
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< "(" << selectionName_ << "):" << nl
|
||||
<< " selection has no faces" << exit(FatalError);
|
||||
}
|
||||
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
surfacePtr_().update();
|
||||
}
|
||||
@ -505,8 +510,10 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::writeFileHeader
|
||||
{
|
||||
if (operation_ != operationType::none)
|
||||
{
|
||||
writeCommented(file(), "Region type : ");
|
||||
file() << regionTypeNames_[regionType_] << " " << regionName_ << endl;
|
||||
writeCommented(file(), "Selection type : ");
|
||||
file()
|
||||
<< selectionTypeNames_[selectionType_] << " "
|
||||
<< selectionName_ << endl;
|
||||
writeCommented(file(), "Faces : ");
|
||||
file() << nFaces_ << endl;
|
||||
writeCommented(file(), "Area : ");
|
||||
@ -652,7 +659,14 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
|
||||
fieldValue(name, runTime, dict, typeName),
|
||||
dict_(dict),
|
||||
surfaceWriterPtr_(nullptr),
|
||||
regionType_(regionTypeNames_.read(dict.lookup("regionType"))),
|
||||
selectionType_
|
||||
(
|
||||
selectionTypeNames_.read
|
||||
(
|
||||
dict.lookupBackwardsCompatible({"select", "regionType"})
|
||||
)
|
||||
),
|
||||
selectionName_(word::null),
|
||||
operation_(operationTypeNames_.read(dict.lookup("operation"))),
|
||||
weightFieldNames_(),
|
||||
scaleFactor_(1),
|
||||
@ -675,7 +689,14 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
|
||||
fieldValue(name, obr, dict, typeName),
|
||||
dict_(dict),
|
||||
surfaceWriterPtr_(nullptr),
|
||||
regionType_(regionTypeNames_.read(dict.lookup("regionType"))),
|
||||
selectionType_
|
||||
(
|
||||
selectionTypeNames_.read
|
||||
(
|
||||
dict.lookupBackwardsCompatible({"select", "regionType"})
|
||||
)
|
||||
),
|
||||
selectionName_(word::null),
|
||||
operation_(operationTypeNames_.read(dict.lookup("operation"))),
|
||||
weightFieldNames_(),
|
||||
scaleFactor_(1),
|
||||
@ -716,7 +737,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
fieldValue::write();
|
||||
}
|
||||
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
surfacePtr_().update();
|
||||
}
|
||||
@ -742,7 +763,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
faceList faces;
|
||||
pointField points;
|
||||
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
combineSurfaceGeometry(faces, points);
|
||||
}
|
||||
@ -756,7 +777,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
surfaceWriterPtr_->write
|
||||
(
|
||||
outputDir(),
|
||||
regionTypeNames_[regionType_] + ("_" + regionName_),
|
||||
selectionTypeNames_[selectionType_] + ("_" + selectionName_),
|
||||
points,
|
||||
faces
|
||||
);
|
||||
@ -766,7 +787,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
// Construct the sign and weight fields and the surface normals
|
||||
const scalarField signs
|
||||
(
|
||||
regionType_ == regionTypes::sampledSurface
|
||||
selectionType_ == selectionTypes::sampledSurface
|
||||
? scalarField(surfacePtr_().Sf().size(), 1)
|
||||
: List<scalar>(faceSign_)
|
||||
);
|
||||
@ -777,7 +798,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
}
|
||||
const vectorField Sf
|
||||
(
|
||||
regionType_ == regionTypes::sampledSurface
|
||||
selectionType_ == selectionTypes::sampledSurface
|
||||
? surfacePtr_().Sf()
|
||||
: (signs*filterField(mesh_.Sf()))()
|
||||
);
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue
|
||||
|
||||
Description
|
||||
Provides a 'face regionType' variant of the fieldValues function object.
|
||||
Surface (face) region selection class.
|
||||
|
||||
Given a list of user-specified fields and a selection of mesh (or general
|
||||
surface) faces, a number of operations can be performed, such as sums,
|
||||
@ -45,7 +45,7 @@ Description
|
||||
writeControl writeTime;
|
||||
writeFields true;
|
||||
|
||||
regionType patch;
|
||||
select patch;
|
||||
name movingWall;
|
||||
|
||||
operation areaAverage;
|
||||
@ -68,7 +68,8 @@ Description
|
||||
writeFields true;
|
||||
|
||||
surfaceFormat none;
|
||||
regionType faceZone;
|
||||
|
||||
select faceZone;
|
||||
name f0;
|
||||
|
||||
operation sum;
|
||||
@ -89,11 +90,11 @@ Usage
|
||||
Property | Description | Required | Default value
|
||||
type | type name: surfaceFieldValue | yes |
|
||||
log | write data to standard output | no | no
|
||||
writeFields | Write the region field values | yes |
|
||||
writeFields | Write the field values | yes |
|
||||
writeArea | Write the area of the surfaceFieldValue | no |
|
||||
surfaceFormat | output value format | no |
|
||||
regionType | face regionType: see below | yes |
|
||||
name | name of face regionType if required | no |
|
||||
select | face selection: see below | yes |
|
||||
name | name of face select if required | no |
|
||||
operation | operation to perform | yes |
|
||||
weightField | name of field to apply weighting | no |
|
||||
weightFields | Names of fields to apply weighting | no |
|
||||
@ -101,7 +102,7 @@ Usage
|
||||
fields | list of fields to operate on | yes |
|
||||
\endtable
|
||||
|
||||
Where \c regionType is defined by
|
||||
Where the supported \c select options are:
|
||||
\plaintable
|
||||
faceZone | requires a 'name' entry to specify the faceZone
|
||||
patch | requires a 'name' entry to specify the patch
|
||||
@ -136,7 +137,7 @@ Usage
|
||||
- If the field is a volField then a \c faceZone can only consist of
|
||||
boundary faces, because only these faces have a value associated with
|
||||
them. No cell-to-face interpolation is performed.
|
||||
- If the field is a surfaceField then the region cannot be a \c
|
||||
- If the field is a surfaceField then the selection cannot be a \c
|
||||
sampledSurface
|
||||
- If a sampledSurface has interpolation set to false then the surface
|
||||
face values will be taken directly from the cell that contains the
|
||||
@ -187,16 +188,16 @@ public:
|
||||
|
||||
// Public data types
|
||||
|
||||
//- region type enumeration
|
||||
enum class regionTypes
|
||||
//- Selection type enumeration
|
||||
enum class selectionTypes
|
||||
{
|
||||
faceZone,
|
||||
patch,
|
||||
sampledSurface
|
||||
};
|
||||
|
||||
//- region type names
|
||||
static const NamedEnum<regionTypes, 3> regionTypeNames_;
|
||||
//- Selection type names
|
||||
static const NamedEnum<selectionTypes, 3> selectionTypeNames_;
|
||||
|
||||
|
||||
//- Operation type enumeration
|
||||
@ -265,8 +266,11 @@ protected:
|
||||
//- Surface writer
|
||||
autoPtr<surfaceWriter> surfaceWriterPtr_;
|
||||
|
||||
//- region type
|
||||
regionTypes regionType_;
|
||||
//- Selection type
|
||||
selectionTypes selectionType_;
|
||||
|
||||
//- Name of face selection (patch, faceZone, etc.)
|
||||
word selectionName_;
|
||||
|
||||
//- Operation to apply to values
|
||||
operationType operation_;
|
||||
@ -434,8 +438,11 @@ public:
|
||||
|
||||
// Public Member Functions
|
||||
|
||||
//- Return the region type
|
||||
inline const regionTypes& regionType() const;
|
||||
//- Return the selection type
|
||||
inline const selectionTypes& selectionType() const;
|
||||
|
||||
//- Return the selection name
|
||||
inline const word& selectionName() const;
|
||||
|
||||
//- Return the local list of face IDs
|
||||
inline const labelList& faceId() const;
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,10 +28,18 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes&
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::regionType() const
|
||||
inline
|
||||
const Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypes&
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::selectionType() const
|
||||
{
|
||||
return regionType_;
|
||||
return selectionType_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::word&
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::selectionName() const
|
||||
{
|
||||
return selectionName_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,7 +40,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::validField
|
||||
{
|
||||
if
|
||||
(
|
||||
regionType_ != regionTypes::sampledSurface
|
||||
selectionType_ != selectionTypes::sampledSurface
|
||||
&& obr_.foundObject<SurfaceField<Type>>(fieldName)
|
||||
)
|
||||
{
|
||||
@ -62,7 +62,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::getFieldValues
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
if (obr_.foundObject<VolField<Type>>(fieldName))
|
||||
{
|
||||
@ -302,7 +302,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
|
||||
faceList faces;
|
||||
pointField points;
|
||||
|
||||
if (regionType_ == regionTypes::sampledSurface)
|
||||
if (selectionType_ == selectionTypes::sampledSurface)
|
||||
{
|
||||
combineSurfaceGeometry(faces, points);
|
||||
}
|
||||
@ -320,8 +320,8 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
|
||||
(
|
||||
outputDir(),
|
||||
fieldName
|
||||
+ '_' + regionTypeNames_[regionType_]
|
||||
+ '_' + regionName_,
|
||||
+ '_' + selectionTypeNames_[selectionType_]
|
||||
+ '_' + selectionName_,
|
||||
points,
|
||||
faces,
|
||||
false,
|
||||
@ -390,7 +390,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
|
||||
file() << tab << result;
|
||||
|
||||
Log << " " << operationTypeNames_[operation_]
|
||||
<< "(" << regionName_ << ") of " << fieldName
|
||||
<< "(" << selectionName_ << ") of " << fieldName
|
||||
<< " = " << result << endl;
|
||||
}
|
||||
|
||||
@ -424,7 +424,8 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::filterField
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< type() << " " << name() << ": "
|
||||
<< regionTypeNames_[regionType_] << "(" << regionName_ << "):"
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< "(" << selectionName_ << "):"
|
||||
<< nl
|
||||
<< " Unable to process internal faces for volume field "
|
||||
<< field.name() << nl << abort(FatalError);
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,8 +41,8 @@ Description
|
||||
writeControl writeTime;
|
||||
writeFields true;
|
||||
|
||||
regionType cellZone;
|
||||
name c0;
|
||||
select cellZone;
|
||||
cellZone c0;
|
||||
operation volAverage;
|
||||
|
||||
weightField alpha1;
|
||||
@ -62,7 +62,7 @@ Usage
|
||||
log | Write data to standard output | no | no
|
||||
writeFields | Write the region field values | yes |
|
||||
writeLocation| Write the location (if available) | no | no
|
||||
regionType | volRegion type: see below | yes |
|
||||
select | volRegion type: see below | yes |
|
||||
name | Name of volRegion if required | no |
|
||||
operation | Operation to perform | yes |
|
||||
weightField | Name of field to apply weighting | no |
|
||||
@ -70,7 +70,7 @@ Usage
|
||||
fields | List of fields to operate on | yes |
|
||||
\endtable
|
||||
|
||||
Where \c regionType is defined by
|
||||
Where \c select options are:
|
||||
\plaintable
|
||||
cellZone | requires a 'name' entry to specify the cellZone
|
||||
all | all cells
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -250,8 +250,8 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fieldName + '_' + regionTypeNames_[regionType_]
|
||||
+ '-' + volRegion::regionName_,
|
||||
fieldName + '_' + selectionTypeNames_[selectionType_]
|
||||
+ '-' + volRegion::cellZoneName_,
|
||||
obr_.time().name(),
|
||||
obr_,
|
||||
IOobject::NO_READ,
|
||||
@ -318,7 +318,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
|
||||
file() << tab << result.value;
|
||||
|
||||
Log << " " << operationTypeNames_[operation_]
|
||||
<< "(" << volRegion::regionName_ << ") of " << fieldName
|
||||
<< "(" << volRegion::cellZoneName_ << ") of " << fieldName
|
||||
<< " = " << result.value;
|
||||
|
||||
if (result.celli != -1)
|
||||
|
||||
@ -38,8 +38,8 @@ functions
|
||||
writeInterval 1;
|
||||
log true;
|
||||
writeFields true;
|
||||
regionType faceZone;
|
||||
name f0;
|
||||
select faceZone;
|
||||
faceZone f0;
|
||||
operation areaAverage;
|
||||
|
||||
fields
|
||||
|
||||
@ -33,7 +33,7 @@ Usage
|
||||
{
|
||||
type fixedTemperatureConstraint;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
phase gas; // Optional phase name
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ Usage
|
||||
{
|
||||
type fixedValueConstraint;
|
||||
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
fieldValues
|
||||
|
||||
@ -78,7 +78,7 @@ inline bool Foam::fv::limitMag::constrainType
|
||||
}
|
||||
|
||||
// handle boundaries in the case of 'all'
|
||||
if (set_.selectionMode() == fvCellSet::selectionModeType::all)
|
||||
if (set_.selectionType() == fvCellSet::selectionTypes::all)
|
||||
{
|
||||
typename VolField<Type>::Boundary& psibf =
|
||||
psi.boundaryFieldRef();
|
||||
|
||||
@ -34,7 +34,7 @@ Usage
|
||||
{
|
||||
type limitMag;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
field U;
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ bool Foam::fv::limitTemperature::constrain(volScalarField& he) const
|
||||
}
|
||||
|
||||
// Handle boundaries in the case of 'all'
|
||||
if (set_.selectionMode() == fvCellSet::selectionModeType::all)
|
||||
if (set_.selectionType() == fvCellSet::selectionTypes::all)
|
||||
{
|
||||
volScalarField::Boundary& Tbf = he.boundaryFieldRef();
|
||||
|
||||
@ -153,7 +153,7 @@ bool Foam::fv::limitTemperature::constrain(volScalarField& he) const
|
||||
}
|
||||
|
||||
// Handle boundaries in the case of 'all'
|
||||
if (set_.selectionMode() == fvCellSet::selectionModeType::all)
|
||||
if (set_.selectionType() == fvCellSet::selectionTypes::all)
|
||||
{
|
||||
volScalarField::Boundary& bf = he.boundaryFieldRef();
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ Usage
|
||||
{
|
||||
type limitTemperature;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
// field T; // Optional energy/temperature field name
|
||||
// Set to T for compressibleVoF
|
||||
|
||||
@ -35,7 +35,7 @@ Usage
|
||||
{
|
||||
type meanVelocityForce;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
U U; // Name of velocity field
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ Usage
|
||||
{
|
||||
type patchMeanVelocityForce;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
U U; // Name of velocity field
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ Usage
|
||||
{
|
||||
type accelerationSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
U U;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ Usage
|
||||
{
|
||||
type actuationDiskSource;
|
||||
|
||||
selectionMode cellSet;
|
||||
select cellSet;
|
||||
cellSet actuationDisk1;
|
||||
|
||||
diskDir (-1 0 0); // Disk direction
|
||||
|
||||
@ -66,7 +66,7 @@ Usage
|
||||
{
|
||||
type effectivenessHeatExchangerSource;
|
||||
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
secondaryMassFlowRate 1.0;
|
||||
|
||||
@ -35,7 +35,7 @@ Usage
|
||||
{
|
||||
type heatSource;
|
||||
|
||||
selectionMode cellSet;
|
||||
select cellSet;
|
||||
cellSet heater;
|
||||
|
||||
Q 1e6;
|
||||
|
||||
@ -47,7 +47,7 @@ Usage
|
||||
{
|
||||
type heatTransfer;
|
||||
|
||||
selectionMode cellSet;
|
||||
select cellSet;
|
||||
cellSet c0;
|
||||
|
||||
semiImplicit no;
|
||||
|
||||
@ -35,7 +35,7 @@ Usage
|
||||
{
|
||||
type massSource;
|
||||
|
||||
selectionMode cellSet;
|
||||
select cellSet;
|
||||
cellSet massSource;
|
||||
|
||||
massFlowRate 1e-4;
|
||||
|
||||
@ -60,7 +60,7 @@ Usage
|
||||
{
|
||||
type radialActuationDiskSource;
|
||||
|
||||
selectionMode cellSet;
|
||||
select cellSet;
|
||||
cellSet radialActuationDisk1;
|
||||
|
||||
U U; // Name of the velocity field
|
||||
|
||||
@ -111,11 +111,11 @@ void Foam::fv::rotorDiskSource::readCoeffs()
|
||||
void Foam::fv::rotorDiskSource::checkData()
|
||||
{
|
||||
// Set inflow type
|
||||
switch (set_.selectionMode())
|
||||
switch (set_.selectionType())
|
||||
{
|
||||
case fvCellSet::selectionModeType::cellSet:
|
||||
case fvCellSet::selectionModeType::cellZone:
|
||||
case fvCellSet::selectionModeType::all:
|
||||
case fvCellSet::selectionTypes::cellSet:
|
||||
case fvCellSet::selectionTypes::cellZone:
|
||||
case fvCellSet::selectionTypes::all:
|
||||
{
|
||||
// Set the profile ID for each blade section
|
||||
profiles_.connectBlades(blade_.profileName(), blade_.profileID());
|
||||
@ -151,14 +151,14 @@ void Foam::fv::rotorDiskSource::checkData()
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Source cannot be used with '"
|
||||
<< fvCellSet::selectionModeTypeNames_[set_.selectionMode()]
|
||||
<< fvCellSet::selectionTypeNames_[set_.selectionType()]
|
||||
<< "' mode. Please use one of: " << nl
|
||||
<< fvCellSet::selectionModeTypeNames_
|
||||
[fvCellSet::selectionModeType::cellSet] << nl
|
||||
<< fvCellSet::selectionModeTypeNames_
|
||||
[fvCellSet::selectionModeType::cellZone] << nl
|
||||
<< fvCellSet::selectionModeTypeNames_
|
||||
[fvCellSet::selectionModeType::all]
|
||||
<< fvCellSet::selectionTypeNames_
|
||||
[fvCellSet::selectionTypes::cellSet] << nl
|
||||
<< fvCellSet::selectionTypeNames_
|
||||
[fvCellSet::selectionTypes::cellZone] << nl
|
||||
<< fvCellSet::selectionTypeNames_
|
||||
[fvCellSet::selectionTypes::all]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ Usage
|
||||
{
|
||||
type solidificationMeltingSource;
|
||||
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone iceZone;
|
||||
|
||||
Tsol 273;
|
||||
|
||||
@ -34,7 +34,7 @@ Usage
|
||||
{
|
||||
type coded;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
field h;
|
||||
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ Description
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone porousBlockage;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
@ -32,7 +32,7 @@ namespace Foam
|
||||
{
|
||||
template<> const char* NamedEnum
|
||||
<
|
||||
polyCellSet::selectionModeType,
|
||||
polyCellSet::selectionTypes,
|
||||
4
|
||||
>::names[] =
|
||||
{
|
||||
@ -42,8 +42,8 @@ namespace Foam
|
||||
"all"
|
||||
};
|
||||
|
||||
const NamedEnum<polyCellSet::selectionModeType, 4>
|
||||
polyCellSet::selectionModeTypeNames_;
|
||||
const NamedEnum<polyCellSet::selectionTypes, 4>
|
||||
polyCellSet::selectionTypeNames_;
|
||||
}
|
||||
|
||||
|
||||
@ -53,9 +53,9 @@ void Foam::polyCellSet::setCells()
|
||||
{
|
||||
Info<< incrIndent;
|
||||
|
||||
switch (selectionMode_)
|
||||
switch (selectionType_)
|
||||
{
|
||||
case selectionModeType::points:
|
||||
case selectionTypes::points:
|
||||
{
|
||||
Info<< indent << "- selecting cells using points" << endl;
|
||||
|
||||
@ -83,7 +83,7 @@ void Foam::polyCellSet::setCells()
|
||||
|
||||
break;
|
||||
}
|
||||
case selectionModeType::cellSet:
|
||||
case selectionTypes::cellSet:
|
||||
{
|
||||
Info<< indent
|
||||
<< "- selecting cells using cellSet " << cellSetName_ << endl;
|
||||
@ -92,7 +92,7 @@ void Foam::polyCellSet::setCells()
|
||||
|
||||
break;
|
||||
}
|
||||
case selectionModeType::cellZone:
|
||||
case selectionTypes::cellZone:
|
||||
{
|
||||
Info<< indent
|
||||
<< "- selecting cells using cellZone " << cellSetName_ << endl;
|
||||
@ -109,7 +109,7 @@ void Foam::polyCellSet::setCells()
|
||||
|
||||
break;
|
||||
}
|
||||
case selectionModeType::all:
|
||||
case selectionTypes::all:
|
||||
{
|
||||
Info<< indent << "- selecting all cells" << endl;
|
||||
cells_ = identity(mesh_.nCells());
|
||||
@ -131,7 +131,7 @@ Foam::polyCellSet::polyCellSet
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
selectionMode_(selectionModeType::all),
|
||||
selectionType_(selectionTypes::all),
|
||||
cellSetName_(word::null)
|
||||
{
|
||||
read(dict);
|
||||
@ -148,7 +148,7 @@ Foam::polyCellSet::~polyCellSet()
|
||||
|
||||
void Foam::polyCellSet::movePoints()
|
||||
{
|
||||
if (selectionMode_ == selectionModeType::points)
|
||||
if (selectionType_ == selectionTypes::points)
|
||||
{
|
||||
setCells();
|
||||
}
|
||||
@ -175,56 +175,58 @@ void Foam::polyCellSet::distribute(const polyDistributionMap&)
|
||||
|
||||
bool Foam::polyCellSet::read(const dictionary& dict)
|
||||
{
|
||||
if (dict.found("selectionMode"))
|
||||
if (dict.found("select") || dict.found("selectionMode"))
|
||||
{
|
||||
selectionMode_ =
|
||||
selectionModeTypeNames_.read(dict.lookup("selectionMode"));
|
||||
selectionType_ = selectionTypeNames_.read
|
||||
(
|
||||
dict.lookupBackwardsCompatible({"select", "selectionMode"})
|
||||
);
|
||||
}
|
||||
else if (dict.found("points"))
|
||||
{
|
||||
selectionMode_ = selectionModeType::points;
|
||||
selectionType_ = selectionTypes::points;
|
||||
}
|
||||
else if (dict.found("cellSet"))
|
||||
{
|
||||
selectionMode_ = selectionModeType::cellSet;
|
||||
selectionType_ = selectionTypes::cellSet;
|
||||
}
|
||||
else if (dict.found("cellZone"))
|
||||
{
|
||||
selectionMode_ = selectionModeType::cellZone;
|
||||
selectionType_ = selectionTypes::cellZone;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.lookup("selectionMode");
|
||||
dict.lookup("select");
|
||||
}
|
||||
|
||||
switch (selectionMode_)
|
||||
switch (selectionType_)
|
||||
{
|
||||
case selectionModeType::points:
|
||||
case selectionTypes::points:
|
||||
{
|
||||
dict.lookup("points") >> points_;
|
||||
break;
|
||||
}
|
||||
case selectionModeType::cellSet:
|
||||
case selectionTypes::cellSet:
|
||||
{
|
||||
dict.lookup("cellSet") >> cellSetName_;
|
||||
break;
|
||||
}
|
||||
case selectionModeType::cellZone:
|
||||
case selectionTypes::cellZone:
|
||||
{
|
||||
dict.lookup("cellZone") >> cellSetName_;
|
||||
break;
|
||||
}
|
||||
case selectionModeType::all:
|
||||
case selectionTypes::all:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown selectionMode "
|
||||
<< selectionModeTypeNames_[selectionMode_]
|
||||
<< nl << "Valid selectionModes:"
|
||||
<< selectionModeTypeNames_.toc()
|
||||
<< "Unknown selection type "
|
||||
<< selectionTypeNames_[selectionType_]
|
||||
<< nl << "Valid selection type:"
|
||||
<< selectionTypeNames_.toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,26 +30,26 @@ Description
|
||||
|
||||
Currently supports cell selection from a set of points, a specified cellSet
|
||||
or cellZone or all of the cells. The selection method can either be
|
||||
specified explicitly using the \c selectionMode entry or inferred from the
|
||||
specified explicitly using the \c select entry or inferred from the
|
||||
presence of either a \c cellSet, \c cellZone or \c points entry. The \c
|
||||
selectionMode entry is required to select \c all cells.
|
||||
select entry is required to select \c all cells.
|
||||
|
||||
Usage
|
||||
Examples:
|
||||
\verbatim
|
||||
// Apply everywhere
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
// Apply within a given cellSet
|
||||
selectionMode cellSet; // Optional
|
||||
select cellSet; // Optional
|
||||
cellSet rotor;
|
||||
|
||||
// Apply within a given cellZone
|
||||
selectionMode cellZone; // Optional
|
||||
cellSet rotor;
|
||||
select cellZone; // Optional
|
||||
cellZone rotor;
|
||||
|
||||
// Apply in cells containing a list of points
|
||||
selectionMode points; // Optional
|
||||
select points; // Optional
|
||||
points
|
||||
(
|
||||
(2.25 0.5 0)
|
||||
@ -87,7 +87,7 @@ public:
|
||||
// Public data
|
||||
|
||||
//- Enumeration for selection mode types
|
||||
enum class selectionModeType
|
||||
enum class selectionTypes
|
||||
{
|
||||
points,
|
||||
cellSet,
|
||||
@ -95,27 +95,28 @@ public:
|
||||
all
|
||||
};
|
||||
|
||||
//- Word list of selection mode type names
|
||||
static const NamedEnum<selectionModeType, 4>
|
||||
selectionModeTypeNames_;
|
||||
//- Word list of selection type names
|
||||
static const NamedEnum<selectionTypes, 4>
|
||||
selectionTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Reference to the mesh
|
||||
const polyMesh& mesh_;
|
||||
|
||||
//- Cell selection mode
|
||||
selectionModeType selectionMode_;
|
||||
//- Cell selection type
|
||||
selectionTypes selectionType_;
|
||||
|
||||
//- Name of cell set for "cellSet" and "cellZone" selectionMode
|
||||
//- Optional name of cell set or zone
|
||||
word cellSetName_;
|
||||
|
||||
//- List of points for "points" selectionMode
|
||||
//- Optional list of points
|
||||
List<point> points_;
|
||||
|
||||
//- Set of cells to apply source to
|
||||
//- Set of selected cells
|
||||
mutable labelList cells_;
|
||||
|
||||
|
||||
@ -145,11 +146,10 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the cell selection mode
|
||||
inline const selectionModeType& selectionMode() const;
|
||||
//- Return const access to the cell selection type
|
||||
inline const selectionTypes& selectionType() const;
|
||||
|
||||
//- Return const access to the name of cell set for "cellSet"
|
||||
// selectionMode
|
||||
//- Return const access to the name of cellSet
|
||||
inline const word& cellSetName() const;
|
||||
|
||||
//- Return const access to the cell set
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,10 +25,10 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::polyCellSet::selectionModeType&
|
||||
Foam::polyCellSet::selectionMode() const
|
||||
inline const Foam::polyCellSet::selectionTypes&
|
||||
Foam::polyCellSet::selectionType() const
|
||||
{
|
||||
return selectionMode_;
|
||||
return selectionType_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ waterSink
|
||||
{
|
||||
type massSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
massFlowRate -21.86682;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ massSource
|
||||
{
|
||||
type massSource;
|
||||
|
||||
selectionMode cellZone;
|
||||
select cellZone;
|
||||
cellZone injection;
|
||||
|
||||
massFlowRate 1e-3;
|
||||
|
||||
@ -17,8 +17,8 @@ writeControl writeTime;
|
||||
writeInterval 1;
|
||||
|
||||
fields (p);
|
||||
regionType cellZone;
|
||||
name injection;
|
||||
select cellZone;
|
||||
cellZone injection;
|
||||
|
||||
operation volAverage;
|
||||
writeFields false;
|
||||
|
||||
@ -18,7 +18,7 @@ waterSource
|
||||
{
|
||||
type massSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
massFlowRate 30.785654;
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ cylinderHeat
|
||||
{
|
||||
type heatSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
q 5e6;
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ cylinderHeat
|
||||
{
|
||||
type heatSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
q 17000;
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ cylinderHeat
|
||||
{
|
||||
type heatSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
q 5e7;
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
fixedTemperature
|
||||
{
|
||||
type fixedTemperatureConstraint;
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
mode uniform;
|
||||
|
||||
@ -29,7 +29,7 @@ fixedTemperature
|
||||
fixedPower
|
||||
{
|
||||
type heatSource;
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
Q 100; // Set power (W)
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
// fixedTemperature
|
||||
// {
|
||||
// type fixedTemperatureConstraint;
|
||||
// selectionMode all;
|
||||
// select all;
|
||||
|
||||
// mode uniform;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ energySource
|
||||
{
|
||||
type heatSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
q 1e7;
|
||||
}
|
||||
|
||||
@ -80,8 +80,8 @@ functions
|
||||
log yes;
|
||||
writeFields false;
|
||||
region fluid;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid);
|
||||
}
|
||||
@ -92,8 +92,8 @@ functions
|
||||
log yes;
|
||||
writeFields false;
|
||||
region fluid;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid);
|
||||
}
|
||||
@ -104,8 +104,8 @@ functions
|
||||
log yes;
|
||||
writeFields false;
|
||||
region fluid;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -117,8 +117,8 @@ functions
|
||||
log yes;
|
||||
writeFields false;
|
||||
region fluid;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
@ -130,8 +130,8 @@ functions
|
||||
log yes;
|
||||
writeFields false;
|
||||
region fluid;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -143,8 +143,8 @@ functions
|
||||
log yes;
|
||||
writeFields false;
|
||||
region fluid;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
|
||||
@ -22,12 +22,12 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction SDA;
|
||||
|
||||
CofG (0 0 0);
|
||||
lambda 50;
|
||||
lambda 50;
|
||||
rollAmax 0.22654;
|
||||
rollAmin 0.10472;
|
||||
heaveA 3.79;
|
||||
|
||||
@ -18,7 +18,7 @@ momentumForce
|
||||
{
|
||||
type meanVelocityForce;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
Ubar (0.1335 0 0);
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ momentumSource
|
||||
{
|
||||
type meanVelocityForce;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
Ubar (0 0 1.95);
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
SRF
|
||||
{
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
|
||||
@ -18,7 +18,7 @@ momentumSource
|
||||
{
|
||||
type semiImplicitSource;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
volumeMode specific;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction rotatingMotion;
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
SRF
|
||||
{
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction multiMotion;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction SDA;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction SDA;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction SDA;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction SDA;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ mover
|
||||
|
||||
motionSolver solidBody;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
solidBodyMotionFunction sixDoFMotion;
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ mover
|
||||
|
||||
solidBodyMotionFunction multiMotion;
|
||||
|
||||
selectionMode all;
|
||||
select all;
|
||||
|
||||
// Table rotating in z axis
|
||||
rotatingTable
|
||||
|
||||
@ -62,8 +62,8 @@ functions
|
||||
log true;
|
||||
// Output field values as well
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
|
||||
fields
|
||||
@ -77,13 +77,13 @@ functions
|
||||
outletFlux
|
||||
{
|
||||
$inletFlux;
|
||||
name outlet;
|
||||
patch outlet;
|
||||
}
|
||||
|
||||
atmosphereFlux
|
||||
{
|
||||
$inletFlux;
|
||||
name atmosphere;
|
||||
patch atmosphere;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -75,8 +75,8 @@ functions
|
||||
log yes;
|
||||
writeTotalArea no;
|
||||
writeFields no;
|
||||
regionType faceZone;
|
||||
name f0;
|
||||
select faceZone;
|
||||
faceZone f0;
|
||||
operation areaAverage;
|
||||
fields
|
||||
(
|
||||
|
||||
@ -75,8 +75,8 @@ functions
|
||||
log yes;
|
||||
writeTotalArea no;
|
||||
writeFields no;
|
||||
regionType faceZone;
|
||||
name f0;
|
||||
select faceZone;
|
||||
faceZone f0;
|
||||
operation areaAverage;
|
||||
fields
|
||||
(
|
||||
|
||||
@ -61,8 +61,8 @@ functions
|
||||
writeControl writeTime;
|
||||
log yes;
|
||||
writeFields no;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation average;
|
||||
weightField phi;
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ functions
|
||||
writeControl writeTime;
|
||||
log yes;
|
||||
writeFields no;
|
||||
regionType patch;
|
||||
select patch;
|
||||
name outlet;
|
||||
operation average;
|
||||
weightField phi;
|
||||
|
||||
@ -57,8 +57,8 @@ functions
|
||||
writeControl writeTime;
|
||||
log yes;
|
||||
writeFields no;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation average;
|
||||
weightField phi;
|
||||
fields
|
||||
|
||||
@ -21,7 +21,7 @@ inletMassFlowRate
|
||||
log true;
|
||||
surfaceFormat none;
|
||||
|
||||
regionType patch;
|
||||
select patch;
|
||||
name inlet;
|
||||
|
||||
operation sum;
|
||||
@ -44,7 +44,7 @@ outletMassFlowRate
|
||||
log true;
|
||||
surfaceFormat none;
|
||||
|
||||
regionType patch;
|
||||
select patch;
|
||||
name outlet;
|
||||
|
||||
operation sum;
|
||||
|
||||
@ -79,7 +79,7 @@ functions
|
||||
(
|
||||
name=probabilityDensity.injection,
|
||||
populationBalance=bubbles,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=injection,
|
||||
functionType=volumeDensity,
|
||||
coordinateType=diameter,
|
||||
@ -90,7 +90,7 @@ functions
|
||||
(
|
||||
name=probabilityDensity.outlet,
|
||||
populationBalance=bubbles,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=outlet,
|
||||
functionType=volumeDensity,
|
||||
coordinateType=diameter,
|
||||
|
||||
@ -59,7 +59,7 @@ functions
|
||||
(
|
||||
name=probabilityDensity.afterBend_1d,
|
||||
populationBalance=agglomerates,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=afterBend_1d,
|
||||
functionType=volumeDensity,
|
||||
coordinateType=diameter,
|
||||
@ -70,7 +70,7 @@ functions
|
||||
(
|
||||
name=probabilityDensity.afterBend_5d,
|
||||
populationBalance=agglomerates,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=afterBend_5d,
|
||||
functionType=volumeDensity,
|
||||
coordinateType=diameter,
|
||||
@ -81,7 +81,7 @@ functions
|
||||
(
|
||||
name=probabilityDensity.afterBend_9d,
|
||||
populationBalance=agglomerates,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=afterBend_9d,
|
||||
functionType=volumeDensity,
|
||||
coordinateType=diameter,
|
||||
@ -92,7 +92,7 @@ functions
|
||||
(
|
||||
name=probabilityDensity.beforeBend_1d,
|
||||
populationBalance=agglomerates,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=beforeBend_1d,
|
||||
functionType=volumeDensity,
|
||||
coordinateType=diameter,
|
||||
|
||||
@ -66,7 +66,7 @@ functions
|
||||
(
|
||||
name=numberDensity,
|
||||
populationBalance=aggregates,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=outlet,
|
||||
functionType=numberDensity,
|
||||
coordinateType=projectedAreaDiameter,
|
||||
|
||||
@ -66,7 +66,7 @@ functions
|
||||
(
|
||||
name=numberDensity,
|
||||
populationBalance=aggregates,
|
||||
regionType=cellZone,
|
||||
select=cellZone,
|
||||
cellZone=outlet,
|
||||
functionType=numberDensity,
|
||||
coordinateType=projectedAreaDiameter,
|
||||
|
||||
@ -67,8 +67,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid);
|
||||
}
|
||||
@ -78,8 +78,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid);
|
||||
}
|
||||
@ -89,8 +89,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -101,8 +101,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
@ -113,8 +113,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -125,8 +125,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
|
||||
@ -71,8 +71,8 @@ functions
|
||||
log yes;
|
||||
functionType volumeConcentration;
|
||||
coordinateType diameter;
|
||||
regionType cellZone;
|
||||
name x349;
|
||||
select cellZone;
|
||||
cellZone x349;
|
||||
populationBalance bubbles;
|
||||
}
|
||||
volumeDensity_bulk.diameter.bubbles
|
||||
@ -85,8 +85,8 @@ functions
|
||||
log yes;
|
||||
functionType volumeConcentration;
|
||||
coordinateType diameter;
|
||||
regionType cellZone;
|
||||
name x349_bulk;
|
||||
select cellZone;
|
||||
cellZone x349_bulk;
|
||||
populationBalance bubbles;
|
||||
}
|
||||
volumeDensity_wall.diameter.bubbles
|
||||
@ -99,8 +99,8 @@ functions
|
||||
log yes;
|
||||
functionType volumeConcentration;
|
||||
coordinateType diameter;
|
||||
regionType cellZone;
|
||||
name x349_wall;
|
||||
select cellZone;
|
||||
cellZone x349_wall;
|
||||
populationBalance bubbles;
|
||||
}
|
||||
outflow
|
||||
@ -109,8 +109,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid );
|
||||
}
|
||||
@ -120,8 +120,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid );
|
||||
}
|
||||
@ -131,8 +131,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -143,8 +143,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
@ -155,8 +155,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -167,8 +167,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
|
||||
@ -71,8 +71,8 @@ functions
|
||||
log yes;
|
||||
functionType volumeConcentration;
|
||||
coordinateType diameter;
|
||||
regionType cellZone;
|
||||
name x349;
|
||||
select cellZone;
|
||||
cellZone x349;
|
||||
populationBalance bubbles;
|
||||
}
|
||||
volumeDensity_bulk.diameter.bubbles
|
||||
@ -85,8 +85,8 @@ functions
|
||||
log yes;
|
||||
functionType volumeConcentration;
|
||||
coordinateType diameter;
|
||||
regionType cellZone;
|
||||
name x349_bulk;
|
||||
select cellZone;
|
||||
cellZone x349_bulk;
|
||||
populationBalance bubbles;
|
||||
}
|
||||
volumeDensity_wall.diameter.bubbles
|
||||
@ -99,8 +99,8 @@ functions
|
||||
log yes;
|
||||
functionType volumeConcentration;
|
||||
coordinateType diameter;
|
||||
regionType cellZone;
|
||||
name x349_wall;
|
||||
select cellZone;
|
||||
cellZone x349_wall;
|
||||
populationBalance bubbles;
|
||||
}
|
||||
outflow
|
||||
@ -109,8 +109,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid );
|
||||
}
|
||||
@ -120,8 +120,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid );
|
||||
}
|
||||
@ -131,8 +131,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -143,8 +143,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas2;
|
||||
fields ( h.gas2 );
|
||||
@ -155,8 +155,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
select patch;
|
||||
patch outlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
@ -167,8 +167,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas;
|
||||
fields ( h.gas );
|
||||
@ -179,8 +179,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.gas2;
|
||||
fields ( h.gas2 );
|
||||
@ -191,8 +191,8 @@ functions
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
log yes;
|
||||
writeFields false;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
select patch;
|
||||
patch inlet;
|
||||
operation sum;
|
||||
weightField alphaRhoPhi.liquid;
|
||||
fields ( h.liquid );
|
||||
|
||||
Reference in New Issue
Block a user