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);
}
91 lines
1.7 KiB
C++
91 lines
1.7 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
format ascii;
|
|
class dictionary;
|
|
location "system";
|
|
object controlDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
application foamRun;
|
|
|
|
solver incompressibleVoF;
|
|
|
|
startFrom startTime;
|
|
|
|
startTime 0;
|
|
|
|
stopAt endTime;
|
|
|
|
endTime 200;
|
|
|
|
deltaT 0.1;
|
|
|
|
writeControl adjustableRunTime;
|
|
|
|
writeInterval 5;
|
|
|
|
purgeWrite 0;
|
|
|
|
writeFormat binary;
|
|
|
|
writePrecision 6;
|
|
|
|
writeCompression off;
|
|
|
|
timeFormat general;
|
|
|
|
timePrecision 6;
|
|
|
|
runTimeModifiable yes;
|
|
|
|
adjustTimeStep yes;
|
|
|
|
maxCo 6;
|
|
maxAlphaCo 6;
|
|
maxDeltaT 1;
|
|
|
|
functions
|
|
{
|
|
inletFlux
|
|
{
|
|
type surfaceFieldValue;
|
|
libs ("libfieldFunctionObjects.so");
|
|
writeControl timeStep;
|
|
log true;
|
|
// Output field values as well
|
|
writeFields false;
|
|
select patch;
|
|
patch inlet;
|
|
operation sum;
|
|
|
|
fields
|
|
(
|
|
phi
|
|
);
|
|
|
|
weightField alpha.water;
|
|
}
|
|
|
|
outletFlux
|
|
{
|
|
$inletFlux;
|
|
patch outlet;
|
|
}
|
|
|
|
atmosphereFlux
|
|
{
|
|
$inletFlux;
|
|
patch atmosphere;
|
|
}
|
|
}
|
|
|
|
// ************************************************************************* //
|