Skip to content

Commit ff63a1b

Browse files
author
Chris Greenshields
committed
Packaged function objects to plug into OpenFOAM cases
See $FOAM_ETC/caseDicts/postProcessing/README for details
1 parent 344a6fe commit ff63a1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1912
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Overview
2+
========
3+
- This directory contains files to help post-processing of OpenFOAM cases
4+
- It primariy "packages" functionObject functionality in a convenient form for
5+
users to plug into their OpenFOAM cases
6+
- While some tools are quite generic, e.g. minMax, others are more application-
7+
oriented, e.g. flowRate.
8+
9+
How the tools work
10+
==================
11+
- The configuration of functionObjects includes both required input data and
12+
control parameters for the functionObject
13+
- This creates a lot of input that can be confusing to users
14+
- The tools here are packaged so that the user input is separated from control
15+
parameters
16+
- Control parameters are pre-configured in .cfg files - users can ignore these
17+
files
18+
- For each tool, required user input is all in one file, for the users to copy
19+
into their case and set accordingly
20+
21+
Example of how to use the tools
22+
===============================
23+
Task: monitor flow rate at an outlet patch named "outlet" for a case
24+
Solution:
25+
- locate the flowRatePatch tool in the flowRate directory
26+
- copy the flowRatePatch file into the case system directory (not
27+
flowRatePatch.cfg)
28+
- edit system/flowRatePatch to set the patch name
29+
replace "patch <patchName>;"
30+
with "patch outlet;"
31+
- activate the function object by including the flowRatePatch file in functions
32+
sub-dictionary in the case controlDict file, e.g.
33+
functions
34+
{
35+
#include "flowRatePatch"
36+
... other function objects here ...
37+
}
38+
39+
Current tools
40+
=============
41+
- fields calculate specific fields, e.g. Q
42+
- flowRate tools to calculate flow rate
43+
- forces forces and forceCoeffs for incompressible/compressible flows
44+
- graphs simple sampling for graph plotting, e.g. singleGraph
45+
- minMax range of minimum and maximum field monitoring, e.g. cellMax
46+
- numerical outputs information relating to numerics, e.g. residuals
47+
- pressure calculates different forms of pressure, pressure drop, etc
48+
- probes options for probing data
49+
- scalarTransport for plugin scalar transport calculations
50+
- visualization post-processing VTK files for cutting planes, streamlines,...
51+
52+
- faceSource configuration for some of the tools above
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object faceSource.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
type faceSource;
18+
functionObjectLibs ("libfieldFunctionObjects.so");
19+
20+
enabled true;
21+
outputControl timeStep;
22+
writeInterval 1;
23+
24+
valueOutput false;
25+
log false;
26+
27+
// ************************************************************************* //
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object faceZoneSource.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
18+
19+
source faceZone;
20+
21+
// ************************************************************************* //
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object patchSource.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
18+
19+
source patch;
20+
sourceName $patch;
21+
22+
// ************************************************************************* //
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object surfaceSource.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
18+
19+
source sampledSurface;
20+
21+
sampledSurfaceDict
22+
{
23+
type sampledTriSurfaceMesh;
24+
surface $triSurface;
25+
source cells;
26+
interpolate true;
27+
}
28+
29+
// ************************************************************************* //
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object Lambda2.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
Lambda2
18+
{
19+
#includeEtc "caseDicts/postProcessing/fields/Lambda2.cfg"
20+
}
21+
22+
// ************************************************************************* //
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object Lambda2.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
type Lambda2;
18+
functionObjectLibs ("libutilityFunctionObjects.so");
19+
20+
enabled true;
21+
outputControl outputTime;
22+
23+
// ************************************************************************* //
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object Q.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
Q
18+
{
19+
#includeEtc "caseDicts/postProcessing/fields/Q.cfg"
20+
}
21+
22+
// ************************************************************************* //
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object Q.cfg;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
type Q;
18+
functionObjectLibs ("libutilityFunctionObjects.so");
19+
20+
enabled true;
21+
outputControl outputTime;
22+
23+
// ************************************************************************* //
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 2.3.x |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object flowRatePatch;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
// This packaged function object sums the flux phi on patch faces so the
18+
// calculated volume flow rate for solvers where phi = volumetric flux, and
19+
// mass flow rate for solvers where phi = mass flux.
20+
21+
flowRatePatch
22+
{
23+
patch <patchName>;
24+
25+
#includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg"
26+
}
27+
28+
// ************************************************************************* //

0 commit comments

Comments
 (0)