From 5d0d9a4fa3688394ec59089ddcac9a18aff31a71 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 8 Jul 2021 13:50:42 +0100 Subject: [PATCH] postProcess: Improve usability of packaged function objects Packaged function objects can now be deployed equally effectively by (a) using a locally edited copy of the configuration file, or by (b) passing parameters as arguments to the global configuration file. For example, to post-process the pressure field "p" at a single location "(1 2 3)", the user could first copy the "probes" packaged function object file to their system directory by calling "foamGet probes". They could then edit the file to contain the following entries: points ((1 2 3)); field p; The function object can then be executed by the postProcess application: postProcess -func probes Or it can be called at run-time, by including from within the functions section of the system/controlDict file: #includeFunc probes Alternatively, the field and points parameters could be passed as arguments either to the postProcess application by calling: postProcess -func "probes(points=((1 2 3)), p)" Or by using the #includeFunc directive: #includeFunc probes(points=((1 2 3)), p) In both cases, mandatory parameters that must be either edited or provided as arguments are denoted in the configuration files with angle-brackets, e.g.: points (); Many of the packaged function objects have been split up to make them more specific to a particular use-case. For example, the "surfaces" function has been split up into separate functions for each surface type; "cutPlaneSurface", "isoSurface", and "patchSurface". This splitting means that the packaged functions now only contain one set of relevant parameters so, unlike previously, they now work effectively with their parameters passed as arguments. To ensure correct usage, all case-dependent parameters are considered mandatory. For example, the "streamlines" packaged function object has been split into specific versions; "streamlinesSphere", "streamlinesLine", "streamlinesPatch" and "streamlinesPoints". The name ending denotes the seeding method. So, the following command creates ten streamlines with starting points randomly seeded within a sphere with a specified centre and radius: postProcess -func "streamlinesSphere(nPoints=10, centre=(0 0 0), radius=1)" The equivalent #includeFunc approach would be: #includeFunc streamlinesSphere(nPoints=10, centre=(0 0 0), radius=1) When passing parameters as arguments, error messages report accurately which mandatory parameters are missing and provide instructions to correct the format of the input. For example, if "postProcess -func graphUniform" is called, then the code prints the following error message: --> FOAM FATAL IO ERROR: Essential value for keyword 'start' not set Essential value for keyword 'end' not set Essential value for keyword 'nPoints' not set Essential value for keyword 'fields' not set In function entry: graphUniform In command: postProcess -func graphUniform The function entry should be: graphUniform(start = , end = , nPoints = , fields = ()) file: controlDict/functions/graphUniform from line 15 to line 25. As always, a full list of all packaged function objects can be obtained by running "postProcess -list", and a description of each function can be obtained by calling "foamInfo ". An example case has been added at "test/postProcessing/channel" which executes almost all packaged function objects using both postProcess and #includeFunc. This serves both as an example of syntax and as a unit test for maintenance. --- etc/caseDicts/postProcessing/combustion/Qdot | 6 +- .../postProcessing/control/stopAtClockTime | 4 +- .../postProcessing/control/writeObjects | 2 +- etc/caseDicts/postProcessing/fields/CourantNo | 3 +- etc/caseDicts/postProcessing/fields/Lambda2 | 3 +- etc/caseDicts/postProcessing/fields/MachNo | 3 +- etc/caseDicts/postProcessing/fields/PecletNo | 3 +- etc/caseDicts/postProcessing/fields/Q | 3 +- etc/caseDicts/postProcessing/fields/age | 10 +- etc/caseDicts/postProcessing/fields/enstrophy | 3 +- .../postProcessing/fields/fieldAverage | 2 +- etc/caseDicts/postProcessing/fields/flowType | 3 +- etc/caseDicts/postProcessing/fields/log | 1 - etc/caseDicts/postProcessing/fields/scale | 4 +- .../postProcessing/fields/streamFunction | 3 +- .../postProcessing/fields/turbulenceFields | 2 +- etc/caseDicts/postProcessing/fields/vorticity | 3 +- .../fields/wallHeatTransferCoeff | 9 +- .../{fields => fieldsOperations}/add | 2 +- .../{fields => fieldsOperations}/divide | 0 .../{fields => fieldsOperations}/multiply | 0 .../{fields => fieldsOperations}/subtract | 2 +- .../{fields => fieldsOperations}/uniform | 0 .../forces/forceCoeffsCompressible | 31 +- .../forces/forceCoeffsIncompressible | 29 +- .../postProcessing/forces/forcesCompressible | 13 +- .../forces/forcesIncompressible | 13 +- .../postProcessing/forces/phaseForces | 2 +- etc/caseDicts/postProcessing/graphs/graph.cfg | 12 +- .../graphs/{singleGraph => graphCell} | 27 +- .../postProcessing/graphs/graphCell.cfg | 22 + .../postProcessing/graphs/graphUniform | 27 ++ .../postProcessing/graphs/graphUniform.cfg | 23 + .../postProcessing/lagrangian/dsmcFields | 12 +- etc/caseDicts/postProcessing/minMax/cellMax | 4 +- .../flowRatePatch.cfg => minMax/cellMax.cfg} | 5 +- .../cellMaxMag} | 8 +- .../postProcessing/minMax/cellMaxMag.cfg | 13 + etc/caseDicts/postProcessing/minMax/cellMin | 2 +- .../postProcessing/minMax/cellMin.cfg | 1 + .../staticPressure => minMax/cellMinMag} | 7 +- .../postProcessing/minMax/cellMinMag.cfg | 13 + .../postProcessing/minMax/cellMinMax.cfg | 1 - .../postProcessing/numerical/residuals | 2 +- .../pressure/staticPressureIncompressible | 18 + ...e.cfg => staticPressureIncompressible.cfg} | 1 + .../pressure/totalPressureCompressible | 4 +- .../pressure/totalPressureCompressible.cfg | 6 +- .../pressure/totalPressureIncompressible | 5 +- .../pressure/totalPressureIncompressible.cfg | 8 +- .../postProcessing/probes/boundaryProbes | 12 +- .../postProcessing/probes/boundaryProbes.cfg | 12 +- .../postProcessing/probes/interfaceHeight | 10 +- .../postProcessing/probes/interfaceHeight.cfg | 2 + .../postProcessing/probes/internalProbes | 8 +- .../postProcessing/probes/internalProbes.cfg | 5 + etc/caseDicts/postProcessing/probes/probes | 10 +- .../postProcessing/probes/probes.cfg | 2 + .../solvers/{particles => }/particles | 0 .../phaseScalarTransport | 9 +- .../phaseScalarTransport.cfg | 0 .../{scalarTransport => }/scalarTransport | 16 +- .../{scalarTransport => }/scalarTransport.cfg | 0 .../streamLines.cfg} | 0 .../streamLines/streamLinesLine | 25 ++ .../streamLines/streamLinesLine.cfg | 20 + .../streamLines/streamLinesPatch | 24 + .../streamLinesPatch.cfg} | 13 +- .../streamLines/streamLinesPoints | 23 + .../streamLinesPoints.cfg} | 11 +- .../streamLines/streamLinesSphere | 25 ++ .../streamLines/streamLinesSphere.cfg | 20 + .../postProcessing/surface/cutPlaneSurface | 24 + .../surface/cutPlaneSurface.cfg | 23 + .../postProcessing/surface/isoSurface | 23 + .../postProcessing/surface/isoSurface.cfg | 22 + .../postProcessing/surface/patchSurface | 22 + .../patchSurface.cfg} | 13 +- .../Qdot.cfg => surface/surface.cfg} | 9 +- .../surfaceFieldValue/faceZoneAverage | 8 +- .../faceZoneFlowRate} | 6 +- .../{faceZone.cfg => faceZoneValue.cfg} | 2 +- .../surfaceFieldValue/patchAverage | 10 +- .../R => surfaceFieldValue/patchDifference} | 12 +- .../patchDifference.cfg} | 3 +- .../patchFlowRate} | 8 +- .../surfaceFieldValue/patchIntegrate | 10 +- .../{patch.cfg => patchValue.cfg} | 3 +- .../surfaceDifference.cfg} | 9 +- .../{surfaceRegion.cfg => surfaceValue.cfg} | 0 .../triSurfaceDifference} | 12 +- .../triSurfaceDifference.cfg} | 9 +- ...iSurfaceRegion.cfg => triSurfaceValue.cfg} | 2 +- .../triSurfaceVolumetricFlowRate} | 6 +- .../postProcessing/visualisation/streamlines | 120 ----- .../postProcessing/visualisation/surfaces | 56 --- .../postProcessing/visualisation/surfaces.cfg | 43 -- .../includeFuncEntry/includeFuncEntry.C | 4 +- .../functionObjectList/functionObjectList.C | 151 +++++-- .../functionObjectList/functionObjectList.H | 10 +- .../primitives/strings/string/string.C | 35 +- .../primitives/strings/string/string.H | 5 +- src/functionObjects/field/pressure/pressure.C | 7 +- .../field/turbulenceFields/turbulenceFields.H | 8 +- test/postProcessing/channel/0/T | 45 ++ test/postProcessing/channel/0/U | 45 ++ test/postProcessing/channel/0/alphat | 47 ++ test/postProcessing/channel/0/epsilon | 48 ++ test/postProcessing/channel/0/k | 48 ++ test/postProcessing/channel/0/nut | 49 ++ test/postProcessing/channel/0/p | 45 ++ test/postProcessing/channel/0/p_rgh | 45 ++ test/postProcessing/channel/0/s | 45 ++ test/postProcessing/channel/0/s.dummy | 20 + test/postProcessing/channel/Allclean | 20 + test/postProcessing/channel/Allrun | 10 + test/postProcessing/channel/constant/g | 21 + .../channel/constant/momentumTransport | 30 ++ .../channel/constant/thermophysicalProperties | 48 ++ .../channel/constant/thermophysicalTransport | 25 ++ .../channel/constant/triSurface/mid.obj | 143 ++++++ .../channel/constant/triSurface/nearInlet.obj | 143 ++++++ .../constant/triSurface/nearOutlet.obj | 143 ++++++ .../channel/system/blockMeshDict | 80 ++++ .../postProcessing/channel/system/controlDict | 417 ++++++++++++++++++ test/postProcessing/channel/system/fvSchemes | 65 +++ test/postProcessing/channel/system/fvSolution | 35 ++ .../postProcessing/channel/system/topoSetDict | 41 ++ 128 files changed, 2472 insertions(+), 488 deletions(-) rename etc/caseDicts/postProcessing/{fields => fieldsOperations}/add (95%) rename etc/caseDicts/postProcessing/{fields => fieldsOperations}/divide (100%) rename etc/caseDicts/postProcessing/{fields => fieldsOperations}/multiply (100%) rename etc/caseDicts/postProcessing/{fields => fieldsOperations}/subtract (95%) rename etc/caseDicts/postProcessing/{fields => fieldsOperations}/uniform (100%) rename etc/caseDicts/postProcessing/graphs/{singleGraph => graphCell} (57%) create mode 100644 etc/caseDicts/postProcessing/graphs/graphCell.cfg create mode 100644 etc/caseDicts/postProcessing/graphs/graphUniform create mode 100644 etc/caseDicts/postProcessing/graphs/graphUniform.cfg rename etc/caseDicts/postProcessing/{flowRate/flowRatePatch.cfg => minMax/cellMax.cfg} (83%) rename etc/caseDicts/postProcessing/{pressure/pressureDifferencePatch => minMax/cellMaxMag} (74%) create mode 100644 etc/caseDicts/postProcessing/minMax/cellMaxMag.cfg rename etc/caseDicts/postProcessing/{pressure/staticPressure => minMax/cellMinMag} (71%) create mode 100644 etc/caseDicts/postProcessing/minMax/cellMinMag.cfg create mode 100644 etc/caseDicts/postProcessing/pressure/staticPressureIncompressible rename etc/caseDicts/postProcessing/pressure/{staticPressure.cfg => staticPressureIncompressible.cfg} (99%) rename etc/caseDicts/postProcessing/solvers/{particles => }/particles (100%) rename etc/caseDicts/postProcessing/solvers/{phaseScalarTransport => }/phaseScalarTransport (80%) rename etc/caseDicts/postProcessing/solvers/{phaseScalarTransport => }/phaseScalarTransport.cfg (100%) rename etc/caseDicts/postProcessing/solvers/{scalarTransport => }/scalarTransport (53%) rename etc/caseDicts/postProcessing/solvers/{scalarTransport => }/scalarTransport.cfg (100%) rename etc/caseDicts/postProcessing/{visualisation/streamlines.cfg => streamLines/streamLines.cfg} (100%) create mode 100644 etc/caseDicts/postProcessing/streamLines/streamLinesLine create mode 100644 etc/caseDicts/postProcessing/streamLines/streamLinesLine.cfg create mode 100644 etc/caseDicts/postProcessing/streamLines/streamLinesPatch rename etc/caseDicts/postProcessing/{graphs/sampleDict.cfg => streamLines/streamLinesPatch.cfg} (73%) create mode 100644 etc/caseDicts/postProcessing/streamLines/streamLinesPoints rename etc/caseDicts/postProcessing/{flowRate/volumetricFlowRateTriSurface.cfg => streamLines/streamLinesPoints.cfg} (74%) create mode 100644 etc/caseDicts/postProcessing/streamLines/streamLinesSphere create mode 100644 etc/caseDicts/postProcessing/streamLines/streamLinesSphere.cfg create mode 100644 etc/caseDicts/postProcessing/surface/cutPlaneSurface create mode 100644 etc/caseDicts/postProcessing/surface/cutPlaneSurface.cfg create mode 100644 etc/caseDicts/postProcessing/surface/isoSurface create mode 100644 etc/caseDicts/postProcessing/surface/isoSurface.cfg create mode 100644 etc/caseDicts/postProcessing/surface/patchSurface rename etc/caseDicts/postProcessing/{flowRate/flowRateFaceZone.cfg => surface/patchSurface.cfg} (71%) rename etc/caseDicts/postProcessing/{combustion/Qdot.cfg => surface/surface.cfg} (81%) rename etc/caseDicts/postProcessing/{flowRate/flowRateFaceZone => surfaceFieldValue/faceZoneFlowRate} (87%) rename etc/caseDicts/postProcessing/surfaceFieldValue/{faceZone.cfg => faceZoneValue.cfg} (86%) rename etc/caseDicts/postProcessing/{fields/R => surfaceFieldValue/patchDifference} (70%) rename etc/caseDicts/postProcessing/{pressure/pressureDifferencePatch.cfg => surfaceFieldValue/patchDifference.cfg} (88%) rename etc/caseDicts/postProcessing/{flowRate/flowRatePatch => surfaceFieldValue/patchFlowRate} (86%) rename etc/caseDicts/postProcessing/surfaceFieldValue/{patch.cfg => patchValue.cfg} (84%) rename etc/caseDicts/postProcessing/{pressure/pressureDifference.cfg => surfaceFieldValue/surfaceDifference.cfg} (90%) rename etc/caseDicts/postProcessing/surfaceFieldValue/{surfaceRegion.cfg => surfaceValue.cfg} (100%) rename etc/caseDicts/postProcessing/{pressure/pressureDifferenceSurface => surfaceFieldValue/triSurfaceDifference} (67%) rename etc/caseDicts/postProcessing/{pressure/pressureDifferenceSurface.cfg => surfaceFieldValue/triSurfaceDifference.cfg} (80%) rename etc/caseDicts/postProcessing/surfaceFieldValue/{triSurfaceRegion.cfg => triSurfaceValue.cfg} (89%) rename etc/caseDicts/postProcessing/{flowRate/volumetricFlowRateTriSurface => surfaceFieldValue/triSurfaceVolumetricFlowRate} (87%) delete mode 100644 etc/caseDicts/postProcessing/visualisation/streamlines delete mode 100644 etc/caseDicts/postProcessing/visualisation/surfaces delete mode 100644 etc/caseDicts/postProcessing/visualisation/surfaces.cfg create mode 100644 test/postProcessing/channel/0/T create mode 100644 test/postProcessing/channel/0/U create mode 100644 test/postProcessing/channel/0/alphat create mode 100644 test/postProcessing/channel/0/epsilon create mode 100644 test/postProcessing/channel/0/k create mode 100644 test/postProcessing/channel/0/nut create mode 100644 test/postProcessing/channel/0/p create mode 100644 test/postProcessing/channel/0/p_rgh create mode 100644 test/postProcessing/channel/0/s create mode 100644 test/postProcessing/channel/0/s.dummy create mode 100755 test/postProcessing/channel/Allclean create mode 100755 test/postProcessing/channel/Allrun create mode 100644 test/postProcessing/channel/constant/g create mode 100644 test/postProcessing/channel/constant/momentumTransport create mode 100644 test/postProcessing/channel/constant/thermophysicalProperties create mode 100644 test/postProcessing/channel/constant/thermophysicalTransport create mode 100644 test/postProcessing/channel/constant/triSurface/mid.obj create mode 100644 test/postProcessing/channel/constant/triSurface/nearInlet.obj create mode 100644 test/postProcessing/channel/constant/triSurface/nearOutlet.obj create mode 100644 test/postProcessing/channel/system/blockMeshDict create mode 100644 test/postProcessing/channel/system/controlDict create mode 100644 test/postProcessing/channel/system/fvSchemes create mode 100644 test/postProcessing/channel/system/fvSolution create mode 100644 test/postProcessing/channel/system/topoSetDict diff --git a/etc/caseDicts/postProcessing/combustion/Qdot b/etc/caseDicts/postProcessing/combustion/Qdot index b41bd9316e..7549c68396 100644 --- a/etc/caseDicts/postProcessing/combustion/Qdot +++ b/etc/caseDicts/postProcessing/combustion/Qdot @@ -10,6 +10,10 @@ Description \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/combustion/Qdot.cfg" +type Qdot; +libs ("libcombustionModels.so"); + +executeControl writeTime; +writeControl writeTime; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/control/stopAtClockTime b/etc/caseDicts/postProcessing/control/stopAtClockTime index 3deafeeb88..66da094ec6 100644 --- a/etc/caseDicts/postProcessing/control/stopAtClockTime +++ b/etc/caseDicts/postProcessing/control/stopAtClockTime @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Stops the run when the specified clock time in second has been reached + Stops the run when the specified clock time in seconds has been reached and optionally write results before stopping. \*---------------------------------------------------------------------------*/ @@ -14,7 +14,7 @@ Description type stopAtClockTime; libs ("libutilityFunctionObjects.so"); -stopTime ; +stopTime ; action nextWrite; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/control/writeObjects b/etc/caseDicts/postProcessing/control/writeObjects index 179170eb4a..befd6cfd82 100644 --- a/etc/caseDicts/postProcessing/control/writeObjects +++ b/etc/caseDicts/postProcessing/control/writeObjects @@ -13,7 +13,7 @@ Description type writeObjects; libs ("libutilityFunctionObjects.so"); -objects (); +objects (); writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/CourantNo b/etc/caseDicts/postProcessing/fields/CourantNo index 53aa0a8008..bcb58e427d 100644 --- a/etc/caseDicts/postProcessing/fields/CourantNo +++ b/etc/caseDicts/postProcessing/fields/CourantNo @@ -13,7 +13,8 @@ Description type CourantNo; libs ("libfieldFunctionObjects.so"); -field phi; +phi phi; +field $phi; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/Lambda2 b/etc/caseDicts/postProcessing/fields/Lambda2 index a1158c4e1b..2747742e9f 100644 --- a/etc/caseDicts/postProcessing/fields/Lambda2 +++ b/etc/caseDicts/postProcessing/fields/Lambda2 @@ -15,7 +15,8 @@ Description type Lambda2; libs ("libfieldFunctionObjects.so"); -field U; +U U; +field $U; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/MachNo b/etc/caseDicts/postProcessing/fields/MachNo index b3d3b18bb3..ffe38055b1 100644 --- a/etc/caseDicts/postProcessing/fields/MachNo +++ b/etc/caseDicts/postProcessing/fields/MachNo @@ -13,7 +13,8 @@ Description type MachNo; libs ("libfieldFunctionObjects.so"); -field U; +U U; +field $U; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/PecletNo b/etc/caseDicts/postProcessing/fields/PecletNo index aaa50119d1..ebe9947e47 100644 --- a/etc/caseDicts/postProcessing/fields/PecletNo +++ b/etc/caseDicts/postProcessing/fields/PecletNo @@ -13,7 +13,8 @@ Description type PecletNo; libs ("libfieldFunctionObjects.so"); -field phi; +phi phi; +field $phi; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/Q b/etc/caseDicts/postProcessing/fields/Q index 160e7f01c8..9c20ed7d88 100644 --- a/etc/caseDicts/postProcessing/fields/Q +++ b/etc/caseDicts/postProcessing/fields/Q @@ -13,7 +13,8 @@ Description type Q; libs ("libfieldFunctionObjects.so"); -field U; +U U; +field $U; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/age b/etc/caseDicts/postProcessing/fields/age index f4cc7a1d90..1ed3740a57 100644 --- a/etc/caseDicts/postProcessing/fields/age +++ b/etc/caseDicts/postProcessing/fields/age @@ -23,6 +23,14 @@ Description type age; libs ("libfieldFunctionObjects.so"); -nCorr 10; +phi phi; +rho rho; +nCorr 5; +schemesField age; +diffusion false; +tolerance 1e-5; + +executeControl writeTime; +writeControl writeTime; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/enstrophy b/etc/caseDicts/postProcessing/fields/enstrophy index bac21ab6a3..d69c9679ca 100644 --- a/etc/caseDicts/postProcessing/fields/enstrophy +++ b/etc/caseDicts/postProcessing/fields/enstrophy @@ -13,7 +13,8 @@ Description type enstrophy; libs ("libfieldFunctionObjects.so"); -field U; +U U; +field $U; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/fieldAverage b/etc/caseDicts/postProcessing/fields/fieldAverage index acba139033..1d3d24ede2 100644 --- a/etc/caseDicts/postProcessing/fields/fieldAverage +++ b/etc/caseDicts/postProcessing/fields/fieldAverage @@ -15,6 +15,6 @@ Description mean yes; prime2Mean no; -fields (); +fields (); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/flowType b/etc/caseDicts/postProcessing/fields/flowType index 089c377cc6..52df9cd425 100644 --- a/etc/caseDicts/postProcessing/fields/flowType +++ b/etc/caseDicts/postProcessing/fields/flowType @@ -16,7 +16,8 @@ Description type flowType; libs ("libfieldFunctionObjects.so"); -field U; +U U; +field $U; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/log b/etc/caseDicts/postProcessing/fields/log index 6931f6b482..44ced3d074 100644 --- a/etc/caseDicts/postProcessing/fields/log +++ b/etc/caseDicts/postProcessing/fields/log @@ -18,5 +18,4 @@ field ; executeControl writeTime; writeControl writeTime; - // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/scale b/etc/caseDicts/postProcessing/fields/scale index 66d5887840..a9a508d812 100644 --- a/etc/caseDicts/postProcessing/fields/scale +++ b/etc/caseDicts/postProcessing/fields/scale @@ -14,11 +14,9 @@ type scale; libs ("libfieldFunctionObjects.so"); field ; -result ; // optional -scale 1; +scale ; executeControl writeTime; writeControl writeTime; - // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/streamFunction b/etc/caseDicts/postProcessing/fields/streamFunction index 0f0147a4f4..fddd7b059d 100644 --- a/etc/caseDicts/postProcessing/fields/streamFunction +++ b/etc/caseDicts/postProcessing/fields/streamFunction @@ -14,7 +14,8 @@ Description type streamFunction; libs ("libfieldFunctionObjects.so"); -field phi; +phi phi; +field $phi; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/turbulenceFields b/etc/caseDicts/postProcessing/fields/turbulenceFields index 9f761ab790..d86598d308 100644 --- a/etc/caseDicts/postProcessing/fields/turbulenceFields +++ b/etc/caseDicts/postProcessing/fields/turbulenceFields @@ -13,7 +13,7 @@ Description type turbulenceFields; libs ("libfieldFunctionObjects.so"); -fields (); +fields (); executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/vorticity b/etc/caseDicts/postProcessing/fields/vorticity index 0dfb07dec1..3040a17ad4 100644 --- a/etc/caseDicts/postProcessing/fields/vorticity +++ b/etc/caseDicts/postProcessing/fields/vorticity @@ -13,7 +13,8 @@ Description type vorticity; libs ("libfieldFunctionObjects.so"); -field U; +U U; +field $U; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/wallHeatTransferCoeff b/etc/caseDicts/postProcessing/fields/wallHeatTransferCoeff index 5d5407925f..c229bd9f3a 100644 --- a/etc/caseDicts/postProcessing/fields/wallHeatTransferCoeff +++ b/etc/caseDicts/postProcessing/fields/wallHeatTransferCoeff @@ -14,10 +14,11 @@ Description type wallHeatTransferCoeff; libs ("libfieldFunctionObjects.so"); -rho 1.225; -Cp 1005; -Pr 0.707; -Prt 0.9; +rho ; // Density; e.g., 1.225 kg/m^3 for air +Cp ; // Specific heat capacity at constant pressure; + // e.g., 1005 J/kg/K for air +Pr ; // Laminar Prandtl number; e.g, 0.7 +Prt ; // Turbulent Prandtly number; e.g., 0.9 executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/add b/etc/caseDicts/postProcessing/fieldsOperations/add similarity index 95% rename from etc/caseDicts/postProcessing/fields/add rename to etc/caseDicts/postProcessing/fieldsOperations/add index 583aae89ee..d836e8b9de 100644 --- a/etc/caseDicts/postProcessing/fields/add +++ b/etc/caseDicts/postProcessing/fieldsOperations/add @@ -13,7 +13,7 @@ Description type add; libs ("libfieldFunctionObjects.so"); -fields (); +fields (); executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/divide b/etc/caseDicts/postProcessing/fieldsOperations/divide similarity index 100% rename from etc/caseDicts/postProcessing/fields/divide rename to etc/caseDicts/postProcessing/fieldsOperations/divide diff --git a/etc/caseDicts/postProcessing/fields/multiply b/etc/caseDicts/postProcessing/fieldsOperations/multiply similarity index 100% rename from etc/caseDicts/postProcessing/fields/multiply rename to etc/caseDicts/postProcessing/fieldsOperations/multiply diff --git a/etc/caseDicts/postProcessing/fields/subtract b/etc/caseDicts/postProcessing/fieldsOperations/subtract similarity index 95% rename from etc/caseDicts/postProcessing/fields/subtract rename to etc/caseDicts/postProcessing/fieldsOperations/subtract index 006c0f50d4..b1246a23ba 100644 --- a/etc/caseDicts/postProcessing/fields/subtract +++ b/etc/caseDicts/postProcessing/fieldsOperations/subtract @@ -13,7 +13,7 @@ Description type subtract; libs ("libfieldFunctionObjects.so"); -fields (); +fields (); executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/fields/uniform b/etc/caseDicts/postProcessing/fieldsOperations/uniform similarity index 100% rename from etc/caseDicts/postProcessing/fields/uniform rename to etc/caseDicts/postProcessing/fieldsOperations/uniform diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible index 552f6d993c..e273a8edf3 100644 --- a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible @@ -7,24 +7,25 @@ ------------------------------------------------------------------------------- Description Calculates lift, drag and moment coefficients by summing forces on - specified patches for a case where the solver is compressible (pressure is - in units M/(LT^2), e.g. Pa). + specified patches for a case where the solver is compressible; i.e., + pressure has units of kg/m/s^2 (Pa). \*---------------------------------------------------------------------------*/ -patches (patch1 patch2); - -magUInf 20; -rhoInf 1.225; -lRef 1; -Aref 1; - -liftDir (0 0 1); -dragDir (1 0 0); - -CofR (0 0 0); -pitchAxis (0 1 0); - #includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg" +patches (); // Names of patches on which to calculate forces + +magUInf ; // Far field velocity magnitude; e.g., 20 m/s +rhoInf ; // Far field density; e.g., 1.225 kg/m^3 for air +lRef ; // Reference length scale for moment calculations; + // e.g., 1 m +Aref ; // Reference area; e.g., 1 m^2 + +CofR ; // Centre of rotation; e.g., (0 0 0) + +liftDir ; // Direction of lift force; e.g., (0 0 1) +dragDir ; // Direction of drag force; e.g., (1 0 0) +pitchAxis ; // Pitch axis; e.g., (0 1 0) + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible index 4a9af9943b..ba2ac8d21e 100644 --- a/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible @@ -7,23 +7,24 @@ ------------------------------------------------------------------------------- Description Calculates lift, drag and moment coefficients by summing forces on - specified patches for a case where the solver is incompressible (pressure - is kinematic, e.g. m^2/s^2). + specified patches for a case where the solver is incompressible; i.e., + pressure is kinematic and has units of m^2/s^2. \*---------------------------------------------------------------------------*/ -patches (patch1 patch2); - -magUInf 20; -lRef 1; -Aref 1; - -liftDir (0 0 1); -dragDir (1 0 0); - -CofR (0 0 0); -pitchAxis (0 1 0); - #includeEtc "caseDicts/postProcessing/forces/forceCoeffsIncompressible.cfg" +patches (); // Names of patches on which to calculate forces + +magUInf ; // Far field velocity magnitude; e.g., 20 m/s +lRef ; // Reference length scale for moment calculations; + // e.g., 1 m +Aref ; // Reference area; e.g., 1 m^2 + +CofR ; // Centre of rotation; e.g., (0 0 0) + +liftDir ; // Direction of lift force; e.g., (0 0 1) +dragDir ; // Direction of drag force; e.g., (1 0 0) +pitchAxis ; // Pitch axis; e.g., (0 1 0) + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesCompressible b/etc/caseDicts/postProcessing/forces/forcesCompressible index 29cc54cc54..b506ca4d09 100644 --- a/etc/caseDicts/postProcessing/forces/forcesCompressible +++ b/etc/caseDicts/postProcessing/forces/forcesCompressible @@ -7,15 +7,16 @@ ------------------------------------------------------------------------------- Description Calculates pressure and viscous forces over specified patches for a case - where the solver is compressible (pressure is in units M/(LT^2), e.g. Pa). + where the solver is compressible; i.e., pressure has units of kg/m/s^2 (Pa). \*---------------------------------------------------------------------------*/ -patches (patch1 patch2); - -CofR (0 0 0); -pitchAxis (0 1 0); - #includeEtc "caseDicts/postProcessing/forces/forces.cfg" +patches (); // Names of patches on which to calculate forces + +CofR ; // Centre of rotation; e.g., (0 0 0) + +pitchAxis ; // Pitch axis; e.g., (0 1 0) + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesIncompressible b/etc/caseDicts/postProcessing/forces/forcesIncompressible index 7e80abfa2a..971dbbdf66 100644 --- a/etc/caseDicts/postProcessing/forces/forcesIncompressible +++ b/etc/caseDicts/postProcessing/forces/forcesIncompressible @@ -7,16 +7,19 @@ ------------------------------------------------------------------------------- Description Calculates pressure and viscous forces over specified patches for a case - where the solver is incompressible (pressure is kinematic, e.g. m^2/s^2). + where the solver is incompressible; i.e., pressure is kinematic and has + units of m^2/s^2. \*---------------------------------------------------------------------------*/ #includeEtc "caseDicts/postProcessing/forces/forcesIncompressible.cfg" -rhoInf 1.225; // Fluid density -patches (patch1 patch2); +patches (); // Names of patches on which to calculate forces -CofR (0 0 0); -pitchAxis (0 1 0); +rhoInf ; // Far field density; e.g., 1.225 kg/m^3 for air + +CofR ; // Centre of rotation; e.g., (0 0 0) + +pitchAxis ; // Pitch axis; e.g., (0 1 0) // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/phaseForces b/etc/caseDicts/postProcessing/forces/phaseForces index 34a4c31909..3b80cdd081 100644 --- a/etc/caseDicts/postProcessing/forces/phaseForces +++ b/etc/caseDicts/postProcessing/forces/phaseForces @@ -18,7 +18,7 @@ Description type phaseForces; libs ("libmultiphaseEulerFoamFunctionObjects.so"); -phase ; +phase ; executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/graphs/graph.cfg b/etc/caseDicts/postProcessing/graphs/graph.cfg index 19dfd2c306..3fe7f6ef1c 100644 --- a/etc/caseDicts/postProcessing/graphs/graph.cfg +++ b/etc/caseDicts/postProcessing/graphs/graph.cfg @@ -11,14 +11,8 @@ libs ("libsampling.so"); writeControl writeTime; -sets -( - line - { - $setConfig; - start $start; - end $end; - } -); +interpolationScheme cellPoint; + +setFormat raw; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/singleGraph b/etc/caseDicts/postProcessing/graphs/graphCell similarity index 57% rename from etc/caseDicts/postProcessing/graphs/singleGraph rename to etc/caseDicts/postProcessing/graphs/graphCell index 1135d9fdbf..ba876d51c9 100644 --- a/etc/caseDicts/postProcessing/graphs/singleGraph +++ b/etc/caseDicts/postProcessing/graphs/graphCell @@ -6,28 +6,21 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Writes graph data for specified fields along a line, specified by start - and end points. + Writes graph data for specified fields along a line, specified by start and + end points. One graph point is generated in each cell that the line + intersects. \*---------------------------------------------------------------------------*/ -start (0 1e-06 0); -end (1 1e-06 0); -fields (U p); +start ; +end ; -// Sampling and I/O settings -#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg" +fields (); -// Override settings here, e.g. -/* -setConfig -{ - type lineCell; - axis x; // y, z, xyz -} -*/ +axis distance; // The independent variable of the graph. Can be "x", + // "y", "z", "xyz" (all coordinates written out), or + // "distance" (from the start point). -// Must be last entry -#includeEtc "caseDicts/postProcessing/graphs/graph.cfg" +#includeEtc "caseDicts/postProcessing/graphs/graphCell.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/graphCell.cfg b/etc/caseDicts/postProcessing/graphs/graphCell.cfg new file mode 100644 index 0000000000..c3b858c302 --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/graphCell.cfg @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/graphs/graph.cfg" + +sets +( + line + { + type lineCell; + axis $axis; + start $start; + end $end; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/graphUniform b/etc/caseDicts/postProcessing/graphs/graphUniform new file mode 100644 index 0000000000..ccf80ff66b --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/graphUniform @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes graph data for specified fields along a line, specified by start and + end points. A specified number of graph points are used, distributed + uniformly along the line. + +\*---------------------------------------------------------------------------*/ + +start ; +end ; +nPoints ; + +fields (); + +axis distance; // The independent variable of the graph. Can be "x", + // "y", "z", "xyz" (all coordinates written out), or + // "distance" (from the start point). + +#includeEtc "caseDicts/postProcessing/graphs/graphUniform.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/graphUniform.cfg b/etc/caseDicts/postProcessing/graphs/graphUniform.cfg new file mode 100644 index 0000000000..270c689cac --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/graphUniform.cfg @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/graphs/graph.cfg" + +sets +( + line + { + type lineUniform; + axis $axis; + start $start; + end $end; + nPoints $nPoints; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/lagrangian/dsmcFields b/etc/caseDicts/postProcessing/lagrangian/dsmcFields index 22a61a1445..94ef5635e1 100644 --- a/etc/caseDicts/postProcessing/lagrangian/dsmcFields +++ b/etc/caseDicts/postProcessing/lagrangian/dsmcFields @@ -18,8 +18,16 @@ Description type dsmcFields; libs ("liblagrangianFunctionObjects.so"); -fields (rhoNMean rhoMMean momentumMean linearKEMean internalEMean - iDofMean fDMean); +fields +( + rhoNMean + rhoMMean + momentumMean + linearKEMean + internalEMean + iDofMean + fDMean +); executeControl writeTime; writeControl writeTime; diff --git a/etc/caseDicts/postProcessing/minMax/cellMax b/etc/caseDicts/postProcessing/minMax/cellMax index 0203dc7695..6008e699aa 100644 --- a/etc/caseDicts/postProcessing/minMax/cellMax +++ b/etc/caseDicts/postProcessing/minMax/cellMax @@ -10,8 +10,8 @@ Description \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" +#includeEtc "caseDicts/postProcessing/minMax/cellMax.cfg" -fields (U p); +fields (); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg b/etc/caseDicts/postProcessing/minMax/cellMax.cfg similarity index 83% rename from etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg rename to etc/caseDicts/postProcessing/minMax/cellMax.cfg index 48b72f7626..39c118521d 100644 --- a/etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg +++ b/etc/caseDicts/postProcessing/minMax/cellMax.cfg @@ -6,9 +6,8 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patch.cfg" +#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" -fields (phi); -operation sum; +operation max; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch b/etc/caseDicts/postProcessing/minMax/cellMaxMag similarity index 74% rename from etc/caseDicts/postProcessing/pressure/pressureDifferencePatch rename to etc/caseDicts/postProcessing/minMax/cellMaxMag index 90641ef258..fcb3d8e3be 100644 --- a/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch +++ b/etc/caseDicts/postProcessing/minMax/cellMaxMag @@ -6,14 +6,12 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Calculates the difference between the average pressures on 2 specified - patches. + Writes out the maximum cell value magnitude for one or more fields. \*---------------------------------------------------------------------------*/ -patch1 ; -patch2 ; +#includeEtc "caseDicts/postProcessing/minMax/cellMaxMag.cfg" -#includeEtc "caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg" +fields (); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMaxMag.cfg b/etc/caseDicts/postProcessing/minMax/cellMaxMag.cfg new file mode 100644 index 0000000000..fa41e5492d --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/cellMaxMag.cfg @@ -0,0 +1,13 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" + +operation maxMag; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMin b/etc/caseDicts/postProcessing/minMax/cellMin index 1afc2dce99..01c21e3e0b 100644 --- a/etc/caseDicts/postProcessing/minMax/cellMin +++ b/etc/caseDicts/postProcessing/minMax/cellMin @@ -12,6 +12,6 @@ Description #includeEtc "caseDicts/postProcessing/minMax/cellMin.cfg" -fields (U p); +fields (); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMin.cfg b/etc/caseDicts/postProcessing/minMax/cellMin.cfg index 0b8f07aa79..c75b1470f3 100644 --- a/etc/caseDicts/postProcessing/minMax/cellMin.cfg +++ b/etc/caseDicts/postProcessing/minMax/cellMin.cfg @@ -7,6 +7,7 @@ \*---------------------------------------------------------------------------*/ #includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" + operation min; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/staticPressure b/etc/caseDicts/postProcessing/minMax/cellMinMag similarity index 71% rename from etc/caseDicts/postProcessing/pressure/staticPressure rename to etc/caseDicts/postProcessing/minMax/cellMinMag index ac857bea42..cc596be1b2 100644 --- a/etc/caseDicts/postProcessing/pressure/staticPressure +++ b/etc/caseDicts/postProcessing/minMax/cellMinMag @@ -6,13 +6,12 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Calculates the pressure field in units M/(LT^2) (e.g. Pa) from kinematic - pressure by scaling by a specified density. + Writes out the minimum cell value magnitude for one or more fields. \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/pressure/staticPressure.cfg" +#includeEtc "caseDicts/postProcessing/minMax/cellMinMag.cfg" -rhoInf 1.2; // Density to scale +fields (); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMinMag.cfg b/etc/caseDicts/postProcessing/minMax/cellMinMag.cfg new file mode 100644 index 0000000000..1188556168 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/cellMinMag.cfg @@ -0,0 +1,13 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" + +operation minMag; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg b/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg index dc8a7cb301..f9674c9968 100644 --- a/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg +++ b/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg @@ -15,6 +15,5 @@ writeInterval 1; writeFields false; regionType all; -operation max; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/numerical/residuals b/etc/caseDicts/postProcessing/numerical/residuals index b03d33ae45..8b320ca3ab 100644 --- a/etc/caseDicts/postProcessing/numerical/residuals +++ b/etc/caseDicts/postProcessing/numerical/residuals @@ -14,6 +14,6 @@ Description #includeEtc "caseDicts/postProcessing/numerical/residuals.cfg" -fields (p U); +fields (); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/staticPressureIncompressible b/etc/caseDicts/postProcessing/pressure/staticPressureIncompressible new file mode 100644 index 0000000000..53cd190dbe --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/staticPressureIncompressible @@ -0,0 +1,18 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Calculates the static pressure field in units of kg/m/s^2 (Pa) from the + kinematic pressure by scaling by a specified density. + +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/pressure/staticPressureIncompressible.cfg" + +rhoInf ; // Density with which to scale the kinematic pressure + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/staticPressure.cfg b/etc/caseDicts/postProcessing/pressure/staticPressureIncompressible.cfg similarity index 99% rename from etc/caseDicts/postProcessing/pressure/staticPressure.cfg rename to etc/caseDicts/postProcessing/pressure/staticPressureIncompressible.cfg index 14a60ae5d9..e5adca6789 100644 --- a/etc/caseDicts/postProcessing/pressure/staticPressure.cfg +++ b/etc/caseDicts/postProcessing/pressure/staticPressureIncompressible.cfg @@ -10,6 +10,7 @@ calcTotal no; calcCoeff no; + rho rhoInf; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureCompressible b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible index 7b0e014f51..e5fd6cd502 100644 --- a/etc/caseDicts/postProcessing/pressure/totalPressureCompressible +++ b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible @@ -7,12 +7,10 @@ ------------------------------------------------------------------------------- Description Calculates the total pressure field for a case where the solver is - compressible (pressure is in units M/(LT^2), e.g. Pa). + compressible; i.e., pressure has units of kg/m/s^2 (Pa). \*---------------------------------------------------------------------------*/ #includeEtc "caseDicts/postProcessing/pressure/totalPressureCompressible.cfg" -pRef 0; - // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg index 4291b5ac1f..ed7e41a05d 100644 --- a/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg +++ b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg @@ -8,7 +8,9 @@ #includeEtc "caseDicts/postProcessing/pressure/pressure.cfg" -calcTotal yes; -calcCoeff no; +calcTotal yes; +calcCoeff no; + +pRef 0; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible index 1401611e47..800607cb74 100644 --- a/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible +++ b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible @@ -7,13 +7,12 @@ ------------------------------------------------------------------------------- Description Calculates the total pressure field for a case where the solver is - incompressible (pressure is kinematic, e.g. m^2/s^2). + compressible; i.e., pressure has units of m^2/s^2. \*---------------------------------------------------------------------------*/ #includeEtc "caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg" -pRef 0.0; -rhoInf 1.2; +rhoInf ; // Density with which to scale the kinematic pressure // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg index 72c6774174..458c3c0e98 100644 --- a/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg +++ b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg @@ -8,8 +8,10 @@ #includeEtc "caseDicts/postProcessing/pressure/pressure.cfg" -calcTotal yes; -calcCoeff no; -rho rhoInf; +calcTotal yes; +calcCoeff no; + +rho rhoInf; +pRef 0; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/boundaryProbes b/etc/caseDicts/postProcessing/probes/boundaryProbes index c6a79e9b95..c256b6f31f 100644 --- a/etc/caseDicts/postProcessing/probes/boundaryProbes +++ b/etc/caseDicts/postProcessing/probes/boundaryProbes @@ -11,16 +11,12 @@ Description \*---------------------------------------------------------------------------*/ -fields (p U); +points (); +maxDistance ; -points -( - (0 0 0) -); +patches (".*"); -maxDistance 0.1; - -patches (".*"); +fields (); #includeEtc "caseDicts/postProcessing/probes/boundaryProbes.cfg" diff --git a/etc/caseDicts/postProcessing/probes/boundaryProbes.cfg b/etc/caseDicts/postProcessing/probes/boundaryProbes.cfg index 7fda708755..50f1ff70d1 100644 --- a/etc/caseDicts/postProcessing/probes/boundaryProbes.cfg +++ b/etc/caseDicts/postProcessing/probes/boundaryProbes.cfg @@ -12,15 +12,19 @@ libs ("libsampling.so"); executeControl writeTime; writeControl writeTime; +interpolationScheme cellPoint; + +setFormat raw; + sets ( points { - type boundaryPoints; - axis xyz; - points $points; + type boundaryPoints; + axis xyz; + points $points; maxDistance $maxDistance; - patches $patches; + patches $patches; } ); diff --git a/etc/caseDicts/postProcessing/probes/interfaceHeight b/etc/caseDicts/postProcessing/probes/interfaceHeight index 6c331d6369..a1beb17c4a 100644 --- a/etc/caseDicts/postProcessing/probes/interfaceHeight +++ b/etc/caseDicts/postProcessing/probes/interfaceHeight @@ -15,12 +15,10 @@ Description \*---------------------------------------------------------------------------*/ +points (); + +alpha ; + #includeEtc "caseDicts/postProcessing/probes/interfaceHeight.cfg" -alpha alpha.water; -locations -( - (0 0 0) -); - // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/interfaceHeight.cfg b/etc/caseDicts/postProcessing/probes/interfaceHeight.cfg index 6392fc7e70..85feafc046 100644 --- a/etc/caseDicts/postProcessing/probes/interfaceHeight.cfg +++ b/etc/caseDicts/postProcessing/probes/interfaceHeight.cfg @@ -12,4 +12,6 @@ libs ("libfieldFunctionObjects.so"); writeControl timeStep; writeInterval 1; +locations $points; + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/internalProbes b/etc/caseDicts/postProcessing/probes/internalProbes index a11ace86cb..6a91f11932 100644 --- a/etc/caseDicts/postProcessing/probes/internalProbes +++ b/etc/caseDicts/postProcessing/probes/internalProbes @@ -10,11 +10,9 @@ Description \*---------------------------------------------------------------------------*/ -fields (p U); -points -( - (0 0 0) -); +points (); + +fields (); #includeEtc "caseDicts/postProcessing/probes/internalProbes.cfg" diff --git a/etc/caseDicts/postProcessing/probes/internalProbes.cfg b/etc/caseDicts/postProcessing/probes/internalProbes.cfg index 01d2d12452..908fbfd77f 100644 --- a/etc/caseDicts/postProcessing/probes/internalProbes.cfg +++ b/etc/caseDicts/postProcessing/probes/internalProbes.cfg @@ -12,12 +12,17 @@ libs ("libsampling.so"); executeControl writeTime; writeControl writeTime; +interpolationScheme cellPoint; + +setFormat raw; + sets ( points { type points; axis xyz; + ordered yes; points $points; } ); diff --git a/etc/caseDicts/postProcessing/probes/probes b/etc/caseDicts/postProcessing/probes/probes index 09198c8a31..fa9efab5e1 100644 --- a/etc/caseDicts/postProcessing/probes/probes +++ b/etc/caseDicts/postProcessing/probes/probes @@ -10,12 +10,10 @@ Description \*---------------------------------------------------------------------------*/ +points (); + +fields (); + #includeEtc "caseDicts/postProcessing/probes/probes.cfg" -fields (p U); -probeLocations -( - (0 0 0) -); - // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/probes.cfg b/etc/caseDicts/postProcessing/probes/probes.cfg index 3959943909..ab0e863422 100644 --- a/etc/caseDicts/postProcessing/probes/probes.cfg +++ b/etc/caseDicts/postProcessing/probes/probes.cfg @@ -12,4 +12,6 @@ libs ("libsampling.so"); writeControl timeStep; writeInterval 1; +probeLocations $points; + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/solvers/particles/particles b/etc/caseDicts/postProcessing/solvers/particles similarity index 100% rename from etc/caseDicts/postProcessing/solvers/particles/particles rename to etc/caseDicts/postProcessing/solvers/particles diff --git a/etc/caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport b/etc/caseDicts/postProcessing/solvers/phaseScalarTransport similarity index 80% rename from etc/caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport rename to etc/caseDicts/postProcessing/solvers/phaseScalarTransport index dafa291177..93d1916045 100644 --- a/etc/caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport +++ b/etc/caseDicts/postProcessing/solvers/phaseScalarTransport @@ -17,10 +17,11 @@ Description \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport.cfg" +#includeEtc "caseDicts/postProcessing/solvers/phaseScalarTransport.cfg" -field s.water; -schemesField s.water; -p p_rgh; +field ; // Name of the transported scalar +schemesField $field; // Name of the field from which to use schemes + // and solvers settings +p p; // Name of the pressure field // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport.cfg b/etc/caseDicts/postProcessing/solvers/phaseScalarTransport.cfg similarity index 100% rename from etc/caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport.cfg rename to etc/caseDicts/postProcessing/solvers/phaseScalarTransport.cfg diff --git a/etc/caseDicts/postProcessing/solvers/scalarTransport/scalarTransport b/etc/caseDicts/postProcessing/solvers/scalarTransport similarity index 53% rename from etc/caseDicts/postProcessing/solvers/scalarTransport/scalarTransport rename to etc/caseDicts/postProcessing/solvers/scalarTransport index 75f9581b0b..7131d7885f 100644 --- a/etc/caseDicts/postProcessing/solvers/scalarTransport/scalarTransport +++ b/etc/caseDicts/postProcessing/solvers/scalarTransport @@ -8,16 +8,18 @@ Description Solves a transport equation for a scalar field. - The name of the scalar field is specified in this file. A sample scalar - field file, that must be initialised for the case, typically in the 0 - directory, is available in $FOAM_ETC/caseDicts/solvers/scalarTransport. + The name of the scalar field is specified in this file. A field file of + this name will also be required, typically in the 0 directory. Scheme and + solver settings will also be needed. Alternatively, if there is another + field which already has appropriate fvSchemes and fvSolution entries, these + settings can be reused by naming the field as the schemesField. \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/solvers/scalarTransport/scalarTransport.cfg" +#includeEtc "caseDicts/postProcessing/solvers/scalarTransport.cfg" -field s; -schemesField s; -D 1e-09; +field ; // Name of the transported scalar +schemesField $field; // Name of the field from which to use schemes + // and solvers settings // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/solvers/scalarTransport/scalarTransport.cfg b/etc/caseDicts/postProcessing/solvers/scalarTransport.cfg similarity index 100% rename from etc/caseDicts/postProcessing/solvers/scalarTransport/scalarTransport.cfg rename to etc/caseDicts/postProcessing/solvers/scalarTransport.cfg diff --git a/etc/caseDicts/postProcessing/visualisation/streamlines.cfg b/etc/caseDicts/postProcessing/streamLines/streamLines.cfg similarity index 100% rename from etc/caseDicts/postProcessing/visualisation/streamlines.cfg rename to etc/caseDicts/postProcessing/streamLines/streamLines.cfg diff --git a/etc/caseDicts/postProcessing/streamLines/streamLinesLine b/etc/caseDicts/postProcessing/streamLines/streamLinesLine new file mode 100644 index 0000000000..dd0a0343a9 --- /dev/null +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesLine @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out files of stream lines with interpolated field data in VTK + format, with initial points uniformly distributed along a line. + +\*---------------------------------------------------------------------------*/ + +start ; +end ; +nPoints ; + +fields (); + +direction both; // Direction in which to track from the starting points. Can be + // "both", "forward" or "backward" + +#includeEtc "caseDicts/postProcessing/streamLines/streamLinesLine.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/streamLines/streamLinesLine.cfg b/etc/caseDicts/postProcessing/streamLines/streamLinesLine.cfg new file mode 100644 index 0000000000..727ef2fcb3 --- /dev/null +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesLine.cfg @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/streamLines/streamLines.cfg" + +seedSampleSet +{ + type lineUniform; + axis distance; + start $start; + end $end; + nPoints $nPoints; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/streamLines/streamLinesPatch b/etc/caseDicts/postProcessing/streamLines/streamLinesPatch new file mode 100644 index 0000000000..ba03dd781d --- /dev/null +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesPatch @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out files of stream lines with interpolated field data in VTK + format, with initial points randomly selected within a patch. + +\*---------------------------------------------------------------------------*/ + +patch ; +nPoints ; + +fields (); + +direction both; // Direction in which to track from the starting points. Can be + // "both", "forward" or "backward" + +#includeEtc "caseDicts/postProcessing/streamLines/streamLinesPatch.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/sampleDict.cfg b/etc/caseDicts/postProcessing/streamLines/streamLinesPatch.cfg similarity index 73% rename from etc/caseDicts/postProcessing/graphs/sampleDict.cfg rename to etc/caseDicts/postProcessing/streamLines/streamLinesPatch.cfg index d28a6a40c2..4f2b561177 100644 --- a/etc/caseDicts/postProcessing/graphs/sampleDict.cfg +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesPatch.cfg @@ -6,15 +6,14 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -interpolationScheme cellPoint; +#includeEtc "caseDicts/postProcessing/streamLines/streamLines.cfg" -setFormat raw; - -setConfig +seedSampleSet { - type lineUniform; // lineCell, lineCellFace - axis distance; // x, y, z, xyz - nPoints 100; + type boundaryRandom; + axis xyz; + patches ($patch); + nPoints $nPoints; } // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/streamLines/streamLinesPoints b/etc/caseDicts/postProcessing/streamLines/streamLinesPoints new file mode 100644 index 0000000000..fb6f1fef95 --- /dev/null +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesPoints @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out files of stream lines with interpolated field data in VTK + format, with specified initial points. + +\*---------------------------------------------------------------------------*/ + +points (); + +fields (); + +direction both; // Direction in which to track from the starting points. Can be + // "both", "forward" or "backward" + +#includeEtc "caseDicts/postProcessing/streamLines/streamLinesPoints.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg b/etc/caseDicts/postProcessing/streamLines/streamLinesPoints.cfg similarity index 74% rename from etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg rename to etc/caseDicts/postProcessing/streamLines/streamLinesPoints.cfg index c42101c141..6322107959 100644 --- a/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesPoints.cfg @@ -6,9 +6,14 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg" +#includeEtc "caseDicts/postProcessing/streamLines/streamLines.cfg" -fields (U); -operation areaNormalIntegrate; +seedSampleSet +{ + type points; + points $points; + ordered yes; + axis xyz; +} // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/streamLines/streamLinesSphere b/etc/caseDicts/postProcessing/streamLines/streamLinesSphere new file mode 100644 index 0000000000..955d76cf52 --- /dev/null +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesSphere @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out files of stream lines with interpolated field data in VTK + format, with initial points randomly selected within a sphere. + +\*---------------------------------------------------------------------------*/ + +centre ; +radius ; +nPoints ; + +fields (); + +direction both; // Direction in which to track from the starting points. Can be + // "both", "forward" or "backward" + +#includeEtc "caseDicts/postProcessing/streamLines/streamLinesSphere.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/streamLines/streamLinesSphere.cfg b/etc/caseDicts/postProcessing/streamLines/streamLinesSphere.cfg new file mode 100644 index 0000000000..81f6633e58 --- /dev/null +++ b/etc/caseDicts/postProcessing/streamLines/streamLinesSphere.cfg @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/streamLines/streamLines.cfg" + +seedSampleSet +{ + type sphereRandom; + axis xyz; + centre $centre; + radius $radius; + nPoints $nPoints; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surface/cutPlaneSurface b/etc/caseDicts/postProcessing/surface/cutPlaneSurface new file mode 100644 index 0000000000..2fdfb6dafd --- /dev/null +++ b/etc/caseDicts/postProcessing/surface/cutPlaneSurface @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out cut-plane surface files with interpolated field data in VTK + format. + +\*---------------------------------------------------------------------------*/ + +point ; +normal ; + +fields (); + +interpolate true; // If false, write cell data to the surface triangles. + // If true, write interpolated data at the surface points. + +#includeEtc "caseDicts/postProcessing/surface/cutPlaneSurface.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surface/cutPlaneSurface.cfg b/etc/caseDicts/postProcessing/surface/cutPlaneSurface.cfg new file mode 100644 index 0000000000..9c8441821f --- /dev/null +++ b/etc/caseDicts/postProcessing/surface/cutPlaneSurface.cfg @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/surface/surface.cfg" + +surfaces +( + cutPlane + { + type cuttingPlane; + interpolate $interpolate; + planeType pointAndNormal; + point $point; + normal $normal; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surface/isoSurface b/etc/caseDicts/postProcessing/surface/isoSurface new file mode 100644 index 0000000000..b167729170 --- /dev/null +++ b/etc/caseDicts/postProcessing/surface/isoSurface @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out iso-surface files with interpolated field data in VTK format. + +\*---------------------------------------------------------------------------*/ + +isoField ; +isoValue ; + +fields (); + +interpolate true; // If false, write cell data to the surface triangles. + // If true, write interpolated data at the surface points. + +#includeEtc "caseDicts/postProcessing/surface/isoSurface.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surface/isoSurface.cfg b/etc/caseDicts/postProcessing/surface/isoSurface.cfg new file mode 100644 index 0000000000..d68b4e4934 --- /dev/null +++ b/etc/caseDicts/postProcessing/surface/isoSurface.cfg @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +#includeEtc "caseDicts/postProcessing/surface/surface.cfg" + +surfaces +( + isoSurface + { + type isoSurface; + interpolate $interpolate; + isoField $isoField; + isoValue $isoValue; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surface/patchSurface b/etc/caseDicts/postProcessing/surface/patchSurface new file mode 100644 index 0000000000..dd453ed92a --- /dev/null +++ b/etc/caseDicts/postProcessing/surface/patchSurface @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out patch surface files with interpolated field data in VTK format. + +\*---------------------------------------------------------------------------*/ + +patch ; + +fields (); + +interpolate true; // If false, write cell data to the surface triangles. + // If true, write interpolated data at the surface points. + +#includeEtc "caseDicts/postProcessing/surface/patchSurface.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/flowRateFaceZone.cfg b/etc/caseDicts/postProcessing/surface/patchSurface.cfg similarity index 71% rename from etc/caseDicts/postProcessing/flowRate/flowRateFaceZone.cfg rename to etc/caseDicts/postProcessing/surface/patchSurface.cfg index e1042bab1b..d700f1ab81 100644 --- a/etc/caseDicts/postProcessing/flowRate/flowRateFaceZone.cfg +++ b/etc/caseDicts/postProcessing/surface/patchSurface.cfg @@ -6,9 +6,16 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/faceZone.cfg" +#includeEtc "caseDicts/postProcessing/surface/surface.cfg" -fields (phi); -operation orientedSum; +surfaces +( + patch + { + type patch; + interpolate $interpolate; + patches ($patch); + } +); // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/combustion/Qdot.cfg b/etc/caseDicts/postProcessing/surface/surface.cfg similarity index 81% rename from etc/caseDicts/postProcessing/combustion/Qdot.cfg rename to etc/caseDicts/postProcessing/surface/surface.cfg index a754a76c0d..1ed8cb3484 100644 --- a/etc/caseDicts/postProcessing/combustion/Qdot.cfg +++ b/etc/caseDicts/postProcessing/surface/surface.cfg @@ -6,10 +6,13 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -type Qdot; -libs ("libcombustionModels.so"); +type surfaces; +libs ("libsampling.so"); -executeControl writeTime; writeControl writeTime; +surfaceFormat vtk; + +interpolationScheme cellPoint; + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneAverage b/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneAverage index fd62cfcfb6..5cba000c3b 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneAverage +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneAverage @@ -6,14 +6,16 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Calculates the average value of one or more fields on a faceZone. + Calculates the average values of fields on a faceZone. \*---------------------------------------------------------------------------*/ name ; -fields (); + +fields (); operation areaAverage; -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/faceZone.cfg" + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/faceZoneValue.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/flowRateFaceZone b/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneFlowRate similarity index 87% rename from etc/caseDicts/postProcessing/flowRate/flowRateFaceZone rename to etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneFlowRate index b8ff4799cd..903b53213d 100644 --- a/etc/caseDicts/postProcessing/flowRate/flowRateFaceZone +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneFlowRate @@ -14,6 +14,10 @@ Description name ; -#includeEtc "caseDicts/postProcessing/flowRate/flowRateFaceZone.cfg" +fields (phi); + +operation orientedSum; + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/faceZoneValue.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/faceZone.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneValue.cfg similarity index 86% rename from etc/caseDicts/postProcessing/surfaceFieldValue/faceZone.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneValue.cfg index 5ad0fabc82..5f760e17ac 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/faceZone.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/faceZoneValue.cfg @@ -6,7 +6,7 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg" regionType faceZone; diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/patchAverage b/etc/caseDicts/postProcessing/surfaceFieldValue/patchAverage index 310753fa20..8dd3dd9ee9 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/patchAverage +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/patchAverage @@ -6,14 +6,16 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Calculates the average value of one or more fields on a patch. + Calculates the average values of fields on a patch. \*---------------------------------------------------------------------------*/ -name ; -fields (); +patch ; + +fields (); operation areaAverage; -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patch.cfg" + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patchValue.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/R b/etc/caseDicts/postProcessing/surfaceFieldValue/patchDifference similarity index 70% rename from etc/caseDicts/postProcessing/fields/R rename to etc/caseDicts/postProcessing/surfaceFieldValue/patchDifference index 4ded9f5b45..924baf51e2 100644 --- a/etc/caseDicts/postProcessing/fields/R +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/patchDifference @@ -6,16 +6,16 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Calculates the Reynolds stress tensor field and stores it on the database. + Calculates the difference between the average values of fields on two + specified patches. \*---------------------------------------------------------------------------*/ -type turbulenceFields; -libs ("libfieldFunctionObjects.so"); +patch1 ; +patch2 ; -field R; +fields (); -executeControl writeTime; -writeControl writeTime; +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patchDifference.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/patchDifference.cfg similarity index 88% rename from etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/patchDifference.cfg index 508c1b9c58..24d0a75b68 100644 --- a/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/patchDifference.cfg @@ -6,13 +6,14 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/pressure/pressureDifference.cfg" +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceDifference.cfg" region1 { regionType patch; name $patch1; } + region2 { regionType patch; diff --git a/etc/caseDicts/postProcessing/flowRate/flowRatePatch b/etc/caseDicts/postProcessing/surfaceFieldValue/patchFlowRate similarity index 86% rename from etc/caseDicts/postProcessing/flowRate/flowRatePatch rename to etc/caseDicts/postProcessing/surfaceFieldValue/patchFlowRate index dbfe666fa0..94828ad484 100644 --- a/etc/caseDicts/postProcessing/flowRate/flowRatePatch +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/patchFlowRate @@ -12,8 +12,12 @@ Description \*---------------------------------------------------------------------------*/ -name ; +patch ; -#includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg" +fields (phi); + +operation sum; + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patchValue.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/patchIntegrate b/etc/caseDicts/postProcessing/surfaceFieldValue/patchIntegrate index 1005c1125e..18d70fd3e2 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/patchIntegrate +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/patchIntegrate @@ -6,14 +6,16 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Calculates the surface integral of one or more fields on a patch. + Calculates the surface integral of fields on a patch. \*---------------------------------------------------------------------------*/ -name ; -fields (); +patch ; + +fields (); operation areaIntegrate; -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patch.cfg" + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/patchValue.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/patch.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/patchValue.cfg similarity index 84% rename from etc/caseDicts/postProcessing/surfaceFieldValue/patch.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/patchValue.cfg index 9080682ded..bde008bb9a 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/patch.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/patchValue.cfg @@ -6,8 +6,9 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg" regionType patch; +name $patch; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/surfaceDifference.cfg similarity index 90% rename from etc/caseDicts/postProcessing/pressure/pressureDifference.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/surfaceDifference.cfg index 38fc61da1f..4ce6eb2561 100644 --- a/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/surfaceDifference.cfg @@ -16,15 +16,16 @@ operation subtract; region1 { - #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" + #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg" operation areaAverage; - fields (p); + fields $fields; } + region2 { - #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" + #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg" operation areaAverage; - fields (p); + fields $fields; } // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg similarity index 100% rename from etc/caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference similarity index 67% rename from etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface rename to etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference index de10b11ca1..850e0f5839 100644 --- a/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference @@ -6,14 +6,16 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Interpolates pressures onto 2 specified triangulated surfaces and - calculates the difference between the average pressures. + Calculates the difference between the average values of fields on two + specified triangulated surfaces. \*---------------------------------------------------------------------------*/ -triSurface1 ; -triSurface2 ; +name1 ; +name2 ; -#includeEtc "caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg" +fields (); + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference.cfg similarity index 80% rename from etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference.cfg index 47823582c4..3cce779951 100644 --- a/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceDifference.cfg @@ -6,7 +6,7 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/pressure/pressureDifference.cfg" +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceDifference.cfg" region1 { @@ -15,18 +15,19 @@ region1 sampledSurfaceDict { type triSurfaceMesh; - regionType cells; + surface $name1; + source cells; interpolate true; - surface $triSurface1; } } region2 { $region1; + sampledSurfaceDict { - surface $triSurface2; + surface $name2; } } diff --git a/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceValue.cfg similarity index 89% rename from etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg rename to etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceValue.cfg index 337849d690..726d9381a1 100644 --- a/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceValue.cfg @@ -6,7 +6,7 @@ \\/ M anipulation | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceValue.cfg" regionType sampledSurface; diff --git a/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceVolumetricFlowRate similarity index 87% rename from etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface rename to etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceVolumetricFlowRate index eea56ae1af..44e2933efc 100644 --- a/etc/caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface +++ b/etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceVolumetricFlowRate @@ -15,6 +15,10 @@ Description name ; -#includeEtc "caseDicts/postProcessing/flowRate/volumetricFlowRateTriSurface.cfg" +fields (U); + +operation areaNormalIntegrate; + +#includeEtc "caseDicts/postProcessing/surfaceFieldValue/triSurfaceValue.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualisation/streamlines b/etc/caseDicts/postProcessing/visualisation/streamlines deleted file mode 100644 index 95b10930a8..0000000000 --- a/etc/caseDicts/postProcessing/visualisation/streamlines +++ /dev/null @@ -1,120 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -------------------------------------------------------------------------------- -Description - Writes out files of streamlines with interpolated field data in VTK format. - -\*---------------------------------------------------------------------------*/ - -#includeEtc "caseDicts/postProcessing/visualisation/streamlines.cfg" - -fields (U p); - -// Streamline direction: forward, backward, both -direction both; - -// Select from methods with sub-dictionary settings below -seedMethod lineCell; - -// Seeding along a line -lineCell -{ - type lineCell; // lineCellFace, lineFace - start (0 -1 1); - end (0 1 1); -} - -lineUniform -{ - type lineUniform; - start (0 -1 1); - end (0 1 1); - nPoints 50; -} - -circleRandom -{ - type circleRandom; - centre (0 0 0); - radius 1; - normal (1 0 0); - nPoints 50; -} - -arcUniform -{ - type arcUniform; - centre (0 0 0); - normal (1 0 0); - radial (0 1 0); - startAngle 0; // rad - endAngle 3.14; // rad - nPoints 50; -} - -// Seeding within a volume region -boxUniform -{ - type boxUniform; - box (-1 -1 -1) (1 1 1); - nPoints (3 3 3); -} - -sphereRandom -{ - type sphereRandom; - centre (0 0 0); - radius 1; - nPoints 50; -} - -// Seeding at points on a surface -triSurfaceMesh -{ - type triSurfaceMesh; - surface "surfaceMeshFile.obj"; // in constant/geometry directory -} - -// Seeding at a boundary -boundaryRandom -{ - type boundaryRandom; - patches (patch1 patch2); - nPoints 50; -} - -// Seeding a set of points -points -{ - type points; - points ( - (0 -1 1) - (0 0 1) - (0 1 1) - ); - ordered on; -} - -boundaryPoints -{ - type boundaryPoints; - points ( - (0 -1 1) - (0 0 1) - (0 1 1) - ); - maxDistance 1; -} - -// DO NOT REMOVE from END of file; sets the seedSampleSet -seedSampleSet -{ - ${$seedMethod}; - axis x; -} - -// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualisation/surfaces b/etc/caseDicts/postProcessing/visualisation/surfaces deleted file mode 100644 index 0a60a40f82..0000000000 --- a/etc/caseDicts/postProcessing/visualisation/surfaces +++ /dev/null @@ -1,56 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -------------------------------------------------------------------------------- -Description - Writes out surface files with interpolated field data in VTK format, e.g. - cutting planes, iso-surfaces and patch boundary surfaces. - - This file includes a selection of example surfaces, each of which the user - should configure and/or remove. - -\*---------------------------------------------------------------------------*/ - -#includeEtc "caseDicts/postProcessing/visualisation/surfaces.cfg" - -fields (p U); - -surfaces -( - xNormal - { - $cuttingPlane; - } - - yNormal - { - $cuttingPlane; - normal $y; // Overrides default normal (1 0 0) - // $y: macro for (0 1 0) - } - - zNormal - { - $cuttingPlane; - point (0 0 2); // Overrides default point (0 0 0) - normal $z; // $z: macro for (0 0 1) - } - - p100 - { - $isosurface; - isoField p; - isoValue 100; - } - - CAD - { - $patchSurface; - patches (CAD); - } -); - -// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualisation/surfaces.cfg b/etc/caseDicts/postProcessing/visualisation/surfaces.cfg deleted file mode 100644 index 97f089cbc7..0000000000 --- a/etc/caseDicts/postProcessing/visualisation/surfaces.cfg +++ /dev/null @@ -1,43 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ - -type surfaces; -libs ("libsampling.so"); - -writeControl writeTime; - -surfaceFormat vtk; -interpolationScheme cellPoint; - -x (1 0 0); -y (0 1 0); -z (0 0 1); -origin (0 0 0); - -cuttingPlane -{ - type cuttingPlane; - planeType pointAndNormal; - point $origin; - normal $x; - interpolate true; -} - -isosurface -{ - type isoSurface; - interpolate true; -} - -patchSurface -{ - type patch; - interpolate true; -} - -// ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C index a89c61acf2..3468c21f09 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C @@ -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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ bool Foam::functionEntries::includeFuncEntry::execute ( fNameArgs, parentDict, - "file " + is.name() + " at line " + Foam::name(is.lineNumber()), + {"file", is.name() + " at line " + Foam::name(is.lineNumber())}, selectedFields ); } diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 93bf0b33ba..31d8487712 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -171,47 +171,63 @@ Foam::fileName Foam::functionObjectList::findDict } -void Foam::functionObjectList::checkUnsetEntries -( - const string& funcCall, - const dictionary& funcArgsDict, - const dictionary& funcDict, - const string& context -) +Foam::List> +Foam::functionObjectList::unsetEntries(const dictionary& funcDict) { - const wordRe unset("<.*>"); - unset.compile(); + const wordRe unsetPattern("<.*>"); + unsetPattern.compile(); - forAllConstIter(IDLList, funcArgsDict, iter) + List> unsetArgs; + + forAllConstIter(IDLList, funcDict, iter) { if (iter().isStream()) { - ITstream& tokens = iter().stream(); + ITstream& its = iter().stream(); + OStringStream oss; + bool isUnset = false; - forAll(tokens, i) + forAll(its, i) { - if (tokens[i].isWord()) + oss << its[i]; + if (its[i].isWord() && unsetPattern.match(its[i].wordToken())) { - if (unset.match(tokens[i].wordToken())) - { - FatalIOErrorInFunction(funcDict) - << "Essential value for keyword '" - << iter().keyword() - << "' not set in function entry" << nl - << " " << funcCall.c_str() << nl - << " in " << context.c_str() << nl - << " Placeholder value is " - << tokens[i].wordToken() - << exit(FatalIOError); - } + isUnset = true; } } + + if (isUnset) + { + unsetArgs.append + ( + Tuple2 + ( + iter().keyword(), + oss.str() + ) + ); + } } else { - checkUnsetEntries(funcCall, iter().dict(), funcDict, context); + List> subUnsetArgs = + unsetEntries(iter().dict()); + + forAll(subUnsetArgs, i) + { + unsetArgs.append + ( + Tuple2 + ( + iter().keyword() + '/' + subUnsetArgs[i].first(), + subUnsetArgs[i].second() + ) + ); + } } } + + return unsetArgs; } @@ -219,7 +235,7 @@ bool Foam::functionObjectList::readFunctionObject ( const string& funcArgs, dictionary& functionsDict, - const string& context, + const Pair& contextTypeAndValue, HashSet& requiredFields, const word& region ) @@ -332,11 +348,81 @@ bool Foam::functionObjectList::readFunctionObject funcDict.lookupOrDefault("funcName", string::validate(funcArgs)) ); - dictionary funcArgsDict; - funcArgsDict.add(funcName, funcDict); + // Check for anything in the configuration that has not been set + List> unsetArgs = unsetEntries(funcDict); + bool hasUnsetError = false; + forAll(unsetArgs, i) + { + if + ( + unsetArgs[i].first() != "fields" + && unsetArgs[i].first() != "objects" + ) + { + hasUnsetError = true; + } + } + if (!hasUnsetError) + { + forAll(unsetArgs, i) + { + funcDict.set(unsetArgs[i].first(), wordList()); + } + } + else + { + FatalIOErrorInFunction(funcDict0) + << nl; + + forAll(unsetArgs, i) + { + FatalIOErrorInFunction(funcDict0) + << "Essential value for keyword '" << unsetArgs[i].first() + << "' not set" << nl; + } + + FatalIOErrorInFunction(funcDict0) + << nl << "In function entry:" << nl + << " " << funcArgs.c_str() << nl + << nl << "In " << contextTypeAndValue.first().c_str() << ":" << nl + << " " << contextTypeAndValue.second().c_str() << nl; + + word funcType; + wordReList args; + List> namedArgs; + dictArgList(funcArgs, funcType, args, namedArgs); + + string argList; + forAll(args, i) + { + args[i].strip(" \n"); + argList += (argList.size() ? ", " : "") + args[i]; + } + forAll(namedArgs, i) + { + namedArgs[i].second().strip(" \n"); + argList += + (argList.size() ? ", " : "") + + namedArgs[i].first() + " = " + namedArgs[i].second(); + } + forAll(unsetArgs, i) + { + unsetArgs[i].second().strip(" \n"); + argList += + (argList.size() ? ", " : "") + + unsetArgs[i].first() + " = " + unsetArgs[i].second(); + } + + FatalIOErrorInFunction(funcDict0) + << nl << "The function entry should be:" << nl + << " " << funcType << '(' << argList.c_str() << ')' + << exit(FatalIOError); + } // Re-parse the funcDict to execute the functionEntries // now that the function argument entries have been added + dictionary funcArgsDict; + funcArgsDict.add(funcName, funcDict); { OStringStream os; funcArgsDict.write(os); @@ -348,9 +434,6 @@ bool Foam::functionObjectList::readFunctionObject ); } - // Check for anything in the configuration that has not been set - checkUnsetEntries(funcArgs, funcArgsDict, funcDict0, context); - // Lookup the field, fields and objects entries from the now expanded // funcDict and insert into the requiredFields dictionary& expandedFuncDict = funcArgsDict.subDict(funcName); @@ -479,7 +562,7 @@ Foam::autoPtr Foam::functionObjectList::New ( args["func"], functionsDict, - "command line " + args.commandLine(), + {"command", args.commandLine()}, requiredFields, region ); @@ -495,7 +578,7 @@ Foam::autoPtr Foam::functionObjectList::New ( funcs[i], functionsDict, - "command line " + args.commandLine(), + {"command", args.commandLine()}, requiredFields, region ); diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 2d77fe41f2..004f272daf 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -96,12 +96,10 @@ class functionObjectList // configuration files, add to the given map and recurse static void listDir(const fileName& dir, HashSet& foMap); - static void checkUnsetEntries + //- Return unset entries and their placeholder values + static List> unsetEntries ( - const string& funcNameArgs, - const dictionary& funcArgsDict, - const dictionary& funcDict, - const string& context + const dictionary& funcDict ); @@ -244,7 +242,7 @@ public: ( const string& funcArgs, dictionary& functionsDict, - const string& context, + const Pair& contextTypeAndValue, HashSet& requiredFields, const word& region = word::null ); diff --git a/src/OpenFOAM/primitives/strings/string/string.C b/src/OpenFOAM/primitives/strings/string/string.C index ef3fc146f5..4504720eaa 100644 --- a/src/OpenFOAM/primitives/strings/string/string.C +++ b/src/OpenFOAM/primitives/strings/string/string.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -197,4 +197,37 @@ Foam::string Foam::string::removeTrailing(const string& str) const } +void Foam::string::strip(const string& str) +{ + // Find the first character to keep + string::size_type i0 = 0; + while (i0 < size() && str.count(operator[](i0)) > 0) + { + ++ i0; + } + + // Find one past the last character to keep + string::size_type i1 = size(); + while (i1 > i0 && str.count(operator[](i1 - 1)) > 0) + { + -- i1; + } + + // Remove leading characters by shuffling the string up + if (i0 != 0) + { + for (string::size_type i = 0; i < size() - i0; ++ i) + { + operator[](i) = operator[](i + i0); + } + } + + // If removing any characters then resize the string + if (i0 != 0 || i1 != size()) + { + resize(i1 - i0); + } +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/string/string.H b/src/OpenFOAM/primitives/strings/string/string.H index 4ba576b0e9..ea7278aac6 100644 --- a/src/OpenFOAM/primitives/strings/string/string.H +++ b/src/OpenFOAM/primitives/strings/string/string.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -217,6 +217,9 @@ public: //- Return string with trailing string removed string removeTrailing(const string&) const; + //- Strip characters from the start and end of the string + void strip(const string&); + // Member Operators diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index c1952f8a1a..772a6a65a0 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,8 +121,7 @@ Foam::tmp Foam::functionObjects::pressure::pDyn if (calcTotal_) { return - tp - + rhoScale(p, 0.5*magSqr(lookupObject(UName_))); + tp + rhoScale(p, 0.5*magSqr(lookupObject(UName_))); } else { @@ -170,7 +169,7 @@ bool Foam::functionObjects::pressure::calc() return store ( resultName_, - coeff(pRef(pDyn(p, rhoScale(p)))) + volScalarField::New(resultName_, coeff(pRef(pDyn(p, rhoScale(p))))) ); } else diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/functionObjects/field/turbulenceFields/turbulenceFields.H index e3f17302e2..a602ca9f40 100644 --- a/src/functionObjects/field/turbulenceFields/turbulenceFields.H +++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,11 +67,11 @@ Usage nuEff | effective turbulence viscosity (incompressible) mut | turbulence viscosity (compressible) muEff | effective turbulence viscosity (compressible) - alphat | turbulence thermal diffusivity (compressible) alphaEff | effective turbulence thermal diffusivity (compressible) R | Reynolds stress tensor - devSigma | Deviatoric part of the effective Reynolds stress - devTau | Divergence of the Reynolds stress + devSigma | Deviatoric part of the effective Reynolds stress \ + (incompressible) + devTau | Divergence of the Reynolds stress (compressible) \endplaintable See also diff --git a/test/postProcessing/channel/0/T b/test/postProcessing/channel/0/T new file mode 100644 index 0000000000..232442623a --- /dev/null +++ b/test/postProcessing/channel/0/T @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/U b/test/postProcessing/channel/0/U new file mode 100644 index 0000000000..99fc04d789 --- /dev/null +++ b/test/postProcessing/channel/0/U @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (8 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type flowRateInletVelocity; + massFlowRate 1; + value $internalField; + } + + outlet + { + type pressureInletOutletVelocity; + value $internalField; + } + + walls + { + type noSlip; + } +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/alphat b/test/postProcessing/channel/0/alphat new file mode 100644 index 0000000000..927ffdee32 --- /dev/null +++ b/test/postProcessing/channel/0/alphat @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type compressible::alphatWallFunction; + Prt 0.85; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/epsilon b/test/postProcessing/channel/0/epsilon new file mode 100644 index 0000000000..322fc6e18b --- /dev/null +++ b/test/postProcessing/channel/0/epsilon @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 1; + value $internalField; + } + + outlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 1; + value $internalField; + } + + walls + { + type epsilonWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/k b/test/postProcessing/channel/0/k new file mode 100644 index 0000000000..90e9b1525e --- /dev/null +++ b/test/postProcessing/channel/0/k @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.3; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value $internalField; + } + + outlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value $internalField; + } + + walls + { + type kqRWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/nut b/test/postProcessing/channel/0/nut new file mode 100644 index 0000000000..ab46e34f14 --- /dev/null +++ b/test/postProcessing/channel/0/nut @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/p b/test/postProcessing/channel/0/p new file mode 100644 index 0000000000..a0f04f2efd --- /dev/null +++ b/test/postProcessing/channel/0/p @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type calculated; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/p_rgh b/test/postProcessing/channel/0/p_rgh new file mode 100644 index 0000000000..d74bc4012c --- /dev/null +++ b/test/postProcessing/channel/0/p_rgh @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedFluxPressure; + value $internalField; + } + + outlet + { + type totalPressure; + p0 $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/s b/test/postProcessing/channel/0/s new file mode 100644 index 0000000000..89389582a3 --- /dev/null +++ b/test/postProcessing/channel/0/s @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object s; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 1; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/0/s.dummy b/test/postProcessing/channel/0/s.dummy new file mode 100644 index 0000000000..26d1dc6ddc --- /dev/null +++ b/test/postProcessing/channel/0/s.dummy @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object s.dummy; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "s" + +// ************************************************************************* // diff --git a/test/postProcessing/channel/Allclean b/test/postProcessing/channel/Allclean new file mode 100755 index 0000000000..5f6a7899ea --- /dev/null +++ b/test/postProcessing/channel/Allclean @@ -0,0 +1,20 @@ +#!/bin/sh + +cd ${0%/*} || exit 1 + +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +find 0 -mindepth 1 -maxdepth 1 \ + ! -name alphat \ + ! -name epsilon \ + ! -name k \ + ! -name nut \ + ! -name p \ + ! -name p_rgh \ + ! -name s \ + ! -name s.dummy \ + ! -name T \ + ! -name U \ + -exec rm -rf {} \; diff --git a/test/postProcessing/channel/Allrun b/test/postProcessing/channel/Allrun new file mode 100755 index 0000000000..8dcafc57df --- /dev/null +++ b/test/postProcessing/channel/Allrun @@ -0,0 +1,10 @@ +#!/bin/sh + +cd ${0%/*} || exit 1 + +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication topoSet +runApplication $(getApplication) +runApplication -s postProcess $(getApplication) -postProcess -latestTime diff --git a/test/postProcessing/channel/constant/g b/test/postProcessing/channel/constant/g new file mode 100644 index 0000000000..770a56192e --- /dev/null +++ b/test/postProcessing/channel/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- 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 uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/constant/momentumTransport b/test/postProcessing/channel/constant/momentumTransport new file mode 100644 index 0000000000..8aee35a5df --- /dev/null +++ b/test/postProcessing/channel/constant/momentumTransport @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object momentumTransport; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + model kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/constant/thermophysicalProperties b/test/postProcessing/channel/constant/thermophysicalProperties new file mode 100644 index 0000000000..921010e07d --- /dev/null +++ b/test/postProcessing/channel/constant/thermophysicalProperties @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type hePsiThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/constant/thermophysicalTransport b/test/postProcessing/channel/constant/thermophysicalTransport new file mode 100644 index 0000000000..4110f6eca1 --- /dev/null +++ b/test/postProcessing/channel/constant/thermophysicalTransport @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalTransport; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + model eddyDiffusivity; + + Prt 0.85; +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/constant/triSurface/mid.obj b/test/postProcessing/channel/constant/triSurface/mid.obj new file mode 100644 index 0000000000..a632ec07c6 --- /dev/null +++ b/test/postProcessing/channel/constant/triSurface/mid.obj @@ -0,0 +1,143 @@ +v 0 -0.5 -0.05 +v 0 -0.5 0.05 +v 0 -0.4 -0.05 +v 0 -0.4 0.05 +v 0 -0.3 -0.05 +v 0 -0.3 0.05 +v 0 -0.2 -0.05 +v 0 -0.2 0.05 +v 0 -0.1 -0.05 +v 0 -0.1 0.05 +v 0 0 -0.05 +v 0 0 0.05 +v 0 0.1 -0.05 +v 0 0.1 0.05 +v 0 0.2 -0.05 +v 0 0.2 0.05 +v 0 0.3 -0.05 +v 0 0.3 0.05 +v 0 0.4 -0.05 +v 0 0.4 0.05 +v 0 0.5 -0.05 +v 0 0.5 0.05 +v 0 -0.45 -0.05 +v 0 -0.5 0 +v 0 -0.45 0 +v 0 -0.45 0.05 +v 0 -0.4 0 +v 0 -0.35 -0.05 +v 0 -0.35 0 +v 0 -0.35 0.05 +v 0 -0.3 0 +v 0 -0.25 -0.05 +v 0 -0.25 0 +v 0 -0.25 0.05 +v 0 -0.2 0 +v 0 -0.15 -0.05 +v 0 -0.15 0 +v 0 -0.15 0.05 +v 0 -0.1 0 +v 0 -0.05 -0.05 +v 0 -0.05 0 +v 0 -0.05 0.05 +v 0 0 0 +v 0 0.05 -0.05 +v 0 0.05 0 +v 0 0.05 0.05 +v 0 0.1 0 +v 0 0.15 -0.05 +v 0 0.15 0 +v 0 0.15 0.05 +v 0 0.2 0 +v 0 0.25 -0.05 +v 0 0.25 0 +v 0 0.25 0.05 +v 0 0.3 0 +v 0 0.35 -0.05 +v 0 0.35 0 +v 0 0.35 0.05 +v 0 0.4 0 +v 0 0.45 -0.05 +v 0 0.45 0 +v 0 0.45 0.05 +v 0 0.5 0 +f 1 24 23 +f 24 2 25 +f 25 3 23 +f 24 25 23 +f 4 27 26 +f 27 3 25 +f 25 2 26 +f 27 25 26 +f 3 27 28 +f 27 4 29 +f 29 5 28 +f 27 29 28 +f 6 31 30 +f 31 5 29 +f 29 4 30 +f 31 29 30 +f 5 31 32 +f 31 6 33 +f 33 7 32 +f 31 33 32 +f 8 35 34 +f 35 7 33 +f 33 6 34 +f 35 33 34 +f 7 35 36 +f 35 8 37 +f 37 9 36 +f 35 37 36 +f 10 39 38 +f 39 9 37 +f 37 8 38 +f 39 37 38 +f 9 39 40 +f 39 10 41 +f 41 11 40 +f 39 41 40 +f 12 43 42 +f 43 11 41 +f 41 10 42 +f 43 41 42 +f 11 43 44 +f 43 12 45 +f 45 13 44 +f 43 45 44 +f 14 47 46 +f 47 13 45 +f 45 12 46 +f 47 45 46 +f 13 47 48 +f 47 14 49 +f 49 15 48 +f 47 49 48 +f 16 51 50 +f 51 15 49 +f 49 14 50 +f 51 49 50 +f 15 51 52 +f 51 16 53 +f 53 17 52 +f 51 53 52 +f 18 55 54 +f 55 17 53 +f 53 16 54 +f 55 53 54 +f 17 55 56 +f 55 18 57 +f 57 19 56 +f 55 57 56 +f 20 59 58 +f 59 19 57 +f 57 18 58 +f 59 57 58 +f 19 59 60 +f 59 20 61 +f 61 21 60 +f 59 61 60 +f 22 63 62 +f 63 21 61 +f 61 20 62 +f 63 61 62 diff --git a/test/postProcessing/channel/constant/triSurface/nearInlet.obj b/test/postProcessing/channel/constant/triSurface/nearInlet.obj new file mode 100644 index 0000000000..e2455d58b7 --- /dev/null +++ b/test/postProcessing/channel/constant/triSurface/nearInlet.obj @@ -0,0 +1,143 @@ +v -0.45 -0.5 -0.05 +v -0.45 -0.5 0.05 +v -0.45 -0.4 -0.05 +v -0.45 -0.4 0.05 +v -0.45 -0.3 -0.05 +v -0.45 -0.3 0.05 +v -0.45 -0.2 -0.05 +v -0.45 -0.2 0.05 +v -0.45 -0.1 -0.05 +v -0.45 -0.1 0.05 +v -0.45 0 -0.05 +v -0.45 0 0.05 +v -0.45 0.1 -0.05 +v -0.45 0.1 0.05 +v -0.45 0.2 -0.05 +v -0.45 0.2 0.05 +v -0.45 0.3 -0.05 +v -0.45 0.3 0.05 +v -0.45 0.4 -0.05 +v -0.45 0.4 0.05 +v -0.45 0.5 -0.05 +v -0.45 0.5 0.05 +v -0.45 -0.45 -0.05 +v -0.45 -0.5 0 +v -0.45 -0.45 0 +v -0.45 -0.45 0.05 +v -0.45 -0.4 0 +v -0.45 -0.35 -0.05 +v -0.45 -0.35 0 +v -0.45 -0.35 0.05 +v -0.45 -0.3 0 +v -0.45 -0.25 -0.05 +v -0.45 -0.25 0 +v -0.45 -0.25 0.05 +v -0.45 -0.2 0 +v -0.45 -0.15 -0.05 +v -0.45 -0.15 0 +v -0.45 -0.15 0.05 +v -0.45 -0.1 0 +v -0.45 -0.05 -0.05 +v -0.45 -0.05 0 +v -0.45 -0.05 0.05 +v -0.45 0 0 +v -0.45 0.05 -0.05 +v -0.45 0.05 0 +v -0.45 0.05 0.05 +v -0.45 0.1 0 +v -0.45 0.15 -0.05 +v -0.45 0.15 0 +v -0.45 0.15 0.05 +v -0.45 0.2 0 +v -0.45 0.25 -0.05 +v -0.45 0.25 0 +v -0.45 0.25 0.05 +v -0.45 0.3 0 +v -0.45 0.35 -0.05 +v -0.45 0.35 0 +v -0.45 0.35 0.05 +v -0.45 0.4 0 +v -0.45 0.45 -0.05 +v -0.45 0.45 0 +v -0.45 0.45 0.05 +v -0.45 0.5 0 +f 1 24 23 +f 24 2 25 +f 25 3 23 +f 24 25 23 +f 4 27 26 +f 27 3 25 +f 25 2 26 +f 27 25 26 +f 3 27 28 +f 27 4 29 +f 29 5 28 +f 27 29 28 +f 6 31 30 +f 31 5 29 +f 29 4 30 +f 31 29 30 +f 5 31 32 +f 31 6 33 +f 33 7 32 +f 31 33 32 +f 8 35 34 +f 35 7 33 +f 33 6 34 +f 35 33 34 +f 7 35 36 +f 35 8 37 +f 37 9 36 +f 35 37 36 +f 10 39 38 +f 39 9 37 +f 37 8 38 +f 39 37 38 +f 9 39 40 +f 39 10 41 +f 41 11 40 +f 39 41 40 +f 12 43 42 +f 43 11 41 +f 41 10 42 +f 43 41 42 +f 11 43 44 +f 43 12 45 +f 45 13 44 +f 43 45 44 +f 14 47 46 +f 47 13 45 +f 45 12 46 +f 47 45 46 +f 13 47 48 +f 47 14 49 +f 49 15 48 +f 47 49 48 +f 16 51 50 +f 51 15 49 +f 49 14 50 +f 51 49 50 +f 15 51 52 +f 51 16 53 +f 53 17 52 +f 51 53 52 +f 18 55 54 +f 55 17 53 +f 53 16 54 +f 55 53 54 +f 17 55 56 +f 55 18 57 +f 57 19 56 +f 55 57 56 +f 20 59 58 +f 59 19 57 +f 57 18 58 +f 59 57 58 +f 19 59 60 +f 59 20 61 +f 61 21 60 +f 59 61 60 +f 22 63 62 +f 63 21 61 +f 61 20 62 +f 63 61 62 diff --git a/test/postProcessing/channel/constant/triSurface/nearOutlet.obj b/test/postProcessing/channel/constant/triSurface/nearOutlet.obj new file mode 100644 index 0000000000..bec02f04eb --- /dev/null +++ b/test/postProcessing/channel/constant/triSurface/nearOutlet.obj @@ -0,0 +1,143 @@ +v 0.45 -0.5 -0.05 +v 0.45 -0.5 0.05 +v 0.45 -0.4 -0.05 +v 0.45 -0.4 0.05 +v 0.45 -0.3 -0.05 +v 0.45 -0.3 0.05 +v 0.45 -0.2 -0.05 +v 0.45 -0.2 0.05 +v 0.45 -0.1 -0.05 +v 0.45 -0.1 0.05 +v 0.45 0 -0.05 +v 0.45 0 0.05 +v 0.45 0.1 -0.05 +v 0.45 0.1 0.05 +v 0.45 0.2 -0.05 +v 0.45 0.2 0.05 +v 0.45 0.3 -0.05 +v 0.45 0.3 0.05 +v 0.45 0.4 -0.05 +v 0.45 0.4 0.05 +v 0.45 0.5 -0.05 +v 0.45 0.5 0.05 +v 0.45 -0.45 -0.05 +v 0.45 -0.5 0 +v 0.45 -0.45 0 +v 0.45 -0.45 0.05 +v 0.45 -0.4 0 +v 0.45 -0.35 -0.05 +v 0.45 -0.35 0 +v 0.45 -0.35 0.05 +v 0.45 -0.3 0 +v 0.45 -0.25 -0.05 +v 0.45 -0.25 0 +v 0.45 -0.25 0.05 +v 0.45 -0.2 0 +v 0.45 -0.15 -0.05 +v 0.45 -0.15 0 +v 0.45 -0.15 0.05 +v 0.45 -0.1 0 +v 0.45 -0.05 -0.05 +v 0.45 -0.05 0 +v 0.45 -0.05 0.05 +v 0.45 0 0 +v 0.45 0.05 -0.05 +v 0.45 0.05 0 +v 0.45 0.05 0.05 +v 0.45 0.1 0 +v 0.45 0.15 -0.05 +v 0.45 0.15 0 +v 0.45 0.15 0.05 +v 0.45 0.2 0 +v 0.45 0.25 -0.05 +v 0.45 0.25 0 +v 0.45 0.25 0.05 +v 0.45 0.3 0 +v 0.45 0.35 -0.05 +v 0.45 0.35 0 +v 0.45 0.35 0.05 +v 0.45 0.4 0 +v 0.45 0.45 -0.05 +v 0.45 0.45 0 +v 0.45 0.45 0.05 +v 0.45 0.5 0 +f 1 24 23 +f 24 2 25 +f 25 3 23 +f 24 25 23 +f 4 27 26 +f 27 3 25 +f 25 2 26 +f 27 25 26 +f 3 27 28 +f 27 4 29 +f 29 5 28 +f 27 29 28 +f 6 31 30 +f 31 5 29 +f 29 4 30 +f 31 29 30 +f 5 31 32 +f 31 6 33 +f 33 7 32 +f 31 33 32 +f 8 35 34 +f 35 7 33 +f 33 6 34 +f 35 33 34 +f 7 35 36 +f 35 8 37 +f 37 9 36 +f 35 37 36 +f 10 39 38 +f 39 9 37 +f 37 8 38 +f 39 37 38 +f 9 39 40 +f 39 10 41 +f 41 11 40 +f 39 41 40 +f 12 43 42 +f 43 11 41 +f 41 10 42 +f 43 41 42 +f 11 43 44 +f 43 12 45 +f 45 13 44 +f 43 45 44 +f 14 47 46 +f 47 13 45 +f 45 12 46 +f 47 45 46 +f 13 47 48 +f 47 14 49 +f 49 15 48 +f 47 49 48 +f 16 51 50 +f 51 15 49 +f 49 14 50 +f 51 49 50 +f 15 51 52 +f 51 16 53 +f 53 17 52 +f 51 53 52 +f 18 55 54 +f 55 17 53 +f 53 16 54 +f 55 53 54 +f 17 55 56 +f 55 18 57 +f 57 19 56 +f 55 57 56 +f 20 59 58 +f 59 19 57 +f 57 18 58 +f 59 57 58 +f 19 59 60 +f 59 20 61 +f 61 21 60 +f 59 61 60 +f 22 63 62 +f 63 21 61 +f 61 20 62 +f 63 61 62 diff --git a/test/postProcessing/channel/system/blockMeshDict b/test/postProcessing/channel/system/blockMeshDict new file mode 100644 index 0000000000..f447a7d195 --- /dev/null +++ b/test/postProcessing/channel/system/blockMeshDict @@ -0,0 +1,80 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.5; + +vertices +( + (-1 -1 -0.1) + ( 1 -1 -0.1) + (-1 1 -0.1) + ( 1 1 -0.1) + + (-1 -1 0.1) + ( 1 -1 0.1) + (-1 1 0.1) + ( 1 1 0.1) +); + +blocks +( + hex (0 1 3 2 4 5 7 6) (1 1 1) simpleGrading (1 1 1) +); + +edges +( +); + +defaultPatch +{ + name frontAndBack; + type empty; +} + +boundary +( + inlet + { + type patch; + faces + ( + (0 2 6 4) + ); + } + outlet + { + type patch; + faces + ( + (1 3 7 5) + ); + } + walls + { + type wall; + faces + ( + (0 1 5 4) + (2 3 7 6) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/test/postProcessing/channel/system/controlDict b/test/postProcessing/channel/system/controlDict new file mode 100644 index 0000000000..fcf926880c --- /dev/null +++ b/test/postProcessing/channel/system/controlDict @@ -0,0 +1,417 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application buoyantPimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.01; + +writeControl runTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep no; + +maxCo 1; + +maxDeltaT 1; + +cacheTemporaryObjects +( + kEpsilon:G +); + +combustionFunctions +{ + // Not possible to test here as it needs a case with a combustion model + //#includeFunc Qdot + + // Not possible to test here as it needs a XiFoam case + //#includeFunc XiReactionRate +} + +controlFunctions +{ + #includeFunc stopAtClockTime(stopTime=3600) + + #includeFunc stopAtFile + + #includeFunc time + + #includeFunc writeObjects(kEpsilon:G) +} + +fieldsFunctions +{ + #includeFunc age + + #includeFunc components(U) + + #includeFunc CourantNo + + #includeFunc ddt(p) + + #includeFunc div(phi) + + #includeFunc enstrophy + + // !!! Takes a list of fields, not a single field like most others. It has + // an inconsistent name convention; i.e., "Mean", rather than + // "mean()". It also does both "mean" and "prime2Mean". Consider + // fixing the output field naming and splitting into separate + // configurations for the different outputs. + #includeFunc fieldAverage(U, k, epsilon) + + #includeFunc flowType + + #includeFunc grad(p) + + #includeFunc Lambda2 + + #includeFunc MachNo + + #includeFunc mag(U) + + #includeFunc magSqr(U) + + #includeFunc PecletNo + + // Not possible to test here as it needs a multiphase case + //#includeFunc phaseMap + + #includeFunc Q + + #includeFunc randomise(U, magPerturbation=0.1) + + #includeFunc scale(age, scale=0.1) + + #includeFunc shearStress + + #includeFunc streamFunction + + #includeFunc totalEnthalpy + + #includeFunc turbulenceFields(muEff, R, devTau) + + #includeFunc turbulenceIntensity + + #includeFunc vorticity + + #includeFunc wallHeatFlux + + #includeFunc wallHeatTransferCoeff(rho=1.225, Cp=1005, Pr=0.7, Prt=0.9) + + #includeFunc wallShearStress + + #includeFunc writeCellCentres + + #includeFunc writeCellVolumes + + // !!! Only writes the internal parts of vol fields. The name should really + // be less general to reflect this; e.g., writeInternalFieldsVTK. However, + // a better change would be further library-ise the internals of foamToVTK + // and incorporate it into this object so that it writes patches, surface + // fields, point fields, lagrangian, etc... Then we could deprecate + // foamToVTK in favour of this function. + #includeFunc writeVTK(U, p) + + #includeFunc yPlus +} + +fieldsOperationsFunctions +{ + // Operation sequence to compute normalised direction of velocity + // perturbation from mean + #includeFunc subtract(U, UMean, result=u) + #includeFunc uniform + ( + fieldType=volScalarField, + name=mag(smallU), + dimensions=[0 1 -1 0 0 0 0], + value=1e-16 + ) + #includeFunc add(mag(U), mag(smallU), result=stabilise(mag(U))) + #includeFunc divide(u, stabilise(mag(U)), result=uFrac) + + // Operation to compute a tensor by doing an outer vector product + #includeFunc multiply(U, u) + + // Operation sequence to compute the log of temperature divided by an + // ambient value + #includeFunc uniform + ( + fieldType=volScalarField, + name=Ta, + dimensions=[0 0 0 1 0 0 0], + value=297 + ) + #includeFunc divide(T, Ta) + #includeFunc log(divide(T,Ta)) +} + +forcesFunctions +{ + #includeFunc forcesIncompressible + ( + patches=(walls), + rhoInf=1.225, + CofR=(0 0 0), + pitchAxis=(0 1 0) + ) + + #includeFunc forceCoeffsIncompressible + ( + patches=(walls), + magUInf=20, + lRef=1, + Aref=1, + CofR=(0 0 0), + liftDir=(0 0 1), + dragDir=(1 0 0), + pitchAxis=(0 1 0) + ) + + #includeFunc forcesCompressible + ( + patches=(walls), + CofR=(0 0 0), + pitchAxis=(0 1 0) + ) + + #includeFunc forceCoeffsCompressible + ( + patches=(walls), + magUInf=20, + rhoInf=1.225, + lRef=1, + Aref=1, + CofR=(0 0 0), + liftDir=(0 0 1), + dragDir=(1 0 0), + pitchAxis=(0 1 0) + ) + + // Not possible to test here as it needs a multiphase Euler-Euler case + //#includeFunc phaseForces(phase=air) +} + +graphsFunctions +{ + #includeFunc graphUniform + ( + start=(-0.5 -0.5 0), + end=(0.5 0.5 0), + nPoints=100, + fields=(p U) + ) + + #includeFunc graphCell + ( + start=(-0.500001 -0.500001 0), + end=(0.500001 0.500001 0), + fields=(p U) + ) +} + +lagrangianFunctions +{ + // Not possible to test here as it needs a DSMC case + //#includeFunc dsmcFields +} + +minMaxFunctions +{ + #includeFunc cellMin(epsilon) + + #includeFunc cellMax(k) + + #includeFunc cellMinMag(U, writeLocation=yes) + + #includeFunc cellMaxMag(U, writeLocation=yes) +} + +numericalFunctions +{ + #includeFunc residuals(p, U, h, k, epsilon) + + #includeFunc timeStep +} + +pressureFunctions +{ + #includeFunc divide(p, rho, result=kinematic(p)) + + #includeFunc staticPressureIncompressible(kinematic(p), rhoInf=1.2) + + #includeFunc totalPressureIncompressible(kinematic(p), rhoInf=1.2) + + #includeFunc totalPressureCompressible +} + +probesFunctions +{ + #includeFunc probes(points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)), p, U, T) + + #includeFunc internalProbes(points=((-0.2 -0.2 0) (0.2 0.2 0)), p, U, T) + + #includeFunc boundaryProbes + ( + points=((-0.2 -0.2 -0.04) (0.2 0.2 -0.04)), + maxDistance=0.02, + p, + U, + T + ) + + #includeFunc uniform + ( + fieldType=volScalarField, + name=alpha.dummy, + dimensions=[0 0 0 0 0 0 0], + value=0.2 + ) + + #includeFunc interfaceHeight + ( + alpha=alpha.dummy, + points=((-0.2 -0.2 0) (0.2 0.2 0)) + ) +} + +solversFunctions +{ + #includeFunc scalarTransport(s, schemesField=h) + + #includeFunc phaseScalarTransport(s.dummy, schemesField=h, p=p_rgh, rho=rho) + + // Not possible to test here as not compatible with compressible solvers + //#includeFunc particles +} + +streamLinesFunctions +{ + #includeFunc streamLinesSphere + ( + centre=(0 0 0), + radius=0.1, + nPoints=100, + p, + U, + direction=forward + ) + + #includeFunc streamLinesLine + ( + start=(-0.5 -0.5 -0.05), + end=(0.5 0.5 0.05), + nPoints=100, + p, + U, + direction=backward + ) + + #includeFunc streamLinesPatch + ( + patch=inlet, + nPoints=100, + p, + U + ) + + #includeFunc streamLinesPoints + ( + points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)) + p, + U, + direction=forward + ) +} + +surfaceFunctions +{ + #includeFunc cutPlaneSurface(point=(0 0 0), normal=(0 0 1), p, U) + + #includeFunc isoSurface(isoField=nut, isoValue=0.1, p, U) + + #includeFunc patchSurface(patch=walls, p, U) +} + +surfaceFieldValueFunctions +{ + #includeFunc patchAverage(patch=inlet, k) + + #includeFunc patchIntegrate(patch=inlet, epsilon) + + #includeFunc patchFlowRate(patch=inlet) + + #includeFunc patchDifference(patch1=inlet, patch2=outlet, p) + + #includeFunc faceZoneAverage(name=f0, U) + + #includeFunc faceZoneFlowRate(name=f0) + + #includeFunc triSurfaceVolumetricFlowRate(name=mid.obj) + + #includeFunc triSurfaceDifference + ( + name1=nearInlet.obj, + name2=nearOutlet.obj, + p + ) +} + +functions +{ + $combustionFunctions; + $controlFunctions; + $fieldsFunctions; + $fieldsOperationsFunctions; + $forcesFunctions; + $graphsFunctions; + $lagrangianFunctions; + $minMaxFunctions; + $numericalFunctions; + $pressureFunctions; + $probesFunctions; + $solversFunctions; + $streamLinesFunctions; + $surfaceFunctions; + $surfaceFieldValueFunctions; +} + +// ************************************************************************* // diff --git a/test/postProcessing/channel/system/fvSchemes b/test/postProcessing/channel/system/fvSchemes new file mode 100644 index 0000000000..c82f1d1a21 --- /dev/null +++ b/test/postProcessing/channel/system/fvSchemes @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss upwind; + div(phi,h) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,age) Gauss upwind; + + div(phi,K) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + + div(alphaPhi.dummy,h) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + +wallDist +{ + method meshWave; +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/system/fvSolution b/test/postProcessing/channel/system/fvSolution new file mode 100644 index 0000000000..c1e2076f0b --- /dev/null +++ b/test/postProcessing/channel/system/fvSolution @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + ".*" + { + solver diagonal; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // diff --git a/test/postProcessing/channel/system/topoSetDict b/test/postProcessing/channel/system/topoSetDict new file mode 100644 index 0000000000..33c1e15a82 --- /dev/null +++ b/test/postProcessing/channel/system/topoSetDict @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name f0; + type faceSet; + action new; + source patchToFace; + sourceInfo + { + name inlet; + } + } + { + name f0; + type faceZoneSet; + action new; + source setToFaceZone; + sourceInfo + { + set f0; + } + } +); + +// ************************************************************************* //