diff --git a/etc/caseDicts/general/fvSolution/relaxationFactors/steadyState b/etc/caseDicts/general/fvSolution/relaxationFactors/steadyState new file mode 100644 index 0000000000..634f2bda05 --- /dev/null +++ b/etc/caseDicts/general/fvSolution/relaxationFactors/steadyState @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object steadyState; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +relaxationFactors +{ + fields + { + p 0.3; + } + equations + { + U 0.7; + ".*" 0.7; + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/general/fvSolution/relaxationFactors/transient b/etc/caseDicts/general/fvSolution/relaxationFactors/transient new file mode 100644 index 0000000000..c8d531e7b2 --- /dev/null +++ b/etc/caseDicts/general/fvSolution/relaxationFactors/transient @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transient; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/generation/meshQualityDict.cfg b/etc/caseDicts/mesh/generation/meshQualityDict.cfg new file mode 100644 index 0000000000..7c244e09f2 --- /dev/null +++ b/etc/caseDicts/mesh/generation/meshQualityDict.cfg @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object meshQualityDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +maxNonOrtho 65; + +maxBoundarySkewness 20; + +maxInternalSkewness 4; + +maxConcave 80; + +// Minimum cell pyramid volume; case dependent +minVol 1e-13; + +// 1e-15 (small positive) to enable tracking +// -1e+30 (large negative) for best layer insertion +minTetQuality 1e-15; + +// if >0 : preserve single cells with all points on the surface if the +// resulting volume after snapping (by approximation) is larger than +// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell). +// If <0 : delete always. +//minVolCollapseRatio 0.5; + +minArea -1; + +minTwist 0.02; + +minDeterminant 0.001; + +minFaceWeight 0.05; + +minVolRatio 0.01; + +minTriangleTwist -1; + +nSmoothScale 4; + +errorReduction 0.75; + +relaxed +{ + maxNonOrtho 75; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg b/etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg new file mode 100644 index 0000000000..71db4d401c --- /dev/null +++ b/etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg @@ -0,0 +1,83 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object snappyHexMeshDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +castellatedMesh true; +snap true; +addLayers true; + +castellatedMeshControls +{ + maxLocalCells 100000; + maxGlobalCells 100000000; + minRefinementCells 10; + maxLoadUnbalance 0.10; + nCellsBetweenLevels 3; + resolveFeatureAngle 30; + allowFreeStandingZoneFaces true; + features + ( + ); +} + +snapControls +{ + nSmoothPatch 3; + tolerance 2.0; + nSolveIter 100; + nRelaxIter 5; + + nFeatureSnapIter 10; + + explicitFeatureSnap false; + multiRegionFeatureSnap false; + implicitFeatureSnap true; +} + +addLayersControls +{ + featureAngle 100; + slipFeatureAngle 30; + + nLayerIter 50; + nRelaxedIter 20; + nRelaxIter 5; + + nGrow 0; + + nSmoothSurfaceNormals 1; + nSmoothNormals 3; + nSmoothThickness 10; + maxFaceThicknessRatio 0.5; + maxThicknessToMedialRatio 0.3; + + minMedialAxisAngle 90; + nMedialAxisIter 10; + + nBufferCellsNoExtrude 0; + additionalReporting false; +// nSmoothDisplacement 0; +// detectExtrusionIsland false; +} + +meshQualityControls +{ + #include "${FOAM_CASE}/system/meshQualityDict" +} + +debug 0; +mergeTolerance 1e-6; + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict b/etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict new file mode 100644 index 0000000000..8fa4ec522f --- /dev/null +++ b/etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object refineMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +set c0; + +coordinateSystem global; + +globalCoeffs +{ + tan1 ( 1 0 0 ); + tan2 ( 0 1 0 ); +} + +directions // comment out as required +( + tan1 + tan2 + normal +); + +useHexTopology no; + +geometricCut yes; + +writeMesh no; + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict b/etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict new file mode 100644 index 0000000000..3367c305f8 --- /dev/null +++ b/etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-1 -1 -1) (1 1 1); // Edit box bounds as required + } + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/README b/etc/caseDicts/postProcessing/README new file mode 100644 index 0000000000..3015d18df1 --- /dev/null +++ b/etc/caseDicts/postProcessing/README @@ -0,0 +1,52 @@ +Overview +======== +- This directory contains files to help post-processing of OpenFOAM cases +- It primariy "packages" functionObject functionality in a convenient form for + users to plug into their OpenFOAM cases +- While some tools are quite generic, e.g. minMax, others are more application- + oriented, e.g. flowRate. + +How the tools work +================== +- The configuration of functionObjects includes both required input data and + control parameters for the functionObject +- This creates a lot of input that can be confusing to users +- The tools here are packaged so that the user input is separated from control + parameters +- Control parameters are pre-configured in .cfg files - users can ignore these + files +- For each tool, required user input is all in one file, for the users to copy + into their case and set accordingly + +Example of how to use the tools +=============================== +Task: monitor flow rate at an outlet patch named "outlet" for a case +Solution: +- locate the flowRatePatch tool in the flowRate directory +- copy the flowRatePatch file into the case system directory (not + flowRatePatch.cfg) +- edit system/flowRatePatch to set the patch name + replace "patch ;" + with "patch outlet;" +- activate the function object by including the flowRatePatch file in functions + sub-dictionary in the case controlDict file, e.g. + functions + { + #include "flowRatePatch" + ... other function objects here ... + } + +Current tools +============= +- fields calculate specific fields, e.g. Q +- flowRate tools to calculate flow rate +- forces forces and forceCoeffs for incompressible/compressible flows +- graphs simple sampling for graph plotting, e.g. singleGraph +- minMax range of minimum and maximum field monitoring, e.g. cellMax +- numerical outputs information relating to numerics, e.g. residuals +- pressure calculates different forms of pressure, pressure drop, etc +- probes options for probing data +- scalarTransport for plugin scalar transport calculations +- visualization post-processing VTK files for cutting planes, streamlines,... + +- faceSource configuration for some of the tools above diff --git a/etc/caseDicts/postProcessing/faceSource/faceSource.cfg b/etc/caseDicts/postProcessing/faceSource/faceSource.cfg new file mode 100644 index 0000000000..1132a7a33f --- /dev/null +++ b/etc/caseDicts/postProcessing/faceSource/faceSource.cfg @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faceSource.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type faceSource; +functionObjectLibs ("libfieldFunctionObjects.so"); + +enabled true; +outputControl timeStep; +writeInterval 1; + +valueOutput false; +log false; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/faceSource/faceZoneSource.cfg b/etc/caseDicts/postProcessing/faceSource/faceZoneSource.cfg new file mode 100644 index 0000000000..56d3c16efc --- /dev/null +++ b/etc/caseDicts/postProcessing/faceSource/faceZoneSource.cfg @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faceZoneSource.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg" + +source faceZone; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/faceSource/patchSource.cfg b/etc/caseDicts/postProcessing/faceSource/patchSource.cfg new file mode 100644 index 0000000000..a1bd471a08 --- /dev/null +++ b/etc/caseDicts/postProcessing/faceSource/patchSource.cfg @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object patchSource.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg" + +source patch; +sourceName $patch; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/faceSource/surfaceSource.cfg b/etc/caseDicts/postProcessing/faceSource/surfaceSource.cfg new file mode 100644 index 0000000000..23db54b242 --- /dev/null +++ b/etc/caseDicts/postProcessing/faceSource/surfaceSource.cfg @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object surfaceSource.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg" + +source sampledSurface; + +sampledSurfaceDict +{ + type sampledTriSurfaceMesh; + surface $triSurface; + source cells; + interpolate true; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/Lambda2 b/etc/caseDicts/postProcessing/fields/Lambda2 new file mode 100644 index 0000000000..31170e2f5b --- /dev/null +++ b/etc/caseDicts/postProcessing/fields/Lambda2 @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object Lambda2.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Lambda2 +{ + #includeEtc "caseDicts/postProcessing/fields/Lambda2.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/Lambda2.cfg b/etc/caseDicts/postProcessing/fields/Lambda2.cfg new file mode 100644 index 0000000000..0722af8f62 --- /dev/null +++ b/etc/caseDicts/postProcessing/fields/Lambda2.cfg @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object Lambda2.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type Lambda2; +functionObjectLibs ("libutilityFunctionObjects.so"); + +enabled true; +outputControl outputTime; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/Q b/etc/caseDicts/postProcessing/fields/Q new file mode 100644 index 0000000000..539af98d5d --- /dev/null +++ b/etc/caseDicts/postProcessing/fields/Q @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object Q.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Q +{ + #includeEtc "caseDicts/postProcessing/fields/Q.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/Q.cfg b/etc/caseDicts/postProcessing/fields/Q.cfg new file mode 100644 index 0000000000..5def0533fb --- /dev/null +++ b/etc/caseDicts/postProcessing/fields/Q.cfg @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object Q.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type Q; +functionObjectLibs ("libutilityFunctionObjects.so"); + +enabled true; +outputControl outputTime; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/flowRatePatch b/etc/caseDicts/postProcessing/flowRate/flowRatePatch new file mode 100644 index 0000000000..9e5385a2f2 --- /dev/null +++ b/etc/caseDicts/postProcessing/flowRate/flowRatePatch @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object flowRatePatch; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// This packaged function object sums the flux phi on patch faces so the +// calculated volume flow rate for solvers where phi = volumetric flux, and +// mass flow rate for solvers where phi = mass flux. + +flowRatePatch +{ + patch ; + + #includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg b/etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg new file mode 100644 index 0000000000..b73dae82ef --- /dev/null +++ b/etc/caseDicts/postProcessing/flowRate/flowRatePatch.cfg @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object flowRatePatch.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg" + +fields (phi); +operation sum; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface b/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface new file mode 100644 index 0000000000..bcaa82a874 --- /dev/null +++ b/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object volFlowRateSurface; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// This packaged function object interpolates velocity U onto triangles in +// triSurface file and integrates over the surface area. Triangles need to +// be small (<= cell size) for an accurate integration. + +volFlowRateSurface +{ + triSurface ; + + #includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg b/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg new file mode 100644 index 0000000000..d8f7546c6e --- /dev/null +++ b/etc/caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object volFlowRateSurface.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/faceSource/surfaceSource.cfg" + +fields (U); +operation areaNormalIntegrate; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg b/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg new file mode 100644 index 0000000000..e2021318bc --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forceCoeffs.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/forces/forces.cfg" + +type forceCoeffs; +rhoInf 1; // Redundant for incompressible + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible new file mode 100644 index 0000000000..3a45f320e4 --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forceCoeffsCompressible; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forceCoeffs +{ + patches ( patch1 patch2 ); + + magUInf 20; + rhoInf 1.225; + lRef 1; + Aref 1; + + liftDir (0 0 1); + dragDir (1 0 0); + + CofR (0 0 0); + pitchAxis (0 1 0); + + #includeEtc "caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg new file mode 100644 index 0000000000..513aec09d8 --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg @@ -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 | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forceCoeffsCompressible.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg" +rhoName rho; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible new file mode 100644 index 0000000000..fab2280353 --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forceCoeffsIncompressible; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forceCoeffs +{ + patches ( patch1 patch2 ); + + magUInf 20; + lRef 1; + Aref 1; + + liftDir (0 0 1); + dragDir (1 0 0); + + CofR (0 0 0); + pitchAxis (0 1 0); + + #includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forces.cfg b/etc/caseDicts/postProcessing/forces/forces.cfg new file mode 100644 index 0000000000..4d36643c8c --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forces.cfg @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forces.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type forces; +functionObjectLibs ( "libforces.so" ); + +enabled true; +outputControl timeStep; +outputInterval 1; + +pName p; +UName U; +rhoName rhoInf; // Incompressible solver +log off; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesCompressible b/etc/caseDicts/postProcessing/forces/forcesCompressible new file mode 100644 index 0000000000..1c8607be20 --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forcesCompressible @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forcesCompressible; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + patches ( patch1 patch2 ); + + CofR (0 0 0); + pitchAxis (0 1 0); + + #includeEtc "caseDicts/postProcessing/forces/forcesCompressible.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesCompressible.cfg b/etc/caseDicts/postProcessing/forces/forcesCompressible.cfg new file mode 100644 index 0000000000..a8a630a9c1 --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forcesCompressible.cfg @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forcesCompressible.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/forces/forces.cfg" +rhoName rho; +rhoInf 1; // Redundant + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesIncompressible b/etc/caseDicts/postProcessing/forces/forcesIncompressible new file mode 100644 index 0000000000..8dc16603cf --- /dev/null +++ b/etc/caseDicts/postProcessing/forces/forcesIncompressible @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object forcesIncompressible; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + rhoInf 1.225; // Fluid density + patches ( patch1 patch2 ); + + CofR (0 0 0); + pitchAxis (0 1 0); + + #includeEtc "caseDicts/postProcessing/forces/forces.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/graph.cfg b/etc/caseDicts/postProcessing/graphs/graph.cfg new file mode 100644 index 0000000000..629aea0f8c --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/graph.cfg @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object graph.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type sets; +functionObjectLibs ("libsampling.so"); + +enabled true; +outputControl outputTime; + +sets +( + line + { + $setConfig; + start $start; + end $end; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/sampleDict b/etc/caseDicts/postProcessing/graphs/sampleDict new file mode 100644 index 0000000000..6b535efd7b --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/sampleDict @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object sampleDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg" + +sets +( + graph + { + $:setConfig; + start (0 1e-6 0); + end (1 1e-6 0); + } +); + +fields ( U p ); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/sampleDict.cfg b/etc/caseDicts/postProcessing/graphs/sampleDict.cfg new file mode 100644 index 0000000000..bdbe894be6 --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/sampleDict.cfg @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object sampleDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +interpolationScheme cellPoint; + +setFormat raw; + +setConfig +{ + type uniform; + axis distance; + nPoints 100; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/graphs/singleGraph b/etc/caseDicts/postProcessing/graphs/singleGraph new file mode 100644 index 0000000000..dcbd48189e --- /dev/null +++ b/etc/caseDicts/postProcessing/graphs/singleGraph @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object graph; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +graph +{ + start (0 1e-06 0); + end (1 1e-06 0); + fields ( U p ); + + #includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg" + + // Must be last entry + #includeEtc "caseDicts/postProcessing/graphs/graph.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMax b/etc/caseDicts/postProcessing/minMax/cellMax new file mode 100644 index 0000000000..e0eac71863 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/cellMax @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cellMax; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cellMax +{ + fields ( U p ); + + #includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMin b/etc/caseDicts/postProcessing/minMax/cellMin new file mode 100644 index 0000000000..ba20b659de --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/cellMin @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cellMin; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cellMin +{ + fields ( U p ); + + #includeEtc "caseDicts/postProcessing/minMax/cellMin.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMin.cfg b/etc/caseDicts/postProcessing/minMax/cellMin.cfg new file mode 100644 index 0000000000..7cd162d9d6 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/cellMin.cfg @@ -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 | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cellMin.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg" +operation min; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg b/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg new file mode 100644 index 0000000000..53374d6a22 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/cellMinMax.cfg @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cellMinMax.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type cellSource; +functionObjectLibs ("libfieldFunctionObjects.so"); + +enabled true; +outputControl timeStep; +writeInterval 1; + +valueOutput false; +log false; + +source all; +operation max; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/faceMax b/etc/caseDicts/postProcessing/minMax/faceMax new file mode 100644 index 0000000000..f1cffd0ff4 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/faceMax @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faceMax; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +faceMax +{ + fields ( U p ); + + #includeEtc "caseDicts/postProcessing/minMax/faceMinMax.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/faceMin b/etc/caseDicts/postProcessing/minMax/faceMin new file mode 100644 index 0000000000..dd5181eff8 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/faceMin @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faceMin; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +faceMin +{ + fields ( U p ); + + #includeEtc "caseDicts/postProcessing/minMax/faceMin.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/faceMin.cfg b/etc/caseDicts/postProcessing/minMax/faceMin.cfg new file mode 100644 index 0000000000..111b8368e7 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/faceMin.cfg @@ -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 | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faceMin.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/minMax/faceMinMax.cfg" +operation min; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/faceMinMax.cfg b/etc/caseDicts/postProcessing/minMax/faceMinMax.cfg new file mode 100644 index 0000000000..620b02cf60 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/faceMinMax.cfg @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faceMinMax.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type faceSource; +functionObjectLibs ("libfieldFunctionObjects.so"); + +enabled true; +outputControl timeStep; +writeInterval 1; + +valueOutput false; +log false; + +source all; +operation max; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/fieldMinMax.cfg b/etc/caseDicts/postProcessing/minMax/fieldMinMax.cfg new file mode 100644 index 0000000000..842cbbdf41 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/fieldMinMax.cfg @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fieldMinMax.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type fieldMinMax; +functionObjectLibs ("libfieldFunctionObjects.so"); + +enabled true; +outputControl timeStep; +writeInterval 1; + +write true; +log false; + +mode magnitude; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/minMaxComponents b/etc/caseDicts/postProcessing/minMax/minMaxComponents new file mode 100644 index 0000000000..999509c934 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/minMaxComponents @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object minMaxComponents; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +minMaxComponents +{ + mode components; + + #includeEtc "caseDicts/postProcessing/minMax/minMaxComponents.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/minMaxComponents.cfg b/etc/caseDicts/postProcessing/minMax/minMaxComponents.cfg new file mode 100644 index 0000000000..a4b2cdb5b9 --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/minMaxComponents.cfg @@ -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 | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object minMaxComponents.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/minMax/fieldMinMax.cfg" +mode components; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/minMax/minMaxMagnitude b/etc/caseDicts/postProcessing/minMax/minMaxMagnitude new file mode 100644 index 0000000000..155d460bdf --- /dev/null +++ b/etc/caseDicts/postProcessing/minMax/minMaxMagnitude @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object minMaxMagnitude; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +minMaxMagnitude +{ + fields ( U p ); + + #includeEtc "caseDicts/postProcessing/minMax/fieldMinMax.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/numerical/residuals b/etc/caseDicts/postProcessing/numerical/residuals new file mode 100644 index 0000000000..3719ca29ba --- /dev/null +++ b/etc/caseDicts/postProcessing/numerical/residuals @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object residuals; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +residuals +{ + fields ( p U ); + + #includeEtc "caseDicts/postProcessing/numerical/residuals.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/numerical/residuals.cfg b/etc/caseDicts/postProcessing/numerical/residuals.cfg new file mode 100644 index 0000000000..844c2810f3 --- /dev/null +++ b/etc/caseDicts/postProcessing/numerical/residuals.cfg @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object residuals.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type residuals; +functionObjectLibs ("libutilityFunctionObjects.so"); + +enabled true; +outputControl timeStep; +outputInterval 1; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg b/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg new file mode 100644 index 0000000000..f8b1ef96db --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object pressureDifference.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type fieldValueDelta; +functionObjectLibs ("libfieldFunctionObjects.so"); + +operation subtract; + +enabled true; +outputControl timeStep; +writeInterval 1 +log false; + +source1 +{ + #includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg" + operation areaAverage; + fields ( p ); +} +source2 +{ + #includeEtc "caseDicts/postProcessing/faceSource/faceSource.cfg" + operation areaAverage; + fields ( p ); +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch b/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch new file mode 100644 index 0000000000..8131375e9d --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object pressureDifferencePatch; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +pressureDifferencePatch +{ + patch1 ; + patch2 ; + + #includeEtc "caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg b/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg new file mode 100644 index 0000000000..c13b316702 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object pressureDifferencePatch.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/pressure/pressureDifference.cfg" + +source1 +{ + source patch; + sourceName $patch1; +} +source2 +{ + source patch; + sourceName $patch2; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface b/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface new file mode 100644 index 0000000000..ba981ad7c7 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object pressureDifferenceSurface; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +pressureDifferenceSurface +{ + triSurface1 ; + triSurface2 ; + + #includeEtc + "caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg b/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg new file mode 100644 index 0000000000..9d782905cc --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object pressureDifferenceSurface.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/pressure/pressureDifference.cfg" + +source1 +{ + source sampledSurface; + + sampledSurfaceDict + { + type sampledTriSurfaceMesh; + source cells; + interpolate true; + surface $triSurface1; + } +} + +source2 +{ + $source1; + sampledSurfaceDict + { + surface $triSurface2; + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/pressureTools.cfg b/etc/caseDicts/postProcessing/pressure/pressureTools.cfg new file mode 100644 index 0000000000..331875a431 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/pressureTools.cfg @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object pressureTools.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type pressureTools; +functionObjectLibs ("libutilityFunctionObjects.so"); + +enabled true; +outputControl outputTime; +log false; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/staticPressure b/etc/caseDicts/postProcessing/pressure/staticPressure new file mode 100644 index 0000000000..3aee436f90 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/staticPressure @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object staticPressure; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +staticPressure +{ + rho 1.2; // Density to scale + + #includeEtc "caseDicts/postProcessing/pressure/staticPressure.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/staticPressure.cfg b/etc/caseDicts/postProcessing/pressure/staticPressure.cfg new file mode 100644 index 0000000000..6b7b5b1005 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/staticPressure.cfg @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object staticPressure.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/pressure/pressureTools.cfg" + +calcTotal no; +calcCoeff no; +rhoName rhoInf; +rhoInf $rho; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureCompressible b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible new file mode 100644 index 0000000000..8712bb9387 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object totalPressureCompressible; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +totalPressure +{ + pRef 0.0; + + #includeEtc + "caseDicts/postProcessing/pressure/totalPressureCompressible.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg new file mode 100644 index 0000000000..0e083f2a25 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/totalPressureCompressible.cfg @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object totalPressureCompressible.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/pressure/pressureTools.cfg" + +calcTotal no; +calcCoeff no; +rhoName rho; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible new file mode 100644 index 0000000000..24a50c5637 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object totalPressureIncompressible; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +totalPressure +{ + pRef 0.0; + rho 1.2; + + #includeEtc + "caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg new file mode 100644 index 0000000000..d90f92a052 --- /dev/null +++ b/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object totalPressureIncompressible.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/pressure/pressureTools.cfg" + +calcTotal yes; +calcCoeff no; +rhoName rhoInf; +rhoInf $rho; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/boundaryCloud b/etc/caseDicts/postProcessing/probes/boundaryCloud new file mode 100644 index 0000000000..1f79a97b88 --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/boundaryCloud @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object boundaryCloud; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +boundaryCloud +{ + fields ( p U ); + + points + ( + (0 0 0) + ); + + maxDistance 0.1; + + patches (".*"); + + #includeEtc "caseDicts/postProcessing/probes/boundaryCloud.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/boundaryCloud.cfg b/etc/caseDicts/postProcessing/probes/boundaryCloud.cfg new file mode 100644 index 0000000000..5df71dc2c3 --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/boundaryCloud.cfg @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object boundaryCloud.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/probes/cloud.cfg" + +sets +( + cloud + { + type patchCloud; + axis xyz; + points $points; + maxDistance $maxDistance; + patches $patches; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/cloud.cfg b/etc/caseDicts/postProcessing/probes/cloud.cfg new file mode 100644 index 0000000000..87cd5e7bd8 --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/cloud.cfg @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cloud.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type sets; +functionObjectLibs ("libsampling.so"); + +enabled true; +outputControl outputTime; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/internalCloud b/etc/caseDicts/postProcessing/probes/internalCloud new file mode 100644 index 0000000000..8a914bbd57 --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/internalCloud @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object internalCloud; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +internalCloud +{ + fields ( p U ); + points + ( + (0 0 0) + ); + + #includeEtc "caseDicts/postProcessing/probes/internalCloud.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/internalCloud.cfg b/etc/caseDicts/postProcessing/probes/internalCloud.cfg new file mode 100644 index 0000000000..e0e60d206a --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/internalCloud.cfg @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object internalCloud.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/postProcessing/probes/cloud.cfg" + +sets +( + cloud + { + type cloud; + axis xyz; + points $points; + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/probes b/etc/caseDicts/postProcessing/probes/probes new file mode 100644 index 0000000000..774deb5d80 --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/probes @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object probes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + fields ( p U ); + probeLocations + ( + (0 0 0) + ); + + #includeEtc "caseDicts/postProcessing/probes/probes.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/probes.cfg b/etc/caseDicts/postProcessing/probes/probes.cfg new file mode 100644 index 0000000000..462851bd10 --- /dev/null +++ b/etc/caseDicts/postProcessing/probes/probes.cfg @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object probes.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type probes; +functionObjectLibs ("libsampling.so"); + +enabled true; +outputControl timeStep; +outputInterval 1; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/scalarTransport/T b/etc/caseDicts/postProcessing/scalarTransport/T new file mode 100644 index 0000000000..44fcc9ac00 --- /dev/null +++ b/etc/caseDicts/postProcessing/scalarTransport/T @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Tinlet 1; + +dimensions [0 0 0 0 0 0 0]; // T can represent any scalar + // with any dimensional units +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform $Tinlet; + } + + ".*" + { + type zeroGradient; + } + + #includeEtc "caseDicts/setConstraintTypes" + +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/scalarTransport/scalarTransport b/etc/caseDicts/postProcessing/scalarTransport/scalarTransport new file mode 100644 index 0000000000..50d63e2cd4 --- /dev/null +++ b/etc/caseDicts/postProcessing/scalarTransport/scalarTransport @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object scalarTransport.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +T +{ + #includeEtc "caseDicts/postProcessing/scalarTransport/scalarTransport.cfg" + + userDT true; + DT 1e-09; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/scalarTransport/scalarTransport.cfg b/etc/caseDicts/postProcessing/scalarTransport/scalarTransport.cfg new file mode 100644 index 0000000000..425b921da9 --- /dev/null +++ b/etc/caseDicts/postProcessing/scalarTransport/scalarTransport.cfg @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object scalarTransport.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type scalarTransport; +functionObjectLibs ("libutilityFunctionObjects.so"); + +enabled true; +outputControl timeStep; +writeInterval 1; + +write true; +log false; + +resetOnStartUp false; +autoSchemes true; +fvOptions {}; + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict b/etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict new file mode 100644 index 0000000000..f33d51229d --- /dev/null +++ b/etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object scalarTransportDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// controlDict settings +startTime 0; + +stopAt endTime; +endTime 1; + +deltaT 1e-4; + +writeControl runTime; +writeInterval 1e-2; + +// transportProperties settings +DT DT [ 0 2 -1 0 0 0 0 ] 1e-9; + +#includeEtc "caseDicts/postProcessing/scalarTransport/scalarTransportDict.cfg" + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict.cfg b/etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict.cfg new file mode 100644 index 0000000000..010290ff68 --- /dev/null +++ b/etc/caseDicts/postProcessing/scalarTransport/scalarTransportDict.cfg @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object scalarTransportDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// fvSchemes settings +ddtSchemes +{ + default Euler; +} +divSchemes +{ + div(phi,T) Gauss limitedLinear 1; +} + +// fvSolution settings +solvers +{ + T + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0; + } +} + +relaxationFactors +{ + fields + { + } + equations + { + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualization/streamlines b/etc/caseDicts/postProcessing/visualization/streamlines new file mode 100644 index 0000000000..64ac9ff3f4 --- /dev/null +++ b/etc/caseDicts/postProcessing/visualization/streamlines @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object streamlines.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +streamlines +{ + nLines 20; + start (0 -4 1e-06); // Ensure that points do not coincide with + end (0 4 1e-06); // mesh faces, but instead lie inside cells + fields ( U p ); + + // Must be last entry + #includeEtc "caseDicts/postProcessing/visualization/streamlines.cfg" +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualization/streamlines.cfg b/etc/caseDicts/postProcessing/visualization/streamlines.cfg new file mode 100644 index 0000000000..8673f72217 --- /dev/null +++ b/etc/caseDicts/postProcessing/visualization/streamlines.cfg @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object streamlines.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type streamLine; +functionObjectLibs ( "libfieldFunctionObjects.so" ); + +outputControl outputTime; + +setFormat vtk; +UName U; +trackForward true; + +lifeTime 10000; +nSubCycle 5; + +cloudName particleTracks; +seedSampleSet uniform; +uniformCoeffs +{ + type uniform; + axis x; + start $start; + end $end; + nPoints $nLines; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualization/surfaces b/etc/caseDicts/postProcessing/visualization/surfaces new file mode 100644 index 0000000000..45ce485057 --- /dev/null +++ b/etc/caseDicts/postProcessing/visualization/surfaces @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object surfaces.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +surfaces +{ + #includeEtc "caseDicts/postProcessing/visualization/surfaces.cfg" + + fields ( p U ); + + surfaces + ( + xNormal + { + $cuttingPlane; + } + + yNormal + { + $cuttingPlane; + pointAndNormalDict + { + normalVector $y; // Overrides default normalVector (1 0 0) + } // $y: macro for (0 1 0) + } + + zNormal + { + $cuttingPlane; + pointAndNormalDict + { + basePoint (0 0 2); // Overrides default basePoint (0 0 0) + normalVector $z; // $y: macro for (0 0 1) + } + } + + p100 + { + $isosurface; + isoField p; + isoValue 100; + } + + CAD + { + $patchSurface; + patches ( CAD ); + } + ); +} + +// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/visualization/surfaces.cfg b/etc/caseDicts/postProcessing/visualization/surfaces.cfg new file mode 100644 index 0000000000..cdd1cefc08 --- /dev/null +++ b/etc/caseDicts/postProcessing/visualization/surfaces.cfg @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object surfaces.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type surfaces; +functionObjectLibs ("libsampling.so"); + +enabled true; +outputControl outputTime; + +surfaceFormat vtk; +interpolationScheme cellPoint; + +x (1 0 0); +y (0 1 0); +z (0 0 1); +origin (0 0 0); + +cuttingPlane +{ + type cuttingPlane; + planeType pointAndNormal; + pointAndNormalDict + { + basePoint $origin; + normalVector $x; + } + interpolate true; +} + +isosurface +{ + type isoSurface; + interpolate true; +} + +patchSurface +{ + type patch; + interpolate true; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/surface/surfaceFeatureExtractDict.cfg b/etc/caseDicts/surface/surfaceFeatureExtractDict.cfg new file mode 100644 index 0000000000..2930d18410 --- /dev/null +++ b/etc/caseDicts/surface/surfaceFeatureExtractDict.cfg @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object surfaceFeatureExtractDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +extractionMethod extractFromSurface; + +extractFromSurfaceCoeffs +{ + includedAngle 150; + geometricTestOnly no; +} + +subsetFeatures +{ + nonManifoldEdges yes; + openEdges yes; +} + +writeObj yes; + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/Make/files b/src/postProcessing/functionObjects/utilities/Make/files index 43e5bc68eb..4c38b4ba67 100644 --- a/src/postProcessing/functionObjects/utilities/Make/files +++ b/src/postProcessing/functionObjects/utilities/Make/files @@ -21,6 +21,9 @@ dsmcFields/dsmcFieldsFunctionObject.C pressureTools/pressureTools.C pressureTools/pressureToolsFunctionObject.C +residuals/residuals.C +residuals/residualsFunctionObject.C + scalarTransport/scalarTransport.C scalarTransport/scalarTransportFunctionObject.C diff --git a/src/postProcessing/functionObjects/utilities/residuals/IOresiduals.H b/src/postProcessing/functionObjects/utilities/residuals/IOresiduals.H new file mode 100644 index 0000000000..1f74ab27a3 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/residuals/IOresiduals.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 . + +Typedef + Foam::IOresiduals + +Description + Instance of the generic IOOutputFilter for residuals. + +\*---------------------------------------------------------------------------*/ + +#ifndef IOresiduals_H +#define IOresiduals_H + +#include "residuals.H" +#include "IOOutputFilter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef IOOutputFilter IOresiduals; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/residuals/residuals.C b/src/postProcessing/functionObjects/utilities/residuals/residuals.C new file mode 100644 index 0000000000..64ac3690b6 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/residuals/residuals.C @@ -0,0 +1,153 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 . + +\*---------------------------------------------------------------------------*/ + +#include "residuals.H" +#include "volFields.H" +#include "dictionary.H" +#include "Time.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(residuals, 0); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::residuals::residuals +( + const word& name, + const objectRegistry& obr, + const dictionary& dict, + const bool loadFromFiles +) +: + functionObjectFile(obr, name, typeName), + name_(name), + obr_(obr), + active_(true), + fieldSet_() +{ + // Check if the available mesh is an fvMesh otherwise deactivate + if (!isA(obr_)) + { + active_ = false; + WarningIn + ( + "residuals::residuals" + "(" + "const word&, " + "const objectRegistry&, " + "const dictionary&, " + "const bool" + ")" + ) << "No fvMesh available, deactivating " << name_ + << endl; + } + + read(dict); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::residuals::~residuals() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::residuals::read(const dictionary& dict) +{ + if (active_) + { + dict.lookup("fields") >> fieldSet_; + } +} + + +void Foam::residuals::writeFileHeader(const label i) +{ + if (Pstream::master()) + { + writeHeader(file(), "Residuals"); + writeCommented(file(), "Time"); + + forAll(fieldSet_, fieldI) + { + writeTabbed(file(), fieldSet_[fieldI]); + } + + file() << endl; + } +} + + +void Foam::residuals::execute() +{ + // Do nothing - only valid on write +} + + +void Foam::residuals::end() +{ + // Do nothing - only valid on write +} + + +void Foam::residuals::timeSet() +{ + // Do nothing - only valid on write +} + + +void Foam::residuals::write() +{ + if (active_) + { + functionObjectFile::write(); + + if (Pstream::master()) + { + file()<< obr_.time().value(); + + forAll(fieldSet_, fieldI) + { + const word& fieldName = fieldSet_[fieldI]; + + writeResidual(fieldName); + writeResidual(fieldName); + writeResidual(fieldName); + writeResidual(fieldName); + writeResidual(fieldName); + } + + file() << endl; + } + } +} + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/residuals/residuals.H b/src/postProcessing/functionObjects/utilities/residuals/residuals.H new file mode 100644 index 0000000000..cb3d69cabd --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/residuals/residuals.H @@ -0,0 +1,196 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 . + +Class + Foam::residuals + +Group + grpUtilitiesFunctionObjects + +Description + This function object writes out the initial residual for specified fields. + + Example of function object specification: + \verbatim + residuals + { + type residuals; + outputControl timeStep; + outputInterval 1; + fields + ( + U + p + ); + } + \endverbatim + + Output data is written to the dir postProcessing/residuals/\/ + For vector/tensor fields, e.g. U, where an equation is solved for each + component, the largest residual of each component is written out. + +SeeAlso + Foam::functionObject + Foam::OutputFilterFunctionObject + +SourceFiles + residuals.C + IOresiduals.H + +\*---------------------------------------------------------------------------*/ + +#ifndef residuals_H +#define residuals_H + +#include "functionObjectFile.H" +#include "primitiveFieldsFwd.H" +#include "volFieldsFwd.H" +#include "HashSet.H" +#include "OFstream.H" +#include "Switch.H" +#include "NamedEnum.H" +#include "solverPerformance.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class objectRegistry; +class dictionary; +class polyMesh; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class residuals Declaration +\*---------------------------------------------------------------------------*/ + +class residuals +: + public functionObjectFile +{ +protected: + + // Protected data + + //- Name of this set of residuals + // Also used as the name of the output directory + word name_; + + const objectRegistry& obr_; + + //- on/off switch + bool active_; + + //- Fields to write residuals + wordList fieldSet_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + residuals(const residuals&); + + //- Disallow default bitwise assignment + void operator=(const residuals&); + + //- Output file header information + virtual void writeFileHeader(const label i); + + +public: + + //- Runtime type information + TypeName("residuals"); + + + // Constructors + + //- Construct for given objectRegistry and dictionary. + // Allow the possibility to load fields from files + residuals + ( + const word& name, + const objectRegistry&, + const dictionary&, + const bool loadFromFiles = false + ); + + + //- Destructor + virtual ~residuals(); + + + // Member Functions + + //- Return name of the set of field min/max + virtual const word& name() const + { + return name_; + } + + //- Read the field min/max data + virtual void read(const dictionary&); + + //- Execute, currently does nothing + virtual void execute(); + + //- Execute at the final time-loop, currently does nothing + virtual void end(); + + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + + //- Calculate the field min/max + template + void writeResidual(const word& fieldName); + + //- Write the residuals + virtual void write(); + + //- Update for changes of mesh + virtual void updateMesh(const mapPolyMesh&) + {} + + //- Update for changes of mesh + virtual void movePoints(const polyMesh&) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "residualsTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/residuals/residualsFunctionObject.C b/src/postProcessing/functionObjects/utilities/residuals/residualsFunctionObject.C new file mode 100644 index 0000000000..ffec5c4604 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/residuals/residualsFunctionObject.C @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 . + +\*---------------------------------------------------------------------------*/ + +#include "residualsFunctionObject.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineNamedTemplateTypeNameAndDebug(residualsFunctionObject, 0); + + addToRunTimeSelectionTable + ( + functionObject, + residualsFunctionObject, + dictionary + ); +} + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/residuals/residualsFunctionObject.H b/src/postProcessing/functionObjects/utilities/residuals/residualsFunctionObject.H new file mode 100644 index 0000000000..9bc49f984e --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/residuals/residualsFunctionObject.H @@ -0,0 +1,54 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 . + +Typedef + Foam::residualsFunctionObject + +Description + FunctionObject wrapper around residuals to allow them to be created via + the functions entry within controlDict. + +SourceFiles + residualsFunctionObject.C + +\*---------------------------------------------------------------------------*/ + +#ifndef residualsFunctionObject_H +#define residualsFunctionObject_H + +#include "residuals.H" +#include "OutputFilterFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef OutputFilterFunctionObject + residualsFunctionObject; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C b/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C new file mode 100644 index 0000000000..4d7c0c032e --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 . + +\*---------------------------------------------------------------------------*/ + +#include "residuals.H" +#include "volFields.H" +#include "dictionary.H" +#include "Time.H" +#include "ListOps.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +void Foam::residuals::writeResidual +( + const word& fieldName +) +{ + typedef GeometricField fieldType; + + if (obr_.foundObject(fieldName)) + { + const fieldType& field = obr_.lookupObject(fieldName); + const fvMesh& mesh = field.mesh(); + const Foam::dictionary& solverDict = mesh.solverPerformanceDict(); + + if (solverDict.found(fieldName)) + { + const List sp(solverDict.lookup(fieldName)); + const scalar residual = sp.first().initialResidual(); + file() << token::TAB << residual; + } + } +} + + +// ************************************************************************* //