diff --git a/src/functionObjects/field/fieldAverage/controlDict b/src/functionObjects/field/fieldAverage/controlDict deleted file mode 100644 index dfb085609f..0000000000 --- a/src/functionObjects/field/fieldAverage/controlDict +++ /dev/null @@ -1,85 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application XXX; - -startFrom latestTime; - -startTime 0; - -stopAt endTime; - -endTime 0.1; - -deltaT 1e-05; - -writeControl timeStep; - -writeInterval 10; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - fieldAverage1 - { - // Type of functionObject - type fieldAverage; - - // Where to load it from (if not already in solver) - libs ("libfieldFunctionObjects.so"); - - // Function object enabled flag - enabled true; - - // When to output the average fields - writeControl writeTime; - - // Fields to be averaged - runTime modifiable - fields - ( - U - { - mean on; - prime2Mean on; - base time; - window 0.01; // optional averaging window - } - - p - { - mean on; - prime2Mean on; - base time; - window 0.01; // optional averaging window - } - ); - } -} - -// ************************************************************************* // diff --git a/src/functionObjects/field/fieldAverage/fieldAverage.H b/src/functionObjects/field/fieldAverage/fieldAverage.H index ec3c5ae9ea..62c2aaf647 100644 --- a/src/functionObjects/field/fieldAverage/fieldAverage.H +++ b/src/functionObjects/field/fieldAverage/fieldAverage.H @@ -70,11 +70,14 @@ Description { type fieldAverage; libs ("libfieldFunctionObjects.so"); - ... + + writeControl writeTime; + restartOnRestart false; restartOnOutput false; periodicRestart false; restartPeriod 0.002; + fields ( U @@ -97,13 +100,13 @@ Description Usage \table - Property | Description | Required | Default value - type | type name: fieldAverage | yes | + Property | Description | Required | Default value + type | type name: fieldAverage | yes | restartOnRestart | Restart the averaging on restart | no | no restartOnOutput | Restart the averaging on output | no | no - periodicRestart | Periodically restart the averaging | no | no - restartPeriod | Periodic restart period | conditional | - fields | list of fields and averaging options | yes | + periodicRestart | Periodically restart the averaging | no | no + restartPeriod | Periodic restart period | conditional | + fields | list of fields and averaging options | yes | \endtable diff --git a/src/functionObjects/field/fieldValues/controlDict b/src/functionObjects/field/fieldValues/controlDict deleted file mode 100644 index 0a2c9dc13d..0000000000 --- a/src/functionObjects/field/fieldValues/controlDict +++ /dev/null @@ -1,129 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application icoFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 0.5; - -deltaT 0.005; - -writeControl timeStep; - -writeInterval 20; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - faceObj1 - { - type surfaceRegion; - libs ("libfieldFunctionObjects.so"); - - enabled true; - writeControl writeTime; - - // Output to log&file (true) or to file only - log true; - - // Output field values as well - writeFields true; - - // Type of region: patch/faceZone/sampledSurface - regionType patch; - - // if patch or faceZone: name of patch or faceZone - name movingWall; - - //// if sampledSurface: dictionary with a sampledSurface - //// Note: will not sample surface fields. - //sampledSurfaceDict - //{ - // // Sampling on triSurface - // type sampledTriSurfaceMesh; - // surface integrationPlane.stl; - // regionType cells; // sample cells or boundaryFaces - // interpolate true; - //} - - // Operation: areaAverage/sum/weightedAverage ... - operation areaAverage; - - fields - ( - p - phi // surface fields not supported for sampledSurface - U - ); - } - - faceObj2 - { - type surfaceRegion; - libs ("libfieldFunctionObjects.so"); - enabled true; - writeControl writeTime; - log true; - writeFields true; - regionType faceZone; - name f0; - operation sum; - - fields - ( - phi - ); - } - - cellObj1 - { - type volRegion; - libs ("libfieldFunctionObjects.so"); - enabled true; - writeControl writeTime; - log true; - writeFields true; - regionType cellZone; - name c0; - operation volAverage; - - fields - ( - p - U - ); - } -} - -// ************************************************************************* // diff --git a/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H b/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H index fa5c623d0b..9f1010abb6 100644 --- a/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H +++ b/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H @@ -37,20 +37,47 @@ Description For example, to calculate the volumetric or mass flux across a patch, apply the 'sum' operator to the flux field (typically \c phi) - Example of function object specification: + Examples of function object specification: \verbatim + movingWallPatch + { + type surfaceRegion; + libs ("libfieldFunctionObjects.so"); + + log true; + writeControl writeTime; + writeFields true; + + regionType patch; + name movingWall; + + operation areaAverage; + + fields + ( + p + phi + U + ); + } + surfaceRegion1 { type surfaceRegion; libs ("libfieldFunctionObjects.so"); - ... - log yes; + + log true; + writeControl writeTime; writeFields true; + surfaceFormat none; regionType faceZone; name f0; + operation sum; + weightField alpha1; + fields ( p diff --git a/src/functionObjects/field/fieldValues/volRegion/volRegion.H b/src/functionObjects/field/fieldValues/volRegion/volRegion.H index 6f8b7ddfe4..bfc41749e7 100644 --- a/src/functionObjects/field/fieldValues/volRegion/volRegion.H +++ b/src/functionObjects/field/fieldValues/volRegion/volRegion.H @@ -41,13 +41,17 @@ Description { type volRegion; libs ("libfieldFunctionObjects.so"); - ... + log true; + writeControl writeTime; writeFields true; + regionType cellZone; name c0; operation volAverage; + weightField alpha1; + fields ( p diff --git a/src/functionObjects/field/nearWallFields/controlDict b/src/functionObjects/field/nearWallFields/controlDict deleted file mode 100644 index e2b79fc221..0000000000 --- a/src/functionObjects/field/nearWallFields/controlDict +++ /dev/null @@ -1,78 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application icoFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 0.5; - -deltaT 0.005; - -writeControl timeStep; - -writeInterval 20; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - near - { - // Where to load it from - libs ("libfieldFunctionObjects.so"); - - type nearWallFields; - - // Output every - writeControl writeTime; //timeStep; - //writeInterval 5; - - // Fields to be sampled. Per field original name and mapped field to - // create. - // Note: fields only get updated when writing! - fields - ( - (p pNear) - (U UNear) - ); - - // Patches to sample (regular expressions) - patches ("movingWall"); - - // Distance to sample - distance 0.009; - } -} - - -// ************************************************************************* // diff --git a/src/functionObjects/field/nearWallFields/nearWallFields.H b/src/functionObjects/field/nearWallFields/nearWallFields.H index 68c9e99beb..79404bc8f5 100644 --- a/src/functionObjects/field/nearWallFields/nearWallFields.H +++ b/src/functionObjects/field/nearWallFields/nearWallFields.H @@ -44,9 +44,17 @@ Description { type nearWallFields; libs ("libfieldFunctionObjects.so"); - ... - fields ((p pNear)(U UNear)); + + writeControl writeTime; + + fields + ( + (p pNear) + (U UNear) + ); + patches (movingWall); + distance 0.13; } \endverbatim diff --git a/src/functionObjects/field/streamLine/controlDict b/src/functionObjects/field/streamLine/controlDict deleted file mode 100644 index 3b001fc10c..0000000000 --- a/src/functionObjects/field/streamLine/controlDict +++ /dev/null @@ -1,103 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application icoFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 0.5; - -deltaT 0.005; - -writeControl timeStep; - -writeInterval 20; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - streamLines - { - type streamLine; - - // Where to load it from (if not already in solver) - libs ("libfieldFunctionObjects.so"); - - // Output every - writeControl writeTime; - // writeInterval 10; - - setFormat vtk; // gnuplot, raw etc. - - // Interpolation method. Default is cellPoint. - // interpolationScheme pointMVC; - - // Tracked forwards (+U) or backwards (-U) - trackForward true; - - // Names of fields to sample. Should contain above velocity field! - fields (p U); - - // Steps particles can travel before being removed - lifeTime 10000; - - //- Specify either absolute length of steps (trackLength) or a number - // of subcycling steps per cell (nSubCycle) - - // Size of single track segment [m] - //trackLength 1e-3; - - // Number of steps per cell (estimate). Set to 1 to disable - // subcycling. - nSubCycle 5; - - // Cloud name to use - cloudName particleTracks; - - // Seeding method. - seedSampleSet uniform; // cloud; //triSurfaceMeshPointSet; - - uniformCoeffs - { - type uniform; - axis x; //distance; - - start (-0.0205 0.0001 0.00001); - end (-0.0205 0.0005 0.00001); - nPoints 100; - } - } -} - - -// ************************************************************************* // diff --git a/src/functionObjects/field/streamLine/streamLine.H b/src/functionObjects/field/streamLine/streamLine.H index 70fbefac15..0c6b9eef9a 100644 --- a/src/functionObjects/field/streamLine/streamLine.H +++ b/src/functionObjects/field/streamLine/streamLine.H @@ -37,7 +37,9 @@ Description { type streamLine; libs ("libfieldFunctionObjects.so"); - ... + + writeControl writeTime; + setFormat vtk; trackForward yes; fields diff --git a/src/functionObjects/field/wallBoundedStreamLine/controlDict b/src/functionObjects/field/wallBoundedStreamLine/controlDict deleted file mode 100644 index f412db6aec..0000000000 --- a/src/functionObjects/field/wallBoundedStreamLine/controlDict +++ /dev/null @@ -1,148 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application icoFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 0.5; - -deltaT 0.005; - -writeControl timeStep; - -writeInterval 20; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - readFields - { - // Where to load it from (if not already in solver) - libs ("libfieldFunctionObjects.so"); - - type readFields; - fields (p U k); - } - - near - { - // Where to load it from - libs ("libfieldFunctionObjects.so"); - - type nearWallFields; - - // Output every - writeControl writeTime; - //writeInterval 1; - - // Fields to be sampled. Per field original name and mapped field to - // create. - fields - ( - (U UNear) - ); - - // Patches/groups to sample (regular expressions) - patches (motorBike); - - // Distance to sample - distance 0.001; - } - streamLines - { - // Where to load it from (if not already in solver) - libs ("libfieldFunctionObjects.so"); - type wallBoundedStreamLine; - - // Output every - writeControl timeStep; //writeTime; - // writeInterval 10; - - setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; - - // Velocity field to use for tracking. - U UNear; - - // Interpolation method. Default is cellPoint. - // interpolationScheme pointMVC; - - // Tracked forwards (+U) or backwards (-U) - trackForward true; - - interpolationScheme cellPoint; - - // Names of fields to sample. Should contain above velocity field! - fields (p U k UNear); - - // Steps particles can travel before being removed - lifeTime 100; - - // Optional absolute length of steps (trackLength) - // Size of single track segment [m] - //trackLength 1e-3; - - // Cloud name to use - cloudName particleTracks; - - // Seeding method. - seedSampleSet patchSeed; //cloud; //triSurfaceMeshPointSet; - - uniformCoeffs - { - type uniform; - axis x; //distance; - - start (0.0035 0.0999 0.0001); - end (0.0035 0.0999 0.0099); - nPoints 20; - } - - cloudCoeffs - { - type cloud; - axis x; //distance; - points ((0.351516548679288 -0.0116085375585099 1.24)); - } - patchSeedCoeffs - { - type patchSeed;//patchCloud; //cloud; //uniform; - patches (motorBike); - axis x; //distance; - maxPoints 20000; - } - } -} - - -// ************************************************************************* // diff --git a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H index 14f21c65c8..d4f1a6f7fb 100644 --- a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H +++ b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H @@ -38,19 +38,24 @@ Description { type wallBoundedStreamLine; libs ("libfieldFunctionObjects.so"); - ... + + writeControl writeTime; + setFormat vtk; U UNear; trackForward yes; + fields ( UNear p ); + lifeTime 10000; trackLength 1e-3; nSubCycle 5; cloudName particleTracks; + seedSampleSet patchSeed; patchSeedCoeffs {