diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/Make/files b/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/Make/files
deleted file mode 100644
index b64d3870e3..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-streamFunction.C
-
-EXE = $(FOAM_APPBIN)/streamFunction
diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/Make/options b/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/Make/options
deleted file mode 100644
index 318e1be8f4..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/Make/options
+++ /dev/null
@@ -1,8 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude
-
-EXE_LIBS = \
- -lgenericPatchFields \
- -lfiniteVolume \
- -lmeshTools
diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/streamFunction.C b/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/streamFunction.C
deleted file mode 100644
index bff8a9856a..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/streamFunction/streamFunction.C
+++ /dev/null
@@ -1,491 +0,0 @@
-/*---------------------------------------------------------------------------* \
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Application
- streamFunction
-
-Description
- Calculates and writes the stream function of velocity field U at each
- time.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "pointFields.H"
-#include "emptyPolyPatch.H"
-#include "symmetryPlanePolyPatch.H"
-#include "symmetryPolyPatch.H"
-#include "wedgePolyPatch.H"
-#include "OSspecific.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
- timeSelector::addOptions();
- #include "addRegionOption.H"
-
- #include "setRootCase.H"
- #include "createTime.H"
-
- instantList timeDirs = timeSelector::select0(runTime, args);
-
- #include "createNamedMesh.H"
-
- label nD = mesh.nGeometricD();
-
- if (nD != 2)
- {
- FatalErrorInFunction
- << "Case is not 2D, stream-function cannot be computed"
- << exit(FatalError);
- }
-
- Vector slabNormal((Vector::one - mesh.geometricD())/2);
- const direction slabDir
- (
- slabNormal
- & Vector(Vector::X, Vector::Y, Vector::Z)
- );
-
- scalar thickness = vector(slabNormal) & mesh.bounds().span();
-
- const pointMesh& pMesh = pointMesh::New(mesh);
-
- forAll(timeDirs, timeI)
- {
- runTime.setTime(timeDirs[timeI], timeI);
-
- Info<< nl << "Time: " << runTime.timeName() << endl;
-
- IOobject phiHeader
- (
- "phi",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ
- );
-
- if (phiHeader.headerOk())
- {
- mesh.readUpdate();
-
- Info<< nl << "Reading field phi" << endl;
-
- surfaceScalarField phi
- (
- IOobject
- (
- "phi",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::NO_WRITE
- ),
- mesh
- );
-
- pointScalarField streamFunction
- (
- IOobject
- (
- "streamFunction",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::NO_WRITE
- ),
- pMesh,
- dimensionedScalar("zero", phi.dimensions(), 0.0)
- );
-
- labelList visitedPoint(mesh.nPoints());
- forAll(visitedPoint, pointi)
- {
- visitedPoint[pointi] = 0;
- }
- label nVisited = 0;
- label nVisitedOld = 0;
-
- const faceUList& faces = mesh.faces();
- const pointField& points = mesh.points();
-
- label nInternalFaces = mesh.nInternalFaces();
-
- vectorField unitAreas(mesh.faceAreas());
- unitAreas /= mag(unitAreas);
-
- const polyPatchList& patches = mesh.boundaryMesh();
-
- bool finished = true;
-
- // Find the boundary face with zero flux. set the stream function
- // to zero on that face
- bool found = false;
-
- do
- {
- found = false;
-
- forAll(patches, patchi)
- {
- const primitivePatch& bouFaces = patches[patchi];
-
- if (!isType(patches[patchi]))
- {
- forAll(bouFaces, facei)
- {
- if
- (
- magSqr(phi.boundaryField()[patchi][facei])
- < SMALL
- )
- {
- const labelList& zeroPoints = bouFaces[facei];
-
- // Zero flux face found
- found = true;
-
- forAll(zeroPoints, pointi)
- {
- if (visitedPoint[zeroPoints[pointi]] == 1)
- {
- found = false;
- break;
- }
- }
-
- if (found)
- {
- Info<< "Zero face: patch: " << patchi
- << " face: " << facei << endl;
-
- forAll(zeroPoints, pointi)
- {
- streamFunction[zeroPoints[pointi]] = 0;
- visitedPoint[zeroPoints[pointi]] = 1;
- nVisited++;
- }
-
- break;
- }
- }
- }
- }
-
- if (found) break;
- }
-
- if (!found)
- {
- Info<< "zero flux boundary face not found. "
- << "Using cell as a reference."
- << endl;
-
- const cellList& c = mesh.cells();
-
- forAll(c, cI)
- {
- labelList zeroPoints = c[cI].labels(mesh.faces());
-
- bool found = true;
-
- forAll(zeroPoints, pointi)
- {
- if (visitedPoint[zeroPoints[pointi]] == 1)
- {
- found = false;
- break;
- }
- }
-
- if (found)
- {
- forAll(zeroPoints, pointi)
- {
- streamFunction[zeroPoints[pointi]] = 0.0;
- visitedPoint[zeroPoints[pointi]] = 1;
- nVisited++;
- }
-
- break;
- }
- else
- {
- FatalErrorInFunction
- << "Cannot find initialisation face or a cell."
- << abort(FatalError);
- }
- }
- }
-
- // Loop through all faces. If one of the points on
- // the face has the streamfunction value different
- // from -1, all points with -1 ont that face have the
- // streamfunction value equal to the face flux in
- // that point plus the value in the visited point
- do
- {
- finished = true;
-
- for
- (
- label facei = nInternalFaces;
- facei
- (patches[patchNo])
- && !isType
- (patches[patchNo])
- && !isType
- (patches[patchNo])
- && !isType
- (patches[patchNo])
- )
- {
- label faceNo =
- mesh.boundaryMesh()[patchNo]
- .whichFace(facei);
-
- vector edgeHat =
- points[curBPoints[pointi]]
- - currentBStreamPoint;
- edgeHat.replace(slabDir, 0);
- edgeHat /= mag(edgeHat);
-
- vector nHat = unitAreas[facei];
-
- if (edgeHat.y() > VSMALL)
- {
- visitedPoint[curBPoints[pointi]] =
- 1;
- nVisited++;
-
- streamFunction[curBPoints[pointi]]
- =
- currentBStream
- + phi.boundaryField()
- [patchNo][faceNo]
- *sign(nHat.x());
- }
- else if (edgeHat.y() < -VSMALL)
- {
- visitedPoint[curBPoints[pointi]] =
- 1;
- nVisited++;
-
- streamFunction[curBPoints[pointi]]
- =
- currentBStream
- - phi.boundaryField()
- [patchNo][faceNo]
- *sign(nHat.x());
- }
- else
- {
- if (edgeHat.x() > VSMALL)
- {
- visitedPoint
- [curBPoints[pointi]] = 1;
- nVisited++;
-
- streamFunction
- [curBPoints[pointi]] =
- currentBStream
- + phi.boundaryField()
- [patchNo][faceNo]
- *sign(nHat.y());
- }
- else if (edgeHat.x() < -VSMALL)
- {
- visitedPoint
- [curBPoints[pointi]] = 1;
- nVisited++;
-
- streamFunction
- [curBPoints[pointi]] =
- currentBStream
- - phi.boundaryField()
- [patchNo][faceNo]
- *sign(nHat.y());
- }
- }
- }
- }
- }
- }
- else
- {
- finished = false;
- }
- }
-
- for (label facei=0; facei VSMALL)
- {
- visitedPoint[curPoints[pointi]] = 1;
- nVisited++;
-
- streamFunction[curPoints[pointi]] =
- currentStream
- + phi[facei]*sign(nHat.x());
- }
- else if (edgeHat.y() < -VSMALL)
- {
- visitedPoint[curPoints[pointi]] = 1;
- nVisited++;
-
- streamFunction[curPoints[pointi]] =
- currentStream
- - phi[facei]*sign(nHat.x());
- }
- }
- }
- }
- else
- {
- finished = false;
- }
- }
-
- Info<< ".";
-
- if (nVisited == nVisitedOld)
- {
- // Find new seed. This must be a
- // multiply connected domain
- Info<< nl << "Exhausted a seed. Looking for new seed "
- << "(this is correct for multiply connected "
- << "domains).";
-
- break;
- }
- else
- {
- nVisitedOld = nVisited;
- }
- } while (!finished);
-
- Info<< endl;
- } while (!finished);
-
- // Normalise the stream-function by the 2D mesh thickness
- streamFunction /= thickness;
- streamFunction.boundaryFieldRef() = 0.0;
- streamFunction.write();
- }
- else
- {
- WarningInFunction
- << "Flux field does not exist."
- << " Stream function not calculated" << endl;
- }
- }
-
- Info<< "\nEnd\n" << endl;
-
- return 0;
-}
-
-
-// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/Make/files b/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/Make/files
deleted file mode 100644
index 368cc8e9f9..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-wallHeatFlux.C
-
-EXE = $(FOAM_APPBIN)/wallHeatFlux
diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/Make/options b/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/Make/options
deleted file mode 100644
index 1d4a46267a..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/Make/options
+++ /dev/null
@@ -1,23 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
- -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
- -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
- -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
- -I$(LIB_SRC)/transportModels/compressible/lnInclude \
- -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
- -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude
-
-EXE_LIBS = \
- -lturbulenceModels \
- -lcompressibleTurbulenceModels \
- -lreactionThermophysicalModels \
- -lgenericPatchFields \
- -lspecie \
- -lcompressibleTransportModels \
- -lfluidThermophysicalModels \
- -lsolidThermo \
- -lfiniteVolume \
- -lfvOptions \
- -lmeshTools
diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/createFields.H b/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/createFields.H
deleted file mode 100644
index e88cc7b37f..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/createFields.H
+++ /dev/null
@@ -1,72 +0,0 @@
-autoPtr thermo
-(
- basicThermo::New(mesh)
-);
-
-const volScalarField& h = thermo->he();
-
-// Register copy of thermo density
-volScalarField rho
-(
- IOobject
- (
- "rho",
- runTime.timeName(),
- mesh
- ),
- thermo->rho()
-);
-
-// Construct turbulence model (if fluid)
-autoPtr UPtr;
-autoPtr phiPtr;
-autoPtr turbulence;
-
-if (isA(thermo()))
-{
- UPtr.reset
- (
- new volVectorField
- (
- IOobject
- (
- "U",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- )
- );
- const volVectorField& U = UPtr();
-
- #include "compressibleCreatePhi.H"
-
- // Copy phi to autoPtr. Rename to make sure copy is now registered as 'phi'.
- phi.rename("phiFluid");
- phiPtr.reset(new surfaceScalarField("phi", phi));
-
- turbulence = compressible::turbulenceModel::New
- (
- rho,
- U,
- phiPtr(),
- refCast(thermo())
- );
-}
-
-// Read radiative heat-flux if available
-volScalarField Qr
-(
- IOobject
- (
- "Qr",
- runTime.timeName(),
- mesh,
- IOobject::READ_IF_PRESENT,
- IOobject::NO_WRITE
- ),
- mesh,
- dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0)
-);
diff --git a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/wallHeatFlux.C
deleted file mode 100644
index a74df86a3c..0000000000
--- a/applications/utilities/postProcessing/toBeFunctionObjects/wallHeatFlux/wallHeatFlux.C
+++ /dev/null
@@ -1,157 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Application
- wallHeatFlux
-
-Description
- Calculates and writes the heat flux for all patches as the boundary field
- of a volScalarField and also prints the integrated flux for all wall
- patches.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "turbulentFluidThermoModel.H"
-#include "solidThermo.H"
-#include "wallFvPatch.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
- timeSelector::addOptions();
- #include "addRegionOption.H"
- #include "setRootCase.H"
- #include "createTime.H"
- instantList timeDirs = timeSelector::select0(runTime, args);
- #include "createNamedMesh.H"
-
- forAll(timeDirs, timeI)
- {
- runTime.setTime(timeDirs[timeI], timeI);
- Info<< "Time = " << runTime.timeName() << endl;
- mesh.readUpdate();
-
- #include "createFields.H"
-
- surfaceScalarField heatFlux
- (
- fvc::interpolate
- (
- (
- turbulence.valid()
- ? turbulence->alphaEff()()
- : thermo->alpha()
- )
- )*fvc::snGrad(h)
- );
-
- const surfaceScalarField::Boundary& patchHeatFlux =
- heatFlux.boundaryField();
-
- const volScalarField::Boundary& patchRadHeatFlux =
- Qr.boundaryField();
-
- const surfaceScalarField::Boundary& magSf =
- mesh.magSf().boundaryField();
-
- Info<< "\nWall heat fluxes [W]" << endl;
- forAll(patchHeatFlux, patchi)
- {
- if (isA(mesh.boundary()[patchi]))
- {
- scalar convFlux = gSum(magSf[patchi]*patchHeatFlux[patchi]);
- scalar radFlux = -gSum(magSf[patchi]*patchRadHeatFlux[patchi]);
-
- Info<< mesh.boundary()[patchi].name() << endl
- << " convective: " << convFlux << endl
- << " radiative: " << radFlux << endl
- << " total: " << convFlux + radFlux << endl;
- }
- }
- Info<< endl;
-
- volScalarField wallHeatFlux
- (
- IOobject
- (
- "wallHeatFlux",
- runTime.timeName(),
- mesh
- ),
- mesh,
- dimensionedScalar("wallHeatFlux", heatFlux.dimensions(), 0.0)
- );
-
- volScalarField::Boundary& wallHeatFluxBf =
- wallHeatFlux.boundaryFieldRef();
-
- forAll(wallHeatFluxBf, patchi)
- {
- wallHeatFluxBf[patchi] = patchHeatFlux[patchi];
- }
-
- wallHeatFlux.write();
-
- // Write the total heat-flux including the radiative contribution
- // if available
- if (Qr.headerOk())
- {
- volScalarField totalWallHeatFlux
- (
- IOobject
- (
- "totalWallHeatFlux",
- runTime.timeName(),
- mesh
- ),
- mesh,
- dimensionedScalar
- (
- "totalWallHeatFlux",
- heatFlux.dimensions(),
- 0.0
- )
- );
-
- volScalarField::Boundary& totalWallHeatFluxBf =
- totalWallHeatFlux.boundaryFieldRef();
-
- forAll(totalWallHeatFluxBf, patchi)
- {
- totalWallHeatFluxBf[patchi] =
- patchHeatFlux[patchi] - patchRadHeatFlux[patchi];
- }
-
- totalWallHeatFlux.write();
- }
- }
-
- Info<< "End" << endl;
-
- return 0;
-}
-
-
-// ************************************************************************* //
diff --git a/bin/streamFunction b/bin/streamFunction
new file mode 120000
index 0000000000..7b00da8e40
--- /dev/null
+++ b/bin/streamFunction
@@ -0,0 +1 @@
+supercededByPostProcess
\ No newline at end of file
diff --git a/bin/wallHeatFlux b/bin/wallHeatFlux
new file mode 120000
index 0000000000..ff6b4704c6
--- /dev/null
+++ b/bin/wallHeatFlux
@@ -0,0 +1 @@
+supercededByPostProcessOption
\ No newline at end of file
diff --git a/etc/caseDicts/postProcessing/fields/streamFunction b/etc/caseDicts/postProcessing/fields/streamFunction
new file mode 100644
index 0000000000..362e8f0dbb
--- /dev/null
+++ b/etc/caseDicts/postProcessing/fields/streamFunction
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Web: www.OpenFOAM.org
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+Description
+ Writes the steam-function pointScalarField calculated from the specified
+ flux surfaceScalarField.
+
+\*---------------------------------------------------------------------------*/
+
+type streamFunction;
+libs ("libfieldFunctionObjects.so");
+
+field phi;
+
+executeControl writeTime;
+writeControl writeTime;
+
+// ************************************************************************* //
diff --git a/etc/caseDicts/postProcessing/fields/wallHeatFlux b/etc/caseDicts/postProcessing/fields/wallHeatFlux
new file mode 100644
index 0000000000..9e7ef4a69b
--- /dev/null
+++ b/etc/caseDicts/postProcessing/fields/wallHeatFlux
@@ -0,0 +1,20 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Web: www.OpenFOAM.org
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+Description
+ Calculates the heat-flux at wall patches, outputting the data as a
+ volScalarField.
+
+\*---------------------------------------------------------------------------*/
+
+type wallHeatFlux;
+libs ("libfieldFunctionObjects.so");
+
+executeControl writeTime;
+writeControl writeTime;
+
+// ************************************************************************* //
diff --git a/src/functionObjects/field/CourantNo/CourantNo.H b/src/functionObjects/field/CourantNo/CourantNo.H
index bce919f480..0861062fea 100644
--- a/src/functionObjects/field/CourantNo/CourantNo.H
+++ b/src/functionObjects/field/CourantNo/CourantNo.H
@@ -28,9 +28,9 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and outputs the Courant number as a
- volScalarField. The field is stored on the mesh database so that it can
- be retrieved and used for other applications.
+ Calculates and outputs the Courant number as a volScalarField. The field is
+ stored on the mesh database so that it can be retrieved and used for other
+ applications.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/Lambda2/Lambda2.H b/src/functionObjects/field/Lambda2/Lambda2.H
index 40402f80ae..de3e0fc0aa 100644
--- a/src/functionObjects/field/Lambda2/Lambda2.H
+++ b/src/functionObjects/field/Lambda2/Lambda2.H
@@ -28,9 +28,9 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and outputs the second largest eigenvalue
- of the sum of the square of the symmetrical and anti-symmetrical parts of
- the velocity gradient tensor.
+ Calculates and outputs the second largest eigenvalue of the sum of the
+ square of the symmetrical and anti-symmetrical parts of the velocity
+ gradient tensor.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/MachNo/MachNo.H b/src/functionObjects/field/MachNo/MachNo.H
index 0e5a934ebd..0eb5bb5391 100644
--- a/src/functionObjects/field/MachNo/MachNo.H
+++ b/src/functionObjects/field/MachNo/MachNo.H
@@ -28,8 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and writes the Mach number as a
- volScalarField.
+ Calculates and writes the Mach number as a volScalarField.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/Make/files b/src/functionObjects/field/Make/files
index d0de311968..920e096723 100644
--- a/src/functionObjects/field/Make/files
+++ b/src/functionObjects/field/Make/files
@@ -53,10 +53,12 @@ MachNo/MachNo.C
turbulenceFields/turbulenceFields.C
yPlus/yPlus.C
wallShearStress/wallShearStress.C
+wallHeatFlux/wallHeatFlux.C
writeCellCentres/writeCellCentres.C
writeCellVolumes/writeCellVolumes.C
XiReactionRate/XiReactionRate.C
+streamFunction/streamFunction.C
LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects
diff --git a/src/functionObjects/field/PecletNo/PecletNo.H b/src/functionObjects/field/PecletNo/PecletNo.H
index 2efe7ace8d..a3e61401dd 100644
--- a/src/functionObjects/field/PecletNo/PecletNo.H
+++ b/src/functionObjects/field/PecletNo/PecletNo.H
@@ -28,8 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and outputs the Peclet number as a
- surfaceScalarField.
+ Calculates and outputs the Peclet number as a surfaceScalarField.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/Q/Q.H b/src/functionObjects/field/Q/Q.H
index cfff507d55..3199a6e6f2 100644
--- a/src/functionObjects/field/Q/Q.H
+++ b/src/functionObjects/field/Q/Q.H
@@ -28,8 +28,8 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and outputs the second invariant of the
- velocity gradient tensor [1/s^2].
+ Calculates and outputs the second invariant of the velocity gradient tensor
+ [1/s^2].
\f[
Q = 0.5(sqr(tr(\nabla U)) - tr(((\nabla U) \cdot (\nabla U))))
diff --git a/src/functionObjects/field/XiReactionRate/XiReactionRate.H b/src/functionObjects/field/XiReactionRate/XiReactionRate.H
index 467aa0c223..e699b1090e 100644
--- a/src/functionObjects/field/XiReactionRate/XiReactionRate.H
+++ b/src/functionObjects/field/XiReactionRate/XiReactionRate.H
@@ -28,8 +28,8 @@ Group
grpFieldFunctionObjects
Description
- This function object writes the turbulent flame-speed and reaction-rate
- volScalarFields for the Xi-based combustion models.
+ Writes the turbulent flame-speed and reaction-rate volScalarFields for the
+ Xi-based combustion models.
Example of function object specification:
\verbatim
diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.H b/src/functionObjects/field/blendingFactor/blendingFactor.H
index 0fa3aea2a2..fd3ccc6238 100644
--- a/src/functionObjects/field/blendingFactor/blendingFactor.H
+++ b/src/functionObjects/field/blendingFactor/blendingFactor.H
@@ -28,9 +28,9 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and outputs the blendingFactor as used by
- the bended convection schemes. The output is a volume field (cells) whose
- value is calculated via the maximum blending factor for any cell face.
+ Calculates and outputs the blendingFactor as used by the bended convection
+ schemes. The output is a volume field (cells) whose value is calculated via
+ the maximum blending factor for any cell face.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/components/components.H b/src/functionObjects/field/components/components.H
index b801a65330..8b94e61728 100644
--- a/src/functionObjects/field/components/components.H
+++ b/src/functionObjects/field/components/components.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the components of a field.
+ Calculates the components of a field.
The operation can be applied to any volume or surface fields generating a
volume or surface scalar fields for each component.
diff --git a/src/functionObjects/field/div/div.H b/src/functionObjects/field/div/div.H
index fe3ee7fb26..91d594ecd9 100644
--- a/src/functionObjects/field/div/div.H
+++ b/src/functionObjects/field/div/div.H
@@ -28,9 +28,8 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the divergence of a field. The operation is
- limited to surfaceScalarFields and volVectorFields, and the output is a
- volScalarField.
+ Calculates the divergence of a field. The operation is limited to
+ surfaceScalarFields and volVectorFields, and the output is a volScalarField.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/enstrophy/enstrophy.H b/src/functionObjects/field/enstrophy/enstrophy.H
index f3d0a80b08..612015c52b 100644
--- a/src/functionObjects/field/enstrophy/enstrophy.H
+++ b/src/functionObjects/field/enstrophy/enstrophy.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the enstrophy of the velocity.
+ Calculates the enstrophy of the velocity.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/fieldAverage/controlDict b/src/functionObjects/field/fieldAverage/controlDict
index d2c47ec3ac..dfb085609f 100644
--- a/src/functionObjects/field/fieldAverage/controlDict
+++ b/src/functionObjects/field/fieldAverage/controlDict
@@ -52,13 +52,13 @@ functions
type fieldAverage;
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
// Function object enabled flag
enabled true;
// When to output the average fields
- writeControl writeTime;
+ writeControl writeTime;
// Fields to be averaged - runTime modifiable
fields
diff --git a/src/functionObjects/field/fieldAverage/fieldAverage.H b/src/functionObjects/field/fieldAverage/fieldAverage.H
index 85cfd974d1..ec3c5ae9ea 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverage.H
+++ b/src/functionObjects/field/fieldAverage/fieldAverage.H
@@ -28,10 +28,12 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates average quantities for a user-specified
- selection of volumetric and surface fields. Fields are entered as a list
- of sub-dictionaries, which indicate the type of averages to perform, and
- can be updated during the calculation. The current options include:
+ Calculates average quantities for a user-specified selection of volumetric
+ and surface fields.
+
+ Fields are entered as a list of sub-dictionaries, which indicate the type of
+ averages to perform, and can be updated during the calculation. The current
+ options include:
- \c mean: arithmetic mean:
\f[
\overline{x} = \frac{1}{N}\displaystyle\sum\limits_{i=0}^N x_i
@@ -66,8 +68,8 @@ Description
\verbatim
fieldAverage1
{
- type fieldAverage;
- libs ("libfieldFunctionObjects.so");
+ type fieldAverage;
+ libs ("libfieldFunctionObjects.so");
...
restartOnRestart false;
restartOnOutput false;
diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H
index 2a261219d8..2ad43e3ec6 100644
--- a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H
+++ b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H
@@ -28,16 +28,16 @@ Group
grpFieldFunctionObjects
Description
- This function object transforms a user-specified selection of fields from
- global Cartesian co-ordinates to a local co-ordinate system. The fields
- are run-time modifiable.
+ Transforms a user-specified selection of fields from global Cartesian
+ co-ordinates to a local co-ordinate system. The fields are run-time
+ modifiable.
Example of function object specification:
\verbatim
fieldCoordinateSystemTransform1
{
type fieldCoordinateSystemTransform;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
fields
(
diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict b/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict
index 4c680267c0..72ab4a8329 100644
--- a/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict
+++ b/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict
@@ -22,13 +22,13 @@ functions
type fieldCoordinateSystemTransform;
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
// Function object enabled flag
enabled true;
// When to output the average fields
- writeControl writeTime;
+ writeControl writeTime;
// Fields to be transformed - runTime modifiable
fields
diff --git a/src/functionObjects/field/fieldMinMax/controlDict b/src/functionObjects/field/fieldMinMax/controlDict
index e31f656b8b..b9e0926a2c 100644
--- a/src/functionObjects/field/fieldMinMax/controlDict
+++ b/src/functionObjects/field/fieldMinMax/controlDict
@@ -52,7 +52,7 @@ functions
type fieldMinMax;
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
// Function object enabled flag
enabled true;
diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/functionObjects/field/fieldMinMax/fieldMinMax.H
index e6d1cefc3b..a024b61cbc 100644
--- a/src/functionObjects/field/fieldMinMax/fieldMinMax.H
+++ b/src/functionObjects/field/fieldMinMax/fieldMinMax.H
@@ -28,18 +28,19 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the value and location of scalar minimim
- and maximum for a list of user-specified fields. For variables with a rank
- greater than zero, either the min/max of a component value or the magnitude
- is reported. When operating in parallel, the processor owning the value
- is also given.
+ Calculates the value and location of scalar minimim and maximum for a list
+ of user-specified fields.
+
+ For variables with a rank greater than zero, either the min/max of a
+ component value or the magnitude is reported. When operating in parallel,
+ the processor owning the value is also given.
Example of function object specification:
\verbatim
fieldMinMax1
{
type fieldMinMax;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
write yes;
log yes;
diff --git a/src/functionObjects/field/fieldValues/controlDict b/src/functionObjects/field/fieldValues/controlDict
index 97b1e21ab5..0a2c9dc13d 100644
--- a/src/functionObjects/field/fieldValues/controlDict
+++ b/src/functionObjects/field/fieldValues/controlDict
@@ -49,7 +49,7 @@ functions
faceObj1
{
type surfaceRegion;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
enabled true;
writeControl writeTime;
@@ -91,7 +91,7 @@ functions
faceObj2
{
type surfaceRegion;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
enabled true;
writeControl writeTime;
log true;
@@ -109,7 +109,7 @@ functions
cellObj1
{
type volRegion;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
enabled true;
writeControl writeTime;
log true;
diff --git a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
index 39f0ab931f..127efb9753 100644
--- a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
+++ b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
@@ -28,15 +28,14 @@ Group
grpFieldFunctionObjects
Description
- This function object provides a differencing option between two 'field
- value' function objects.
+ Provides a differencing option between two 'field value' function objects.
Example of function object specification:
\verbatim
fieldValueDelta1
{
type fieldValueDelta;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
operation subtract;
fieldValue1
diff --git a/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H b/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H
index 9c085b7e79..c5dfcb11b0 100644
--- a/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H
+++ b/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.H
@@ -28,10 +28,11 @@ Group
grpFieldFunctionObjects
Description
- This function object provides a 'face regionType' variant of the fieldValues
- function object. Given a list of user-specified fields and a selection
- of mesh (or general surface) faces, a number of operations can be
- performed, such as sums, averages and integrations.
+ Provides a 'face regionType' variant of the fieldValues function object.
+
+ Given a list of user-specified fields and a selection of mesh (or general
+ surface) faces, a number of operations can be performed, such as sums,
+ averages and integrations.
For example, to calculate the volumetric or mass flux across a patch,
apply the 'sum' operator to the flux field (typically \c phi)
@@ -41,7 +42,7 @@ Description
surfaceRegion1
{
type surfaceRegion;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
log yes;
writeFields true;
diff --git a/src/functionObjects/field/fieldValues/volRegion/volRegion.H b/src/functionObjects/field/fieldValues/volRegion/volRegion.H
index 30625483ee..6f8b7ddfe4 100644
--- a/src/functionObjects/field/fieldValues/volRegion/volRegion.H
+++ b/src/functionObjects/field/fieldValues/volRegion/volRegion.H
@@ -28,10 +28,11 @@ Group
grpFieldFunctionObjects
Description
- This function object provides a 'cell region' variant of the fieldValues
- function object. Given a list of user-specified fields and a selection
- of mesh cells, a number of operations can be performed, such as sums,
- averages and integrations.
+ Provides a 'cell region' variant of the fieldValues function object.
+
+ Given a list of user-specified fields and a selection of mesh cells, a
+ number of operations can be performed, such as sums, averages and
+ integrations.
Example of function object specification:
@@ -39,7 +40,7 @@ Description
volRegion1
{
type volRegion;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
log true;
writeFields true;
diff --git a/src/functionObjects/field/flowType/flowType.H b/src/functionObjects/field/flowType/flowType.H
index 78c05cc2d3..f55151acbc 100644
--- a/src/functionObjects/field/flowType/flowType.H
+++ b/src/functionObjects/field/flowType/flowType.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates and writes the flowType of a velocity field.
+ Calculates and writes the flowType of a velocity field.
The flow type parameter is obtained according to the following equation:
\verbatim
diff --git a/src/functionObjects/field/grad/grad.H b/src/functionObjects/field/grad/grad.H
index c7415d9909..ef7860442b 100644
--- a/src/functionObjects/field/grad/grad.H
+++ b/src/functionObjects/field/grad/grad.H
@@ -28,9 +28,10 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the gradient of a field. The operation is
- limited to scalar and vector volume or surface fields, and the output is a
- volume vector or tensor field.
+ Calculates the gradient of a field.
+
+ The operation is limited to scalar and vector volume or surface fields, and
+ the output is a volume vector or tensor field.
See also
Foam::functionObjects::fvMeshFunctionObject
diff --git a/src/functionObjects/field/histogram/histogram.H b/src/functionObjects/field/histogram/histogram.H
index f09a8bcfc3..0767444369 100644
--- a/src/functionObjects/field/histogram/histogram.H
+++ b/src/functionObjects/field/histogram/histogram.H
@@ -36,7 +36,7 @@ Description
{
type histogram;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
field p;
nBins 100;
diff --git a/src/functionObjects/field/mag/mag.H b/src/functionObjects/field/mag/mag.H
index c2ec19355d..de2737c31d 100644
--- a/src/functionObjects/field/mag/mag.H
+++ b/src/functionObjects/field/mag/mag.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the magnitude of a field.
+ Calculates the magnitude of a field.
The operation can be applied to any volume or surface fields generating a
volume or surface scalar field.
diff --git a/src/functionObjects/field/magSqr/magSqr.H b/src/functionObjects/field/magSqr/magSqr.H
index fa35957d2e..f1af984178 100644
--- a/src/functionObjects/field/magSqr/magSqr.H
+++ b/src/functionObjects/field/magSqr/magSqr.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the magnitude of the sqr of a field.
+ Calculates the magnitude of the sqr of a field.
The operation can be applied to any volume or surface field generating a
volume or surface scalar field.
diff --git a/src/functionObjects/field/nearWallFields/controlDict b/src/functionObjects/field/nearWallFields/controlDict
index 9d40cdcf9f..e2b79fc221 100644
--- a/src/functionObjects/field/nearWallFields/controlDict
+++ b/src/functionObjects/field/nearWallFields/controlDict
@@ -49,7 +49,7 @@ functions
near
{
// Where to load it from
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
type nearWallFields;
diff --git a/src/functionObjects/field/nearWallFields/nearWallFields.H b/src/functionObjects/field/nearWallFields/nearWallFields.H
index 060516fa5e..68c9e99beb 100644
--- a/src/functionObjects/field/nearWallFields/nearWallFields.H
+++ b/src/functionObjects/field/nearWallFields/nearWallFields.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object samples near-patch volume fields
+ Samples near-patch volume fields.
Fields are stored
- every time step the field is updated with new values
@@ -43,7 +43,7 @@ Description
nearWallFields1
{
type nearWallFields;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
fields ((p pNear)(U UNear));
patches (movingWall);
diff --git a/src/functionObjects/field/pressure/pressure.H b/src/functionObjects/field/pressure/pressure.H
index 0ac0cd125d..2bcc715ada 100644
--- a/src/functionObjects/field/pressure/pressure.H
+++ b/src/functionObjects/field/pressure/pressure.H
@@ -28,9 +28,9 @@ Group
grpFieldFunctionObjects
Description
- This function object includes tools to manipulate the pressure into
- different forms. These currently include:
+ Includes tools to manipulate the pressure into different forms.
+ These currently include:
- static pressure
\f[
p = \rho p_k
@@ -81,7 +81,7 @@ Description
pressure1
{
type pressure;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
calcTotal no;
calcCoeff yes;
diff --git a/src/functionObjects/field/processorField/postProcessingDict b/src/functionObjects/field/processorField/postProcessingDict
index 0df126095f..4a1eadbfdf 100644
--- a/src/functionObjects/field/processorField/postProcessingDict
+++ b/src/functionObjects/field/processorField/postProcessingDict
@@ -22,13 +22,13 @@ functions
type processorField;
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
// Function object enabled flag
enabled true;
// When to output the average fields
- writeControl writeTime;
+ writeControl writeTime;
}
}
diff --git a/src/functionObjects/field/processorField/processorField.H b/src/functionObjects/field/processorField/processorField.H
index a9f531d5ed..54075cbdb8 100644
--- a/src/functionObjects/field/processorField/processorField.H
+++ b/src/functionObjects/field/processorField/processorField.H
@@ -28,15 +28,15 @@ Group
grpFieldFunctionObjects
Description
- This function object writes a scalar field whose value is the local
- processor ID. The output field name is 'processorID'.
+ Writes a scalar field whose value is the local processor ID. The output
+ field name is 'processorID'.
Example of function object specification:
\verbatim
processorField1
{
type processorField;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
}
\endverbatim
diff --git a/src/functionObjects/field/randomise/randomise.H b/src/functionObjects/field/randomise/randomise.H
index eec09cd4b8..a8baff0884 100644
--- a/src/functionObjects/field/randomise/randomise.H
+++ b/src/functionObjects/field/randomise/randomise.H
@@ -28,8 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object adds a random component to a field,
- with a specified perturbation magnitude.
+ Adds a random component to a field, with a specified perturbation magnitude.
The operation can be applied to any volume field.
diff --git a/src/functionObjects/field/readFields/postProcessingDict b/src/functionObjects/field/readFields/postProcessingDict
index 89c9b262a7..ae79cfcbf3 100644
--- a/src/functionObjects/field/readFields/postProcessingDict
+++ b/src/functionObjects/field/readFields/postProcessingDict
@@ -19,7 +19,7 @@ functions
readFields1
{
type readFields;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
@@ -33,7 +33,7 @@ functions
faceObj2
{
type surfaceRegion;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
enabled true;
writeControl timeStep;
writeInterval 1;
diff --git a/src/functionObjects/field/readFields/readFields.H b/src/functionObjects/field/readFields/readFields.H
index 2c69d5570a..1dbcffbaa1 100644
--- a/src/functionObjects/field/readFields/readFields.H
+++ b/src/functionObjects/field/readFields/readFields.H
@@ -28,15 +28,15 @@ Group
grpFieldFunctionObjects
Description
- This function object reads fields from the time directories and adds them to
- the mesh database for further post-processing.
+ Reads fields from the time directories and adds them to the mesh database
+ for further post-processing.
Example of function object specification:
\verbatim
readFields1
{
type readFields;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
fields
(
diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
index 82250a9027..f3a7b53a0c 100644
--- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
+++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
@@ -28,8 +28,8 @@ Group
grpFieldFunctionObjects
Description
- This function object creates a size distribution via interrogating a
- continuous phase fraction field.
+ Creates a size distribution via interrogating a continuous phase fraction
+ field.
Looks up a phase-fraction (alpha) field and splits the mesh into regions
based on where the field is below the threshold value. These
@@ -59,7 +59,7 @@ Description
regionSizeDistribution1
{
type regionSizeDistribution;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
field alpha;
patches (inlet);
diff --git a/src/functionObjects/field/streamFunction/streamFunction.C b/src/functionObjects/field/streamFunction/streamFunction.C
new file mode 100644
index 0000000000..9a5d32ca49
--- /dev/null
+++ b/src/functionObjects/field/streamFunction/streamFunction.C
@@ -0,0 +1,463 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "streamFunction.H"
+#include "surfaceFields.H"
+#include "pointFields.H"
+#include "emptyPolyPatch.H"
+#include "symmetryPlanePolyPatch.H"
+#include "symmetryPolyPatch.H"
+#include "wedgePolyPatch.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+ defineTypeNameAndDebug(streamFunction, 0);
+
+ addToRunTimeSelectionTable
+ (
+ functionObject,
+ streamFunction,
+ dictionary
+ );
+}
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+Foam::tmp Foam::functionObjects::streamFunction::calc
+(
+ const surfaceScalarField& phi
+) const
+{
+ Log << " functionObjects::" << type() << " " << name()
+ << " calculating steam-function" << endl;
+
+ Vector slabNormal((Vector::one - mesh_.geometricD())/2);
+ const direction slabDir
+ (
+ slabNormal
+ & Vector(Vector::X, Vector::Y, Vector::Z)
+ );
+
+ scalar thickness = vector(slabNormal) & mesh_.bounds().span();
+
+ const pointMesh& pMesh = pointMesh::New(mesh_);
+
+ tmp tstreamFunction
+ (
+ new pointScalarField
+ (
+ IOobject
+ (
+ "streamFunction",
+ time_.timeName(),
+ mesh_
+ ),
+ pMesh,
+ dimensionedScalar("zero", phi.dimensions(), 0.0)
+ )
+ );
+ pointScalarField& streamFunction = tstreamFunction.ref();
+
+ labelList visitedPoint(mesh_.nPoints());
+ forAll(visitedPoint, pointi)
+ {
+ visitedPoint[pointi] = 0;
+ }
+ label nVisited = 0;
+ label nVisitedOld = 0;
+
+ const faceUList& faces = mesh_.faces();
+ const pointField& points = mesh_.points();
+
+ label nInternalFaces = mesh_.nInternalFaces();
+
+ vectorField unitAreas(mesh_.faceAreas());
+ unitAreas /= mag(unitAreas);
+
+ const polyPatchList& patches = mesh_.boundaryMesh();
+
+ bool finished = true;
+
+ // Find the boundary face with zero flux. set the stream function
+ // to zero on that face
+ bool found = false;
+
+ do
+ {
+ found = false;
+
+ forAll(patches, patchi)
+ {
+ const primitivePatch& bouFaces = patches[patchi];
+
+ if (!isType(patches[patchi]))
+ {
+ forAll(bouFaces, facei)
+ {
+ if
+ (
+ magSqr(phi.boundaryField()[patchi][facei]) < SMALL
+ )
+ {
+ const labelList& zeroPoints = bouFaces[facei];
+
+ // Zero flux face found
+ found = true;
+
+ forAll(zeroPoints, pointi)
+ {
+ if (visitedPoint[zeroPoints[pointi]] == 1)
+ {
+ found = false;
+ break;
+ }
+ }
+
+ if (found)
+ {
+ Log << " Zero face: patch: " << patchi
+ << " face: " << facei << endl;
+
+ forAll(zeroPoints, pointi)
+ {
+ streamFunction[zeroPoints[pointi]] = 0;
+ visitedPoint[zeroPoints[pointi]] = 1;
+ nVisited++;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ if (found) break;
+ }
+
+ if (!found)
+ {
+ Log << " Zero flux boundary face not found. "
+ << "Using cell as a reference."
+ << endl;
+
+ const cellList& c = mesh_.cells();
+
+ forAll(c, cI)
+ {
+ labelList zeroPoints = c[cI].labels(mesh_.faces());
+
+ bool found = true;
+
+ forAll(zeroPoints, pointi)
+ {
+ if (visitedPoint[zeroPoints[pointi]] == 1)
+ {
+ found = false;
+ break;
+ }
+ }
+
+ if (found)
+ {
+ forAll(zeroPoints, pointi)
+ {
+ streamFunction[zeroPoints[pointi]] = 0.0;
+ visitedPoint[zeroPoints[pointi]] = 1;
+ nVisited++;
+ }
+
+ break;
+ }
+ else
+ {
+ FatalErrorInFunction
+ << "Cannot find initialisation face or a cell."
+ << exit(FatalError);
+ }
+ }
+ }
+
+ // Loop through all faces. If one of the points on
+ // the face has the streamfunction value different
+ // from -1, all points with -1 ont that face have the
+ // streamfunction value equal to the face flux in
+ // that point plus the value in the visited point
+ do
+ {
+ finished = true;
+
+ for (label facei = nInternalFaces; facei(patches[patchNo])
+ && !isType
+ (patches[patchNo])
+ && !isType(patches[patchNo])
+ && !isType(patches[patchNo])
+ )
+ {
+ label faceNo =
+ mesh_.boundaryMesh()[patchNo]
+ .whichFace(facei);
+
+ vector edgeHat =
+ points[curBPoints[pointi]]
+ - currentBStreamPoint;
+ edgeHat.replace(slabDir, 0);
+ edgeHat /= mag(edgeHat);
+
+ vector nHat = unitAreas[facei];
+
+ if (edgeHat.y() > VSMALL)
+ {
+ visitedPoint[curBPoints[pointi]] = 1;
+ nVisited++;
+
+ streamFunction[curBPoints[pointi]] =
+ currentBStream
+ + phi.boundaryField()[patchNo][faceNo]
+ *sign(nHat.x());
+ }
+ else if (edgeHat.y() < -VSMALL)
+ {
+ visitedPoint[curBPoints[pointi]] = 1;
+ nVisited++;
+
+ streamFunction[curBPoints[pointi]] =
+ currentBStream
+ - phi.boundaryField()[patchNo][faceNo]
+ *sign(nHat.x());
+ }
+ else
+ {
+ if (edgeHat.x() > VSMALL)
+ {
+ visitedPoint[curBPoints[pointi]] = 1;
+ nVisited++;
+
+ streamFunction[curBPoints[pointi]] =
+ currentBStream
+ + phi.boundaryField()[patchNo][faceNo]
+ *sign(nHat.y());
+ }
+ else if (edgeHat.x() < -VSMALL)
+ {
+ visitedPoint[curBPoints[pointi]] = 1;
+ nVisited++;
+
+ streamFunction[curBPoints[pointi]] =
+ currentBStream
+ - phi.boundaryField()[patchNo][faceNo]
+ *sign(nHat.y());
+ }
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ finished = false;
+ }
+ }
+
+ for (label facei=0; facei VSMALL)
+ {
+ visitedPoint[curPoints[pointi]] = 1;
+ nVisited++;
+
+ streamFunction[curPoints[pointi]] =
+ currentStream
+ + phi[facei]*sign(nHat.x());
+ }
+ else if (edgeHat.y() < -VSMALL)
+ {
+ visitedPoint[curPoints[pointi]] = 1;
+ nVisited++;
+
+ streamFunction[curPoints[pointi]] =
+ currentStream
+ - phi[facei]*sign(nHat.x());
+ }
+ }
+ }
+ }
+ else
+ {
+ finished = false;
+ }
+ }
+
+ if (nVisited == nVisitedOld)
+ {
+ // Find new seed. This must be a
+ // multiply connected domain
+ Log << " Exhausted a seed, looking for new seed "
+ << "(this is correct for multiply connected domains).";
+
+ break;
+ }
+ else
+ {
+ nVisitedOld = nVisited;
+ }
+ } while (!finished);
+ } while (!finished);
+
+ // Normalise the stream-function by the 2D mesh thickness
+ streamFunction /= thickness;
+ streamFunction.boundaryFieldRef() = 0.0;
+
+ return tstreamFunction;
+}
+
+
+bool Foam::functionObjects::streamFunction::calc()
+{
+ if (foundObject(fieldName_))
+ {
+ const surfaceScalarField& phi =
+ mesh_.lookupObject(fieldName_);
+
+ return store(resultName_, calc(phi));
+ }
+ else
+ {
+ return false;
+ }
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::functionObjects::streamFunction::streamFunction
+(
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+)
+:
+ fieldExpression(name, runTime, dict, "phi")
+{
+ setResultName("streamFunction", "phi");
+
+ label nD = mesh_.nGeometricD();
+
+ if (nD != 2)
+ {
+ FatalErrorInFunction
+ << "Case is not 2D, stream-function cannot be computed"
+ << exit(FatalError);
+ }
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+Foam::functionObjects::streamFunction::~streamFunction()
+{}
+
+
+// ************************************************************************* //
diff --git a/src/functionObjects/field/streamFunction/streamFunction.H b/src/functionObjects/field/streamFunction/streamFunction.H
new file mode 100644
index 0000000000..9c2777715e
--- /dev/null
+++ b/src/functionObjects/field/streamFunction/streamFunction.H
@@ -0,0 +1,105 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ Foam::functionObjects::streamFunction
+
+Group
+ grpFieldFunctionObjects
+
+Description
+ This function object calculates and outputs the stream-function as a
+ pointScalarField.
+
+See also
+ Foam::functionObjects::fieldExpression
+ Foam::functionObjects::fvMeshFunctionObject
+
+SourceFiles
+ streamFunction.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef functionObjects_streamFunction_H
+#define functionObjects_streamFunction_H
+
+#include "fieldExpression.H"
+#include "surfaceFieldsFwd.H"
+#include "pointFieldsFwd.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+
+/*---------------------------------------------------------------------------*\
+ Class streamFunction Declaration
+\*---------------------------------------------------------------------------*/
+
+class streamFunction
+:
+ public fieldExpression
+{
+ // Private Member Functions
+
+ tmp calc(const surfaceScalarField& phi) const;
+
+ //- Calculate the stream-function and return true if successful
+ virtual bool calc();
+
+
+public:
+
+ //- Runtime type information
+ TypeName("streamFunction");
+
+
+ // Constructors
+
+ //- Construct for given objectRegistry and dictionary.
+ // Allow the possibility to load fields from files
+ streamFunction
+ (
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+ );
+
+
+ //- Destructor
+ virtual ~streamFunction();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace functionObjects
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/functionObjects/field/streamLine/controlDict b/src/functionObjects/field/streamLine/controlDict
index ddbea97f57..3b001fc10c 100644
--- a/src/functionObjects/field/streamLine/controlDict
+++ b/src/functionObjects/field/streamLine/controlDict
@@ -51,10 +51,10 @@ functions
type streamLine;
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
// Output every
- writeControl writeTime;
+ writeControl writeTime;
// writeInterval 10;
setFormat vtk; // gnuplot, raw etc.
diff --git a/src/functionObjects/field/streamLine/streamLine.H b/src/functionObjects/field/streamLine/streamLine.H
index d6b2157764..70fbefac15 100644
--- a/src/functionObjects/field/streamLine/streamLine.H
+++ b/src/functionObjects/field/streamLine/streamLine.H
@@ -28,16 +28,15 @@ Group
grpFieldFunctionObjects
Description
- This function object generates streamline data by sampling a set of
- user-specified fields along a particle track, transported by a
- user-specified velocity field.
+ Generates streamline data by sampling a set of user-specified fields along a
+ particle track, transported by a user-specified velocity field.
Example of function object specification:
\verbatim
streamLine1
{
type streamLine;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
setFormat vtk;
trackForward yes;
diff --git a/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H b/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H
index 72c16e6f41..c4df3e7a0a 100644
--- a/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H
+++ b/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H
@@ -27,8 +27,7 @@ Class
Group grpFieldFunctionObjects
Description
- This function object linearly interpolates volume fields to generate
- surface fields
+ Linearly interpolates volume fields to generate surface fields.
Fields are stored
- every time step the field is updated with new values
@@ -43,7 +42,7 @@ Description
surfaceInterpolate1
{
type surfaceInterpolate;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
fields ((p pNear)(U UNear));
}
diff --git a/src/functionObjects/field/turbulenceFields/postProcessingDict b/src/functionObjects/field/turbulenceFields/postProcessingDict
index 9d6b27ad26..aae7362d65 100644
--- a/src/functionObjects/field/turbulenceFields/postProcessingDict
+++ b/src/functionObjects/field/turbulenceFields/postProcessingDict
@@ -19,10 +19,10 @@ functions
turbulenceFields1
{
type turbulenceFields;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
enabled true;
- writeControl timeStep;
- writeInterval 1;
+ writeControl timeStep;
+ writeInterval 1;
fields
(
diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/functionObjects/field/turbulenceFields/turbulenceFields.H
index 1d15fc8cce..77f11936d1 100644
--- a/src/functionObjects/field/turbulenceFields/turbulenceFields.H
+++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.H
@@ -28,8 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object stores turbulence fields on the mesh database for
- further manipulation.
+ Stores turbulence fields on the mesh database for further manipulation.
Fields are stored as copies of the original, with the prefix
"tubulenceModel:", e.g.:
@@ -43,7 +42,7 @@ Description
turbulenceFields1
{
type turbulenceFields;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
fields
(
diff --git a/src/functionObjects/field/vorticity/vorticity.H b/src/functionObjects/field/vorticity/vorticity.H
index 250e60cb0c..a063026084 100644
--- a/src/functionObjects/field/vorticity/vorticity.H
+++ b/src/functionObjects/field/vorticity/vorticity.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object calculates the vorticity, the curl of the velocity.
+ Calculates the vorticity, the curl of the velocity.
See also
Foam::functionObjects::fieldExpression
diff --git a/src/functionObjects/field/wallBoundedStreamLine/controlDict b/src/functionObjects/field/wallBoundedStreamLine/controlDict
index e7117a471a..f412db6aec 100644
--- a/src/functionObjects/field/wallBoundedStreamLine/controlDict
+++ b/src/functionObjects/field/wallBoundedStreamLine/controlDict
@@ -49,7 +49,7 @@ functions
readFields
{
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
type readFields;
fields (p U k);
@@ -58,12 +58,12 @@ functions
near
{
// Where to load it from
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
type nearWallFields;
// Output every
- writeControl writeTime;
+ writeControl writeTime;
//writeInterval 1;
// Fields to be sampled. Per field original name and mapped field to
@@ -82,7 +82,7 @@ functions
streamLines
{
// Where to load it from (if not already in solver)
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
type wallBoundedStreamLine;
// Output every
diff --git a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H
index 3aaa0e3250..14f21c65c8 100644
--- a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H
+++ b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H
@@ -28,16 +28,16 @@ Group
grpFieldFunctionObjects
Description
- This function object generates streamline data by sampling a set of
- user-specified fields along a particle track, transported by a
- user-specified velocity field, constrained to a patch.
+ Generates streamline data by sampling a set of user-specified fields along a
+ particle track, transported by a user-specified velocity field, constrained
+ to a patch.
Example of function object specification:
\verbatim
wallBoundedStreamLine1
{
type wallBoundedStreamLine;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
setFormat vtk;
U UNear;
diff --git a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C
new file mode 100644
index 0000000000..142d3d739a
--- /dev/null
+++ b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C
@@ -0,0 +1,286 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "wallHeatFlux.H"
+#include "surfaceInterpolate.H"
+#include "fvcSnGrad.H"
+#include "wallPolyPatch.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+ defineTypeNameAndDebug(wallHeatFlux, 0);
+ addToRunTimeSelectionTable(functionObject, wallHeatFlux, dictionary);
+}
+}
+
+
+// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
+
+void Foam::functionObjects::wallHeatFlux::writeFileHeader(const label i)
+{
+ // Add headers to output data
+ writeHeader(file(), "Wall heat-flux");
+ writeCommented(file(), "Time");
+ writeTabbed(file(), "patch");
+ writeTabbed(file(), "min");
+ writeTabbed(file(), "max");
+ writeTabbed(file(), "integral");
+ file() << endl;
+}
+
+
+void Foam::functionObjects::wallHeatFlux::calcHeatFlux
+(
+ const compressible::turbulenceModel& model,
+ volScalarField& wallHeatFlux
+)
+{
+ surfaceScalarField heatFlux
+ (
+ fvc::interpolate(model.alphaEff())*fvc::snGrad(model.transport().he())
+ );
+
+ volScalarField::Boundary& wallHeatFluxBf =
+ wallHeatFlux.boundaryFieldRef();
+
+ const surfaceScalarField::Boundary& heatFluxBf =
+ heatFlux.boundaryField();
+
+ forAll(wallHeatFluxBf, patchi)
+ {
+ wallHeatFluxBf[patchi] = heatFluxBf[patchi];
+ }
+
+ if (foundObject("Qr"))
+ {
+ const volScalarField& Qr = lookupObject("Qr");
+
+ const volScalarField::Boundary& radHeatFluxBf =
+ Qr.boundaryField();
+
+ forAll(wallHeatFluxBf, patchi)
+ {
+ wallHeatFluxBf[patchi] += radHeatFluxBf[patchi];
+ }
+ }
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::functionObjects::wallHeatFlux::wallHeatFlux
+(
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+)
+:
+ writeFiles(name, runTime, dict, name),
+ patchSet_()
+{
+ if (!isA(obr_))
+ {
+ FatalErrorInFunction
+ << "objectRegistry is not an fvMesh" << exit(FatalError);
+ }
+
+ const fvMesh& mesh = refCast(obr_);
+
+ volScalarField* wallHeatFluxPtr
+ (
+ new volScalarField
+ (
+ IOobject
+ (
+ type(),
+ mesh.time().timeName(),
+ mesh,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ mesh,
+ dimensionedScalar("0", dimMass/pow3(dimTime), 0)
+ )
+ );
+
+ mesh.objectRegistry::store(wallHeatFluxPtr);
+
+ read(dict);
+ resetName(typeName);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+Foam::functionObjects::wallHeatFlux::~wallHeatFlux()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
+{
+ writeFiles::read(dict);
+
+ const fvMesh& mesh = refCast(obr_);
+ const polyBoundaryMesh& pbm = mesh.boundaryMesh();
+
+ patchSet_ =
+ mesh.boundaryMesh().patchSet
+ (
+ wordReList(dict.lookupOrDefault("patches", wordReList()))
+ );
+
+ Info<< type() << " " << name() << ":" << nl;
+
+ if (patchSet_.empty())
+ {
+ forAll(pbm, patchi)
+ {
+ if (isA(pbm[patchi]))
+ {
+ patchSet_.insert(patchi);
+ }
+ }
+
+ Info<< " processing all wall patches" << nl << endl;
+ }
+ else
+ {
+ Info<< " processing wall patches: " << nl;
+ labelHashSet filteredPatchSet;
+ forAllConstIter(labelHashSet, patchSet_, iter)
+ {
+ label patchi = iter.key();
+ if (isA(pbm[patchi]))
+ {
+ filteredPatchSet.insert(patchi);
+ Info<< " " << pbm[patchi].name() << endl;
+ }
+ else
+ {
+ WarningInFunction
+ << "Requested wall heat-flux on non-wall boundary "
+ << "type patch: " << pbm[patchi].name() << endl;
+ }
+ }
+
+ Info<< endl;
+
+ patchSet_ = filteredPatchSet;
+ }
+
+ return true;
+}
+
+
+bool Foam::functionObjects::wallHeatFlux::execute()
+{
+ volScalarField& wallHeatFlux = const_cast
+ (
+ lookupObject(type())
+ );
+
+ if
+ (
+ foundObject
+ (
+ turbulenceModel::propertiesName
+ )
+ )
+ {
+ const compressible::turbulenceModel& turbModel =
+ lookupObject
+ (
+ turbulenceModel::propertiesName
+ );
+
+ calcHeatFlux(turbModel, wallHeatFlux);
+ }
+ else
+ {
+ FatalErrorInFunction
+ << "Unable to find compressible turbulence model in the "
+ << "database" << exit(FatalError);
+ }
+
+ return true;
+}
+
+
+bool Foam::functionObjects::wallHeatFlux::write()
+{
+ writeFiles::write();
+
+ const volScalarField& wallHeatFlux =
+ obr_.lookupObject(type());
+
+ Log << type() << " " << name() << " write:" << nl
+ << " writing field " << wallHeatFlux.name() << endl;
+
+ wallHeatFlux.write();
+
+ const fvMesh& mesh = refCast(obr_);
+ const fvPatchList& patches = mesh.boundary();
+
+ const surfaceScalarField::Boundary& magSf =
+ mesh.magSf().boundaryField();
+
+ forAllConstIter(labelHashSet, patchSet_, iter)
+ {
+ label patchi = iter.key();
+ const fvPatch& pp = patches[patchi];
+
+ const scalarField& hfp =
+ wallHeatFlux.boundaryField()[patchi];
+
+ const scalar minHfp = gMin(hfp);
+ const scalar maxHfp = gMax(hfp);
+ const scalar integralHfp = gSum(magSf[patchi]*hfp);
+
+ if (Pstream::master())
+ {
+ file() << mesh.time().value()
+ << token::TAB << pp.name()
+ << token::TAB << minHfp
+ << token::TAB << maxHfp
+ << token::TAB << integralHfp
+ << endl;
+ }
+
+ Log << " min/max(" << pp.name() << ") = "
+ << minHfp << ", " << maxHfp << ", " << integralHfp << endl;
+ }
+
+ return true;
+}
+
+
+// ************************************************************************* //
diff --git a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H
new file mode 100644
index 0000000000..505d019669
--- /dev/null
+++ b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H
@@ -0,0 +1,169 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ Foam::functionObjects::wallHeatFlux
+
+Group
+ grpForcesFunctionObjects
+
+Description
+ Calculates and write the heat-flux at wall patches as the
+ volScalarField field 'wallHeatFlux'.
+
+ All wall patches are included by default; to restrict the calculation to
+ certain patches, use the optional 'patches' entry.
+
+ Example of function object specification:
+ \verbatim
+ wallHeatFlux1
+ {
+ type wallHeatFlux;
+ libs ("libfieldFunctionObjects.so");
+ ...
+ patches (".*Wall");
+ }
+ \endverbatim
+
+Usage
+ \table
+ Property | Description | Required | Default value
+ type | type name: wallHeatFlux | yes |
+ patches | list of patches to process | no | all wall patches
+ \endtable
+
+See also
+ Foam::functionObject
+ Foam::functionObjects::writeFiles
+ Foam::functionObjects::pressureTools
+ Foam::functionObjects::timeControl
+
+SourceFiles
+ wallHeatFlux.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef functionObjects_wallHeatFlux_H
+#define functionObjects_wallHeatFlux_H
+
+#include "writeFiles.H"
+#include "volFieldsFwd.H"
+#include "surfaceFieldsFwd.H"
+#include "HashSet.H"
+#include "turbulentFluidThermoModel.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of classes
+class fvMesh;
+
+namespace functionObjects
+{
+
+/*---------------------------------------------------------------------------*\
+ Class wallHeatFlux Declaration
+\*---------------------------------------------------------------------------*/
+
+class wallHeatFlux
+:
+ public writeFiles
+{
+protected:
+
+ // Protected data
+
+ //- Optional list of patches to process
+ labelHashSet patchSet_;
+
+
+ // Protected Member Functions
+
+ //- File header information
+ virtual void writeFileHeader(const label i);
+
+ //- Calculate the heat-flux
+ void calcHeatFlux
+ (
+ const compressible::turbulenceModel& turbModel,
+ volScalarField& wallHeatFlux
+ );
+
+
+private:
+
+ // Private member functions
+
+ //- Disallow default bitwise copy construct
+ wallHeatFlux(const wallHeatFlux&);
+
+ //- Disallow default bitwise assignment
+ void operator=(const wallHeatFlux&);
+
+
+public:
+
+ //- Runtime type information
+ TypeName("wallHeatFlux");
+
+
+ // Constructors
+
+ //- Construct from Time and dictionary
+ wallHeatFlux
+ (
+ const word& name,
+ const Time& runTime,
+ const dictionary&
+ );
+
+
+ //- Destructor
+ virtual ~wallHeatFlux();
+
+
+ // Member Functions
+
+ //- Read the wallHeatFlux data
+ virtual bool read(const dictionary&);
+
+ //- Calculate the wall heat-flux
+ virtual bool execute();
+
+ //- Write the wall heat-flux
+ virtual bool write();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace functionObjects
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/functionObjects/field/wallShearStress/wallShearStress.H b/src/functionObjects/field/wallShearStress/wallShearStress.H
index a8ce6044ec..5836f08b86 100644
--- a/src/functionObjects/field/wallShearStress/wallShearStress.H
+++ b/src/functionObjects/field/wallShearStress/wallShearStress.H
@@ -28,9 +28,8 @@ Group
grpForcesFunctionObjects
Description
- This function object evaluates and outputs the shear stress at wall
- patches. The result is written as a volVectorField to time directories as
- field 'wallShearStress'
+ Calculates and write the shear-stress at wall patches as
+ the volVectorField field 'wallShearStress'.
\f[
Stress = R \dot n
@@ -42,16 +41,16 @@ Description
n | patch normal vector (into the domain)
\endvartable
- The shear stress (symmetrical) tensor field is retrieved from the
- turbulence model. All wall patches are included by default; to restrict
- the calculation to certain patches, use the optional 'patches' entry.
+ The shear-stress symmetric tensor field is retrieved from the turbulence
+ model. All wall patches are included by default; to restrict the
+ calculation to certain patches, use the optional 'patches' entry.
Example of function object specification:
\verbatim
wallShearStress1
{
type wallShearStress;
- libs ("libfieldFunctionObjects.so");
+ libs ("libfieldFunctionObjects.so");
...
patches (".*Wall");
}
@@ -114,7 +113,7 @@ protected:
//- File header information
virtual void writeFileHeader(const label i);
- //- Calculate the shear stress
+ //- Calculate the shear-stress
void calcShearStress
(
const fvMesh& mesh,
diff --git a/src/functionObjects/field/writeCellCentres/writeCellCentres.H b/src/functionObjects/field/writeCellCentres/writeCellCentres.H
index fd44473cc8..c6c050e6cd 100644
--- a/src/functionObjects/field/writeCellCentres/writeCellCentres.H
+++ b/src/functionObjects/field/writeCellCentres/writeCellCentres.H
@@ -28,8 +28,8 @@ Group
grpFieldFunctionObjects
Description
- This function object writes the cell-centres volVectorField and the
- three component fields as volScalarFields.
+ Writes the cell-centres volVectorField and the three component fields as
+ volScalarFields.
Example of function object specification:
\verbatim
diff --git a/src/functionObjects/field/writeCellVolumes/writeCellVolumes.H b/src/functionObjects/field/writeCellVolumes/writeCellVolumes.H
index c5bd54a72e..63d56124bc 100644
--- a/src/functionObjects/field/writeCellVolumes/writeCellVolumes.H
+++ b/src/functionObjects/field/writeCellVolumes/writeCellVolumes.H
@@ -28,7 +28,7 @@ Group
grpFieldFunctionObjects
Description
- This function object writes the cell-volumes volScalarField.
+ Writes the cell-volumes volScalarField.
Example of function object specification:
\verbatim
diff --git a/src/functionObjects/forces/forceCoeffs/forceCoeffs.H b/src/functionObjects/forces/forceCoeffs/forceCoeffs.H
index c663157430..68aca01f70 100644
--- a/src/functionObjects/forces/forceCoeffs/forceCoeffs.H
+++ b/src/functionObjects/forces/forceCoeffs/forceCoeffs.H
@@ -28,16 +28,16 @@ Group
grpForcesFunctionObjects
Description
- This function object extends the Foam::forces function object by providing
- lift, drag and moment coefficients. The data can optionally be output into
- bins, defined in a given direction.
+ Extends the forces functionObject by providing lift, drag and moment
+ coefficients. The data can optionally be output into bins, defined in a
+ given direction.
Example of function object specification:
\verbatim
forceCoeffs1
{
type forceCoeffs;
- libs ("libforces.so");
+ libs ("libforces.so");
...
log yes;
patches (walls);
diff --git a/src/functionObjects/forces/forces/forces.H b/src/functionObjects/forces/forces/forces.H
index 406b6e8abb..223c4cd632 100644
--- a/src/functionObjects/forces/forces/forces.H
+++ b/src/functionObjects/forces/forces/forces.H
@@ -28,8 +28,8 @@ Group
grpForcesFunctionObjects
Description
- This function object calculates the forces and moments by integrating the
- pressure and skin-friction forces over a given list of patches.
+ Calculates the forces and moments by integrating the pressure and
+ skin-friction forces over a given list of patches.
Member function forces::write() calculates the forces/moments and
writes the forces/moments into the file \/forces.dat and bin
@@ -40,7 +40,7 @@ Description
forces1
{
type forces;
- libs ("libforces.so");
+ libs ("libforces.so");
...
log yes;
patches (walls);
diff --git a/src/functionObjects/lagrangian/cloudInfo/cloudInfo.H b/src/functionObjects/lagrangian/cloudInfo/cloudInfo.H
index 9b1e4674e3..564406dde5 100644
--- a/src/functionObjects/lagrangian/cloudInfo/cloudInfo.H
+++ b/src/functionObjects/lagrangian/cloudInfo/cloudInfo.H
@@ -28,8 +28,9 @@ Group
grpLagrangianFunctionObjects
Description
- This function object outputs Lagrangian cloud information to a file. The
- current outputs include:
+ Outputs Lagrangian cloud information to a file.
+
+ The current outputs include:
- total current number of parcels
- total current mass of parcels
@@ -38,7 +39,7 @@ Description
cloudInfo1
{
type cloudInfo;
- libs ("libcloudFunctionObjects.so");
+ libs ("libcloudFunctionObjects.so");
...
clouds
(
diff --git a/src/functionObjects/lagrangian/cloudInfo/postProcessingDict b/src/functionObjects/lagrangian/cloudInfo/postProcessingDict
index ca8a3ba09c..52241b8272 100644
--- a/src/functionObjects/lagrangian/cloudInfo/postProcessingDict
+++ b/src/functionObjects/lagrangian/cloudInfo/postProcessingDict
@@ -19,10 +19,10 @@ functions
cloudInfo1
{
type cloudInfo;
- libs ("libcloudFunctionObjects.so");
+ libs ("libcloudFunctionObjects.so");
enabled true;
- writeControl timeStep;
- writeInterval 1;
+ writeControl timeStep;
+ writeInterval 1;
clouds (myCloud1);
}
diff --git a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.H b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.H
index a754cc659c..5f94116d1c 100644
--- a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.H
+++ b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.H
@@ -47,8 +47,8 @@ Description
\verbatim
tracks
{
- libs ("liblagrangianFunctionObjects.so");
- type icoUncoupledKinematicCloud;
+ libs ("liblagrangianFunctionObjects.so");
+ type icoUncoupledKinematicCloud;
}
\endverbatim
diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.H b/src/functionObjects/solvers/scalarTransport/scalarTransport.H
index 6add280f57..86c92bdee7 100644
--- a/src/functionObjects/solvers/scalarTransport/scalarTransport.H
+++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.H
@@ -28,7 +28,7 @@ Group
grpSolversFunctionObjects
Description
- This function object evolves a passive scalar transport equation.
+ Evolves a passive scalar transport equation.
- To specify the field name set the 'field' entry
- To employ the same numerical schemes as another field set
diff --git a/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H b/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H
index b79144c75c..21c5a6ad94 100644
--- a/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H
+++ b/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H
@@ -28,8 +28,7 @@ Group
grpUtilitiesFunctionObjects
Description
- This function object provides a general interface to enable dynamic code
- compilation.
+ Provides a general interface to enable dynamic code compilation.
The entries are
codeInclude : include files
@@ -46,7 +45,7 @@ Description
\verbatim
difference
{
- libs ("libutilityFunctionObjects.so");
+ libs ("libutilityFunctionObjects.so");
type coded;
// Name of on-the-fly generated functionObject
diff --git a/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H b/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H
index 42e36ba90f..221c09a0e3 100644
--- a/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H
+++ b/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H
@@ -28,14 +28,14 @@ Group
grpUtilitiesFunctionObjects
Description
- This function object removes registered objects if present in the database
+ Removes registered objects if present in the database.
Example of function object specification:
\verbatim
removeRegisteredObject1
{
type removeRegisteredObject;
- libs ("libutilityFunctionObjects.so");
+ libs ("libutilityFunctionObjects.so");
...
objectNames (obj1 obj2);
}
diff --git a/src/functionObjects/utilities/residuals/residuals.H b/src/functionObjects/utilities/residuals/residuals.H
index b6d7fbb54c..92b23ddc6d 100644
--- a/src/functionObjects/utilities/residuals/residuals.H
+++ b/src/functionObjects/utilities/residuals/residuals.H
@@ -28,7 +28,7 @@ Group
grpUtilitiesFunctionObjects
Description
- This function object writes out the initial residual for specified fields.
+ Writes out the initial residual for specified fields.
Example of function object specification:
\verbatim
diff --git a/src/functionObjects/utilities/systemCall/controlDict b/src/functionObjects/utilities/systemCall/controlDict
index 41287f0c4a..afac84b1f1 100644
--- a/src/functionObjects/utilities/systemCall/controlDict
+++ b/src/functionObjects/utilities/systemCall/controlDict
@@ -49,9 +49,9 @@ functions
systemCall1
{
type systemCall;
- libs ("libsystemCall.so");
+ libs ("libsystemCall.so");
enabled true;
- writeControl writeTime;
+ writeControl writeTime;
// called every time step
executeCalls
diff --git a/src/functionObjects/utilities/systemCall/systemCall.H b/src/functionObjects/utilities/systemCall/systemCall.H
index a468b25f05..66efeac5cc 100644
--- a/src/functionObjects/utilities/systemCall/systemCall.H
+++ b/src/functionObjects/utilities/systemCall/systemCall.H
@@ -28,9 +28,9 @@ Group
grpUtilitiesFunctionObjects
Description
- This function object executes system calls, entered in the form of a
- string lists. Calls can be made at the following points in the
- calculation:
+ Executes system calls, entered in the form of a string lists.
+
+ Calls can be made at the following points in the calculation:
- every time step
- every output time
- end of the calculation
@@ -40,7 +40,7 @@ Description
systemCall1
{
type systemCall;
- libs ("libsystemCall.so");
+ libs ("libsystemCall.so");
...
executeCalls
(
diff --git a/src/functionObjects/utilities/timeActivatedFileUpdate/controlDict b/src/functionObjects/utilities/timeActivatedFileUpdate/controlDict
index 5a38c46c94..3a3aa8a003 100644
--- a/src/functionObjects/utilities/timeActivatedFileUpdate/controlDict
+++ b/src/functionObjects/utilities/timeActivatedFileUpdate/controlDict
@@ -49,9 +49,9 @@ functions
fileUpdate1
{
type timeActivatedFileUpdate;
- libs ("libutilityFunctionObjects.so");
- writeControl timeStep;
- writeInterval 1;
+ libs ("libutilityFunctionObjects.so");
+ writeControl timeStep;
+ writeInterval 1;
fileToUpdate "$FOAM_CASE/system/fvSolution";
timeVsFile
diff --git a/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H b/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H
index 2644519d6e..19da9d797e 100644
--- a/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H
+++ b/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H
@@ -37,9 +37,9 @@ Description
fileUpdate1
{
type timeActivatedFileUpdate;
- libs ("libutilityFunctionObjects.so");
- writeControl timeStep;
- writeInterval 1;
+ libs ("libutilityFunctionObjects.so");
+ writeControl timeStep;
+ writeInterval 1;
fileToUpdate "$FOAM_CASE/system/fvSolution";
timeVsFile
(
diff --git a/src/functionObjects/utilities/writeDictionary/writeDictionary.H b/src/functionObjects/utilities/writeDictionary/writeDictionary.H
index c7ef4bc7ec..57b80e1463 100644
--- a/src/functionObjects/utilities/writeDictionary/writeDictionary.H
+++ b/src/functionObjects/utilities/writeDictionary/writeDictionary.H
@@ -28,7 +28,7 @@ Group
grpUtilitiesFunctionObjects
Description
- This function object writes dictionaries on start-up, and on change
+ Writes dictionaries on start-up and on change.
SourceFiles
writeDictionary.C
diff --git a/src/functionObjects/utilities/writeObjects/writeObjects.H b/src/functionObjects/utilities/writeObjects/writeObjects.H
index 760951f1f1..548dbecfab 100644
--- a/src/functionObjects/utilities/writeObjects/writeObjects.H
+++ b/src/functionObjects/utilities/writeObjects/writeObjects.H
@@ -28,8 +28,8 @@ Group
grpUtilitiesFunctionObjects
Description
- This function object allows specification of different writing frequency
- of objects registered to the database.
+ Allows specification of different writing frequency of objects registered to
+ the database.
It has similar functionality as the main time database through the
writeControl setting: