postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities

with the more general and flexible 'postProcess' utility and '-postProcess' solver option

Rationale
---------

Both the 'postProcess' utility and '-postProcess' solver option use the
same extensive set of functionObjects available for data-processing
during the run avoiding the substantial code duplication necessary for
the 'foamCalc' and 'postCalc' utilities and simplifying maintenance.
Additionally consistency is guaranteed between solver data processing
and post-processing.

The functionObjects have been substantially re-written and generalized
to simplify development and encourage contribution.

Configuration
-------------

An extensive set of simple functionObject configuration files are
provided in

OpenFOAM-dev/etc/caseDicts/postProcessing

and more will be added in the future.  These can either be copied into
'<case>/system' directory and included into the 'controlDict.functions'
sub-dictionary or included directly from 'etc/caseDicts/postProcessing'
using the '#includeEtc' directive or the new and more convenient
'#includeFunc' directive which searches the
'<etc>/caseDicts/postProcessing' directories for the selected
functionObject, e.g.

functions
{
    #includeFunc Q
    #includeFunc Lambda2
}

'#includeFunc' first searches the '<case>/system' directory in case
there is a local configuration.

Description of #includeFunc
---------------------------

    Specify a functionObject dictionary file to include, expects the
    functionObject name to follow (without quotes).

    Search for functionObject dictionary file in
    user/group/shipped directories.
    The search scheme allows for version-specific and
    version-independent files using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/postProcessing
      - ~/.OpenFOAM/caseDicts/postProcessing
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/caseDicts/postProcessing
      - $WM_PROJECT_SITE/caseDicts/postProcessing
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/caseDicts/postProcessing
      - $WM_PROJECT_INST_DIR/site/caseDicts/postProcessing
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/postProcessing

    An example of the \c \#includeFunc directive:
    \verbatim
        #includeFunc <funcName>
    \endverbatim

postProcess
-----------

The 'postProcess' utility and '-postProcess' solver option provide the
same set of controls to execute functionObjects after the run either by
reading a specified set of fields to process in the case of
'postProcess' or by reading all fields and models required to start the
run in the case of '-postProcess' for each selected time:

postProcess -help

Usage: postProcess [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -field <name>     specify the name of the field to be processed, e.g. U
  -fields <list>    specify a list of fields to be processed, e.g. '(U T p)' -
                    regular expressions not currently supported
  -func <name>      specify the name of the functionObject to execute, e.g. Q
  -funcs <list>     specify the names of the functionObjects to execute, e.g.
                    '(Q div(U))'
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

 pimpleFoam -postProcess -help

Usage: pimpleFoam [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -field <name>     specify the name of the field to be processed, e.g. U
  -fields <list>    specify a list of fields to be processed, e.g. '(U T p)' -
                    regular expressions not currently supported
  -func <name>      specify the name of the functionObject to execute, e.g. Q
  -funcs <list>     specify the names of the functionObjects to execute, e.g.
                    '(Q div(U))'
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -postProcess      Execute functionObjects only
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

The functionObjects to execute may be specified on the command-line
using the '-func' option for a single functionObject or '-funcs' for a
list, e.g.

postProcess -func Q
postProcess -funcs '(div(U) div(phi))'

In the case of 'Q' the default field to process is 'U' which is
specified in and read from the configuration file but this may be
overridden thus:

postProcess -func 'Q(Ua)'

as is done in the example above to calculate the two forms of the divergence of
the velocity field.  Additional fields which the functionObjects may depend on
can be specified using the '-field' or '-fields' options.

The 'postProcess' utility can only be used to execute functionObjects which
process fields present in the time directories.  However, functionObjects which
depend on fields obtained from models, e.g. properties derived from turbulence
models can be executed using the '-postProcess' of the appropriate solver, e.g.

pisoFoam -postProcess -func PecletNo

or

sonicFoam -postProcess -func MachNo

In this case all required fields will have already been read so the '-field' or
'-fields' options are not be needed.

Henry G. Weller
CFD Direct Ltd.
This commit is contained in:
Henry Weller 2016-05-28 18:58:48 +01:00
parent 6f9573bb12
commit e4dc50dcb0
394 changed files with 1450 additions and 5384 deletions

View File

@ -20,7 +20,6 @@ EXE_LIBS = \
-lfieldFunctionObjects \
-lfileFormats \
-lfiniteVolume \
-lfoamCalcFunctions \
-lforces \
-lfvMotionSolvers \
-lgenericPatchFields \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,6 +34,7 @@ Description
#include "IFstream.H"
#include "IOobject.H"
#include "HashSet.H"
#include "etcFiles.H"
using namespace Foam;

View File

@ -1,3 +0,0 @@
foamCalcApp.C
EXE = $(FOAM_APPBIN)/foamCalc

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/foamCalcFunctions/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lgenericPatchFields \
-lfoamCalcFunctions \
-lfiniteVolume \
-lmeshTools

View File

@ -1,100 +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 <http://www.gnu.org/licenses/>.
Application
foamCalc
Description
Generic wrapper for calculating a quantity at each time.
Split into four phases:
1. Intialise
2. Pre-time calculation loop
3. Calculation loop
4. Post-calculation loop
\*---------------------------------------------------------------------------*/
#include "timeSelector.H"
#include "calcType.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
Foam::timeSelector::addOptions();
#include "addRegionOption.H"
Foam::argList::addBoolOption
(
"noWrite",
"suppress writing results"
);
#include "addDictOption.H"
if (argc < 2)
{
FatalError
<< "No utility has been supplied" << nl
<< exit(FatalError);
}
const word utilityName = argv[1];
Foam::autoPtr<Foam::calcType> utility
(
calcType::New(utilityName)
);
utility().tryInit();
#include "setRootCase.H"
#include "createTime.H"
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
#include "createNamedMesh.H"
utility().tryPreCalc(args, runTime, mesh);
forAll(timeDirs, timeI)
{
runTime.setTime(timeDirs[timeI], timeI);
Foam::Info<< "Time = " << runTime.timeName() << Foam::endl;
mesh.readUpdate();
utility().tryCalc(args, runTime, mesh);
Foam::Info<< Foam::endl;
}
utility().tryPostCalc(args, runTime, mesh);
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,3 @@
postProcess.C
EXE = $(FOAM_APPBIN)/postProcess

View File

@ -1,6 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
@ -9,11 +8,11 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
LIB_LIBS = \
-lfvOptions \
EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
@ -22,5 +21,7 @@ LIB_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lfiniteVolume \
-lfvOptions \
-lgenericPatchFields \
-lmeshTools \
-lsampling

View File

@ -0,0 +1,202 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 <http://www.gnu.org/licenses/>.
Application
postProcess
Description
Execute the set of functionObjects specified in the selected dictionary
(which defaults to system/controlDict) or on the command-line for the
selected set of times on the selected set of fields.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "timeSelector.H"
#include "ReadFields.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "pointFields.H"
#include "uniformDimensionedFields.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define ReadFields(GeoFieldType) \
readFields<GeoFieldType>(mesh, objects, selectedFields, storedObjects);
#define ReadPointFields(GeoFieldType) \
readFields<GeoFieldType>(pMesh, objects, selectedFields, storedObjects);
#define ReadUniformFields(FieldType) \
readUniformFields<FieldType> \
(constantObjects, selectedFields, storedObjects);
void executeFunctionObjects
(
const argList& args,
const Time& runTime,
fvMesh& mesh,
const HashSet<word>& selectedFields,
functionObjectList& functions
)
{
Info<< nl << "Reading fields:" << endl;
// Maintain a stack of the stored objects to clear after executing
// the functionObjects
LIFOStack<regIOobject*> storedObjects;
// Read objects in time directory
IOobjectList objects(mesh, runTime.timeName());
// Read volFields
ReadFields(volScalarField);
ReadFields(volVectorField);
ReadFields(volSphericalTensorField);
ReadFields(volSymmTensorField);
ReadFields(volTensorField);
// Read internal fields
ReadFields(volScalarField::Internal);
ReadFields(volVectorField::Internal);
ReadFields(volSphericalTensorField::Internal);
ReadFields(volSymmTensorField::Internal);
ReadFields(volTensorField::Internal);
// Read surface fields
ReadFields(surfaceScalarField);
ReadFields(surfaceVectorField);
ReadFields(surfaceSphericalTensorField);
ReadFields(surfaceSymmTensorField);
ReadFields(surfaceTensorField);
// Read point fields.
const pointMesh& pMesh = pointMesh::New(mesh);
ReadPointFields(pointScalarField)
ReadPointFields(pointVectorField);
ReadPointFields(pointSphericalTensorField);
ReadPointFields(pointSymmTensorField);
ReadPointFields(pointTensorField);
// Read uniform dimensioned fields
IOobjectList constantObjects(mesh, runTime.constant());
ReadUniformFields(uniformDimensionedScalarField);
ReadUniformFields(uniformDimensionedVectorField);
ReadUniformFields(uniformDimensionedSphericalTensorField);
ReadUniformFields(uniformDimensionedSymmTensorField);
ReadUniformFields(uniformDimensionedTensorField);
Info<< nl << "Executing functionObjects" << endl;
// Execute the functionObjects in post-processing mode
functions.execute(true);
while (!storedObjects.empty())
{
storedObjects.pop()->checkOut();
}
}
int main(int argc, char *argv[])
{
Foam::timeSelector::addOptions();
#include "addRegionOption.H"
#include "addFunctionObjectOptions.H"
#include "setRootCase.H"
#include "createTime.H"
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
#include "createNamedMesh.H"
// Initialize the set of selected fields from the command-line options
HashSet<word> selectedFields;
if (args.optionFound("fields"))
{
args.optionLookup("fields")() >> selectedFields;
}
if (args.optionFound("field"))
{
selectedFields.insert(args.optionLookup("field")());
}
// Externally stored dictionary for functionObjectList
// if not constructed from runTime
dictionary functionsDict;
// Construct functionObjectList
autoPtr<functionObjectList> functionsPtr
(
functionObjectList::New(args, runTime, functionsDict, selectedFields)
);
forAll(timeDirs, timeI)
{
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time = " << runTime.timeName() << endl;
if (mesh.readUpdate() != polyMesh::UNCHANGED)
{
// Update functionObjectList if mesh changes
functionsPtr = functionObjectList::New
(
args,
runTime,
functionsDict,
selectedFields
);
}
FatalIOError.throwExceptions();
try
{
executeFunctionObjects
(
args,
runTime,
mesh,
selectedFields,
functionsPtr()
);
}
catch (IOerror& err)
{
Warning<< err << endl;
}
Info<< endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,129 +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 <http://www.gnu.org/licenses/>.
Application
Co
Description
Calculates and writes the Co number as a volScalarField obtained
from field phi.
The -noWrite option just outputs the max values without writing the
field.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
#include "zeroGradientFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject phiHeader
(
"phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (phiHeader.headerOk())
{
volScalarField Co
(
IOobject
(
"Co",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
mesh,
dimensionedScalar("0", dimless, 0),
zeroGradientFvPatchScalarField::typeName
);
Info<< " Reading phi" << endl;
surfaceScalarField phi(phiHeader, mesh);
if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
{
Info<< " Calculating compressible Co" << endl;
Info<< " Reading rho" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
Co.ref() =
(0.5*runTime.deltaT())
*fvc::surfaceSum(mag(phi))()()
/(rho*mesh.V());
Co.correctBoundaryConditions();
}
else if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
{
Info<< " Calculating incompressible Co" << endl;
Co.ref() =
(0.5*runTime.deltaT())
*fvc::surfaceSum(mag(phi))()()
/mesh.V();
Co.correctBoundaryConditions();
}
else
{
FatalErrorInFunction
<< "Incorrect dimensions of phi: " << phi.dimensions()
<< abort(FatalError);
}
Info<< "Co max : " << max(Co).value() << endl;
if (writeResults)
{
Co.write();
}
}
else
{
Info<< " No phi" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
Co.C
EXE = $(FOAM_APPBIN)/Co

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
Application
Lambda2
Description
Calculates and writes the second largest eigenvalue of the sum of the
square of the symmetrical and anti-symmetrical parts of the velocity
gradient tensor.
The -noWrite option has no meaning.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
const volTensorField gradU(fvc::grad(U));
volTensorField SSplusWW
(
(symm(gradU) & symm(gradU)) + (skew(gradU) & skew(gradU))
);
volScalarField Lambda2
(
IOobject
(
"Lambda2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
-eigenValues(SSplusWW)().component(vector::Y)
);
Info<< " Writing -Lambda2" << endl;
Lambda2.write();
}
else
{
Info<< " No U" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,4 +0,0 @@
Lambda2.C
EXE = $(FOAM_APPBIN)/Lambda2

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,151 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>.
Application
Mach
Description
Calculates and optionally writes the local Mach number from the velocity
field U at each time.
The -nowrite option just outputs the max value without writing the field.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
IOobject Theader
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
// Check U and T exists
if (Uheader.headerOk() && Theader.headerOk())
{
autoPtr<volScalarField> MachPtr;
volVectorField U(Uheader, mesh);
if
(
IOobject
(
basicThermo::dictName,
runTime.constant(),
mesh
).headerOk()
)
{
// thermophysical Mach
autoPtr<fluidThermo> thermo
(
fluidThermo::New(mesh)
);
volScalarField Cp(thermo->Cp());
volScalarField Cv(thermo->Cv());
MachPtr.set
(
new volScalarField
(
IOobject
(
"Ma",
runTime.timeName(),
mesh
),
mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T()))
)
);
}
else
{
// thermodynamic Mach
IOdictionary thermoProps
(
IOobject
(
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar R(thermoProps.lookup("R"));
dimensionedScalar Cv(thermoProps.lookup("Cv"));
volScalarField T(Theader, mesh);
MachPtr.set
(
new volScalarField
(
IOobject
(
"Ma",
runTime.timeName(),
mesh
),
mag(U)/(sqrt(((Cv + R)/Cv)*R*T))
)
);
}
Info<< "Mach max : " << max(MachPtr()).value() << endl;
if (writeResults)
{
MachPtr().write();
}
}
else
{
Info<< " Missing U or T" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
Mach.C
EXE = $(FOAM_APPBIN)/Mach

View File

@ -1,14 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lcompressibleTransportModels \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lfiniteVolume

View File

@ -1,23 +0,0 @@
Info<< "Reading thermodynamicProperties\n" << endl;
IOdictionary thermodynamicProperties
(
IOobject
(
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar R
(
thermodynamicProperties.lookup("R")
);
dimensionedScalar Cv
(
thermodynamicProperties.lookup("Cv")
);

View File

@ -1,50 +0,0 @@
#include "readThermodynamicProperties.H"
for (label i=startTime; i<endTime; i++)
{
runTime.setTime(Times[i], i);
Info<< "Time = " << runTime.timeName() << endl;
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
IOobject Theader
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
// Check U exists
if (Uheader.headerOk() && Theader.headerOk())
{
mesh.readUpdate();
volVectorField U(Uheader, mesh);
volScalarField T(Theader, mesh);
volScalarField Ma
(
IOobject
(
"Ma",
runTime.timeName(),
mesh
),
mag(U)/(sqrt(((Cv + R)/Cv)*R*T))
);
Ma.write();
}
else
{
Info<< " No U or T" << endl;
}
}

View File

@ -1,45 +0,0 @@
for (label i=startTime; i<endTime; i++)
{
runTime.setTime(Times[i], i);
Info<< "Time = " << runTime.timeName() << endl;
mesh.readUpdate();
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
volVectorField U(Uheader, mesh);
autoPtr<fluidThermo> thermo
(
fluidThermo::New(mesh)
);
volScalarField Cp = thermo->Cp();
volScalarField Cv = thermo->Cv();
volScalarField Ma
(
IOobject
(
"Ma",
runTime.timeName(),
mesh
),
mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T()))
);
Ma.write();
}
else
{
Info<< " No U" << endl;
}
}

View File

@ -1,3 +0,0 @@
Pe.C
EXE = $(FOAM_APPBIN)/Pe

View File

@ -1,280 +0,0 @@
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>.
Application
Pe
Description
Calculates the Peclet number Pe from the flux phi and writes the maximum
value, the surfaceScalarField Pef and volScalarField Pe.
With the -noWrite option just outputs the max value without writing
the fields.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "surfaceInterpolate.H"
#include "fvcAverage.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "turbulentFluidThermoModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject phiHeader
(
"phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (phiHeader.headerOk())
{
autoPtr<surfaceScalarField> PePtr;
Info<< " Reading phi" << endl;
surfaceScalarField phi(phiHeader, mesh);
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
IOobject turbulencePropertiesHeader
(
"turbulenceProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
);
Info<< " Calculating Pe" << endl;
if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
{
if (turbulencePropertiesHeader.headerOk())
{
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::turbulenceModel> turbulenceModel
(
incompressible::turbulenceModel::New
(
U,
phi,
laminarTransport
)
);
PePtr.set
(
new surfaceScalarField
(
IOobject
(
"Pef",
runTime.timeName(),
mesh
),
mag(phi)
/(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(turbulenceModel->nuEff())
)
)
);
}
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar nu(transportProperties.lookup("nu"));
PePtr.set
(
new surfaceScalarField
(
IOobject
(
"Pef",
runTime.timeName(),
mesh
),
mag(phi)
/(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* nu
)
)
);
}
}
else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
{
if (turbulencePropertiesHeader.headerOk())
{
autoPtr<fluidThermo> thermo(fluidThermo::New(mesh));
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh
),
thermo->rho()
);
autoPtr<compressible::turbulenceModel> turbulenceModel
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo()
)
);
PePtr.set
(
new surfaceScalarField
(
IOobject
(
"Pef",
runTime.timeName(),
mesh
),
mag(phi)
/(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(turbulenceModel->muEff())
)
)
);
}
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar mu(transportProperties.lookup("mu"));
PePtr.set
(
new surfaceScalarField
(
IOobject
(
"Pef",
runTime.timeName(),
mesh
),
mag(phi)
/(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* mu
)
)
);
}
}
else
{
FatalErrorInFunction
<< "Incorrect dimensions of phi: " << phi.dimensions()
<< abort(FatalError);
}
Info<< " Pe max : " << max(PePtr()).value() << endl;
if (writeResults)
{
Info<< " Writing surfaceScalarField : "
<< PePtr().name() << endl;
PePtr().write();
volScalarField Pe
(
IOobject
(
"Pe",
runTime.timeName(),
mesh
),
fvc::average(PePtr())
);
Info<< " Writing volScalarField : "
<< Pe.name() << endl;
Pe.write();
}
}
else
{
Info<< " No phi" << endl;
}
}
// ************************************************************************* //

View File

@ -1,4 +0,0 @@
Q.C
EXE = $(FOAM_APPBIN)/Q

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,115 +0,0 @@
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 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 <http://www.gnu.org/licenses/>.
Application
Q
Description
Calculates and writes the second invariant of the velocity gradient tensor.
Q = 0.5*(sqr(tr(gradU)) - tr(((gradU)&(gradU)))) [1/s^2]
The -noWrite option just outputs the max/min values without writing
the field.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
volTensorField gradU(fvc::grad(U));
volScalarField Q
(
IOobject
(
"Q",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
0.5*(sqr(tr(gradU)) - tr(((gradU)&(gradU))))
);
/*
// This is a second way of calculating Q, that delivers results
// very close, but not identical to the first approach.
volSymmTensorField S(symm(gradU)); // symmetric part of tensor
volTensorField W(skew(gradU)); // anti-symmetric part
volScalarField SS(S && S);
volScalarField WW(W && W);
volScalarField Q
(
IOobject
(
"Q",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
0.5*(WW - SS)
);
*/
Info<< "mag(Q) max/min : "
<< max(Q).value() << " "
<< min(Q).value() << endl;
if (writeResults)
{
Q.write();
}
}
else
{
Info<< " No U" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
enstrophy.C
EXE = $(FOAM_APPBIN)/enstrophy

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
Application
enstrophy
Description
Calculates and writes the enstrophy of the velocity field U.
The -noWrite option just outputs the max/min values without writing the
field.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
Info<< " Calculating enstrophy" << endl;
volScalarField enstrophy
(
IOobject
(
"enstrophy",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
0.5*magSqr(fvc::curl(U))
);
Info<< "enstrophy(U) max/min : "
<< max(enstrophy).value() << " "
<< min(enstrophy).value() << endl;
if (writeResults)
{
enstrophy.write();
}
}
else
{
Info<< " No U" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
flowType.C
EXE = $(FOAM_APPBIN)/flowType

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,95 +0,0 @@
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
Application
flowType
Description
Calculates and writes the flowType of velocity field U.
The -noWrite option has no meaning.
The flow type parameter is obtained according to the following equation:
\verbatim
|D| - |Omega|
lambda = -------------
|D| + |Omega|
-1 = rotational flow
0 = simple shear flow
1 = planar extensional flow
\endverbatim
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
volTensorField gradU(fvc::grad(U));
volScalarField magD(mag(symm(gradU)));
volScalarField magOmega (mag(skew(gradU)));
dimensionedScalar smallMagD("smallMagD", magD.dimensions(), SMALL);
Info<< " Calculating flowType" << endl;
volScalarField flowType
(
IOobject
(
"flowType",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
(magD - magOmega)/(magD + magOmega + smallMagD)
);
flowType.write();
}
else
{
Info<< " No U" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
uprime.C
EXE = $(FOAM_APPBIN)/uprime

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
Application
uprime
Description
Calculates and writes the scalar field of uprime (sqrt(2/3 k)).
The -noWrite option just outputs the max/min values without writing
the field.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject kheader
(
"k",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (kheader.headerOk())
{
Info<< " Reading k" << endl;
volScalarField k(kheader, mesh);
Info<< " Calculating uprime" << endl;
volScalarField uprime
(
IOobject
(
"uprime",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
sqrt((2.0/3.0)*k)
);
Info<< "uprime max/min : "
<< max(uprime).value() << " "
<< min(uprime).value() << endl;
if (writeResults)
{
uprime.write();
}
}
else
{
Info<< " No k" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
vorticity.C
EXE = $(FOAM_APPBIN)/vorticity

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lgenericPatchFields \
-lfiniteVolume \
-lmeshTools

View File

@ -1,101 +0,0 @@
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
Application
vorticity
Description
Calculates and writes the vorticity of velocity field U.
The -noWrite option just outputs the max/min values without writing
the field.
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvc.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
Info<< " Calculating vorticity" << endl;
volVectorField vorticity
(
IOobject
(
"vorticity",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
fvc::curl(U)
);
volScalarField magVorticity
(
IOobject
(
"magVorticity",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
mag(vorticity)
);
Info<< "vorticity max/min : "
<< max(magVorticity).value() << " "
<< min(magVorticity).value() << endl;
if (writeResults)
{
vorticity.write();
magVorticity.write();
}
}
else
{
Info<< " No U" << endl;
}
Info<< "\nEnd\n" << endl;
}
// ************************************************************************* //

View File

@ -35,6 +35,7 @@ Description
#include "dictionary.H"
#include "IFstream.H"
#include "OSspecific.H"
#include "etcFiles.H"
#include "specie.H"
#include "perfectGas.H"

View File

@ -36,6 +36,7 @@ Description
#include "dictionary.H"
#include "IFstream.H"
#include "OSspecific.H"
#include "etcFiles.H"
#include "IOmanip.H"
#include "specie.H"

View File

@ -34,6 +34,7 @@ Description
#include "dictionary.H"
#include "IFstream.H"
#include "OSspecific.H"
#include "etcFiles.H"
#include "specie.H"
#include "perfectGas.H"

39
bin/Co Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 <http://www.gnu.org/licenses/>.
#
# Script
# Co
#
# Description
# Script to suggest using the new "-postProcess" solver option.
#
#------------------------------------------------------------------------------
Script=${0##*/}
echo $Script "has been superceded by the -postProcess solver option:"
echo "<solverName> -func CourantNo"
echo "e.g."
echo "pimpleFoam -postProcess -func CourantNo"
#------------------------------------------------------------------------------

1
bin/Lambda2 Symbolic link
View File

@ -0,0 +1 @@
supercededByPostProcess

39
bin/Mach Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 <http://www.gnu.org/licenses/>.
#
# Script
# Mach
#
# Description
# Script to suggest using the new "-postProcess" solver option.
#
#------------------------------------------------------------------------------
Script=${0##*/}
echo $Script "has been superceded by the -postProcess solver option:"
echo "<solverName> -func MachNo"
echo "e.g."
echo "sonicFoam -postProcess -func MachNo"
#------------------------------------------------------------------------------

39
bin/Pe Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 <http://www.gnu.org/licenses/>.
#
# Script
# Pe
#
# Description
# Script to suggest using the new "-postProcess" solver option.
#
#------------------------------------------------------------------------------
Script=${0##*/}
echo $Script "has been superceded by the -postProcess solver option:"
echo "<solverName> -func PecletNo"
echo "e.g."
echo "pimpleFoam -postProcess -func PecletNo"
#------------------------------------------------------------------------------

1
bin/Q Symbolic link
View File

@ -0,0 +1 @@
supercededByPostProcess

1
bin/enstrophy Symbolic link
View File

@ -0,0 +1 @@
supercededByPostProcess

View File

@ -31,7 +31,7 @@
#
#------------------------------------------------------------------------------
echo "execFlowFunctionObjects has been replaced by the \
echo "execFlowFunctionObjects has been superceded by the \
'-postProcess' solver command-line option, e.g."
echo "simpleFoam -help -postProcess"

1
bin/flowType Symbolic link
View File

@ -0,0 +1 @@
supercededByPostProcess

37
bin/foamCalc Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 <http://www.gnu.org/licenses/>.
#
# Script
# foamCalc
#
# Description
# Replacement foamCalc to suggest using the new "postProcess" utility.
#
#------------------------------------------------------------------------------
echo "foamCalc has been superceded by the postProcess utility:"
echo "postProcess -help"
postProcess -help
#------------------------------------------------------------------------------

37
bin/supercededByPostProcess Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / 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 <http://www.gnu.org/licenses/>.
#
# Script
# supercededByPostProcess
#
# Description
# Script to suggest using the new "postProcess" utility.
#
#------------------------------------------------------------------------------
Script=${0##*/}
echo $Script "has been superceded by the postProcess utility:"
echo "postProcess -func" $Script
#------------------------------------------------------------------------------

1
bin/vorticity Symbolic link
View File

@ -0,0 +1 @@
supercededByPostProcess

View File

@ -32,7 +32,7 @@ Solution:
sub-dictionary in the case controlDict file, e.g.
functions
{
#include "flowRatePatch"
#includeFunc flowRatePatch
... other function objects here ...
}

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
#includeFunc faceSource.cfg
source faceZone;

View File

@ -12,7 +12,7 @@ patchAverage
fields (p);
operation average;
#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg";
#includeFunc patchSource.cfg;
}

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
#includeFunc faceSource.cfg
source patch;
sourceName $patch;

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
#includeFunc faceSource.cfg
source sampledSurface;

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
CourantNo
{
type CourantNo;
libs ("libfieldFunctionObjects.so");
field phi;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -9,7 +9,9 @@
Lambda2
{
type Lambda2;
libs ("libutilityFunctionObjects.so");
libs ("libfieldFunctionObjects.so");
field U;
executeControl writeTime;
writeControl writeTime;

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
MachNo
{
type MachNo;
libs ("libfieldFunctionObjects.so");
field U;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
PecletNo
{
type PecletNo;
libs ("libfieldFunctionObjects.so");
field phi;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -9,7 +9,9 @@
Q
{
type Q;
libs ("libfieldFunctionObjects.so");
libs ("libfieldFunctionObjects.so");
field U;
executeControl writeTime;
writeControl writeTime;

View File

@ -9,7 +9,9 @@
components
{
type components;
libs ("libfieldFunctionObjects.so");
libs ("libfieldFunctionObjects.so");
field <fieldName>;
executeControl writeTime;
writeControl writeTime;

View File

@ -9,7 +9,9 @@
div
{
type div;
libs ("libfieldFunctionObjects.so");
libs ("libfieldFunctionObjects.so");
field <fieldName>;
executeControl writeTime;
writeControl writeTime;

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
enstrophy
{
type enstrophy;
libs ("libfieldFunctionObjects.so");
field U;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
flowType
{
type flowType;
libs ("libfieldFunctionObjects.so");
field U;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
grad
{
type grad;
libs ("libfieldFunctionObjects.so");
field <fieldName>;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
mag
{
type mag;
libs ("libfieldFunctionObjects.so");
field <fieldName>;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
magSqr
{
type magSqr;
libs ("libfieldFunctionObjects.so");
field <fieldName>;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -8,7 +8,9 @@
randomise
{
#includeEtc "caseDicts/postProcessing/fields/randomise.cfg"
#includeFunc "randomise.cfg"
field <fieldName>;
// Set the magnitude of the perturbation
magPerturbation <scalar>;

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
vorticity
{
type vorticity;
libs ("libfieldFunctionObjects.so");
field U;
executeControl writeTime;
writeControl writeTime;
}
// ************************************************************************* //

View File

@ -14,7 +14,7 @@ flowRatePatch
{
patch <patchName>;
#includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg"
#includeFunc flowRatePatch.cfg
}
// ************************************************************************* //

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg"
#includeFunc patchSource.cfg
fields (phi);
operation sum;

View File

@ -14,7 +14,7 @@ volFlowRateSurface
{
triSurface <triSurfaceFile>;
#includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg"
#includeFunc volFlowRateSurface.cfg
}
// ************************************************************************* //

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/faceSource/surfaceSource.cfg"
#includeFunc surfaceSource.cfg
fields (U);
operation areaNormalIntegrate;

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
#includeFunc forces.cfg
type forceCoeffs;
rhoInf 1; // Redundant for incompressible

View File

@ -21,7 +21,7 @@ forceCoeffs
CofR (0 0 0);
pitchAxis (0 1 0);
#includeEtc "caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg"
#includeFunc forceCoeffsCompressible.cfg
}
// ************************************************************************* //

View File

@ -6,6 +6,6 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg"
#includeFunc forceCoeffs.cfg
// ************************************************************************* //

View File

@ -20,7 +20,7 @@ forceCoeffs
CofR (0 0 0);
pitchAxis (0 1 0);
#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg"
#includeFunc forceCoeffs.cfg
}
// ************************************************************************* //

View File

@ -13,7 +13,7 @@ forces
CofR (0 0 0);
pitchAxis (0 1 0);
#includeEtc "caseDicts/postProcessing/forces/forcesCompressible.cfg"
#includeFunc forcesCompressible.cfg
}
// ************************************************************************* //

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
#includeFunc forces.cfg
rhoInf 1; // Redundant

View File

@ -8,7 +8,7 @@
forces
{
#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
#includeFunc forces.cfg
rhoInf 1.225; // Fluid density
patches (patch1 patch2);

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg"
#includeFunc sampleDict.cfg
sets
(

View File

@ -12,10 +12,10 @@ graph
end (1 1e-06 0);
fields (U p);
#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg"
#includeFunc sampleDict.cfg
// Must be last entry
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
#includeFunc graph.cfg
}
// ************************************************************************* //

View File

@ -8,7 +8,7 @@
cellMax
{
#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg"
#includeFunc cellMinMax.cfg
fields (U p);
}

View File

@ -8,7 +8,7 @@
cellMin
{
#includeEtc "caseDicts/postProcessing/minMax/cellMin.cfg"
#includeFunc cellMin.cfg
fields (U p);
}

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg"
#includeFunc cellMinMax.cfg
operation min;
// ************************************************************************* //

View File

@ -8,7 +8,7 @@
faceMax
{
#includeEtc "caseDicts/postProcessing/minMax/faceMinMax.cfg"
#includeFunc faceMinMax.cfg
fields (U p);
}

View File

@ -8,7 +8,7 @@
faceMin
{
#includeEtc "caseDicts/postProcessing/minMax/faceMin.cfg"
#includeFunc faceMin.cfg
fields (U p);
}

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/minMax/faceMinMax.cfg"
#includeFunc faceMinMax.cfg
operation min;
// ************************************************************************* //

View File

@ -8,7 +8,7 @@
minMaxComponents
{
#includeEtc "caseDicts/postProcessing/minMax/minMaxComponents.cfg"
#includeFunc minMaxComponents.cfg
mode components;
}

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/minMax/fieldMinMax.cfg"
#includeFunc fieldMinMax.cfg
mode components;
// ************************************************************************* //

View File

@ -8,7 +8,7 @@
minMaxMagnitude
{
#includeEtc "caseDicts/postProcessing/minMax/fieldMinMax.cfg"
#includeFunc fieldMinMax.cfg
fields (U p);
}

View File

@ -8,7 +8,7 @@
residuals
{
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
#includeFunc residuals.cfg
fields (p U);
}

View File

@ -15,7 +15,7 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type pressure;
libs ("libutilityFunctionObjects.so");
libs ("libfieldFunctionObjects.so");
executeControl writeTime;
writeControl writeTime;

View File

@ -17,13 +17,13 @@ log false;
source1
{
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
#includeFunc faceSource.cfg
operation areaAverage;
fields (p);
}
source2
{
#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg"
#includeFunc faceSource.cfg
operation areaAverage;
fields (p);
}

View File

@ -11,7 +11,7 @@ pressureDifferencePatch
patch1 <patch1>;
patch2 <patch2>;
#includeEtc "caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg"
#includeFunc pressureDifferencePatch.cfg
}
// ************************************************************************* //

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/pressure/pressureDifference.cfg"
#includeFunc pressureDifference.cfg
source1
{

View File

@ -11,8 +11,7 @@ pressureDifferenceSurface
triSurface1 <triSurface1>;
triSurface2 <triSurface2>;
#includeEtc
"caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg"
#includeFunc pressureDifferenceSurface.cfg
}
// ************************************************************************* //

View File

@ -6,7 +6,7 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/pressure/pressureDifference.cfg"
#includeFunc pressureDifference.cfg
source1
{

View File

@ -8,9 +8,9 @@
staticPressure
{
#includeEtc "caseDicts/postProcessing/pressure/staticPressure.cfg"
#includeFunc staticPressure.cfg
rho 1.2; // Density to scale
rhoInf 1.2; // Density to scale
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More