Permalink
Browse files

Packaged function objects to plug into OpenFOAM cases

See $FOAM_ETC/caseDicts/postProcessing/README for details
  • Loading branch information...
1 parent 344a6fe commit ff63a1bfede14f9b93d9e8808811493921dc9a23 Chris Greenshields committed May 17, 2015
Showing with 1,912 additions and 0 deletions.
  1. +52 −0 etc/caseDicts/postProcessing/README
  2. +27 −0 etc/caseDicts/postProcessing/faceSource/faceSource.cfg
  3. +21 −0 etc/caseDicts/postProcessing/faceSource/faceZoneSource.cfg
  4. +22 −0 etc/caseDicts/postProcessing/faceSource/patchSource.cfg
  5. +29 −0 etc/caseDicts/postProcessing/faceSource/surfaceSource.cfg
  6. +22 −0 etc/caseDicts/postProcessing/fields/Lambda2
  7. +23 −0 etc/caseDicts/postProcessing/fields/Lambda2.cfg
  8. +22 −0 etc/caseDicts/postProcessing/fields/Q
  9. +23 −0 etc/caseDicts/postProcessing/fields/Q.cfg
  10. +28 −0 etc/caseDicts/postProcessing/flowRate/flowRatePatch
  11. +22 −0 etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg
  12. +28 −0 etc/caseDicts/postProcessing/flowRate/volFlowRateSurface
  13. +22 −0 etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg
  14. +22 −0 etc/caseDicts/postProcessing/forces/forceCoeffs.cfg
  15. +35 −0 etc/caseDicts/postProcessing/forces/forceCoeffsCompressible
  16. +20 −0 etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg
  17. +34 −0 etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible
  18. +29 −0 etc/caseDicts/postProcessing/forces/forces.cfg
  19. +27 −0 etc/caseDicts/postProcessing/forces/forcesCompressible
  20. +21 −0 etc/caseDicts/postProcessing/forces/forcesCompressible.cfg
  21. +28 −0 etc/caseDicts/postProcessing/forces/forcesIncompressible
  22. +33 −0 etc/caseDicts/postProcessing/graphs/graph.cfg
  23. +31 −0 etc/caseDicts/postProcessing/graphs/sampleDict
  24. +28 −0 etc/caseDicts/postProcessing/graphs/sampleDict.cfg
  25. +29 −0 etc/caseDicts/postProcessing/graphs/singleGraph
  26. +24 −0 etc/caseDicts/postProcessing/minMax/cellMax
  27. +24 −0 etc/caseDicts/postProcessing/minMax/cellMin
  28. +20 −0 etc/caseDicts/postProcessing/minMax/cellMin.cfg
  29. +30 −0 etc/caseDicts/postProcessing/minMax/cellMinMax.cfg
  30. +24 −0 etc/caseDicts/postProcessing/minMax/faceMax
  31. +24 −0 etc/caseDicts/postProcessing/minMax/faceMin
  32. +20 −0 etc/caseDicts/postProcessing/minMax/faceMin.cfg
  33. +30 −0 etc/caseDicts/postProcessing/minMax/faceMinMax.cfg
  34. +29 −0 etc/caseDicts/postProcessing/minMax/fieldMinMax.cfg
  35. +24 −0 etc/caseDicts/postProcessing/minMax/minMaxComponents
  36. +20 −0 etc/caseDicts/postProcessing/minMax/minMaxComponents.cfg
  37. +24 −0 etc/caseDicts/postProcessing/minMax/minMaxMagnitude
  38. +24 −0 etc/caseDicts/postProcessing/numerical/residuals
  39. +24 −0 etc/caseDicts/postProcessing/numerical/residuals.cfg
  40. +40 −0 etc/caseDicts/postProcessing/pressure/pressureDifference.cfg
  41. +25 −0 etc/caseDicts/postProcessing/pressure/pressureDifferencePatch
  42. +30 −0 etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg
  43. +26 −0 etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface
  44. +41 −0 etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg
  45. +24 −0 etc/caseDicts/postProcessing/pressure/pressureTools.cfg
  46. +24 −0 etc/caseDicts/postProcessing/pressure/staticPressure
  47. +24 −0 etc/caseDicts/postProcessing/pressure/staticPressure.cfg
  48. +25 −0 etc/caseDicts/postProcessing/pressure/totalPressureCompressible
  49. +23 −0 etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg
  50. +26 −0 etc/caseDicts/postProcessing/pressure/totalPressureIncompressible
  51. +24 −0 etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg
  52. +33 −0 etc/caseDicts/postProcessing/probes/boundaryCloud
  53. +31 −0 etc/caseDicts/postProcessing/probes/boundaryCloud.cfg
  54. +23 −0 etc/caseDicts/postProcessing/probes/cloud.cfg
  55. +28 −0 etc/caseDicts/postProcessing/probes/internalCloud
  56. +29 −0 etc/caseDicts/postProcessing/probes/internalCloud.cfg
  57. +28 −0 etc/caseDicts/postProcessing/probes/probes
  58. +24 −0 etc/caseDicts/postProcessing/probes/probes.cfg
  59. +40 −0 etc/caseDicts/postProcessing/scalarTransport/T
  60. +25 −0 etc/caseDicts/postProcessing/scalarTransport/scalarTransport
  61. +31 −0 etc/caseDicts/postProcessing/scalarTransport/scalarTransport.cfg
  62. +33 −0 etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict
  63. +49 −0 etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict.cfg
  64. +28 −0 etc/caseDicts/postProcessing/visualization/streamlines
  65. +40 −0 etc/caseDicts/postProcessing/visualization/streamlines.cfg
  66. +64 −0 etc/caseDicts/postProcessing/visualization/surfaces
  67. +55 −0 etc/caseDicts/postProcessing/visualization/surfaces.cfg
@@ -0,0 +1,52 @@
+Overview
+========
+- This directory contains files to help post-processing of OpenFOAM cases
+- It primariy "packages" functionObject functionality in a convenient form for
+ users to plug into their OpenFOAM cases
+- While some tools are quite generic, e.g. minMax, others are more application-
+ oriented, e.g. flowRate.
+
+How the tools work
+==================
+- The configuration of functionObjects includes both required input data and
+ control parameters for the functionObject
+- This creates a lot of input that can be confusing to users
+- The tools here are packaged so that the user input is separated from control
+ parameters
+- Control parameters are pre-configured in .cfg files - users can ignore these
+ files
+- For each tool, required user input is all in one file, for the users to copy
+ into their case and set accordingly
+
+Example of how to use the tools
+===============================
+Task: monitor flow rate at an outlet patch named "outlet" for a case
+Solution:
+- locate the flowRatePatch tool in the flowRate directory
+- copy the flowRatePatch file into the case system directory (not
+ flowRatePatch.cfg)
+- edit system/flowRatePatch to set the patch name
+ replace "patch <patchName>;"
+ with "patch outlet;"
+- activate the function object by including the flowRatePatch file in functions
+ sub-dictionary in the case controlDict file, e.g.
+ functions
+ {
+ #include "flowRatePatch"
+ ... other function objects here ...
+ }
+
+Current tools
+=============
+- fields calculate specific fields, e.g. Q
+- flowRate tools to calculate flow rate
+- forces forces and forceCoeffs for incompressible/compressible flows
+- graphs simple sampling for graph plotting, e.g. singleGraph
+- minMax range of minimum and maximum field monitoring, e.g. cellMax
+- numerical outputs information relating to numerics, e.g. residuals
+- pressure calculates different forms of pressure, pressure drop, etc
+- probes options for probing data
+- scalarTransport for plugin scalar transport calculations
+- visualization post-processing VTK files for cutting planes, streamlines,...
+
+- faceSource configuration for some of the tools above
@@ -0,0 +1,27 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object faceSource.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+type faceSource;
+functionObjectLibs ("libfieldFunctionObjects.so");
+
+enabled true;
+outputControl timeStep;
+writeInterval 1;
+
+valueOutput false;
+log false;
+
+// ************************************************************************* //
@@ -0,0 +1,21 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object faceZoneSource.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
+
+source faceZone;
+
+// ************************************************************************* //
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object patchSource.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
+
+source patch;
+sourceName $patch;
+
+// ************************************************************************* //
@@ -0,0 +1,29 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object surfaceSource.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
+
+source sampledSurface;
+
+sampledSurfaceDict
+{
+ type sampledTriSurfaceMesh;
+ surface $triSurface;
+ source cells;
+ interpolate true;
+}
+
+// ************************************************************************* //
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object Lambda2.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+Lambda2
+{
+ #includeEtc "caseDicts/postProcessing/fields/Lambda2.cfg"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,23 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object Lambda2.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+type Lambda2;
+functionObjectLibs ("libutilityFunctionObjects.so");
+
+enabled true;
+outputControl outputTime;
+
+// ************************************************************************* //
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object Q.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+Q
+{
+ #includeEtc "caseDicts/postProcessing/fields/Q.cfg"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,23 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object Q.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+type Q;
+functionObjectLibs ("libutilityFunctionObjects.so");
+
+enabled true;
+outputControl outputTime;
+
+// ************************************************************************* //
@@ -0,0 +1,28 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object flowRatePatch;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// This packaged function object sums the flux phi on patch faces so the
+// calculated volume flow rate for solvers where phi = volumetric flux, and
+// mass flow rate for solvers where phi = mass flux.
+
+flowRatePatch
+{
+ patch <patchName>;
+
+ #includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object flowRatePatch.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg"
+
+fields (phi);
+operation sum;
+
+// ************************************************************************* //
@@ -0,0 +1,28 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object volFlowRateSurface;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// This packaged function object interpolates velocity U onto triangles in
+// triSurface file and integrates over the surface area. Triangles need to
+// be small (<= cell size) for an accurate integration.
+
+volFlowRateSurface
+{
+ triSurface <triSurfaceFile>;
+
+ #includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object volFlowRateSurface.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#includeEtc "caseDicts/postProcessing/faceSource/surfaceSource.cfg"
+
+fields (U);
+operation areaNormalIntegrate;
+
+// ************************************************************************* //
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object forceCoeffs.cfg;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
+
+type forceCoeffs;
+rhoInf 1; // Redundant for incompressible
+
+// ************************************************************************* //
Oops, something went wrong.

0 comments on commit ff63a1b

Please sign in to comment.