diff --git a/etc/templates/axisymmetricJet/system/controlDict b/etc/templates/axisymmetricJet/system/controlDict index 0615c921ba..403832c843 100644 --- a/etc/templates/axisymmetricJet/system/controlDict +++ b/etc/templates/axisymmetricJet/system/controlDict @@ -49,9 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ - #include "graph" -} // ************************************************************************* // diff --git a/etc/templates/axisymmetricJet/system/functions b/etc/templates/axisymmetricJet/system/functions new file mode 100644 index 0000000000..e100694a17 --- /dev/null +++ b/etc/templates/axisymmetricJet/system/functions @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +#include "graph" + +// ************************************************************************* // diff --git a/etc/templates/closedVolume/system/controlDict b/etc/templates/closedVolume/system/controlDict index 8cd4ef22a5..e045abd916 100644 --- a/etc/templates/closedVolume/system/controlDict +++ b/etc/templates/closedVolume/system/controlDict @@ -49,8 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ -} // ************************************************************************* // diff --git a/etc/templates/closedVolume/system/functions b/etc/templates/closedVolume/system/functions new file mode 100644 index 0000000000..01ca7cf475 --- /dev/null +++ b/etc/templates/closedVolume/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +// ************************************************************************* // diff --git a/etc/templates/closedVolumeRotating/system/controlDict b/etc/templates/closedVolumeRotating/system/controlDict index d2fd07959c..1e11c8535a 100644 --- a/etc/templates/closedVolumeRotating/system/controlDict +++ b/etc/templates/closedVolumeRotating/system/controlDict @@ -49,8 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ -} // ************************************************************************* // diff --git a/etc/templates/closedVolumeRotating/system/functions b/etc/templates/closedVolumeRotating/system/functions new file mode 100644 index 0000000000..01ca7cf475 --- /dev/null +++ b/etc/templates/closedVolumeRotating/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +// ************************************************************************* // diff --git a/etc/templates/compressibleInflowOutflow/system/controlDict b/etc/templates/compressibleInflowOutflow/system/controlDict index 5e9cd8355f..d66f2f9f00 100644 --- a/etc/templates/compressibleInflowOutflow/system/controlDict +++ b/etc/templates/compressibleInflowOutflow/system/controlDict @@ -45,8 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ -} // ************************************************************************* // diff --git a/etc/templates/compressibleInflowOutflow/system/functions b/etc/templates/compressibleInflowOutflow/system/functions new file mode 100644 index 0000000000..bcbc97b6be --- /dev/null +++ b/etc/templates/compressibleInflowOutflow/system/functions @@ -0,0 +1,16 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/etc/templates/inflowOutflow/system/controlDict b/etc/templates/inflowOutflow/system/controlDict index d2fd07959c..1e11c8535a 100644 --- a/etc/templates/inflowOutflow/system/controlDict +++ b/etc/templates/inflowOutflow/system/controlDict @@ -49,8 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ -} // ************************************************************************* // diff --git a/etc/templates/inflowOutflow/system/functions b/etc/templates/inflowOutflow/system/functions new file mode 100644 index 0000000000..01ca7cf475 --- /dev/null +++ b/etc/templates/inflowOutflow/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +// ************************************************************************* // diff --git a/etc/templates/inflowOutflowRotating/system/controlDict b/etc/templates/inflowOutflowRotating/system/controlDict index d2fd07959c..1e11c8535a 100644 --- a/etc/templates/inflowOutflowRotating/system/controlDict +++ b/etc/templates/inflowOutflowRotating/system/controlDict @@ -49,8 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ -} // ************************************************************************* // diff --git a/etc/templates/inflowOutflowRotating/system/functions b/etc/templates/inflowOutflowRotating/system/functions new file mode 100644 index 0000000000..01ca7cf475 --- /dev/null +++ b/etc/templates/inflowOutflowRotating/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/controlDict b/etc/templates/singleFluidCHT/system/controlDict index 258674f1ce..0ccd70e314 100644 --- a/etc/templates/singleFluidCHT/system/controlDict +++ b/etc/templates/singleFluidCHT/system/controlDict @@ -45,8 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ -} // ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/functions b/etc/templates/singleFluidCHT/system/functions new file mode 100644 index 0000000000..76649a93df --- /dev/null +++ b/etc/templates/singleFluidCHT/system/functions @@ -0,0 +1,18 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeIfPresent "regionSolvers" + +// ************************************************************************* // diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/functions b/src/functionObjects/field/fieldCoordinateSystemTransform/functions new file mode 100644 index 0000000000..aaf735dfb3 --- /dev/null +++ b/src/functionObjects/field/fieldCoordinateSystemTransform/functions @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fieldCoordinateSystemTransform1 +{ + // Type of functionObject + type fieldCoordinateSystemTransform; + + // Where to load it from (if not already in solver) + libs ("libfieldFunctionObjects.so"); + + // Function object enabled flag + enabled true; + + // When to output the average fields + writeControl writeTime; + + // Fields to be transformed - runTime modifiable + fields + ( + U + UMean + UPrime2Mean + ); + + coordinateSystem + { + origin (0 0 0); + coordinateRotation + { + type axesRotation; + e1 (1 0.15 0); + e3 (0 0 -1); + } + } +} + +// ************************************************************************* // diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict b/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict deleted file mode 100644 index 6625275d96..0000000000 --- a/src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict +++ /dev/null @@ -1,53 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - format ascii; - class dictionary; - object postProcessingDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -functions -{ - fieldCoordinateSystemTransform1 - { - // Type of functionObject - type fieldCoordinateSystemTransform; - - // Where to load it from (if not already in solver) - libs ("libfieldFunctionObjects.so"); - - // Function object enabled flag - enabled true; - - // When to output the average fields - writeControl writeTime; - - // Fields to be transformed - runTime modifiable - fields - ( - U - UMean - UPrime2Mean - ); - - coordinateSystem - { - origin (0 0 0); - coordinateRotation - { - type axesRotation; - e1 (1 0.15 0); - e3 (0 0 -1); - } - } - } -} - -// ************************************************************************* // diff --git a/src/functionObjects/field/processorField/postProcessingDict b/src/functionObjects/field/processorField/functions similarity index 59% rename from src/functionObjects/field/processorField/postProcessingDict rename to src/functionObjects/field/processorField/functions index d1b42eb680..42d8644c52 100644 --- a/src/functionObjects/field/processorField/postProcessingDict +++ b/src/functionObjects/field/processorField/functions @@ -9,26 +9,23 @@ FoamFile { format ascii; class dictionary; - object postProcessingDict; + object functions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -functions +processorField1 { - processorField1 - { - // Type of functionObject - type processorField; + // Type of functionObject + type processorField; - // Where to load it from (if not already in solver) - libs ("libfieldFunctionObjects.so"); + // Where to load it from (if not already in solver) + libs ("libfieldFunctionObjects.so"); - // Function object enabled flag - enabled true; + // Function object enabled flag + enabled true; - // When to output the average fields - writeControl writeTime; - } + // When to output the average fields + writeControl writeTime; } // ************************************************************************* // diff --git a/src/functionObjects/field/readFields/functions b/src/functionObjects/field/readFields/functions new file mode 100644 index 0000000000..c06e76e7d4 --- /dev/null +++ b/src/functionObjects/field/readFields/functions @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +readFields1 +{ + type readFields; + libs ("libfieldFunctionObjects.so"); + enabled true; + writeControl timeStep; + writeInterval 1; + + fields + ( + interpolateU + ); +} + +faceObj2 +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + enabled true; + writeControl timeStep; + writeInterval 1; + log true; + writeFields true; + select faceZone; + faceZone f0; + operation areaAverage; + + fields + ( + interpolateU + ); +} + +// ************************************************************************* // diff --git a/src/functionObjects/field/readFields/postProcessingDict b/src/functionObjects/field/readFields/postProcessingDict deleted file mode 100644 index 776033d8eb..0000000000 --- a/src/functionObjects/field/readFields/postProcessingDict +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - format ascii; - class dictionary; - object postProcessingDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -functions -{ - readFields1 - { - type readFields; - libs ("libfieldFunctionObjects.so"); - enabled true; - writeControl timeStep; - writeInterval 1; - - fields - ( - interpolateU - ); - } - - faceObj2 - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - enabled true; - writeControl timeStep; - writeInterval 1; - log true; - writeFields true; - select faceZone; - faceZone f0; - operation areaAverage; - - fields - ( - interpolateU - ); - } -} - -// ************************************************************************* // diff --git a/src/lagrangian/functionObjects/cloudInfo/postProcessingDict b/src/functionObjects/field/turbulenceFields/functions similarity index 67% rename from src/lagrangian/functionObjects/cloudInfo/postProcessingDict rename to src/functionObjects/field/turbulenceFields/functions index c1c7ec12bc..6e7b019e2c 100644 --- a/src/lagrangian/functionObjects/cloudInfo/postProcessingDict +++ b/src/functionObjects/field/turbulenceFields/functions @@ -9,22 +9,22 @@ FoamFile { format ascii; class dictionary; - object postProcessingDict; + object functions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -functions +turbulenceFields1 { - cloudInfo1 - { - type cloudInfo; - libs ("liblagrangianFunctionObjects.so"); - enabled true; - writeControl timeStep; - writeInterval 1; + type turbulenceFields; + libs ("libfieldFunctionObjects.so"); + enabled true; + writeControl timeStep; + writeInterval 1; - clouds (myCloud1); - } + fields + ( + R + ); } // ************************************************************************* // diff --git a/src/functionObjects/field/turbulenceFields/postProcessingDict b/src/lagrangian/functionObjects/cloudInfo/functions similarity index 66% rename from src/functionObjects/field/turbulenceFields/postProcessingDict rename to src/lagrangian/functionObjects/cloudInfo/functions index b180b8a5ef..5cbdd881ad 100644 --- a/src/functionObjects/field/turbulenceFields/postProcessingDict +++ b/src/lagrangian/functionObjects/cloudInfo/functions @@ -9,25 +9,19 @@ FoamFile { format ascii; class dictionary; - object postProcessingDict; + object functions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -functions +cloudInfo1 { - turbulenceFields1 - { - type turbulenceFields; - libs ("libfieldFunctionObjects.so"); - enabled true; - writeControl timeStep; - writeInterval 1; + type cloudInfo; + libs ("liblagrangianFunctionObjects.so"); + enabled true; + writeControl timeStep; + writeInterval 1; - fields - ( - R - ); - } + clouds (myCloud1); } // ************************************************************************* // diff --git a/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/controlDict b/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/controlDict index 479498f225..a295f70959 100644 --- a/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/controlDict +++ b/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/controlDict @@ -52,10 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc continuity - #includeFunc plot -} // ************************************************************************* // diff --git a/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/functions b/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/functions new file mode 100644 index 0000000000..c467f60f0c --- /dev/null +++ b/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc continuity +#includeFunc plot + +// ************************************************************************* // diff --git a/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/controlDict b/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/controlDict index 479498f225..a295f70959 100644 --- a/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/controlDict +++ b/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/controlDict @@ -52,10 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc continuity - #includeFunc plot -} // ************************************************************************* // diff --git a/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/functions b/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/functions new file mode 100644 index 0000000000..c467f60f0c --- /dev/null +++ b/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc continuity +#includeFunc plot + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/binaryBreakup/system/controlDict b/test/multiphaseEuler/populationBalance/binaryBreakup/system/controlDict index 300f6067f2..a8af6a183b 100644 --- a/test/multiphaseEuler/populationBalance/binaryBreakup/system/controlDict +++ b/test/multiphaseEuler/populationBalance/binaryBreakup/system/controlDict @@ -52,15 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=bubbles, - functionType=numberDensity, - coordinateType=volume - ) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/binaryBreakup/system/functions b/test/multiphaseEuler/populationBalance/binaryBreakup/system/functions new file mode 100644 index 0000000000..a9caf944a8 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/binaryBreakup/system/functions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=bubbles, + functionType=numberDensity, + coordinateType=volume +) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/breakup/system/controlDict b/test/multiphaseEuler/populationBalance/breakup/system/controlDict index 300f6067f2..a8af6a183b 100644 --- a/test/multiphaseEuler/populationBalance/breakup/system/controlDict +++ b/test/multiphaseEuler/populationBalance/breakup/system/controlDict @@ -52,15 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=bubbles, - functionType=numberDensity, - coordinateType=volume - ) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/breakup/system/functions b/test/multiphaseEuler/populationBalance/breakup/system/functions new file mode 100644 index 0000000000..a9caf944a8 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/breakup/system/functions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=bubbles, + functionType=numberDensity, + coordinateType=volume +) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/coalescence/system/controlDict b/test/multiphaseEuler/populationBalance/coalescence/system/controlDict index 97146ca745..534aacc8ae 100644 --- a/test/multiphaseEuler/populationBalance/coalescence/system/controlDict +++ b/test/multiphaseEuler/populationBalance/coalescence/system/controlDict @@ -52,15 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=bubbles, - functionType=numberDensity, - coordinateType=volume - ) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/coalescence/system/functions b/test/multiphaseEuler/populationBalance/coalescence/system/functions new file mode 100644 index 0000000000..a9caf944a8 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/coalescence/system/functions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=bubbles, + functionType=numberDensity, + coordinateType=volume +) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/drift/system/controlDict b/test/multiphaseEuler/populationBalance/drift/system/controlDict index 400664e964..4e5cd83cb7 100644 --- a/test/multiphaseEuler/populationBalance/drift/system/controlDict +++ b/test/multiphaseEuler/populationBalance/drift/system/controlDict @@ -52,40 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=bubbles, - functionType=numberDensity, - coordinateType=volume - ) - - #includeFunc populationBalanceMoments - ( - populationBalance=bubbles, - momentType=integerMoment, - coordinateType=volume, - order=1 - ) - - #includeFunc populationBalanceMoments - ( - populationBalance=bubbles, - momentType=integerMoment, - coordinateType=volume, - order=0 - ) - - #includeFunc probes - ( - name=probes, - points=((0.5 0.5 0.5)), - integerMoment0(N,v).bubbles, - integerMoment1(N,v).bubbles, - writeControl=writeTime - ) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/drift/system/functions b/test/multiphaseEuler/populationBalance/drift/system/functions new file mode 100644 index 0000000000..a0b34f6c82 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/drift/system/functions @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=bubbles, + functionType=numberDensity, + coordinateType=volume +) + +#includeFunc populationBalanceMoments +( + populationBalance=bubbles, + momentType=integerMoment, + coordinateType=volume, + order=1 +) + +#includeFunc populationBalanceMoments +( + populationBalance=bubbles, + momentType=integerMoment, + coordinateType=volume, + order=0 +) + +#includeFunc probes +( + name=probes, + points=((0.5 0.5 0.5)), + integerMoment0(N,v).bubbles, + integerMoment1(N,v).bubbles, + writeControl=writeTime +) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/isothermalGrowth/system/controlDict b/test/multiphaseEuler/populationBalance/isothermalGrowth/system/controlDict index 03876a28fd..3d2eaae833 100644 --- a/test/multiphaseEuler/populationBalance/isothermalGrowth/system/controlDict +++ b/test/multiphaseEuler/populationBalance/isothermalGrowth/system/controlDict @@ -52,32 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc residuals - ( - p_rgh, - f3.air1.bubbles, - f9.air2.bubbles, - f15.air3.bubbles - ) - #includeFunc graphCell - ( - name=graph, - start=(0.05 0 0.05), - end=(0.05 1.0 0.05), - axis=y, - d.bubbles, - p, - alpha.air1, - alpha.air2, - alpha.air3, - alpha.bubbles - ) - #includeFunc cellZoneAverage - #includeFunc writeObjects(d.air1) - #includeFunc writeObjects(d.air2) - #includeFunc writeObjects(d.air3) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/isothermalGrowth/system/functions b/test/multiphaseEuler/populationBalance/isothermalGrowth/system/functions new file mode 100644 index 0000000000..c518f71fd0 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/isothermalGrowth/system/functions @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc residuals +( + p_rgh, + f3.air1.bubbles, + f9.air2.bubbles, + f15.air3.bubbles +) +#includeFunc graphCell +( + name=graph, + start=(0.05 0 0.05), + end=(0.05 1.0 0.05), + axis=y, + d.bubbles, + p, + alpha.air1, + alpha.air2, + alpha.air3, + alpha.bubbles +) +#includeFunc cellZoneAverage +#includeFunc writeObjects(d.air1) +#includeFunc writeObjects(d.air2) +#includeFunc writeObjects(d.air3) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/negativeDrift/system/controlDict b/test/multiphaseEuler/populationBalance/negativeDrift/system/controlDict index dfea24f181..3e6647dc31 100644 --- a/test/multiphaseEuler/populationBalance/negativeDrift/system/controlDict +++ b/test/multiphaseEuler/populationBalance/negativeDrift/system/controlDict @@ -52,40 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=bubbles, - functionType=numberDensity, - coordinateType=volume - ) - - #includeFunc populationBalanceMoments - ( - populationBalance=bubbles, - momentType=integerMoment, - coordinateType=volume, - order=1 - ) - - #includeFunc populationBalanceMoments - ( - populationBalance=bubbles, - momentType=integerMoment, - coordinateType=volume, - order=0 - ) - - #includeFunc probes - ( - name=probes, - points=((0.5 0.5 0.5)), - integerMoment0(N,v).bubbles, - integerMoment1(N,v).bubbles, - writeControl=writeTime - ) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/negativeDrift/system/functions b/test/multiphaseEuler/populationBalance/negativeDrift/system/functions new file mode 100644 index 0000000000..a0b34f6c82 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/negativeDrift/system/functions @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=bubbles, + functionType=numberDensity, + coordinateType=volume +) + +#includeFunc populationBalanceMoments +( + populationBalance=bubbles, + momentType=integerMoment, + coordinateType=volume, + order=1 +) + +#includeFunc populationBalanceMoments +( + populationBalance=bubbles, + momentType=integerMoment, + coordinateType=volume, + order=0 +) + +#includeFunc probes +( + name=probes, + points=((0.5 0.5 0.5)), + integerMoment0(N,v).bubbles, + integerMoment1(N,v).bubbles, + writeControl=writeTime +) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/controlDict b/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/controlDict index 78501c5390..a8af6a183b 100644 --- a/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/controlDict +++ b/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/controlDict @@ -52,25 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=bubbles, - functionType=numberDensity, - coordinateType=diameter, - normalise=yes - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=volumeDensity, - populationBalance=bubbles, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) -} // ************************************************************************* // diff --git a/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/functions b/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/functions new file mode 100644 index 0000000000..e271be6a97 --- /dev/null +++ b/test/multiphaseEuler/populationBalance/simultaneousCoalescenceAndBreakup/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=bubbles, + functionType=numberDensity, + coordinateType=diameter, + normalise=yes +) + +#includeFunc populationBalanceSizeDistribution +( + name=volumeDensity, + populationBalance=bubbles, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +// ************************************************************************* // diff --git a/test/multiphaseEuler/thermal/waterEvaporation/system/controlDict b/test/multiphaseEuler/thermal/waterEvaporation/system/controlDict index d92feb45ed..b52bbf72ee 100644 --- a/test/multiphaseEuler/thermal/waterEvaporation/system/controlDict +++ b/test/multiphaseEuler/thermal/waterEvaporation/system/controlDict @@ -52,10 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc continuity - #includeFunc plot -} // ************************************************************************* // diff --git a/test/multiphaseEuler/thermal/waterEvaporation/system/functions b/test/multiphaseEuler/thermal/waterEvaporation/system/functions new file mode 100644 index 0000000000..c467f60f0c --- /dev/null +++ b/test/multiphaseEuler/thermal/waterEvaporation/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc continuity +#includeFunc plot + +// ************************************************************************* // diff --git a/test/postProcessing/channel/system/controlDict b/test/postProcessing/channel/system/controlDict index 7ddd563042..f3ddc26ac2 100644 --- a/test/postProcessing/channel/system/controlDict +++ b/test/postProcessing/channel/system/controlDict @@ -58,386 +58,5 @@ cacheTemporaryObjects kEpsilon:G ); -combustionFunctions -{ - // Not possible to test here as it needs a case with a combustion model - //#includeFunc Qdot - - // Not possible to test here as it needs a XiFoam case - //#includeFunc XiReactionRate -} - -controlFunctions -{ - #includeFunc stopAtClockTime(stopTime=3600) - - #includeFunc stopAtFile - - #includeFunc time - - #includeFunc writeObjects(kEpsilon:G) -} - -fieldsFunctions -{ - #includeFunc age - - #includeFunc components(U) - - #includeFunc CourantNo - - #includeFunc ddt(p) - - #includeFunc div(phi) - - #includeFunc enstrophy - - // !!! Takes a list of fields, not a single field like most others. It has - // an inconsistent name convention; i.e., "Mean", rather than - // "mean()". It also does both "mean" and "prime2Mean". Consider - // fixing the output field naming and splitting into separate - // configurations for the different outputs. - #includeFunc fieldAverage(U, k, epsilon) - - #includeFunc flowType - - #includeFunc grad(p) - - #includeFunc Lambda2 - - #includeFunc MachNo - - #includeFunc mag(U) - - #includeFunc magSqr(U) - - #includeFunc PecletNo - - // Not possible to test here as it needs a multiphase case - //#includeFunc phaseMap - - #includeFunc Q - - #includeFunc randomise(U, magPerturbation=0.1) - - #includeFunc reconstruct(phi) - - #includeFunc scale(age, scale=0.1) - - #includeFunc shearStress - - #includeFunc streamFunction - - #includeFunc surfaceInterpolate(rho, result=rhof) - - #includeFunc totalEnthalpy - - #includeFunc turbulenceFields(nuEff, R, devTau) - - #includeFunc turbulenceIntensity - - #includeFunc vorticity - - #includeFunc wallHeatFlux - - #includeFunc wallHeatTransferCoeff(rho=1.225, Cp=1005, Pr=0.7, Prt=0.9) - - #includeFunc wallShearStress - - #includeFunc writeCellCentres - - #includeFunc writeCellVolumes - - // !!! Only writes the internal parts of vol fields. The name should really - // be less general to reflect this; e.g., writeInternalFieldsVTK. However, - // a better change would be further library-ise the internals of foamToVTK - // and incorporate it into this object so that it writes patches, surface - // fields, point fields, lagrangian, etc... Then we could deprecate - // foamToVTK in favour of this function. - #includeFunc writeVTK(U, p) - - #includeFunc yPlus -} - -fieldsOperationsFunctions -{ - // Operation sequence to compute normalised direction of velocity - // perturbation from mean - #includeFunc subtract(U, UMean, result=u) - #includeFunc uniform - ( - fieldType=volScalarField, - field=mag(smallU), - dimensions=[0 1 -1 0 0 0 0], - value=1e-16 - ) - #includeFunc add(mag(U), mag(smallU), result=stabilise(mag(U))) - #includeFunc divide(u, stabilise(mag(U)), result=uFrac) - - // Operation to compute a tensor by doing an outer vector product - #includeFunc multiply(U, u) - - // Operation sequence to compute the log of temperature divided by an - // ambient value - #includeFunc uniform - ( - fieldType=volScalarField, - field=Ta, - dimensions=[0 0 0 1 0 0 0], - value=297 - ) - #includeFunc divide(T, Ta) - #includeFunc log(divide(T,Ta)) -} - -forcesFunctions -{ - #includeFunc forcesIncompressible - ( - patches=(walls), - rhoInf=1.225, - CofR=(0 0 0), - pitchAxis=(0 1 0) - ) - - #includeFunc forceCoeffsIncompressible - ( - patches=(walls), - magUInf=20, - lRef=1, - Aref=1, - CofR=(0 0 0), - liftDir=(0 0 1), - dragDir=(1 0 0), - pitchAxis=(0 1 0) - ) - - #includeFunc forcesCompressible - ( - patches=(walls), - CofR=(0 0 0), - pitchAxis=(0 1 0) - ) - - #includeFunc forceCoeffsCompressible - ( - patches=(walls), - magUInf=20, - rhoInf=1.225, - lRef=1, - Aref=1, - CofR=(0 0 0), - liftDir=(0 0 1), - dragDir=(1 0 0), - pitchAxis=(0 1 0) - ) - - // Not possible to test here as it needs a multiphase Euler-Euler case - //#includeFunc phaseForces(phase=air) -} - -graphsFunctions -{ - #includeFunc graphUniform - ( - start=(-0.5 -0.5 0), - end=(0.5 0.5 0), - nPoints=100, - fields=(p U) - ) - - #includeFunc graphCell - ( - start=(-0.500001 -0.500001 0), - end=(0.500001 0.500001 0), - fields=(p U) - ) - - #includeFunc graphLayerAverage - ( - patches=(inlet), - axis=x, - fields=(p U) - ) -} - -lagrangianFunctions -{ - // Not possible to test here as it needs a DSMC case - //#includeFunc dsmcFields -} - -numericalFunctions -{ - #includeFunc residuals(p, U, h, k, epsilon) - - #includeFunc timeStep -} - -pressureFunctions -{ - #includeFunc divide(p, rho, result=kinematic(p)) - - #includeFunc staticPressureIncompressible(kinematic(p), rhoInf=1.2) - - #includeFunc totalPressureIncompressible(kinematic(p), rhoInf=1.2) - - #includeFunc totalPressureCompressible -} - -probesFunctions -{ - #includeFunc probes(points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)), p, U, T) - - #includeFunc internalProbes(points=((-0.2 -0.2 0) (0.2 0.2 0)), p, U, T) - - #includeFunc boundaryProbes - ( - points=((-0.2 -0.2 -0.04) (0.2 0.2 -0.04)), - maxDistance=0.02, - p, - U, - T - ) - - #includeFunc uniform - ( - fieldType=volScalarField, - field=alpha.dummy, - dimensions=[], - value=0.2 - ) - - #includeFunc interfaceHeight - ( - alpha=alpha.dummy, - points=((-0.2 -0.2 0) (0.2 0.2 0)) - ) -} - -solversFunctions -{ - #includeFunc scalarTransport(s, schemesField=h) - - #includeFunc phaseScalarTransport - ( - s.dummy, - solveAlphaPhi=yes, - p=p_rgh, - rho=rho, - schemesField=h - ) - - // Not possible to test here as not compatible with compressible solvers - //#includeFunc particles -} - -streamlinesFunctions -{ - #includeFunc streamlinesSphere - ( - centre=(0 0 0), - radius=0.1, - nPoints=100, - p, - U, - direction=forward - ) - - #includeFunc streamlinesLine - ( - start=(-0.5 -0.5 -0.05), - end=(0.5 0.5 0.05), - nPoints=100, - p, - U, - direction=backward - ) - - #includeFunc streamlinesPatch - ( - patch=inlet, - nPoints=100, - p, - U - ) - - #includeFunc streamlinesPoints - ( - points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)) - p, - U, - direction=forward - ) -} - -surfaceFunctions -{ - #includeFunc cutPlaneSurface(point=(0 0 0), normal=(0 0 1), p, U) - - #includeFunc isoSurface(isoField=nut, isoValue=0.1, p, U) - - #includeFunc patchSurface(patch=walls, p, U) -} - -surfaceFieldValueFunctions -{ - #includeFunc patchAverage(patch=inlet, k) - - #includeFunc patchIntegrate(patch=inlet, epsilon) - - #includeFunc patchFlowRate(patch=inlet) - - #includeFunc patchDifference(patch1=inlet, patch2=outlet, p) - - #includeFunc faceZoneAverage(faceZone=f0, U) - - #includeFunc faceZoneFlowRate(faceZone=f0) - - #includeFunc triSurfaceAverage(triSurface=mid.obj, p) - - #includeFunc triSurfaceVolumetricFlowRate(triSurface=mid.obj) - - #includeFunc triSurfaceDifference - ( - name1=nearInlet.obj, - name2=nearOutlet.obj, - p - ) -} - -volFieldValueFunctions -{ - #includeFunc cellMin(epsilon) - - #includeFunc cellMax(k) - - #includeFunc cellMinMag(U, writeLocation=yes) - - #includeFunc cellMaxMag(U, writeLocation=yes) - - #includeFunc volAverage(p) - - #includeFunc volIntegrate(rho) -} - -functions -{ - $combustionFunctions; - $controlFunctions; - $fieldsFunctions; - $fieldsOperationsFunctions; - $forcesFunctions; - $graphsFunctions; - $lagrangianFunctions; - $numericalFunctions; - $pressureFunctions; - $probesFunctions; - $solversFunctions; - $streamlinesFunctions; - $surfaceFunctions; - $surfaceFieldValueFunctions; - $volFieldValueFunctions; -} // ************************************************************************* // diff --git a/test/postProcessing/channel/system/functionSets b/test/postProcessing/channel/system/functionSets new file mode 100644 index 0000000000..2b4201e429 --- /dev/null +++ b/test/postProcessing/channel/system/functionSets @@ -0,0 +1,397 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionFunctions +{ + // Not possible to test here as it needs a case with a combustion model + //#includeFunc Qdot + + // Not possible to test here as it needs a XiFoam case + //#includeFunc XiReactionRate +} + +controlFunctions +{ + #includeFunc stopAtClockTime(stopTime=3600) + + #includeFunc stopAtFile + + #includeFunc time + + #includeFunc writeObjects(kEpsilon:G) +} + +fieldsFunctions +{ + #includeFunc age + + #includeFunc components(U) + + #includeFunc CourantNo + + #includeFunc ddt(p) + + #includeFunc div(phi) + + #includeFunc enstrophy + + // !!! Takes a list of fields, not a single field like most others. It has + // an inconsistent name convention; i.e., "Mean", rather than + // "mean()". It also does both "mean" and "prime2Mean". Consider + // fixing the output field naming and splitting into separate + // configurations for the different outputs. + #includeFunc fieldAverage(U, k, epsilon) + + #includeFunc flowType + + #includeFunc grad(p) + + #includeFunc Lambda2 + + #includeFunc MachNo + + #includeFunc mag(U) + + #includeFunc magSqr(U) + + #includeFunc PecletNo + + // Not possible to test here as it needs a multiphase case + //#includeFunc phaseMap + + #includeFunc Q + + #includeFunc randomise(U, magPerturbation=0.1) + + #includeFunc reconstruct(phi) + + #includeFunc scale(age, scale=0.1) + + #includeFunc shearStress + + #includeFunc streamFunction + + #includeFunc surfaceInterpolate(rho, result=rhof) + + #includeFunc totalEnthalpy + + #includeFunc turbulenceFields(nuEff, R, devTau) + + #includeFunc turbulenceIntensity + + #includeFunc vorticity + + #includeFunc wallHeatFlux + + #includeFunc wallHeatTransferCoeff(rho=1.225, Cp=1005, Pr=0.7, Prt=0.9) + + #includeFunc wallShearStress + + #includeFunc writeCellCentres + + #includeFunc writeCellVolumes + + // !!! Only writes the internal parts of vol fields. The name should really + // be less general to reflect this; e.g., writeInternalFieldsVTK. However, + // a better change would be further library-ise the internals of foamToVTK + // and incorporate it into this object so that it writes patches, surface + // fields, point fields, lagrangian, etc... Then we could deprecate + // foamToVTK in favour of this function. + #includeFunc writeVTK(U, p) + + #includeFunc yPlus +} + +fieldsOperationsFunctions +{ + // Operation sequence to compute normalised direction of velocity + // perturbation from mean + #includeFunc subtract(U, UMean, result=u) + #includeFunc uniform + ( + fieldType=volScalarField, + field=mag(smallU), + dimensions=[0 1 -1 0 0 0 0], + value=1e-16 + ) + #includeFunc add(mag(U), mag(smallU), result=stabilise(mag(U))) + #includeFunc divide(u, stabilise(mag(U)), result=uFrac) + + // Operation to compute a tensor by doing an outer vector product + #includeFunc multiply(U, u) + + // Operation sequence to compute the log of temperature divided by an + // ambient value + #includeFunc uniform + ( + fieldType=volScalarField, + field=Ta, + dimensions=[0 0 0 1 0 0 0], + value=297 + ) + #includeFunc divide(T, Ta) + #includeFunc log(divide(T,Ta)) +} + +forcesFunctions +{ + #includeFunc forcesIncompressible + ( + patches=(walls), + rhoInf=1.225, + CofR=(0 0 0), + pitchAxis=(0 1 0) + ) + + #includeFunc forceCoeffsIncompressible + ( + patches=(walls), + magUInf=20, + lRef=1, + Aref=1, + CofR=(0 0 0), + liftDir=(0 0 1), + dragDir=(1 0 0), + pitchAxis=(0 1 0) + ) + + #includeFunc forcesCompressible + ( + patches=(walls), + CofR=(0 0 0), + pitchAxis=(0 1 0) + ) + + #includeFunc forceCoeffsCompressible + ( + patches=(walls), + magUInf=20, + rhoInf=1.225, + lRef=1, + Aref=1, + CofR=(0 0 0), + liftDir=(0 0 1), + dragDir=(1 0 0), + pitchAxis=(0 1 0) + ) + + // Not possible to test here as it needs a multiphase Euler-Euler case + //#includeFunc phaseForces(phase=air) +} + +graphsFunctions +{ + #includeFunc graphUniform + ( + start=(-0.5 -0.5 0), + end=(0.5 0.5 0), + nPoints=100, + fields=(p U) + ) + + #includeFunc graphCell + ( + start=(-0.500001 -0.500001 0), + end=(0.500001 0.500001 0), + fields=(p U) + ) + + #includeFunc graphLayerAverage + ( + patches=(inlet), + axis=x, + fields=(p U) + ) +} + +lagrangianFunctions +{ + // Not possible to test here as it needs a DSMC case + //#includeFunc dsmcFields +} + +numericalFunctions +{ + #includeFunc residuals(p, U, h, k, epsilon) + + #includeFunc timeStep +} + +pressureFunctions +{ + #includeFunc divide(p, rho, result=kinematic(p)) + + #includeFunc staticPressureIncompressible(kinematic(p), rhoInf=1.2) + + #includeFunc totalPressureIncompressible(kinematic(p), rhoInf=1.2) + + #includeFunc totalPressureCompressible +} + +probesFunctions +{ + #includeFunc probes(points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)), p, U, T) + + #includeFunc internalProbes(points=((-0.2 -0.2 0) (0.2 0.2 0)), p, U, T) + + #includeFunc boundaryProbes + ( + points=((-0.2 -0.2 -0.04) (0.2 0.2 -0.04)), + maxDistance=0.02, + p, + U, + T + ) + + #includeFunc uniform + ( + fieldType=volScalarField, + field=alpha.dummy, + dimensions=[], + value=0.2 + ) + + #includeFunc interfaceHeight + ( + alpha=alpha.dummy, + points=((-0.2 -0.2 0) (0.2 0.2 0)) + ) +} + +solversFunctions +{ + #includeFunc scalarTransport(s, schemesField=h) + + #includeFunc phaseScalarTransport + ( + s.dummy, + solveAlphaPhi=yes, + p=p_rgh, + rho=rho, + schemesField=h + ) + + // Not possible to test here as not compatible with compressible solvers + //#includeFunc particles +} + +streamlinesFunctions +{ + #includeFunc streamlinesSphere + ( + centre=(0 0 0), + radius=0.1, + nPoints=100, + p, + U, + direction=forward + ) + + #includeFunc streamlinesLine + ( + start=(-0.5 -0.5 -0.05), + end=(0.5 0.5 0.05), + nPoints=100, + p, + U, + direction=backward + ) + + #includeFunc streamlinesPatch + ( + patch=inlet, + nPoints=100, + p, + U + ) + + #includeFunc streamlinesPoints + ( + points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)) + p, + U, + direction=forward + ) +} + +surfaceFunctions +{ + #includeFunc cutPlaneSurface(point=(0 0 0), normal=(0 0 1), p, U) + + #includeFunc isoSurface(isoField=nut, isoValue=0.1, p, U) + + #includeFunc patchSurface(patch=walls, p, U) +} + +surfaceFieldValueFunctions +{ + #includeFunc patchAverage(patch=inlet, k) + + #includeFunc patchIntegrate(patch=inlet, epsilon) + + #includeFunc patchFlowRate(patch=inlet) + + #includeFunc patchDifference(patch1=inlet, patch2=outlet, p) + + #includeFunc faceZoneAverage(faceZone=f0, U) + + #includeFunc faceZoneFlowRate(faceZone=f0) + + #includeFunc triSurfaceAverage(triSurface=mid.obj, p) + + #includeFunc triSurfaceVolumetricFlowRate(triSurface=mid.obj) + + #includeFunc triSurfaceDifference + ( + name1=nearInlet.obj, + name2=nearOutlet.obj, + p + ) +} + +volFieldValueFunctions +{ + #includeFunc cellMin(epsilon) + + #includeFunc cellMax(k) + + #includeFunc cellMinMag(U, writeLocation=yes) + + #includeFunc cellMaxMag(U, writeLocation=yes) + + #includeFunc volAverage(p) + + #includeFunc volIntegrate(rho) +} + +$combustionFunctions; +$controlFunctions; +$fieldsFunctions; +$fieldsOperationsFunctions; +$forcesFunctions; +$graphsFunctions; +$lagrangianFunctions; +$numericalFunctions; +$pressureFunctions; +$probesFunctions; +$solversFunctions; +$streamlinesFunctions; +$surfaceFunctions; +$surfaceFieldValueFunctions; +$volFieldValueFunctions; + +// ************************************************************************* // diff --git a/test/postProcessing/channel/system/functions b/test/postProcessing/channel/system/functions new file mode 100644 index 0000000000..9dd3e07af8 --- /dev/null +++ b/test/postProcessing/channel/system/functions @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +$functionSets!combustionFunctions; +$functionSets!controlFunctions; +$functionSets!fieldsFunctions; +$functionSets!fieldsOperationsFunctions; +$functionSets!forcesFunctions; +$functionSets!graphsFunctions; +$functionSets!lagrangianFunctions; +$functionSets!numericalFunctions; +$functionSets!pressureFunctions; +$functionSets!probesFunctions; +$functionSets!solversFunctions; +$functionSets!streamlinesFunctions; +$functionSets!surfaceFunctions; +$functionSets!surfaceFieldValueFunctions; +$functionSets!volFieldValueFunctions; + +// ************************************************************************* // diff --git a/tutorials/XiFluid/kivaTest/system/controlDict b/tutorials/XiFluid/kivaTest/system/controlDict index 1ff1e8bf38..0a8cd892bc 100644 --- a/tutorials/XiFluid/kivaTest/system/controlDict +++ b/tutorials/XiFluid/kivaTest/system/controlDict @@ -58,32 +58,5 @@ userTime rpm 1500; } -functions -{ - setDeltaT - { - type coded; - - // Load the library containing the 'coded' functionObject - libs ("libutilityFunctionObjects.so"); - - codeInclude - #{ - #include "volFields.H" - #}; - - codeExecute - #{ - const Time& runTime = mesh().time(); - if (runTime.userTimeValue() >= -15.0) - { - const_cast(runTime).setDeltaT - ( - runTime.userTimeToTime(0.025) - ); - } - #}; - } -} // ************************************************************************* // diff --git a/tutorials/XiFluid/kivaTest/system/functions b/tutorials/XiFluid/kivaTest/system/functions new file mode 100644 index 0000000000..bdcfe63300 --- /dev/null +++ b/tutorials/XiFluid/kivaTest/system/functions @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +setDeltaT +{ + type coded; + + // Load the library containing the 'coded' functionObject + libs ("libutilityFunctionObjects.so"); + + codeInclude + #{ + #include "volFields.H" + #}; + + codeExecute + #{ + const Time& runTime = mesh().time(); + if (runTime.userTimeValue() >= -15.0) + { + const_cast(runTime).setDeltaT + ( + runTime.userTimeToTime(0.025) + ); + } + #}; +} + +// ************************************************************************* // diff --git a/tutorials/compressibleVoF/ballValve/system/controlDict b/tutorials/compressibleVoF/ballValve/system/controlDict index 049116c868..fb6d4d0b01 100644 --- a/tutorials/compressibleVoF/ballValve/system/controlDict +++ b/tutorials/compressibleVoF/ballValve/system/controlDict @@ -52,41 +52,6 @@ maxCo 0.25; maxAlphaCo 0.25; -functions -{ - #includeFunc cutPlaneSurface - ( - point=(0 0 0), - normal=(0 0 1), - interpolate=no, - fields=(alpha.water p_rgh p T U k epsilon) - ) - - #includeFunc isoSurface - ( - isoField=alpha.water, - isoValue=0.5, - writeEmpty=yes - ) - - #includeFunc patchSurface(patch=".*(Walls|NonCouple)") - - cavitationVolume - { - type volFieldValue; - libs ("libfieldFunctionObjects.so"); - - writeControl timeStep; - writeInterval 1; - writeFields false; - - select all; - - operation volIntegrate; - - fields (alpha.vapour); - } -} // ************************************************************************* // diff --git a/tutorials/compressibleVoF/ballValve/system/functions b/tutorials/compressibleVoF/ballValve/system/functions new file mode 100644 index 0000000000..4cb7279ea4 --- /dev/null +++ b/tutorials/compressibleVoF/ballValve/system/functions @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc cutPlaneSurface +( + point=(0 0 0), + normal=(0 0 1), + interpolate=no, + fields=(alpha.water p_rgh p T U k epsilon) +) + +#includeFunc isoSurface +( + isoField=alpha.water, + isoValue=0.5, + writeEmpty=yes +) + +#includeFunc patchSurface(patch=".*(Walls|NonCouple)") + +cavitationVolume +{ + type volFieldValue; + libs ("libfieldFunctionObjects.so"); + + writeControl timeStep; + writeInterval 1; + writeFields false; + + select all; + + operation volIntegrate; + + fields (alpha.vapour); +} + +// ************************************************************************* // diff --git a/tutorials/compressibleVoF/sloshingTank2D/system/controlDict b/tutorials/compressibleVoF/sloshingTank2D/system/controlDict index ba113ca5ad..e3d988fe86 100644 --- a/tutorials/compressibleVoF/sloshingTank2D/system/controlDict +++ b/tutorials/compressibleVoF/sloshingTank2D/system/controlDict @@ -53,48 +53,6 @@ maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl writeTime; - probeLocations - ( - (0 9.95 19.77) - (0 -9.95 19.77) - ); - fixedLocations false; - fields - ( - p - ); - } - - wallPressure - { - type surfaces; - libs ("libsampling.so"); - writeControl writeTime; - surfaceFormat raw; - fields - ( - p - ); - interpolationScheme cellPoint; - - surfaces - ( - walls - { - type patch; - patches (walls); - triangulate false; - } - ); - } -} // ************************************************************************* // diff --git a/tutorials/compressibleVoF/sloshingTank2D/system/functions b/tutorials/compressibleVoF/sloshingTank2D/system/functions new file mode 100644 index 0000000000..23070730a2 --- /dev/null +++ b/tutorials/compressibleVoF/sloshingTank2D/system/functions @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl writeTime; + probeLocations + ( + (0 9.95 19.77) + (0 -9.95 19.77) + ); + fixedLocations false; + fields + ( + p + ); +} + +wallPressure +{ + type surfaces; + libs ("libsampling.so"); + writeControl writeTime; + surfaceFormat raw; + fields + ( + p + ); + interpolationScheme cellPoint; + + surfaces + ( + walls + { + type patch; + patches (walls); + triangulate false; + } + ); +} + +// ************************************************************************* // diff --git a/tutorials/fluid/BernardCells/system/controlDict b/tutorials/fluid/BernardCells/system/controlDict index 28efaab4c9..cd780e5d6d 100644 --- a/tutorials/fluid/BernardCells/system/controlDict +++ b/tutorials/fluid/BernardCells/system/controlDict @@ -46,10 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc residuals(p_rgh) - #includeFunc streamlinesLine(name=streamlines, start=(0 0.5 0), end=(9 0.5 0), nPoints=24, U) -} // ************************************************************************* // diff --git a/tutorials/fluid/BernardCells/system/functions b/tutorials/fluid/BernardCells/system/functions new file mode 100644 index 0000000000..64c06e7e8f --- /dev/null +++ b/tutorials/fluid/BernardCells/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc residuals(p_rgh) +#includeFunc streamlinesLine(name=streamlines, start=(0 0.5 0), end=(9 0.5 0), nPoints=24, U) + +// ************************************************************************* // diff --git a/tutorials/fluid/aerofoilNACA0012/system/controlDict b/tutorials/fluid/aerofoilNACA0012/system/controlDict index 2046a6185a..029de5f246 100644 --- a/tutorials/fluid/aerofoilNACA0012/system/controlDict +++ b/tutorials/fluid/aerofoilNACA0012/system/controlDict @@ -45,10 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc MachNo - #includeFunc residuals -} // ************************************************************************* // diff --git a/tutorials/fluid/aerofoilNACA0012/system/functions b/tutorials/fluid/aerofoilNACA0012/system/functions new file mode 100644 index 0000000000..8ef033859c --- /dev/null +++ b/tutorials/fluid/aerofoilNACA0012/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc MachNo +#includeFunc residuals + +// ************************************************************************* // diff --git a/tutorials/fluid/aerofoilNACA0012Steady/system/controlDict b/tutorials/fluid/aerofoilNACA0012Steady/system/controlDict index 6e44319099..d836a5842f 100644 --- a/tutorials/fluid/aerofoilNACA0012Steady/system/controlDict +++ b/tutorials/fluid/aerofoilNACA0012Steady/system/controlDict @@ -45,11 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc MachNo - #includeFunc residuals - #includeFunc forceCoeffsCompressible -} // ************************************************************************* // diff --git a/tutorials/fluid/aerofoilNACA0012Steady/system/functions b/tutorials/fluid/aerofoilNACA0012Steady/system/functions new file mode 100644 index 0000000000..b85dc0b7a5 --- /dev/null +++ b/tutorials/fluid/aerofoilNACA0012Steady/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc MachNo +#includeFunc residuals +#includeFunc forceCoeffsCompressible + +// ************************************************************************* // diff --git a/tutorials/fluid/blockedChannel/system/controlDict b/tutorials/fluid/blockedChannel/system/controlDict index 2d3b24f443..f4cd3a2c31 100644 --- a/tutorials/fluid/blockedChannel/system/controlDict +++ b/tutorials/fluid/blockedChannel/system/controlDict @@ -50,9 +50,5 @@ adjustTimeStep yes; maxCo 5; -functions -{ - #includeFunc scalarTransport(tracer) -} // ************************************************************************* // diff --git a/tutorials/fluid/blockedChannel/system/functions b/tutorials/fluid/blockedChannel/system/functions new file mode 100644 index 0000000000..1a5c53c4ee --- /dev/null +++ b/tutorials/fluid/blockedChannel/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc scalarTransport(tracer) + +// ************************************************************************* // diff --git a/tutorials/fluid/forwardStep/system/controlDict b/tutorials/fluid/forwardStep/system/controlDict index 74d5bf66cf..cbeba8a600 100644 --- a/tutorials/fluid/forwardStep/system/controlDict +++ b/tutorials/fluid/forwardStep/system/controlDict @@ -46,17 +46,6 @@ timePrecision 6; runTimeModifiable true; -functions -{ - libs ("libfieldFunctionObjects.so"); - - Ma - { - type MachNo; - executeControl writeTime; - writeControl writeTime; - } -} // ************************************************************************* // diff --git a/tutorials/fluid/forwardStep/system/functions b/tutorials/fluid/forwardStep/system/functions new file mode 100644 index 0000000000..accad3bc9b --- /dev/null +++ b/tutorials/fluid/forwardStep/system/functions @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs ("libfieldFunctionObjects.so"); + +Ma +{ + type MachNo; + executeControl writeTime; + writeControl writeTime; +} + +// ************************************************************************* // diff --git a/tutorials/fluid/helmholtzResonance/system/controlDict b/tutorials/fluid/helmholtzResonance/system/controlDict index ae1dc1996f..51cdf475d5 100644 --- a/tutorials/fluid/helmholtzResonance/system/controlDict +++ b/tutorials/fluid/helmholtzResonance/system/controlDict @@ -50,25 +50,5 @@ adjustTimeStep no; maxCo 0.5; -functions -{ - probes - { - libs ("libsampling.so"); - type probes; - name probes; - writeControl timeStep; - writeInterval 1; - fields (p); - probeLocations - ( - ( -0.045 0 0 ) - ( -0.045 0.020 0 ) - ( -0.010 0 0 ) - ( 0.0125 0 0 ) - ( 0.0125 0.020 0 ) - ); - } -} // ************************************************************************* // diff --git a/tutorials/fluid/helmholtzResonance/system/functions b/tutorials/fluid/helmholtzResonance/system/functions new file mode 100644 index 0000000000..3df030acf9 --- /dev/null +++ b/tutorials/fluid/helmholtzResonance/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + libs ("libsampling.so"); + type probes; + name probes; + writeControl timeStep; + writeInterval 1; + fields (p); + probeLocations + ( + ( -0.045 0 0 ) + ( -0.045 0.020 0 ) + ( -0.010 0 0 ) + ( 0.0125 0 0 ) + ( 0.0125 0.020 0 ) + ); +} + +// ************************************************************************* // diff --git a/tutorials/fluid/hotRoomComfort/system/controlDict b/tutorials/fluid/hotRoomComfort/system/controlDict index e00b97e5aa..7f272bb868 100644 --- a/tutorials/fluid/hotRoomComfort/system/controlDict +++ b/tutorials/fluid/hotRoomComfort/system/controlDict @@ -46,32 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - age - { - libs ("libfieldFunctionObjects.so"); - type age; - - diffusion on; - - writeControl writeTime; - executeControl writeTime; - } - - comfort - { - libs ("libfieldFunctionObjects.so"); - type comfort; - - clothing 0.5; - metabolicRate 1.2; - extWork 0; - relHumidity 60; - - writeControl writeTime; - executeControl writeTime; - } -} // ************************************************************************* // diff --git a/tutorials/fluid/hotRoomComfort/system/functions b/tutorials/fluid/hotRoomComfort/system/functions new file mode 100644 index 0000000000..4250c84aa6 --- /dev/null +++ b/tutorials/fluid/hotRoomComfort/system/functions @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +age +{ + libs ("libfieldFunctionObjects.so"); + type age; + + diffusion on; + + writeControl writeTime; + executeControl writeTime; +} + +comfort +{ + libs ("libfieldFunctionObjects.so"); + type comfort; + + clothing 0.5; + metabolicRate 1.2; + extWork 0; + relHumidity 60; + + writeControl writeTime; + executeControl writeTime; +} + +// ************************************************************************* // diff --git a/tutorials/fluid/nacaAirfoil/system/controlDict b/tutorials/fluid/nacaAirfoil/system/controlDict index 50de7b0d57..dfdca88e83 100644 --- a/tutorials/fluid/nacaAirfoil/system/controlDict +++ b/tutorials/fluid/nacaAirfoil/system/controlDict @@ -46,30 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - forces - { - type forceCoeffs; - libs ("libforces.so"); - writeControl timeStep; - writeInterval 1; - - patches - ( - WALL10 - ); - - log true; - rhoInf 1; - CofR (0 0 0); - liftDir (-0.239733 0.970839 0); - dragDir (0.970839 0.239733 0); - pitchAxis (0 0 1); - magUInf 618.022; - lRef 1; - Aref 1; - } -} // ************************************************************************* // diff --git a/tutorials/fluid/nacaAirfoil/system/functions b/tutorials/fluid/nacaAirfoil/system/functions new file mode 100644 index 0000000000..30adbab4f4 --- /dev/null +++ b/tutorials/fluid/nacaAirfoil/system/functions @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forceCoeffs; + libs ("libforces.so"); + writeControl timeStep; + writeInterval 1; + + patches + ( + WALL10 + ); + + log true; + rhoInf 1; + CofR (0 0 0); + liftDir (-0.239733 0.970839 0); + dragDir (0.970839 0.239733 0); + pitchAxis (0 0 1); + magUInf 618.022; + lRef 1; + Aref 1; +} + +// ************************************************************************* // diff --git a/tutorials/fluid/pitzDaily/system/controlDict b/tutorials/fluid/pitzDaily/system/controlDict index 524d5336f6..24774f7528 100644 --- a/tutorials/fluid/pitzDaily/system/controlDict +++ b/tutorials/fluid/pitzDaily/system/controlDict @@ -50,9 +50,5 @@ adjustTimeStep no; maxCo 0.5; -functions -{ - #includeFunc fieldAverage(U, p, prime2Mean = yes) -} // ************************************************************************* // diff --git a/tutorials/fluid/pitzDaily/system/functions b/tutorials/fluid/pitzDaily/system/functions new file mode 100644 index 0000000000..c4e3df0301 --- /dev/null +++ b/tutorials/fluid/pitzDaily/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U, p, prime2Mean = yes) + +// ************************************************************************* // diff --git a/tutorials/fluid/shockTube/system/controlDict b/tutorials/fluid/shockTube/system/controlDict index ef6c981834..83a8544cd9 100644 --- a/tutorials/fluid/shockTube/system/controlDict +++ b/tutorials/fluid/shockTube/system/controlDict @@ -46,9 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc mag(U) -} // ************************************************************************* // diff --git a/tutorials/fluid/shockTube/system/functions b/tutorials/fluid/shockTube/system/functions new file mode 100644 index 0000000000..efbe74a6e4 --- /dev/null +++ b/tutorials/fluid/shockTube/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc mag(U) + +// ************************************************************************* // diff --git a/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/controlDict b/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/controlDict index 6bd68145f8..9653c783af 100644 --- a/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/controlDict +++ b/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/controlDict @@ -46,13 +46,5 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - #includeFunc volIntegrate(cloud:alpha) - #includeFunc patchFlowRate(patch=lowerInlet, cloud:massFlux) - #includeFunc patchFlowRate(patch=upperInlet, cloud:massFlux) - #includeFunc faceZoneFlowRate(faceZone=mid, cloud:massFlux) - #includeFunc patchFlowRate(patch=outlet, cloud:massFlux) -} // ************************************************************************* // diff --git a/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/functions b/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/functions new file mode 100644 index 0000000000..edc53a294f --- /dev/null +++ b/tutorials/incompressibleDenseParticleFluid/injectionChannel/system/functions @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc volIntegrate(cloud:alpha) +#includeFunc patchFlowRate(patch=lowerInlet, cloud:massFlux) +#includeFunc patchFlowRate(patch=upperInlet, cloud:massFlux) +#includeFunc faceZoneFlowRate(faceZone=mid, cloud:massFlux) +#includeFunc patchFlowRate(patch=outlet, cloud:massFlux) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/T3A/system/controlDict b/tutorials/incompressibleFluid/T3A/system/controlDict index 1c62036e82..bccb28a915 100644 --- a/tutorials/incompressibleFluid/T3A/system/controlDict +++ b/tutorials/incompressibleFluid/T3A/system/controlDict @@ -46,29 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc wallShearStress - - #includeFunc graphUniform - ( - name=wallShearStressGraph, - start=(0.04075 0.00075 0), - end=(3.04 0.00075 0), - nPoints=100, - axis=x, - wallShearStress - ) - - #includeFunc graphUniform - ( - name=kGraph, - start=(0.04075 0.05 0), - end=(3.04 0.05 0), - nPoints=100, - axis=x, - k - ) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/T3A/system/functions b/tutorials/incompressibleFluid/T3A/system/functions new file mode 100644 index 0000000000..a0a3105f51 --- /dev/null +++ b/tutorials/incompressibleFluid/T3A/system/functions @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc wallShearStress + +#includeFunc graphUniform +( + name=wallShearStressGraph, + start=(0.04075 0.00075 0), + end=(3.04 0.00075 0), + nPoints=100, + axis=x, + wallShearStress +) + +#includeFunc graphUniform +( + name=kGraph, + start=(0.04075 0.05 0), + end=(3.04 0.05 0), + nPoints=100, + axis=x, + k +) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/TJunction/system/controlDict b/tutorials/incompressibleFluid/TJunction/system/controlDict index eaaf384c49..1f9e5083f4 100644 --- a/tutorials/incompressibleFluid/TJunction/system/controlDict +++ b/tutorials/incompressibleFluid/TJunction/system/controlDict @@ -50,41 +50,5 @@ adjustTimeStep yes; maxCo 5; -functions -{ - probes - { - // Where to load it from - libs ("libsampling.so"); - - type probes; - - // Name of the directory for probe data - name probes; - - // Write at same frequency as fields - writeControl writeTime; - writeInterval 1; - - // Fields to be probed - fields - ( - p U - ); - - probeLocations - ( - ( 1e-06 0 0.01 ) // at inlet - (0.21 -0.20999 0.01) // at outlet1 - (0.21 0.20999 0.01) // at outlet2 - (0.21 0 0.01) // at central block - ); - } - - #includeFunc patchFlowRate(patch=outlet1) - #includeFunc faceZoneFlowRate(faceZone=fz1) - #includeFunc patchFlowRate(patch=outlet2) - #includeFunc faceZoneFlowRate(faceZone=fz2) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/TJunction/system/functions b/tutorials/incompressibleFluid/TJunction/system/functions new file mode 100644 index 0000000000..575c63b783 --- /dev/null +++ b/tutorials/incompressibleFluid/TJunction/system/functions @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + // Where to load it from + libs ("libsampling.so"); + + type probes; + + // Name of the directory for probe data + name probes; + + // Write at same frequency as fields + writeControl writeTime; + writeInterval 1; + + // Fields to be probed + fields + ( + p U + ); + + probeLocations + ( + ( 1e-06 0 0.01 ) // at inlet + (0.21 -0.20999 0.01) // at outlet1 + (0.21 0.20999 0.01) // at outlet2 + (0.21 0 0.01) // at central block + ); +} + +#includeFunc patchFlowRate(patch=outlet1) +#includeFunc faceZoneFlowRate(faceZone=fz1) +#includeFunc patchFlowRate(patch=outlet2) +#includeFunc faceZoneFlowRate(faceZone=fz2) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/TJunctionFan/system/controlDict b/tutorials/incompressibleFluid/TJunctionFan/system/controlDict index 781af4efd3..a2a3c79968 100644 --- a/tutorials/incompressibleFluid/TJunctionFan/system/controlDict +++ b/tutorials/incompressibleFluid/TJunctionFan/system/controlDict @@ -50,33 +50,5 @@ adjustTimeStep yes; maxCo 3; -functions -{ - probes - { - // Where to load it from - libs ("libsampling.so"); - - type probes; - - // Name of the directory for probe data - name probes; - - // Write at same frequency as fields - writeControl writeTime; - writeInterval 1; - - // Fields to be probed - fields (p U); - - probeLocations - ( - ( 1e-06 0 0.01 ) // at inlet - (0.21 -0.20999 0.01) // at outlet1 - (0.21 0.20999 0.01) // at outlet2 - (0.21 0 0.01) // at central block - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/TJunctionFan/system/functions b/tutorials/incompressibleFluid/TJunctionFan/system/functions new file mode 100644 index 0000000000..dadd4313eb --- /dev/null +++ b/tutorials/incompressibleFluid/TJunctionFan/system/functions @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + // Where to load it from + libs ("libsampling.so"); + + type probes; + + // Name of the directory for probe data + name probes; + + // Write at same frequency as fields + writeControl writeTime; + writeInterval 1; + + // Fields to be probed + fields (p U); + + probeLocations + ( + ( 1e-06 0 0.01 ) // at inlet + (0.21 -0.20999 0.01) // at outlet1 + (0.21 0.20999 0.01) // at outlet2 + (0.21 0 0.01) // at central block + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/ballValve/system/controlDict b/tutorials/incompressibleFluid/ballValve/system/controlDict index 9365238d66..68991374c8 100644 --- a/tutorials/incompressibleFluid/ballValve/system/controlDict +++ b/tutorials/incompressibleFluid/ballValve/system/controlDict @@ -50,16 +50,6 @@ adjustTimeStep yes; maxCo 0.5; -functions -{ - #includeFunc patchFlowRate(name=inletFlowRate, patch=inlet) - #includeFunc patchFlowRate(name=lowerOutletFlowRate, patch=lowerOutlet) - #includeFunc patchFlowRate(name=upperOutletFlowRate, patch=upperOutlet) - #includeFunc scalarTransport(s) - #includeFunc reconstruct(phi) - #includeFunc streamlinesPatch(patch=inlet, nPoints=100, U=reconstruct(phi)) - #includeFunc wallsSurface -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/ballValve/system/functions b/tutorials/incompressibleFluid/ballValve/system/functions new file mode 100644 index 0000000000..1c713023ac --- /dev/null +++ b/tutorials/incompressibleFluid/ballValve/system/functions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchFlowRate(name=inletFlowRate, patch=inlet) +#includeFunc patchFlowRate(name=lowerOutletFlowRate, patch=lowerOutlet) +#includeFunc patchFlowRate(name=upperOutletFlowRate, patch=upperOutlet) +#includeFunc scalarTransport(s) +#includeFunc reconstruct(phi) +#includeFunc streamlinesPatch(patch=inlet, nPoints=100, U=reconstruct(phi)) +#includeFunc wallsSurface + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/blockedChannel/system/controlDict b/tutorials/incompressibleFluid/blockedChannel/system/controlDict index 78d3651c35..7cd1ca4afd 100644 --- a/tutorials/incompressibleFluid/blockedChannel/system/controlDict +++ b/tutorials/incompressibleFluid/blockedChannel/system/controlDict @@ -50,9 +50,5 @@ adjustTimeStep yes; maxCo 5; -functions -{ - #includeFunc scalarTransport(tracer) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/blockedChannel/system/functions b/tutorials/incompressibleFluid/blockedChannel/system/functions new file mode 100644 index 0000000000..1a5c53c4ee --- /dev/null +++ b/tutorials/incompressibleFluid/blockedChannel/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc scalarTransport(tracer) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/boxTurb16/system/controlDict b/tutorials/incompressibleFluid/boxTurb16/system/controlDict index 5d8fba0d29..93dda01e46 100644 --- a/tutorials/incompressibleFluid/boxTurb16/system/controlDict +++ b/tutorials/incompressibleFluid/boxTurb16/system/controlDict @@ -48,9 +48,5 @@ runTimeModifiable true; graphFormat raw; -functions -{ - #includeFunc enstrophy(executeAtStart=no); -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/boxTurb16/system/functions b/tutorials/incompressibleFluid/boxTurb16/system/functions new file mode 100644 index 0000000000..ebd2fe44a8 --- /dev/null +++ b/tutorials/incompressibleFluid/boxTurb16/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc enstrophy(executeAtStart=no); + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/channel395/system/controlDict b/tutorials/incompressibleFluid/channel395/system/controlDict index 9de7665592..52a933d141 100644 --- a/tutorials/incompressibleFluid/channel395/system/controlDict +++ b/tutorials/incompressibleFluid/channel395/system/controlDict @@ -46,34 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc fieldAverage(U, p, prime2Mean = yes) - - #includeFunc uniform - ( - fieldType = volScalarField, - field = half, - dimensions = [], - value = 0.5 - ) - - #includeFunc mag(UPrime2Mean) - - #includeFunc multiply(half, mag(UPrime2Mean), result = k) - - #includeFunc graphLayerAverage - ( - name = layerAverage, - patches = (bottomWall), - axis = y, - symmetric = yes, - pMean, - pPrime2Mean, - UMean, - UPrime2Mean, - k - ); -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/channel395/system/functions b/tutorials/incompressibleFluid/channel395/system/functions new file mode 100644 index 0000000000..3797c83b21 --- /dev/null +++ b/tutorials/incompressibleFluid/channel395/system/functions @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U, p, prime2Mean = yes) + +#includeFunc uniform +( + fieldType = volScalarField, + field = half, + dimensions = [], + value = 0.5 +) + +#includeFunc mag(UPrime2Mean) + +#includeFunc multiply(half, mag(UPrime2Mean), result = k) + +#includeFunc graphLayerAverage +( + name = layerAverage, + patches = (bottomWall), + axis = y, + symmetric = yes, + pMean, + pPrime2Mean, + UMean, + UPrime2Mean, + k +); + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/drivaerFastback/system/controlDict.orig b/tutorials/incompressibleFluid/drivaerFastback/system/controlDict.orig index 8a1432af7d..8fe1378539 100644 --- a/tutorials/incompressibleFluid/drivaerFastback/system/controlDict.orig +++ b/tutorials/incompressibleFluid/drivaerFastback/system/controlDict.orig @@ -49,38 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ - #includeFunc forceCoeffsIncompressible - - #includeFunc time - - #includeFunc streamlinesSphere - ( - name=streamlines, - centre=(4 0 0.7), - radius=1, - nPoints=30, - fields=(U) - ) - - #includeFunc cutPlaneSurface - ( - name=xNormal, - point=(4 0 1), - normal=(1 0 0), - fields=(p U) - ) - - #includeFunc cutPlaneSurface - ( - name=yNormal, - point=(-5 0.02 1), - normal=(0 1 0), - fields=(p U) - ) - - #includeFunc patchSurface(name=car, patch=".*(body|Wheels)", p) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/drivaerFastback/system/functions b/tutorials/incompressibleFluid/drivaerFastback/system/functions new file mode 100644 index 0000000000..e9e0728126 --- /dev/null +++ b/tutorials/incompressibleFluid/drivaerFastback/system/functions @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +#includeFunc forceCoeffsIncompressible + +#includeFunc time + +#includeFunc streamlinesSphere +( + name=streamlines, + centre=(4 0 0.7), + radius=1, + nPoints=30, + fields=(U) +) + +#includeFunc cutPlaneSurface +( + name=xNormal, + point=(4 0 1), + normal=(1 0 0), + fields=(p U) +) + +#includeFunc cutPlaneSurface +( + name=yNormal, + point=(-5 0.02 1), + normal=(0 1 0), + fields=(p U) +) + +#includeFunc patchSurface(name=car, patch=".*(body|Wheels)", p) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/flowWithOpenBoundary/system/controlDict b/tutorials/incompressibleFluid/flowWithOpenBoundary/system/controlDict index 843a0f84d6..b70d73228c 100644 --- a/tutorials/incompressibleFluid/flowWithOpenBoundary/system/controlDict +++ b/tutorials/incompressibleFluid/flowWithOpenBoundary/system/controlDict @@ -45,10 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc scalarTransport(T, alphal=1, alphat=1) - #includeFunc time -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/flowWithOpenBoundary/system/functions b/tutorials/incompressibleFluid/flowWithOpenBoundary/system/functions new file mode 100644 index 0000000000..f9d21ebc60 --- /dev/null +++ b/tutorials/incompressibleFluid/flowWithOpenBoundary/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc scalarTransport(T, alphal=1, alphat=1) +#includeFunc time + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/controlDict b/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/controlDict index ec79dd59ec..563e6fb7dc 100644 --- a/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/controlDict +++ b/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/controlDict @@ -48,13 +48,5 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - clouds - { - type fvModel; - #includeModel clouds(name=fvModel) - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/functions b/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/functions new file mode 100644 index 0000000000..16db122da7 --- /dev/null +++ b/tutorials/incompressibleFluid/hopperParticles/hopperEmptying/system/functions @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +clouds +{ + type fvModel; + #includeModel clouds(name=fvModel) +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/controlDict b/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/controlDict index dfa4d872f5..23258f9100 100644 --- a/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/controlDict +++ b/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/controlDict @@ -48,13 +48,5 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - clouds - { - type fvModel; - #includeModel clouds(name=fvModel) - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/functions b/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/functions new file mode 100644 index 0000000000..16db122da7 --- /dev/null +++ b/tutorials/incompressibleFluid/hopperParticles/hopperInitialState/system/functions @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +clouds +{ + type fvModel; + #includeModel clouds(name=fvModel) +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/impeller/system/controlDict b/tutorials/incompressibleFluid/impeller/system/controlDict index 30a24a5cea..59bc52e47d 100644 --- a/tutorials/incompressibleFluid/impeller/system/controlDict +++ b/tutorials/incompressibleFluid/impeller/system/controlDict @@ -50,25 +50,6 @@ adjustTimeStep yes; maxCo 1.0; -functions -{ - #includeFunc patchFlowRate(name=inletFlowRate, patch=inlet) - #includeFunc patchFlowRate(name=outletFlowRate, patch=outlet) - - cartesianToCylindrical - { - type cylindrical; - libs ("libfieldFunctionObjects.so"); - - origin (0 0 0); - axis (1 0 0); - - field U; - - writeControl writeTime; - writeInterval 1; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/impeller/system/functions b/tutorials/incompressibleFluid/impeller/system/functions new file mode 100644 index 0000000000..0729f0e985 --- /dev/null +++ b/tutorials/incompressibleFluid/impeller/system/functions @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchFlowRate(name=inletFlowRate, patch=inlet) +#includeFunc patchFlowRate(name=outletFlowRate, patch=outlet) + +cartesianToCylindrical +{ + type cylindrical; + libs ("libfieldFunctionObjects.so"); + + origin (0 0 0); + axis (1 0 0); + + field U; + + writeControl writeTime; + writeInterval 1; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/mixerVessel2D/system/controlDict b/tutorials/incompressibleFluid/mixerVessel2D/system/controlDict index 63f1eafafb..27948afbcc 100644 --- a/tutorials/incompressibleFluid/mixerVessel2D/system/controlDict +++ b/tutorials/incompressibleFluid/mixerVessel2D/system/controlDict @@ -50,40 +50,6 @@ adjustTimeStep yes; maxCo 0.5; -functions -{ - cartesianToCylindrical - { - type cylindrical; - libs ("libfieldFunctionObjects.so"); - - origin (0 0 0); - axis (0 0 1); - - field U; - - writeControl writeTime; - writeInterval 1; - } - - #includeFunc fieldAverage(cylindrical(U)) - - cylindricalToCartesian - { - type cylindrical; - libs ("libfieldFunctionObjects.so"); - - origin (0 0 0); - axis (0 0 1); - - field cylindrical(U)Mean; - toCartesian true; - result UMean; - - writeControl writeTime; - writeInterval 1; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/mixerVessel2D/system/functions b/tutorials/incompressibleFluid/mixerVessel2D/system/functions new file mode 100644 index 0000000000..051a259698 --- /dev/null +++ b/tutorials/incompressibleFluid/mixerVessel2D/system/functions @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cartesianToCylindrical +{ + type cylindrical; + libs ("libfieldFunctionObjects.so"); + + origin (0 0 0); + axis (0 0 1); + + field U; + + writeControl writeTime; + writeInterval 1; +} + +#includeFunc fieldAverage(cylindrical(U)) + +cylindricalToCartesian +{ + type cylindrical; + libs ("libfieldFunctionObjects.so"); + + origin (0 0 0); + axis (0 0 1); + + field cylindrical(U)Mean; + toCartesian true; + result UMean; + + writeControl writeTime; + writeInterval 1; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/controlDict b/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/controlDict index f100144446..f9bd5f1c0a 100644 --- a/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/controlDict +++ b/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/controlDict @@ -48,13 +48,5 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - clouds - { - type fvModel; - #includeModel clouds(name=fvModel) - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/functions b/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/functions new file mode 100644 index 0000000000..16db122da7 --- /dev/null +++ b/tutorials/incompressibleFluid/mixerVesselHorizontal2DParticles/system/functions @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +clouds +{ + type fvModel; + #includeModel clouds(name=fvModel) +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/motorBike/lesFiles/controlDict b/tutorials/incompressibleFluid/motorBike/lesFiles/controlDict index 90f5ef5cbb..e43c03b61d 100644 --- a/tutorials/incompressibleFluid/motorBike/lesFiles/controlDict +++ b/tutorials/incompressibleFluid/motorBike/lesFiles/controlDict @@ -50,26 +50,5 @@ cacheTemporaryObjects SpalartAllmarasDDES:LESRegion ); -functions -{ - writeCachedObjects - { - type writeObjects; - - libs ("libutilityFunctionObjects.so"); - - writeControl writeTime; - writeOption anyWrite; - - objects - ( - SpalartAllmarasDDES:LESRegion - ); - } - - #include "cutPlane" - #include "streamlines" - #include "forceCoeffs" -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/motorBike/lesFiles/functions b/tutorials/incompressibleFluid/motorBike/lesFiles/functions new file mode 100644 index 0000000000..c74f45ec75 --- /dev/null +++ b/tutorials/incompressibleFluid/motorBike/lesFiles/functions @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cacheTemporaryObjects +( + SpalartAllmarasDDES:LESRegion +); + +writeCachedObjects +{ + type writeObjects; + + libs ("libutilityFunctionObjects.so"); + + writeControl writeTime; + writeOption anyWrite; + + objects + ( + SpalartAllmarasDDES:LESRegion + ); +} + +#include "cutPlane" +#include "streamlines" +#include "forceCoeffs" + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/motorBike/motorBike/system/controlDict b/tutorials/incompressibleFluid/motorBike/motorBike/system/controlDict index 5000a770c5..989dada63b 100644 --- a/tutorials/incompressibleFluid/motorBike/motorBike/system/controlDict +++ b/tutorials/incompressibleFluid/motorBike/motorBike/system/controlDict @@ -46,11 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #include "cutPlane" - #include "streamlines" - #include "forceCoeffs" -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/motorBike/motorBike/system/functions b/tutorials/incompressibleFluid/motorBike/motorBike/system/functions new file mode 100644 index 0000000000..55ffb59ebb --- /dev/null +++ b/tutorials/incompressibleFluid/motorBike/motorBike/system/functions @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "cutPlane" +#include "streamlines" +#include "forceCoeffs" + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/motorBikeSteady/system/controlDict b/tutorials/incompressibleFluid/motorBikeSteady/system/controlDict index 597f7c1bb7..e33a24ef67 100644 --- a/tutorials/incompressibleFluid/motorBikeSteady/system/controlDict +++ b/tutorials/incompressibleFluid/motorBikeSteady/system/controlDict @@ -45,12 +45,6 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #include "cutPlane" - #include "streamlines" - #include "forceCoeffs" -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/motorBikeSteady/system/functions b/tutorials/incompressibleFluid/motorBikeSteady/system/functions new file mode 100644 index 0000000000..36b51b083e --- /dev/null +++ b/tutorials/incompressibleFluid/motorBikeSteady/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "cutPlane" +#include "streamlines" +#include "forceCoeffs" + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/movingCone/system/controlDict b/tutorials/incompressibleFluid/movingCone/system/controlDict index 24a6118008..ad025b7eb6 100644 --- a/tutorials/incompressibleFluid/movingCone/system/controlDict +++ b/tutorials/incompressibleFluid/movingCone/system/controlDict @@ -50,9 +50,5 @@ adjustTimeStep yes; maxCo 0.5; -functions -{ - #include "cutPlane" -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/movingCone/system/functions b/tutorials/incompressibleFluid/movingCone/system/functions new file mode 100644 index 0000000000..e69b26d0c5 --- /dev/null +++ b/tutorials/incompressibleFluid/movingCone/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "cutPlane" + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/oscillatingInlet/system/controlDict b/tutorials/incompressibleFluid/oscillatingInlet/system/controlDict index 480cd03c82..ac86841892 100644 --- a/tutorials/incompressibleFluid/oscillatingInlet/system/controlDict +++ b/tutorials/incompressibleFluid/oscillatingInlet/system/controlDict @@ -50,11 +50,6 @@ adjustTimeStep true; maxCo 0.5; -functions -{ - #includeFunc patchFlowRate(name=inletFlowRate, patch=inlet) - #includeFunc patchFlowRate(name=outletFlowRate, patch=outlet) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/oscillatingInlet/system/functions b/tutorials/incompressibleFluid/oscillatingInlet/system/functions new file mode 100644 index 0000000000..930484c2b1 --- /dev/null +++ b/tutorials/incompressibleFluid/oscillatingInlet/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchFlowRate(name=inletFlowRate, patch=inlet) +#includeFunc patchFlowRate(name=outletFlowRate, patch=outlet) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDaily/system/controlDict b/tutorials/incompressibleFluid/pitzDaily/system/controlDict index e729bbca75..08f2e14698 100644 --- a/tutorials/incompressibleFluid/pitzDaily/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDaily/system/controlDict @@ -50,9 +50,5 @@ adjustTimeStep yes; maxCo 5; -functions -{ - #includeFunc patchAverage(patch=inlet, fields=(p U)) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDaily/system/functions b/tutorials/incompressibleFluid/pitzDaily/system/functions new file mode 100644 index 0000000000..6f3989632b --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDaily/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchAverage(patch=inlet, fields=(p U)) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyLES/system/controlDict b/tutorials/incompressibleFluid/pitzDailyLES/system/controlDict index 0cd9317ba2..2ae192a67d 100644 --- a/tutorials/incompressibleFluid/pitzDailyLES/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDailyLES/system/controlDict @@ -46,59 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - - writeControl timeStep; - writeInterval 1; - - fields (p); - - probeLocations - ( - (0.0254 0.0253 0) - (0.0508 0.0253 0) - (0.0762 0.0253 0) - (0.1016 0.0253 0) - (0.127 0.0253 0) - (0.1524 0.0253 0) - (0.1778 0.0253 0) - ); - } - - #includeFunc fieldAverage(U, p, prime2Mean = yes) - - surfaceSampling - { - type surfaces; - libs ("libsampling.so"); - - writeControl writeTime; - - interpolationScheme cellPoint; - - surfaceFormat vtk; - - fields (U); - - surfaces - ( - nearWall - { - type patchInternalField; - patches (lowerWall); - distance 1e-6; - interpolate true; - triangulate false; - } - ); - } - - #includeFunc scalarTransport(s) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyLES/system/functions b/tutorials/incompressibleFluid/pitzDailyLES/system/functions new file mode 100644 index 0000000000..a17f182f84 --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDailyLES/system/functions @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + + writeControl timeStep; + writeInterval 1; + + fields (p); + + probeLocations + ( + (0.0254 0.0253 0) + (0.0508 0.0253 0) + (0.0762 0.0253 0) + (0.1016 0.0253 0) + (0.127 0.0253 0) + (0.1524 0.0253 0) + (0.1778 0.0253 0) + ); +} + +#includeFunc fieldAverage(U, p, prime2Mean = yes) + +surfaceSampling +{ + type surfaces; + libs ("libsampling.so"); + + writeControl writeTime; + + interpolationScheme cellPoint; + + surfaceFormat vtk; + + fields (U); + + surfaces + ( + nearWall + { + type patchInternalField; + patches (lowerWall); + distance 1e-6; + interpolate true; + triangulate false; + } + ); +} + +#includeFunc scalarTransport(s) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/controlDict b/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/controlDict index c32236d284..2ae192a67d 100644 --- a/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/controlDict @@ -46,67 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl timeStep; - writeInterval 1; - - fields - ( - p - ); - - probeLocations - ( - (0.0254 0.0253 0) - (0.0508 0.0253 0) - (0.0762 0.0253 0) - (0.1016 0.0253 0) - (0.127 0.0253 0) - (0.1524 0.0253 0) - (0.1778 0.0253 0) - ); - - } - - #includeFunc fieldAverage(U, p, prime2Mean = yes) - - surfaceSampling - { - // Sample near-wall velocity - - type surfaces; - - // Where to load it from (if not already in solver) - libs ("libsampling.so"); - writeControl writeTime; - - interpolationScheme cellPoint; - - surfaceFormat vtk; - - // Fields to be sampled - fields - ( - U - ); - - surfaces - ( - nearWall - { - type patchInternalField; - patches ( lowerWall ); - distance 1e-6; - interpolate true; - triangulate false; - } - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/functions b/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/functions new file mode 100644 index 0000000000..eb2af5bc95 --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDailyLESDevelopedInlet/system/functions @@ -0,0 +1,77 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl timeStep; + writeInterval 1; + + fields + ( + p + ); + + probeLocations + ( + (0.0254 0.0253 0) + (0.0508 0.0253 0) + (0.0762 0.0253 0) + (0.1016 0.0253 0) + (0.127 0.0253 0) + (0.1524 0.0253 0) + (0.1778 0.0253 0) + ); + +} + +#includeFunc fieldAverage(U, p, prime2Mean = yes) + +surfaceSampling +{ + // Sample near-wall velocity + + type surfaces; + + // Where to load it from (if not already in solver) + libs ("libsampling.so"); + writeControl writeTime; + + interpolationScheme cellPoint; + + surfaceFormat vtk; + + // Fields to be sampled + fields + ( + U + ); + + surfaces + ( + nearWall + { + type patchInternalField; + patches ( lowerWall ); + distance 1e-6; + interpolate true; + triangulate false; + } + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyPulse/system/controlDict b/tutorials/incompressibleFluid/pitzDailyPulse/system/controlDict index 2c3cb7630d..a356f285b7 100644 --- a/tutorials/incompressibleFluid/pitzDailyPulse/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDailyPulse/system/controlDict @@ -50,9 +50,5 @@ adjustTimeStep yes; maxCo 5; -functions -{ - #includeFunc patchAverage(patch=inlet, fields=(p U)) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyPulse/system/functions b/tutorials/incompressibleFluid/pitzDailyPulse/system/functions new file mode 100644 index 0000000000..6f3989632b --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDailyPulse/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchAverage(patch=inlet, fields=(p U)) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/controlDict b/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/controlDict index 21aad299ec..24ab556d9b 100644 --- a/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/controlDict @@ -50,41 +50,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc scalarTransport(T, diffusivity=constant, D = 0.01) - - mixingQualityCheck - { - type coded; - - // Load the library containing the 'coded' functionObject - libs ("libutilityFunctionObjects.so"); - - codeInclude - #{ - #include "volFields.H" - #}; - - codeExecute - #{ - const volScalarField& T - ( - mesh().lookupObject("T") - ); - - const scalar maxT = max(T).value(); - const scalar meanT = T.weightedAverage(mesh().V()).value(); - - const scalar mixingQuality = meanT/maxT; - Info << "mixingQuality = " << mixingQuality << endl; - - if (mixingQuality > 0.9) - { - const_cast(mesh().time()).writeAndEnd(); - } - #}; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/functions b/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/functions new file mode 100644 index 0000000000..120a56ad46 --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDailyScalarTransport/system/functions @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc scalarTransport(T, diffusivity=constant, D = 0.01) + +mixingQualityCheck +{ + type coded; + + // Load the library containing the 'coded' functionObject + libs ("libutilityFunctionObjects.so"); + + codeInclude + #{ + #include "volFields.H" + #}; + + codeExecute + #{ + const volScalarField& T + ( + mesh().lookupObject("T") + ); + + const scalar maxT = max(T).value(); + const scalar meanT = T.weightedAverage(mesh().V()).value(); + + const scalar mixingQuality = meanT/maxT; + Info << "mixingQuality = " << mixingQuality << endl; + + if (mixingQuality > 0.9) + { + const_cast(mesh().time()).writeAndEnd(); + } + #}; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailySteady/system/controlDict b/tutorials/incompressibleFluid/pitzDailySteady/system/controlDict index d51067c3bb..e32652c547 100644 --- a/tutorials/incompressibleFluid/pitzDailySteady/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDailySteady/system/controlDict @@ -51,20 +51,5 @@ cacheTemporaryObjects kEpsilon:G ); -functions -{ - #includeFunc streamlinesLine - ( - name=streamlines, - start=(-0.0205 0.001 0.00001), - end=(-0.0205 0.0251 0.00001), - nPoints=10, - fields=(p k U) - ) - - #includeFunc writeObjects(kEpsilon:G) - - #includeFunc strainRate(writeControl=writeTime) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailySteady/system/functions b/tutorials/incompressibleFluid/pitzDailySteady/system/functions new file mode 100644 index 0000000000..caccece31f --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDailySteady/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cacheTemporaryObjects +( + kEpsilon:G +); + +#includeFunc streamlinesLine +( + name=streamlines, + start=(-0.0205 0.001 0.00001), + end=(-0.0205 0.0251 0.00001), + nPoints=10, + fields=(p k U) +) + +#includeFunc writeObjects(kEpsilon:G) + +#includeFunc strainRate(writeControl=writeTime) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/controlDict b/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/controlDict index bf4cc2fef2..8850f5d52a 100644 --- a/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/controlDict +++ b/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/controlDict @@ -46,44 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - streamlines - { - type streamlines; - - libs ("libfieldFunctionObjects.so"); - - // Output every - writeControl writeTime; - - // Write format - setFormat vtk; - - // Track forward (+U) or backward (-U) or both - direction forward; - - // Names of fields to sample. Should contain above velocity field! - fields (p k U); - - // Steps particles can travel before being removed - lifeTime 10000; - - // Number of steps per cell (estimate). Set to 1 to disable subcycling. - nSubCycle 5; - - // Cloud name to use - cloudName particleTracks; - - // Seeding method. - seedSampleSet - { - type lineUniform; - start (-0.0205 0.001 0.00001); - end (-0.0205 0.0251 0.00001); - nPoints 10; - } - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/functions b/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/functions new file mode 100644 index 0000000000..78f4478d1c --- /dev/null +++ b/tutorials/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/functions @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +streamlines +{ + type streamlines; + + libs ("libfieldFunctionObjects.so"); + + // Output every + writeControl writeTime; + + // Write format + setFormat vtk; + + // Track forward (+U) or backward (-U) or both + direction forward; + + // Names of fields to sample. Should contain above velocity field! + fields (p k U); + + // Steps particles can travel before being removed + lifeTime 10000; + + // Number of steps per cell (estimate). Set to 1 to disable subcycling. + nSubCycle 5; + + // Cloud name to use + cloudName particleTracks; + + // Seeding method. + seedSampleSet + { + type lineUniform; + start (-0.0205 0.001 0.00001); + end (-0.0205 0.0251 0.00001); + nPoints 10; + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/planarContraction/system/controlDict b/tutorials/incompressibleFluid/planarContraction/system/controlDict index c76e009fc9..f65834e48e 100644 --- a/tutorials/incompressibleFluid/planarContraction/system/controlDict +++ b/tutorials/incompressibleFluid/planarContraction/system/controlDict @@ -45,11 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc graphCell(name=lineA, start=(-0.0016 0 0), end=(-0.0016 0.0128 0), U) - #includeFunc graphCell(name=lineB, start=(-0.0048 0 0), end=(-0.0048 0.0128 0), U) - #includeFunc graphCell(name=lineC, start=(-0.0032 0 0), end=(-0.0032 0.0128 0), U) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/planarContraction/system/functions b/tutorials/incompressibleFluid/planarContraction/system/functions new file mode 100644 index 0000000000..ce55023e1c --- /dev/null +++ b/tutorials/incompressibleFluid/planarContraction/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc graphCell(name=lineA, start=(-0.0016 0 0), end=(-0.0016 0.0128 0), U) +#includeFunc graphCell(name=lineB, start=(-0.0048 0 0), end=(-0.0048 0.0128 0), U) +#includeFunc graphCell(name=lineC, start=(-0.0032 0 0), end=(-0.0032 0.0128 0), U) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/planarPoiseuille/system/controlDict b/tutorials/incompressibleFluid/planarPoiseuille/system/controlDict index eeea4a0bbe..83e3ad6e0a 100644 --- a/tutorials/incompressibleFluid/planarPoiseuille/system/controlDict +++ b/tutorials/incompressibleFluid/planarPoiseuille/system/controlDict @@ -45,11 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc residuals(p, sigma) - #includeFunc graphCell(name=graph, start=(0 0 0), end=(0 1 0), U) - #includeFunc probes(name=probes, points=((0 1 0)), U) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/planarPoiseuille/system/functions b/tutorials/incompressibleFluid/planarPoiseuille/system/functions new file mode 100644 index 0000000000..b585323360 --- /dev/null +++ b/tutorials/incompressibleFluid/planarPoiseuille/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc residuals(p, sigma) +#includeFunc graphCell(name=graph, start=(0 0 0), end=(0 1 0), U) +#includeFunc probes(name=probes, points=((0 1 0)), U) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/planarPoiseuille/validation/WatersKing/createFields.H b/tutorials/incompressibleFluid/planarPoiseuille/validation/WatersKing/createFields.H index 27ee3ff6cf..9f62f651e2 100644 --- a/tutorials/incompressibleFluid/planarPoiseuille/validation/WatersKing/createFields.H +++ b/tutorials/incompressibleFluid/planarPoiseuille/validation/WatersKing/createFields.H @@ -45,6 +45,5 @@ const dictionary& gradPDict = fvModels.subDict("momentumSource").subDict("sources"); const scalar K(vector(gradPDict.subDict("U").lookup("explicit")).x()); -const dictionary& probesDict = - runTime.controlDict().subDict("functions").subDict("probes"); +const dictionary& probesDict = runTime.functionObjects().subDict("probes"); const point location = pointField(probesDict.lookup("probeLocations"))[0]; diff --git a/tutorials/incompressibleFluid/propeller/system/controlDict b/tutorials/incompressibleFluid/propeller/system/controlDict index 20573a04d1..03381bac72 100644 --- a/tutorials/incompressibleFluid/propeller/system/controlDict +++ b/tutorials/incompressibleFluid/propeller/system/controlDict @@ -53,11 +53,5 @@ adjustTimeStep yes; maxCo 2; -functions -{ - #includeFunc Q - #include "surfaces" - #include "forces" -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/propeller/system/functions b/tutorials/incompressibleFluid/propeller/system/functions new file mode 100644 index 0000000000..28f1f8ff77 --- /dev/null +++ b/tutorials/incompressibleFluid/propeller/system/functions @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +////- For testing with moveMesh +//deltaT 0.01; +//writeControl timeStep; +//writeInterval 1; + +#includeFunc Q +#include "surfaces" +#include "forces" + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/roomResidenceTime/system/controlDict b/tutorials/incompressibleFluid/roomResidenceTime/system/controlDict index 4430dc0ac0..b5b36da832 100644 --- a/tutorials/incompressibleFluid/roomResidenceTime/system/controlDict +++ b/tutorials/incompressibleFluid/roomResidenceTime/system/controlDict @@ -46,9 +46,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc residuals(p, U) -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/roomResidenceTime/system/functions b/tutorials/incompressibleFluid/roomResidenceTime/system/functions new file mode 100644 index 0000000000..31a51934b4 --- /dev/null +++ b/tutorials/incompressibleFluid/roomResidenceTime/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc residuals(p, U) + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/windAroundBuildings/system/controlDict b/tutorials/incompressibleFluid/windAroundBuildings/system/controlDict index c6e29b18f8..adf657edbd 100644 --- a/tutorials/incompressibleFluid/windAroundBuildings/system/controlDict +++ b/tutorials/incompressibleFluid/windAroundBuildings/system/controlDict @@ -49,8 +49,5 @@ runTimeModifiable true; // maxCo 1; -functions -{ -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/windAroundBuildings/system/functions b/tutorials/incompressibleFluid/windAroundBuildings/system/functions new file mode 100644 index 0000000000..01ca7cf475 --- /dev/null +++ b/tutorials/incompressibleFluid/windAroundBuildings/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// adjustTimeStep yes; + +// maxCo 1; + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/controlDict b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/controlDict index 5c33257450..2e3e7f82fc 100644 --- a/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/controlDict +++ b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/controlDict @@ -46,21 +46,6 @@ timePrecision 6; runTimeModifiable true; -functions -{ - forces - { - type forces; - libs ("libforces.so"); - writeControl timeStep; - writeInterval 10; - patches (wing); - rho rhoInf; - log true; - rhoInf 1; - CofR (0.4974612746 -0.01671895744 0.125); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/functions b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/functions new file mode 100644 index 0000000000..23f60bc8c9 --- /dev/null +++ b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_steady/system/functions @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forces; + libs ("libforces.so"); + writeControl timeStep; + writeInterval 10; + patches (wing); + rho rhoInf; + log true; + rhoInf 1; + CofR (0.4974612746 -0.01671895744 0.125); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/controlDict b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/controlDict index e5fe700fdc..8436aef5f1 100644 --- a/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/controlDict +++ b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/controlDict @@ -50,14 +50,5 @@ adjustTimeStep yes; maxCo 0.9; -functions -{ - sixDoFRigidBodyState - { - type sixDoFRigidBodyState; - libs ("libsixDoFRigidBodyState.so"); - angleUnits degrees; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/functions b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/functions new file mode 100644 index 0000000000..24016e92c8 --- /dev/null +++ b/tutorials/incompressibleFluid/wingMotion/wingMotion2D_transient/system/functions @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +sixDoFRigidBodyState +{ + type sixDoFRigidBodyState; + libs ("libsixDoFRigidBodyState.so"); + angleUnits degrees; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/DTCHull/system/controlDict b/tutorials/incompressibleVoF/DTCHull/system/controlDict index b3be60406a..cdc6c3f247 100644 --- a/tutorials/incompressibleVoF/DTCHull/system/controlDict +++ b/tutorials/incompressibleVoF/DTCHull/system/controlDict @@ -46,19 +46,6 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - forces - { - type forces; - libs ("libforces.so"); - patches (hull); - log on; - writeControl timeStep; - writeInterval 1; - CofR (2.929541 0 0.2); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/DTCHull/system/functions b/tutorials/incompressibleVoF/DTCHull/system/functions new file mode 100644 index 0000000000..ad16ce4d09 --- /dev/null +++ b/tutorials/incompressibleVoF/DTCHull/system/functions @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forces; + libs ("libforces.so"); + patches (hull); + log on; + writeControl timeStep; + writeInterval 1; + CofR (2.929541 0 0.2); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/DTCHullMoving/system/controlDict b/tutorials/incompressibleVoF/DTCHullMoving/system/controlDict index e25dd3415d..cc6025446c 100644 --- a/tutorials/incompressibleVoF/DTCHullMoving/system/controlDict +++ b/tutorials/incompressibleVoF/DTCHullMoving/system/controlDict @@ -52,19 +52,6 @@ maxCo 25; maxAlphaCo 15; maxDeltaT 0.01; -functions -{ - forces - { - type forces; - libs ("libforces.so"); - patches (hull); - log on; - writeControl timeStep; - writeInterval 1; - CofR (2.929541 0 0.2); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/DTCHullMoving/system/functions b/tutorials/incompressibleVoF/DTCHullMoving/system/functions new file mode 100644 index 0000000000..ad16ce4d09 --- /dev/null +++ b/tutorials/incompressibleVoF/DTCHullMoving/system/functions @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forces; + libs ("libforces.so"); + patches (hull); + log on; + writeControl timeStep; + writeInterval 1; + CofR (2.929541 0 0.2); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/DTCHullWave/system/controlDict b/tutorials/incompressibleVoF/DTCHullWave/system/controlDict index 9d10c98cd3..43363c8486 100644 --- a/tutorials/incompressibleVoF/DTCHullWave/system/controlDict +++ b/tutorials/incompressibleVoF/DTCHullWave/system/controlDict @@ -52,34 +52,6 @@ maxCo 10; maxAlphaCo 5; maxDeltaT 0.01; -functions -{ - surfaces - { - type surfaces; - libs ("libsampling.so"); - - writeControl adjustableRunTime; - writeInterval 0.01; - - surfaceFormat vtk; - writeFormat binary; - fields (p_rgh U); - - interpolationScheme cellPoint; - - surfaces - ( - interface - { - type isoSurface; - isoField alpha.water; - isoValue 0.5; - interpolate true; - } - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/DTCHullWave/system/functions b/tutorials/incompressibleVoF/DTCHullWave/system/functions new file mode 100644 index 0000000000..92eee641ee --- /dev/null +++ b/tutorials/incompressibleVoF/DTCHullWave/system/functions @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +surfaces +{ + type surfaces; + libs ("libsampling.so"); + + writeControl adjustableRunTime; + writeInterval 0.01; + + surfaceFormat vtk; + writeFormat binary; + fields (p_rgh U); + + interpolationScheme cellPoint; + + surfaces + ( + interface + { + type isoSurface; + isoField alpha.water; + isoValue 0.5; + interpolate true; + } + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/damBreakLaminar/system/controlDict b/tutorials/incompressibleVoF/damBreakLaminar/system/controlDict index 8e235f7f13..7931e5fbec 100644 --- a/tutorials/incompressibleVoF/damBreakLaminar/system/controlDict +++ b/tutorials/incompressibleVoF/damBreakLaminar/system/controlDict @@ -53,10 +53,5 @@ maxAlphaCo 1; maxDeltaT 1; -functions -{ - #includeFunc phaseScalarTransport(field=tracer.water) - #includeFunc phaseScalarTransport(field=tracer.air, residualAlpha=1e-6) -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/damBreakLaminar/system/functions b/tutorials/incompressibleVoF/damBreakLaminar/system/functions new file mode 100644 index 0000000000..e578772055 --- /dev/null +++ b/tutorials/incompressibleVoF/damBreakLaminar/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc phaseScalarTransport(field=tracer.water) +#includeFunc phaseScalarTransport(field=tracer.air, residualAlpha=1e-6) + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObject/system/controlDict b/tutorials/incompressibleVoF/floatingObject/system/controlDict index 39d9487f71..7575595442 100644 --- a/tutorials/incompressibleVoF/floatingObject/system/controlDict +++ b/tutorials/incompressibleVoF/floatingObject/system/controlDict @@ -52,14 +52,5 @@ maxCo 1; maxAlphaCo 1; maxDeltaT 1; -functions -{ - rigidBodyState - { - type rigidBodyState; - libs ("librigidBodyState.so"); - angleUnits degrees; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObject/system/controlDict.sixDoF b/tutorials/incompressibleVoF/floatingObject/system/controlDict.sixDoF index 6316592889..3b74f6d48d 100644 --- a/tutorials/incompressibleVoF/floatingObject/system/controlDict.sixDoF +++ b/tutorials/incompressibleVoF/floatingObject/system/controlDict.sixDoF @@ -52,14 +52,4 @@ maxCo 1; maxAlphaCo 1; maxDeltaT 1; -functions -{ - sixDoFRigidBodyState - { - type sixDoFRigidBodyState; - libs ("libsixDoFRigidBodyState.so"); - angleUnits degrees; - } -} - // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObject/system/functions b/tutorials/incompressibleVoF/floatingObject/system/functions new file mode 100644 index 0000000000..3ef54191fd --- /dev/null +++ b/tutorials/incompressibleVoF/floatingObject/system/functions @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +rigidBodyState +{ + type rigidBodyState; + libs ("librigidBodyState.so"); + angleUnits degrees; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObject/system/functions.sixDoF b/tutorials/incompressibleVoF/floatingObject/system/functions.sixDoF new file mode 100644 index 0000000000..24016e92c8 --- /dev/null +++ b/tutorials/incompressibleVoF/floatingObject/system/functions.sixDoF @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +sixDoFRigidBodyState +{ + type sixDoFRigidBodyState; + libs ("libsixDoFRigidBodyState.so"); + angleUnits degrees; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict b/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict index f9794a79d8..28d32952bc 100644 --- a/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict +++ b/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict @@ -52,14 +52,5 @@ maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1; -functions0 -{ - rigidBodyState - { - type rigidBodyState; - libs ("librigidBodyState.so"); - angleUnits degrees; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict.sixDoF b/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict.sixDoF index 6316592889..3b74f6d48d 100644 --- a/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict.sixDoF +++ b/tutorials/incompressibleVoF/floatingObjectWaves/system/controlDict.sixDoF @@ -52,14 +52,4 @@ maxCo 1; maxAlphaCo 1; maxDeltaT 1; -functions -{ - sixDoFRigidBodyState - { - type sixDoFRigidBodyState; - libs ("libsixDoFRigidBodyState.so"); - angleUnits degrees; - } -} - // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObjectWaves/system/functions b/tutorials/incompressibleVoF/floatingObjectWaves/system/functions new file mode 100644 index 0000000000..3ef54191fd --- /dev/null +++ b/tutorials/incompressibleVoF/floatingObjectWaves/system/functions @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +rigidBodyState +{ + type rigidBodyState; + libs ("librigidBodyState.so"); + angleUnits degrees; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/floatingObjectWaves/system/functions.sixDoF b/tutorials/incompressibleVoF/floatingObjectWaves/system/functions.sixDoF new file mode 100644 index 0000000000..24016e92c8 --- /dev/null +++ b/tutorials/incompressibleVoF/floatingObjectWaves/system/functions.sixDoF @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +sixDoFRigidBodyState +{ + type sixDoFRigidBodyState; + libs ("libsixDoFRigidBodyState.so"); + angleUnits degrees; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/forcedUpstreamWave/system/controlDict b/tutorials/incompressibleVoF/forcedUpstreamWave/system/controlDict index bbc220d749..1fb95117bb 100644 --- a/tutorials/incompressibleVoF/forcedUpstreamWave/system/controlDict +++ b/tutorials/incompressibleVoF/forcedUpstreamWave/system/controlDict @@ -54,16 +54,6 @@ maxAlphaCo 1; maxDeltaT 1; -functions -{ - interfaceHeight1 - { - type interfaceHeight; - libs ("libfieldFunctionObjects.so"); - locations ((300 0 0) (450 0 0) (600 0 0)); - alpha alpha.water; - } -} DebugSwitches { diff --git a/tutorials/incompressibleVoF/forcedUpstreamWave/system/functions b/tutorials/incompressibleVoF/forcedUpstreamWave/system/functions new file mode 100644 index 0000000000..f92cdd126d --- /dev/null +++ b/tutorials/incompressibleVoF/forcedUpstreamWave/system/functions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +interfaceHeight1 +{ + type interfaceHeight; + libs ("libfieldFunctionObjects.so"); + locations ((300 0 0) (450 0 0) (600 0 0)); + alpha alpha.water; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/mixerVessel/system/controlDict b/tutorials/incompressibleVoF/mixerVessel/system/controlDict index c32f18733a..996293ede6 100644 --- a/tutorials/incompressibleVoF/mixerVessel/system/controlDict +++ b/tutorials/incompressibleVoF/mixerVessel/system/controlDict @@ -54,17 +54,5 @@ maxAlphaCo 1; maxDeltaT 1; -functions -{ - #includeFunc cutPlaneSurface - ( - point=(0 0 0), - normal=(1 -1 0), - interpolate=no, - alpha.oil, - p_rgh, - U - ) -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/mixerVessel/system/functions b/tutorials/incompressibleVoF/mixerVessel/system/functions new file mode 100644 index 0000000000..c52bc9acb7 --- /dev/null +++ b/tutorials/incompressibleVoF/mixerVessel/system/functions @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc cutPlaneSurface +( + point=(0 0 0), + normal=(1 -1 0), + interpolate=no, + alpha.oil, + p_rgh, + U +) + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/planingHullW3/system/controlDict b/tutorials/incompressibleVoF/planingHullW3/system/controlDict index d0ba35e104..99366964f5 100644 --- a/tutorials/incompressibleVoF/planingHullW3/system/controlDict +++ b/tutorials/incompressibleVoF/planingHullW3/system/controlDict @@ -52,27 +52,5 @@ maxCo 5; maxAlphaCo 5; maxDeltaT 0.002; -functions -{ - forces - { - type forces; - libs ("libforces.so"); - patches (hull); - log on; - writeControl timeStep; - writeInterval 1; - CofR (0 0 0); - } - - rigidBodyState - { - type rigidBodyState; - libs ("librigidBodyState.so"); - angleUnits degrees; - } - - #includeFunc surfaces -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/planingHullW3/system/functions b/tutorials/incompressibleVoF/planingHullW3/system/functions new file mode 100644 index 0000000000..4dc400bc35 --- /dev/null +++ b/tutorials/incompressibleVoF/planingHullW3/system/functions @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forces; + libs ("libforces.so"); + patches (hull); + log on; + writeControl timeStep; + writeInterval 1; + CofR (0 0 0); +} + +rigidBodyState +{ + type rigidBodyState; + libs ("librigidBodyState.so"); + angleUnits degrees; +} + +#includeFunc surfaces + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/propeller/system/controlDict b/tutorials/incompressibleVoF/propeller/system/controlDict index 92926cc5e4..b666b2fdec 100644 --- a/tutorials/incompressibleVoF/propeller/system/controlDict +++ b/tutorials/incompressibleVoF/propeller/system/controlDict @@ -51,10 +51,5 @@ adjustTimeStep yes; maxCo 2; maxAlphaCo 1; -functions -{ - #includeFunc patchSurface(patch="propeller.*") - #includeFunc isoSurface(isoField=alpha.water, isoValue=0.5, writeEmpty=true) -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/propeller/system/functions b/tutorials/incompressibleVoF/propeller/system/functions new file mode 100644 index 0000000000..4da6b4fe2d --- /dev/null +++ b/tutorials/incompressibleVoF/propeller/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchSurface(patch="propeller.*") +#includeFunc isoSurface(isoField=alpha.water, isoValue=0.5, writeEmpty=true) + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/rotatingCube/system/controlDict b/tutorials/incompressibleVoF/rotatingCube/system/controlDict index 699ad25ab1..3e63db6ca9 100644 --- a/tutorials/incompressibleVoF/rotatingCube/system/controlDict +++ b/tutorials/incompressibleVoF/rotatingCube/system/controlDict @@ -51,10 +51,5 @@ adjustTimeStep yes; maxCo 0.5; maxAlphaCo 0.5; -functions -{ - #includeFunc patchSurface(patch=cube) - #includeFunc isoSurface(isoField=alpha.water, isoValue=0.5) -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/rotatingCube/system/functions b/tutorials/incompressibleVoF/rotatingCube/system/functions new file mode 100644 index 0000000000..d24ca2ad0a --- /dev/null +++ b/tutorials/incompressibleVoF/rotatingCube/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchSurface(patch=cube) +#includeFunc isoSurface(isoField=alpha.water, isoValue=0.5) + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank2D/system/controlDict b/tutorials/incompressibleVoF/sloshingTank2D/system/controlDict index a98618e851..d8e15d98e0 100644 --- a/tutorials/incompressibleVoF/sloshingTank2D/system/controlDict +++ b/tutorials/incompressibleVoF/sloshingTank2D/system/controlDict @@ -53,48 +53,6 @@ maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl writeTime; - probeLocations - ( - (0 9.95 19.77) - (0 -9.95 19.77) - ); - fixedLocations false; - fields - ( - p - ); - } - - wallPressure - { - type surfaces; - libs ("libsampling.so"); - writeControl writeTime; - surfaceFormat raw; - fields - ( - p - ); - interpolationScheme cellPoint; - - surfaces - ( - walls - { - type patch; - patches (walls); - triangulate false; - } - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank2D/system/functions b/tutorials/incompressibleVoF/sloshingTank2D/system/functions new file mode 100644 index 0000000000..23070730a2 --- /dev/null +++ b/tutorials/incompressibleVoF/sloshingTank2D/system/functions @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl writeTime; + probeLocations + ( + (0 9.95 19.77) + (0 -9.95 19.77) + ); + fixedLocations false; + fields + ( + p + ); +} + +wallPressure +{ + type surfaces; + libs ("libsampling.so"); + writeControl writeTime; + surfaceFormat raw; + fields + ( + p + ); + interpolationScheme cellPoint; + + surfaces + ( + walls + { + type patch; + patches (walls); + triangulate false; + } + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/controlDict b/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/controlDict index 10793ceb24..81b6238768 100644 --- a/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/controlDict +++ b/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/controlDict @@ -52,48 +52,6 @@ maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl writeTime; - probeLocations - ( - (0 9.95 19.77) - (0 -9.95 19.77) - ); - fixedLocations false; - fields - ( - p - ); - } - - wallPressure - { - type surfaces; - libs ("libsampling.so"); - writeControl writeTime; - surfaceFormat raw; - fields - ( - p - ); - interpolationScheme cellPoint; - - surfaces - ( - walls - { - type patch; - patches (walls); - triangulate false; - } - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/functions b/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/functions new file mode 100644 index 0000000000..23070730a2 --- /dev/null +++ b/tutorials/incompressibleVoF/sloshingTank2D3DoF/system/functions @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl writeTime; + probeLocations + ( + (0 9.95 19.77) + (0 -9.95 19.77) + ); + fixedLocations false; + fields + ( + p + ); +} + +wallPressure +{ + type surfaces; + libs ("libsampling.so"); + writeControl writeTime; + surfaceFormat raw; + fields + ( + p + ); + interpolationScheme cellPoint; + + surfaces + ( + walls + { + type patch; + patches (walls); + triangulate false; + } + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank3D/system/controlDict b/tutorials/incompressibleVoF/sloshingTank3D/system/controlDict index d35686d1b5..8fb6107a2f 100644 --- a/tutorials/incompressibleVoF/sloshingTank3D/system/controlDict +++ b/tutorials/incompressibleVoF/sloshingTank3D/system/controlDict @@ -52,26 +52,6 @@ maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl timeStep; - writeInterval 1; - probeLocations - ( - (0 9.95 19.77) - (0 -9.95 19.77) - ); - fixedLocations false; - fields - ( - p - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank3D/system/functions b/tutorials/incompressibleVoF/sloshingTank3D/system/functions new file mode 100644 index 0000000000..4a18621b27 --- /dev/null +++ b/tutorials/incompressibleVoF/sloshingTank3D/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl timeStep; + writeInterval 1; + probeLocations + ( + (0 9.95 19.77) + (0 -9.95 19.77) + ); + fixedLocations false; + fields + ( + p + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/controlDict b/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/controlDict index 37fdcbf0ec..2a789e40b2 100644 --- a/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/controlDict +++ b/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/controlDict @@ -52,26 +52,6 @@ maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl timeStep; - writeInterval 1; - probeLocations - ( - (0 9.95 19.77) - (0 -9.95 19.77) - ); - fixedLocations false; - fields - ( - p - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/functions b/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/functions new file mode 100644 index 0000000000..4a18621b27 --- /dev/null +++ b/tutorials/incompressibleVoF/sloshingTank3D3DoF/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl timeStep; + writeInterval 1; + probeLocations + ( + (0 9.95 19.77) + (0 -9.95 19.77) + ); + fixedLocations false; + fields + ( + p + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/controlDict b/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/controlDict index fab4ff25b2..81b6238768 100644 --- a/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/controlDict +++ b/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/controlDict @@ -52,26 +52,6 @@ maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - probes - { - type probes; - libs ("libsampling.so"); - writeControl timeStep; - writeInterval 1; - probeLocations - ( - (0 9.95 19.77) - (0 -9.95 19.77) - ); - fixedLocations false; - fields - ( - p - ); - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/functions b/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/functions new file mode 100644 index 0000000000..4a18621b27 --- /dev/null +++ b/tutorials/incompressibleVoF/sloshingTank3D6DoF/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +probes +{ + type probes; + libs ("libsampling.so"); + writeControl timeStep; + writeInterval 1; + probeLocations + ( + (0 9.95 19.77) + (0 -9.95 19.77) + ); + fixedLocations false; + fields + ( + p + ); +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/waterChannel/system/controlDict b/tutorials/incompressibleVoF/waterChannel/system/controlDict index f5c2ed4836..c05916d37a 100644 --- a/tutorials/incompressibleVoF/waterChannel/system/controlDict +++ b/tutorials/incompressibleVoF/waterChannel/system/controlDict @@ -52,39 +52,5 @@ maxCo 6; maxAlphaCo 6; maxDeltaT 1; -functions -{ - inletFlux - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - writeControl timeStep; - log true; - // Output field values as well - writeFields false; - select patch; - patch inlet; - operation sum; - - fields - ( - phi - ); - - weightField alpha.water; - } - - outletFlux - { - $inletFlux; - patch outlet; - } - - atmosphereFlux - { - $inletFlux; - patch atmosphere; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/waterChannel/system/functions b/tutorials/incompressibleVoF/waterChannel/system/functions new file mode 100644 index 0000000000..cdf4a90f92 --- /dev/null +++ b/tutorials/incompressibleVoF/waterChannel/system/functions @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inletFlux +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + log true; + // Output field values as well + writeFields false; + select patch; + patch inlet; + operation sum; + + fields + ( + phi + ); + + weightField alpha.water; +} + +outletFlux +{ + $inletFlux; + patch outlet; +} + +atmosphereFlux +{ + $inletFlux; + patch atmosphere; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/wave/system/controlDict b/tutorials/incompressibleVoF/wave/system/controlDict index 45c27d6ee2..a2a65f3976 100644 --- a/tutorials/incompressibleVoF/wave/system/controlDict +++ b/tutorials/incompressibleVoF/wave/system/controlDict @@ -54,15 +54,5 @@ maxAlphaCo 1; maxDeltaT 1; -functions -{ - interfaceHeight1 - { - type interfaceHeight; - libs ("libfieldFunctionObjects.so"); - locations ((300 0 0) (450 0 0) (600 0 0)); - alpha alpha.water; - } -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/wave/system/functions b/tutorials/incompressibleVoF/wave/system/functions new file mode 100644 index 0000000000..f92cdd126d --- /dev/null +++ b/tutorials/incompressibleVoF/wave/system/functions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +interfaceHeight1 +{ + type interfaceHeight; + libs ("libfieldFunctionObjects.so"); + locations ((300 0 0) (450 0 0) (600 0 0)); + alpha alpha.water; +} + +// ************************************************************************* // diff --git a/tutorials/incompressibleVoF/wave3D/system/controlDict b/tutorials/incompressibleVoF/wave3D/system/controlDict index 0ffa22a829..dd45a5e7cb 100644 --- a/tutorials/incompressibleVoF/wave3D/system/controlDict +++ b/tutorials/incompressibleVoF/wave3D/system/controlDict @@ -54,9 +54,5 @@ maxAlphaCo 1; maxDeltaT 1; -functions -{ - #includeFunc isoSurface(isoField=alpha.water, isoValue=0.5, fields=()) -} // ************************************************************************* // diff --git a/tutorials/incompressibleVoF/wave3D/system/functions b/tutorials/incompressibleVoF/wave3D/system/functions new file mode 100644 index 0000000000..9e633fe0be --- /dev/null +++ b/tutorials/incompressibleVoF/wave3D/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc isoSurface(isoField=alpha.water, isoValue=0.5, fields=()) + +// ************************************************************************* // diff --git a/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/controlDict b/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/controlDict index 5c8210cc42..7c4b55aa16 100644 --- a/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/controlDict +++ b/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/controlDict @@ -52,37 +52,5 @@ maxCo 0.4; maxDeltaT 1; -functions -{ - forces - { - type forces; - libs ("libforces.so"); - writeControl writeTime; - patches (floatingObject); - rho rhoInf; - log yes; - rhoInf 1000; - CofR (0 0 0); - } - - poolHeight - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - writeControl timeStep; - writeInterval 1; - log yes; - writeTotalArea no; - writeFields no; - select faceZone; - faceZone f0; - operation areaAverage; - fields - ( - zeta - ); - } -}; // ************************************************************************* // diff --git a/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/functions b/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/functions new file mode 100644 index 0000000000..4c337a9f37 --- /dev/null +++ b/tutorials/isothermalFluid/potentialFreeSurfaceMovingOscillatingBox/system/functions @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forces; + libs ("libforces.so"); + writeControl writeTime; + patches (floatingObject); + rho rhoInf; + log yes; + rhoInf 1000; + CofR (0 0 0); +} + +poolHeight +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 1; + log yes; + writeTotalArea no; + writeFields no; + select faceZone; + faceZone f0; + operation areaAverage; + fields + ( + zeta + ); +} + +// ************************************************************************* // diff --git a/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/controlDict b/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/controlDict index 52b775d812..2379cf1b9c 100644 --- a/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/controlDict +++ b/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/controlDict @@ -52,38 +52,5 @@ maxCo 0.4; maxDeltaT 1; -functions -{ - forces - { - type forces; - libs ("libforces.so"); - writeControl writeTime; - patches (floatingObject); - rho rhoInf; - log yes; - rhoInf 1000; - CofR (0 0 0); - } - - poolHeight - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - writeControl timeStep; - writeInterval 1; - log yes; - writeTotalArea no; - writeFields no; - select faceZone; - faceZone f0; - operation areaAverage; - fields - ( - zeta - ); - - } -}; // ************************************************************************* // diff --git a/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/functions b/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/functions new file mode 100644 index 0000000000..a0c431a257 --- /dev/null +++ b/tutorials/isothermalFluid/potentialFreeSurfaceOscillatingBox/system/functions @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forces +{ + type forces; + libs ("libforces.so"); + writeControl writeTime; + patches (floatingObject); + rho rhoInf; + log yes; + rhoInf 1000; + CofR (0 0 0); +} + +poolHeight +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 1; + log yes; + writeTotalArea no; + writeFields no; + select faceZone; + faceZone f0; + operation areaAverage; + fields + ( + zeta + ); + +} + +// ************************************************************************* // diff --git a/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/controlDict b/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/controlDict index 12331912b4..a26a901c83 100644 --- a/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/controlDict +++ b/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/controlDict @@ -44,9 +44,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc components(U) -} // ************************************************************************* // diff --git a/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/functions b/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/functions new file mode 100644 index 0000000000..32ec3eb5b1 --- /dev/null +++ b/tutorials/legacy/electromagnetics/mhdFoam/hartmann/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc components(U) + +// ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/controlDict b/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/controlDict index 639bdc50ee..46c5800c65 100644 --- a/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/controlDict +++ b/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/controlDict @@ -46,32 +46,4 @@ runTimeModifiable true; adjustTimeStep no; -functions -{ - fieldAverage1 - { - #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" - - fields - ( - rhoN - rhoM - dsmcRhoN - momentum - linearKE - internalE - iDof - q - fD - ); - } - - dsmcFields1 - { - type dsmcFields; - libs ("liblagrangianFunctionObjects.so"); - writeControl writeTime; - } -} - // ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/functions b/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/functions new file mode 100644 index 0000000000..7eb2012215 --- /dev/null +++ b/tutorials/legacy/lagrangian/dsmcFoam/freeSpacePeriodic/system/functions @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fieldAverage1 +{ + #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" + + fields + ( + rhoN + rhoM + dsmcRhoN + momentum + linearKE + internalE + iDof + q + fD + ); +} + +dsmcFields1 +{ + type dsmcFields; + libs ("liblagrangianFunctionObjects.so"); + writeControl writeTime; +} + +// ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/controlDict b/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/controlDict index f483a2c99b..3f42557fd3 100644 --- a/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/controlDict +++ b/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/controlDict @@ -46,33 +46,5 @@ runTimeModifiable true; adjustTimeStep no; -functions -{ - fieldAverage1 - { - #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" - restartOnOutput off; - - fields - ( - rhoN - rhoM - dsmcRhoN - momentum - linearKE - internalE - iDof - q - fD - ); - } - - dsmcFields1 - { - type dsmcFields; - libs ("liblagrangianFunctionObjects.so"); - writeControl writeTime; - } -} // ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/functions b/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/functions new file mode 100644 index 0000000000..50e9adfae5 --- /dev/null +++ b/tutorials/legacy/lagrangian/dsmcFoam/freeSpaceStream/system/functions @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fieldAverage1 +{ + #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" + + restartOnOutput off; + + fields + ( + rhoN + rhoM + dsmcRhoN + momentum + linearKE + internalE + iDof + q + fD + ); +} + +dsmcFields1 +{ + type dsmcFields; + libs ("liblagrangianFunctionObjects.so"); + writeControl writeTime; +} + +// ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/controlDict b/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/controlDict index 1385718b90..6d3c7feb5d 100644 --- a/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/controlDict +++ b/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/controlDict @@ -46,32 +46,5 @@ runTimeModifiable true; adjustTimeStep no; -functions -{ - fieldAverage1 - { - #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" - - fields - ( - rhoN - rhoM - dsmcRhoN - momentum - linearKE - internalE - iDof - q - fD - ); - } - - dsmcFields1 - { - type dsmcFields; - libs ("liblagrangianFunctionObjects.so"); - writeControl writeTime; - } -} // ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/functions b/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/functions new file mode 100644 index 0000000000..7eb2012215 --- /dev/null +++ b/tutorials/legacy/lagrangian/dsmcFoam/supersonicCorner/system/functions @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fieldAverage1 +{ + #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" + + fields + ( + rhoN + rhoM + dsmcRhoN + momentum + linearKE + internalE + iDof + q + fD + ); +} + +dsmcFields1 +{ + type dsmcFields; + libs ("liblagrangianFunctionObjects.so"); + writeControl writeTime; +} + +// ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/controlDict b/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/controlDict index 2b5b00d5f3..c0d7c59d45 100644 --- a/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/controlDict +++ b/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/controlDict @@ -46,44 +46,5 @@ runTimeModifiable true; adjustTimeStep no; -functions -{ - fieldAverage1 - { - #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" - - fields - ( - rhoN - rhoM - dsmcRhoN - momentum - linearKE - internalE - iDof - q - fD - ); - } - - dsmcFields1 - { - type dsmcFields; - libs ("liblagrangianFunctionObjects.so"); - writeControl writeTime; - } - - forces1 - { - type forces; - libs ("libforces.so"); - writeControl writeTime; - patches (obstacle); - directForceDensity true; - fDName fDMean; - CofR (0 0 0); - log on; - } -} // ************************************************************************* // diff --git a/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/functions b/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/functions new file mode 100644 index 0000000000..007f99dc59 --- /dev/null +++ b/tutorials/legacy/lagrangian/dsmcFoam/wedge15Ma5/system/functions @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fieldAverage1 +{ + #includeEtc "caseDicts/functions/fields/fieldAverage.cfg" + + fields + ( + rhoN + rhoM + dsmcRhoN + momentum + linearKE + internalE + iDof + q + fD + ); +} + +dsmcFields1 +{ + type dsmcFields; + libs ("liblagrangianFunctionObjects.so"); + writeControl writeTime; +} + +forces1 +{ + type forces; + libs ("libforces.so"); + writeControl writeTime; + patches (obstacle); + directForceDensity true; + fDName fDMean; + CofR (0 0 0); + log on; +} + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/controlDict b/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/controlDict index 7b30d22e93..c05e69c188 100644 --- a/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/controlDict +++ b/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/controlDict @@ -59,23 +59,4 @@ maxDi 200; maxDeltaT 1; -functions -{ - #includeFunc patchAverage - ( - name=cylinderT, - region=fluid, - patch=fluid_to_solid, - field=T - ) - #includeFunc patchAverage - ( - name=inletU, - region=fluid, - patch=inlet, - field=U - ) -} - - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/functions b/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/functions new file mode 100644 index 0000000000..623c675012 --- /dev/null +++ b/tutorials/multiRegion/CHT/VoFcoolingCylinder2D/system/functions @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchAverage +( + name=cylinderT, + region=fluid, + patch=fluid_to_solid, + field=T +) +#includeFunc patchAverage +( + name=inletU, + region=fluid, + patch=inlet, + field=U +) + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/circuitBoardCooling/system/controlDict b/tutorials/multiRegion/CHT/circuitBoardCooling/system/controlDict index 6c69171ccc..89d43f2b21 100644 --- a/tutorials/multiRegion/CHT/circuitBoardCooling/system/controlDict +++ b/tutorials/multiRegion/CHT/circuitBoardCooling/system/controlDict @@ -49,5 +49,4 @@ timePrecision 6; runTimeModifiable true; - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/coolingCylinder2D/system/controlDict b/tutorials/multiRegion/CHT/coolingCylinder2D/system/controlDict index a3b24e9aed..0d1f8b7df6 100644 --- a/tutorials/multiRegion/CHT/coolingCylinder2D/system/controlDict +++ b/tutorials/multiRegion/CHT/coolingCylinder2D/system/controlDict @@ -57,23 +57,4 @@ maxDi 200; maxDeltaT 1; -functions -{ - #includeFunc patchAverage - ( - name=cylinderT, - region=fluid, - patch=fluid_to_solid, - field=T - ) - #includeFunc patchAverage - ( - name=inletU, - region=fluid, - patch=inlet, - field=U - ) -} - - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/coolingCylinder2D/system/functions b/tutorials/multiRegion/CHT/coolingCylinder2D/system/functions new file mode 100644 index 0000000000..623c675012 --- /dev/null +++ b/tutorials/multiRegion/CHT/coolingCylinder2D/system/functions @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchAverage +( + name=cylinderT, + region=fluid, + patch=fluid_to_solid, + field=T +) +#includeFunc patchAverage +( + name=inletU, + region=fluid, + patch=inlet, + field=U +) + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/coolingSphere/system/controlDict b/tutorials/multiRegion/CHT/coolingSphere/system/controlDict index f3a8257586..dd22f6d448 100644 --- a/tutorials/multiRegion/CHT/coolingSphere/system/controlDict +++ b/tutorials/multiRegion/CHT/coolingSphere/system/controlDict @@ -45,8 +45,4 @@ timePrecision 6; runTimeModifiable true; -functions -{ -} - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/coolingSphere/system/functions b/tutorials/multiRegion/CHT/coolingSphere/system/functions new file mode 100644 index 0000000000..76649a93df --- /dev/null +++ b/tutorials/multiRegion/CHT/coolingSphere/system/functions @@ -0,0 +1,18 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeIfPresent "regionSolvers" + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/heatExchanger/system/controlDict b/tutorials/multiRegion/CHT/heatExchanger/system/controlDict index 6d1f1bd5cb..1402561ffd 100644 --- a/tutorials/multiRegion/CHT/heatExchanger/system/controlDict +++ b/tutorials/multiRegion/CHT/heatExchanger/system/controlDict @@ -50,5 +50,4 @@ timePrecision 6; runTimeModifiable true; - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/controlDict b/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/controlDict index 70080c7831..e69924c051 100644 --- a/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/controlDict +++ b/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/controlDict @@ -57,24 +57,4 @@ maxDi 200; maxDeltaT 1; -functions -{ - #includeFunc patchAverage - ( - name=cylinderToil, - region=fluid, - patch=fluid_to_solid, - field=T.oil - ) - - #includeFunc patchAverage - ( - name=cylinderTwater, - region=fluid, - patch=fluid_to_solid, - field=T.water - ) -} - - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/functions b/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/functions new file mode 100644 index 0000000000..2d80f77c79 --- /dev/null +++ b/tutorials/multiRegion/CHT/multiphaseCoolingCylinder2D/system/functions @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc patchAverage +( + name=cylinderToil, + region=fluid, + patch=fluid_to_solid, + field=T.oil +) + +#includeFunc patchAverage +( + name=cylinderTwater, + region=fluid, + patch=fluid_to_solid, + field=T.water +) + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/reverseBurner/system/controlDict b/tutorials/multiRegion/CHT/reverseBurner/system/controlDict index 192a945494..930a822bc1 100644 --- a/tutorials/multiRegion/CHT/reverseBurner/system/controlDict +++ b/tutorials/multiRegion/CHT/reverseBurner/system/controlDict @@ -56,10 +56,4 @@ maxDi 5.0; adjustTimeStep yes; -functions -{ - #includeFunc Qdot(region=gas) -} - - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/reverseBurner/system/functions b/tutorials/multiRegion/CHT/reverseBurner/system/functions new file mode 100644 index 0000000000..a176624b9c --- /dev/null +++ b/tutorials/multiRegion/CHT/reverseBurner/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot(region=gas) + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/controlDict b/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/controlDict index 63fde8ca8a..aa8b50a4ab 100644 --- a/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/controlDict +++ b/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/controlDict @@ -53,11 +53,4 @@ runTimeModifiable on; adjustTimeStep off; -functions -{ - #includeFunc residuals(region = shell, p_rgh, U, h) - #includeFunc residuals(region = tube, p_rgh, U, h) - #includeFunc residuals(region = solid, h) -} - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/functions b/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/functions new file mode 100644 index 0000000000..e8f5813bd3 --- /dev/null +++ b/tutorials/multiRegion/CHT/shellAndTubeHeatExchanger/system/functions @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc residuals(region = shell, p_rgh, U, h) +#includeFunc residuals(region = tube, p_rgh, U, h) +#includeFunc residuals(region = solid, h) + +// ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/wallBoiling/system/controlDict b/tutorials/multiRegion/CHT/wallBoiling/system/controlDict index 9aeda16f29..938f08b78f 100644 --- a/tutorials/multiRegion/CHT/wallBoiling/system/controlDict +++ b/tutorials/multiRegion/CHT/wallBoiling/system/controlDict @@ -58,121 +58,4 @@ maxDi 200; maxDeltaT 0.005; -functions -{ - #includeFunc wallHeatFlux(name=WHFliquid, writeFields=false, phase=liquid, region=fluid) - #includeFunc wallHeatFlux(name=WHFgas, writeFields=false, phase=gas, region=fluid) - #includeFunc wallHeatFlux(name=WHFsolid, writeFields=false, region=solid, log=yes) - - writeWallBoilingProperties - { - type wallBoilingProperties; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl writeTime; - executeAtStart no; - region fluid; - phase liquid; - } - outflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - region fluid; - select patch; - patch outlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); - } - inflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - region fluid; - select patch; - patch inlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); - } - outletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - region fluid; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - outletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - region fluid; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - inletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - region fluid; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - inletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - region fluid; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - writeObjects1 - { - type writeObjects; - libs ("libutilityFunctionObjects.so"); - region fluid; - - objects - ( - rho.gas - mu.gas - psi.gas - kappa.gas - rho.liquid - mu.liquid - psi.liquid - kappa.liquid - h.liquid - h.gas - ); - - writeControl writeTime; - writeInterval 1; - } -} - - // ************************************************************************* // diff --git a/tutorials/multiRegion/CHT/wallBoiling/system/functions b/tutorials/multiRegion/CHT/wallBoiling/system/functions new file mode 100644 index 0000000000..f6c6f2be6a --- /dev/null +++ b/tutorials/multiRegion/CHT/wallBoiling/system/functions @@ -0,0 +1,150 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc wallHeatFlux +( + name=WHFliquid, + writeFields=false, + phase=liquid, + region=fluid +) + +#includeFunc wallHeatFlux +( + name=WHFgas, + writeFields=false, + phase=gas, + region=fluid +) + +#includeFunc wallHeatFlux +( + name=WHFsolid, + writeFields=false, + region=solid, + log=yes +) + +writeWallBoilingProperties +{ + type wallBoilingProperties; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl writeTime; + executeAtStart no; + region fluid; + phase liquid; +} +outflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + region fluid; + select patch; + patch outlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); +} +inflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + region fluid; + select patch; + patch inlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); +} +outletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + region fluid; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +outletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + region fluid; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +inletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + region fluid; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +inletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + region fluid; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +writeObjects1 +{ + type writeObjects; + libs ("libutilityFunctionObjects.so"); + region fluid; + + objects + ( + rho.gas + mu.gas + psi.gas + kappa.gas + rho.liquid + mu.liquid + psi.liquid + kappa.liquid + h.liquid + h.gas + ); + + writeControl writeTime; + writeInterval 1; +} + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/aachenBomb/system/controlDict b/tutorials/multicomponentFluid/aachenBomb/system/controlDict index bf0ae3ff83..683c1f94ea 100644 --- a/tutorials/multicomponentFluid/aachenBomb/system/controlDict +++ b/tutorials/multicomponentFluid/aachenBomb/system/controlDict @@ -50,10 +50,6 @@ maxCo 0.1; runTimeModifiable yes; -functions -{ - #includeFunc Qdot -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/aachenBomb/system/functions b/tutorials/multicomponentFluid/aachenBomb/system/functions new file mode 100644 index 0000000000..36e2103fb4 --- /dev/null +++ b/tutorials/multicomponentFluid/aachenBomb/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2D/system/controlDict b/tutorials/multicomponentFluid/counterFlowFlame2D/system/controlDict index d22ec131fb..138f96212e 100644 --- a/tutorials/multicomponentFluid/counterFlowFlame2D/system/controlDict +++ b/tutorials/multicomponentFluid/counterFlowFlame2D/system/controlDict @@ -50,10 +50,6 @@ adjustTimeStep yes; maxCo 0.4; -functions -{ - #includeFunc Qdot -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2D/system/functions b/tutorials/multicomponentFluid/counterFlowFlame2D/system/functions new file mode 100644 index 0000000000..36e2103fb4 --- /dev/null +++ b/tutorials/multicomponentFluid/counterFlowFlame2D/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/controlDict b/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/controlDict index 586408fae4..495ebbb8c1 100644 --- a/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/controlDict +++ b/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/controlDict @@ -46,10 +46,6 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc Qdot -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/functions b/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/functions new file mode 100644 index 0000000000..36e2103fb4 --- /dev/null +++ b/tutorials/multicomponentFluid/counterFlowFlame2DLTS/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/controlDict b/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/controlDict index 8fea13fb44..3508f3facb 100644 --- a/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/controlDict +++ b/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/controlDict @@ -46,10 +46,6 @@ timePrecision 6; runTimeModifiable true; -functions -{ - #includeFunc Qdot -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/functions b/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/functions new file mode 100644 index 0000000000..36e2103fb4 --- /dev/null +++ b/tutorials/multicomponentFluid/counterFlowFlame2DLTS_GRI_TDAC/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/controlDict b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/controlDict index d22ec131fb..138f96212e 100644 --- a/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/controlDict +++ b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/controlDict @@ -50,10 +50,6 @@ adjustTimeStep yes; maxCo 0.4; -functions -{ - #includeFunc Qdot -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/functions b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/functions new file mode 100644 index 0000000000..36e2103fb4 --- /dev/null +++ b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/controlDict b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/controlDict index d22ec131fb..138f96212e 100644 --- a/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/controlDict +++ b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/controlDict @@ -50,10 +50,6 @@ adjustTimeStep yes; maxCo 0.4; -functions -{ - #includeFunc Qdot -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/functions b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/functions new file mode 100644 index 0000000000..36e2103fb4 --- /dev/null +++ b/tutorials/multicomponentFluid/counterFlowFlame2D_GRI_TDAC/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/nc7h16/system/controlDict b/tutorials/multicomponentFluid/nc7h16/system/controlDict index 3b428dcde1..84f944fc48 100644 --- a/tutorials/multicomponentFluid/nc7h16/system/controlDict +++ b/tutorials/multicomponentFluid/nc7h16/system/controlDict @@ -53,10 +53,4 @@ DebugSwitches SolverPerformance 0; } -functions -{ - #includeFunc adjustTimeStepToChemistry - #includeFunc probes(name=probe, points=((0 0 0)), T, p) -} - // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/nc7h16/system/functions b/tutorials/multicomponentFluid/nc7h16/system/functions new file mode 100644 index 0000000000..24508c34c0 --- /dev/null +++ b/tutorials/multicomponentFluid/nc7h16/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc adjustTimeStepToChemistry +#includeFunc probes(name=probe, points=((0 0 0)), T, p) + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/verticalChannel/system/controlDict b/tutorials/multicomponentFluid/verticalChannel/system/controlDict index ec60b70541..09b3f33c3f 100644 --- a/tutorials/multicomponentFluid/verticalChannel/system/controlDict +++ b/tutorials/multicomponentFluid/verticalChannel/system/controlDict @@ -52,26 +52,5 @@ maxCo 5; maxDeltaT 1e-03; -functions -{ - surfaceFieldValue1 - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - writeControl writeTime; - log yes; - writeFields no; - select patch; - patch outlet; - operation average; - weightField phi; - - fields - ( - H2O - T - ); - } -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/verticalChannel/system/functions b/tutorials/multicomponentFluid/verticalChannel/system/functions new file mode 100644 index 0000000000..b7b3b46519 --- /dev/null +++ b/tutorials/multicomponentFluid/verticalChannel/system/functions @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +surfaceFieldValue1 +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + log yes; + writeFields no; + select patch; + patch outlet; + operation average; + weightField phi; + + fields + ( + H2O + T + ); +} + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/verticalChannelLTS/system/controlDict b/tutorials/multicomponentFluid/verticalChannelLTS/system/controlDict index e9ad779391..b0badc4a49 100644 --- a/tutorials/multicomponentFluid/verticalChannelLTS/system/controlDict +++ b/tutorials/multicomponentFluid/verticalChannelLTS/system/controlDict @@ -47,26 +47,6 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - surfaceFieldValue1 - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - writeControl writeTime; - log yes; - writeFields no; - select patch; - name outlet; - operation average; - weightField phi; - fields - ( - H2O - T - ); - } -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/verticalChannelLTS/system/functions b/tutorials/multicomponentFluid/verticalChannelLTS/system/functions new file mode 100644 index 0000000000..2e70a1ca3d --- /dev/null +++ b/tutorials/multicomponentFluid/verticalChannelLTS/system/functions @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +surfaceFieldValue1 +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + log yes; + writeFields no; + select patch; + name outlet; + operation average; + weightField phi; + fields + ( + H2O + T + ); +} + +// ************************************************************************* // diff --git a/tutorials/multicomponentFluid/verticalChannelSteady/system/controlDict b/tutorials/multicomponentFluid/verticalChannelSteady/system/controlDict index 5d51f4b773..3e11831387 100644 --- a/tutorials/multicomponentFluid/verticalChannelSteady/system/controlDict +++ b/tutorials/multicomponentFluid/verticalChannelSteady/system/controlDict @@ -47,27 +47,6 @@ timePrecision 6; runTimeModifiable yes; -functions -{ - surfaceFieldValue1 - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - enabled yes; - writeControl writeTime; - log yes; - writeFields no; - select patch; - patch outlet; - operation average; - weightField phi; - fields - ( - H2O - T - ); - } -} // ************************************************************************* // diff --git a/tutorials/multicomponentFluid/verticalChannelSteady/system/functions b/tutorials/multicomponentFluid/verticalChannelSteady/system/functions new file mode 100644 index 0000000000..568fdc646d --- /dev/null +++ b/tutorials/multicomponentFluid/verticalChannelSteady/system/functions @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +surfaceFieldValue1 +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + enabled yes; + writeControl writeTime; + log yes; + writeFields no; + select patch; + patch outlet; + operation average; + weightField phi; + fields + ( + H2O + T + ); +} + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/Grossetete/system/controlDict b/tutorials/multiphaseEuler/Grossetete/system/controlDict index 07d9e1376d..0c1f8bf4fc 100644 --- a/tutorials/multiphaseEuler/Grossetete/system/controlDict +++ b/tutorials/multiphaseEuler/Grossetete/system/controlDict @@ -52,18 +52,6 @@ maxCo 0.25; maxDeltaT 0.001; -functions -{ - #includeFunc graphCell - ( - name=graph, - start=(0.0101 0 0), - end=(0.0101 0.01905 0), - fields=(alpha.gas) - ) - - #includeFunc yPlus(phase=liquid) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/Grossetete/system/functions b/tutorials/multiphaseEuler/Grossetete/system/functions new file mode 100644 index 0000000000..5060194585 --- /dev/null +++ b/tutorials/multiphaseEuler/Grossetete/system/functions @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc graphCell +( + name=graph, + start=(0.0101 0 0), + end=(0.0101 0.01905 0), + fields=(alpha.gas) +) + +#includeFunc yPlus(phase=liquid) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/boilingBed/system/controlDict b/tutorials/multiphaseEuler/boilingBed/system/controlDict index 6edee3cfa1..e38c113084 100644 --- a/tutorials/multiphaseEuler/boilingBed/system/controlDict +++ b/tutorials/multiphaseEuler/boilingBed/system/controlDict @@ -52,127 +52,6 @@ maxCo 0.5; maxDeltaT 0.005; -functions -{ - #includeFunc cellMinMag - ( - name=fieldMin, - executeAtStart=no, - continuityError.gas, - continuityError.liquid, - log=yes - ) - - #includeFunc cellMaxMag - ( - name=fieldMax, - executeAtStart=no, - continuityError.gas, - continuityError.liquid, - log=yes - ) - - #includeFunc writeObjects - ( - continuityError.gas, - continuityError.liquid - ) - - outflow - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - fields (alphaRhoPhi.gas alphaRhoPhi.liquid); - } - - inflow - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - fields (alphaRhoPhi.gas alphaRhoPhi.liquid); - } - - outletGas - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.gas; - fields (h.gas); - } - - outletLiquid - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields (e.liquid); - } - - inletGas - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.gas; - fields (h.gas); - } - - inletLiquid - { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields (e.liquid); - } - - contError - { - type volFieldValue; - libs ("libfieldFunctionObjects.so"); - log yes; - writeFields false; - select all; - operation volIntegrate; - fields (continuityError.gas continuityError.liquid); - } - - writeWallheatfluxSolid - { - type wallHeatFlux; - libs ( "libmultiphaseEulerFoamFunctionObjects.so" ); - writeControl writeTime; - phase solid; - } -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/boilingBed/system/functions b/tutorials/multiphaseEuler/boilingBed/system/functions new file mode 100644 index 0000000000..5ba562634e --- /dev/null +++ b/tutorials/multiphaseEuler/boilingBed/system/functions @@ -0,0 +1,136 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc cellMinMag +( + name=fieldMin, + executeAtStart=no, + continuityError.gas, + continuityError.liquid, + log=yes +) + +#includeFunc cellMaxMag +( + name=fieldMax, + executeAtStart=no, + continuityError.gas, + continuityError.liquid, + log=yes +) + +#includeFunc writeObjects +( + continuityError.gas, + continuityError.liquid +) + +outflow +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + fields (alphaRhoPhi.gas alphaRhoPhi.liquid); +} + +inflow +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + fields (alphaRhoPhi.gas alphaRhoPhi.liquid); +} + +outletGas +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.gas; + fields (h.gas); +} + +outletLiquid +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields (e.liquid); +} + +inletGas +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.gas; + fields (h.gas); +} + +inletLiquid +{ + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields (e.liquid); +} + +contError +{ + type volFieldValue; + libs ("libfieldFunctionObjects.so"); + log yes; + writeFields false; + select all; + operation volIntegrate; + fields (continuityError.gas continuityError.liquid); +} + +writeWallheatfluxSolid +{ + type wallHeatFlux; + libs ( "libmultiphaseEulerFoamFunctionObjects.so" ); + writeControl writeTime; + phase solid; +} + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumn/system/controlDict b/tutorials/multiphaseEuler/bubbleColumn/system/controlDict index d8a43d59ea..19f5c45ecc 100644 --- a/tutorials/multiphaseEuler/bubbleColumn/system/controlDict +++ b/tutorials/multiphaseEuler/bubbleColumn/system/controlDict @@ -52,10 +52,6 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc fieldAverage(U.air, U.water, alpha.air, p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumn/system/functions b/tutorials/multiphaseEuler/bubbleColumn/system/functions new file mode 100644 index 0000000000..3962bd58fe --- /dev/null +++ b/tutorials/multiphaseEuler/bubbleColumn/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U.air, U.water, alpha.air, p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/controlDict b/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/controlDict index eeb6a69b82..d4b0f7ad5f 100644 --- a/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/controlDict +++ b/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/controlDict @@ -52,10 +52,6 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc Qdot(phase = gas) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/functions b/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/functions new file mode 100644 index 0000000000..8fc45ef388 --- /dev/null +++ b/tutorials/multiphaseEuler/bubbleColumnEvaporatingReacting/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc Qdot(phase = gas) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnIATE/system/controlDict b/tutorials/multiphaseEuler/bubbleColumnIATE/system/controlDict index d8a43d59ea..19f5c45ecc 100644 --- a/tutorials/multiphaseEuler/bubbleColumnIATE/system/controlDict +++ b/tutorials/multiphaseEuler/bubbleColumnIATE/system/controlDict @@ -52,10 +52,6 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc fieldAverage(U.air, U.water, alpha.air, p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnIATE/system/functions b/tutorials/multiphaseEuler/bubbleColumnIATE/system/functions new file mode 100644 index 0000000000..3962bd58fe --- /dev/null +++ b/tutorials/multiphaseEuler/bubbleColumnIATE/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U.air, U.water, alpha.air, p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnLES/system/controlDict b/tutorials/multiphaseEuler/bubbleColumnLES/system/controlDict index d8a43d59ea..19f5c45ecc 100644 --- a/tutorials/multiphaseEuler/bubbleColumnLES/system/controlDict +++ b/tutorials/multiphaseEuler/bubbleColumnLES/system/controlDict @@ -52,10 +52,6 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc fieldAverage(U.air, U.water, alpha.air, p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnLES/system/functions b/tutorials/multiphaseEuler/bubbleColumnLES/system/functions new file mode 100644 index 0000000000..3962bd58fe --- /dev/null +++ b/tutorials/multiphaseEuler/bubbleColumnLES/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U.air, U.water, alpha.air, p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnLaminar/system/controlDict b/tutorials/multiphaseEuler/bubbleColumnLaminar/system/controlDict index d8a43d59ea..19f5c45ecc 100644 --- a/tutorials/multiphaseEuler/bubbleColumnLaminar/system/controlDict +++ b/tutorials/multiphaseEuler/bubbleColumnLaminar/system/controlDict @@ -52,10 +52,6 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc fieldAverage(U.air, U.water, alpha.air, p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubbleColumnLaminar/system/functions b/tutorials/multiphaseEuler/bubbleColumnLaminar/system/functions new file mode 100644 index 0000000000..3962bd58fe --- /dev/null +++ b/tutorials/multiphaseEuler/bubbleColumnLaminar/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U.air, U.water, alpha.air, p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubblePipe/system/controlDict b/tutorials/multiphaseEuler/bubblePipe/system/controlDict index f31d833866..3fd4ee1053 100644 --- a/tutorials/multiphaseEuler/bubblePipe/system/controlDict +++ b/tutorials/multiphaseEuler/bubblePipe/system/controlDict @@ -51,51 +51,5 @@ maxCo 0.8; maxDeltaT 1; -functions -{ - #includeFunc residuals(p_rgh, k.water, omega.water) - #includeFunc timeStep - #includeFunc writeObjects(d.air1) - #includeFunc writeObjects(d.air2) - #includeFunc phaseForces(phase=water) - #includeFunc graphUniform - ( - name=graph, - start=(0 0 0.89), - end=(0.025 0 0.89), - nPoints=100, - fields= - ( - alpha.air1 - alpha.air2 - alpha.bubbles - liftForce.water - wallLubricationForce.water - turbulentDispersionForce.water - ) - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=probabilityDensity.injection, - populationBalance=bubbles, - select=cellZone, - cellZone=injection, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=probabilityDensity.outlet, - populationBalance=bubbles, - select=cellZone, - cellZone=outlet, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/bubblePipe/system/functions b/tutorials/multiphaseEuler/bubblePipe/system/functions new file mode 100644 index 0000000000..6aede3c268 --- /dev/null +++ b/tutorials/multiphaseEuler/bubblePipe/system/functions @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc residuals(p_rgh, k.water, omega.water) +#includeFunc timeStep +#includeFunc writeObjects(d.air1) +#includeFunc writeObjects(d.air2) +#includeFunc phaseForces(phase=water) +#includeFunc graphUniform +( + name=graph, + start=(0 0 0.89), + end=(0.025 0 0.89), + nPoints=100, + fields= + ( + alpha.air1 + alpha.air2 + alpha.bubbles + liftForce.water + wallLubricationForce.water + turbulentDispersionForce.water + ) +) + +#includeFunc populationBalanceSizeDistribution +( + name=probabilityDensity.injection, + populationBalance=bubbles, + select=cellZone, + cellZone=injection, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +#includeFunc populationBalanceSizeDistribution +( + name=probabilityDensity.outlet, + populationBalance=bubbles, + select=cellZone, + cellZone=outlet, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/damBreak4phase/system/controlDict b/tutorials/multiphaseEuler/damBreak4phase/system/controlDict index 5ace973e80..32587152c5 100644 --- a/tutorials/multiphaseEuler/damBreak4phase/system/controlDict +++ b/tutorials/multiphaseEuler/damBreak4phase/system/controlDict @@ -53,9 +53,5 @@ maxAlphaCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc phaseMap -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/damBreak4phase/system/functions b/tutorials/multiphaseEuler/damBreak4phase/system/functions new file mode 100644 index 0000000000..b75a163176 --- /dev/null +++ b/tutorials/multiphaseEuler/damBreak4phase/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc phaseMap + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/fluidisedBed/system/controlDict b/tutorials/multiphaseEuler/fluidisedBed/system/controlDict index 4041ce7fcc..de978e00ce 100644 --- a/tutorials/multiphaseEuler/fluidisedBed/system/controlDict +++ b/tutorials/multiphaseEuler/fluidisedBed/system/controlDict @@ -52,10 +52,6 @@ maxCo 2; maxDeltaT 0.01; -functions -{ - #includeFunc fieldAverage(U.particles, U.air, alpha.particles, p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/fluidisedBed/system/functions b/tutorials/multiphaseEuler/fluidisedBed/system/functions new file mode 100644 index 0000000000..5fce8746c4 --- /dev/null +++ b/tutorials/multiphaseEuler/fluidisedBed/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U.particles, U.air, alpha.particles, p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/fluidisedBedLaminar/system/controlDict b/tutorials/multiphaseEuler/fluidisedBedLaminar/system/controlDict index ec6ed9e104..9ea82c6ed2 100644 --- a/tutorials/multiphaseEuler/fluidisedBedLaminar/system/controlDict +++ b/tutorials/multiphaseEuler/fluidisedBedLaminar/system/controlDict @@ -52,10 +52,6 @@ maxCo 0.9; maxDeltaT 1e-05; -functions -{ - #includeFunc fieldAverage(U.particles, U.air, alpha.particles, p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/fluidisedBedLaminar/system/functions b/tutorials/multiphaseEuler/fluidisedBedLaminar/system/functions new file mode 100644 index 0000000000..5fce8746c4 --- /dev/null +++ b/tutorials/multiphaseEuler/fluidisedBedLaminar/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc fieldAverage(U.particles, U.air, alpha.particles, p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/hydrofoil/system/controlDict b/tutorials/multiphaseEuler/hydrofoil/system/controlDict index 7b17d827b2..b178b91114 100644 --- a/tutorials/multiphaseEuler/hydrofoil/system/controlDict +++ b/tutorials/multiphaseEuler/hydrofoil/system/controlDict @@ -51,54 +51,6 @@ maxCo 0.8; maxDeltaT 1e-4; -functions -{ - #includeFunc yPlus(phase=liquid) - - #includeFunc cellMin - ( - name=min, - alpha.liquid, - alpha.gas, - p, - p_rgh, - U.liquid, - U.gas, - T.gas, - T.liquid - ) - - #includeFunc cellMax - ( - name=max, - alpha.liquid, - alpha.gas, - p, - p_rgh, - U.liquid, - U.gas, - T.gas, - T.liquid - ) - - #includeFunc graphPatchCutLayerAverage - ( - name=hydrofoilLowerPressure, - patch=hydrofoilLower, - direction=(0.15 -0.016 0), - nPoints=100, - p - ) - - #includeFunc graphPatchCutLayerAverage - ( - name=hydrofoilUpperPressure, - patch=hydrofoilUpper, - direction=(0.15 -0.016 0), - nPoints=100, - p - ) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/hydrofoil/system/functions b/tutorials/multiphaseEuler/hydrofoil/system/functions new file mode 100644 index 0000000000..d97cbf73d3 --- /dev/null +++ b/tutorials/multiphaseEuler/hydrofoil/system/functions @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc yPlus(phase=liquid) + +#includeFunc cellMin +( + name=min, + alpha.liquid, + alpha.gas, + p, + p_rgh, + U.liquid, + U.gas, + T.gas, + T.liquid +) + +#includeFunc cellMax +( + name=max, + alpha.liquid, + alpha.gas, + p, + p_rgh, + U.liquid, + U.gas, + T.gas, + T.liquid +) + +#includeFunc graphPatchCutLayerAverage +( + name=hydrofoilLowerPressure, + patch=hydrofoilLower, + direction=(0.15 -0.016 0), + nPoints=100, + p +) + +#includeFunc graphPatchCutLayerAverage +( + name=hydrofoilUpperPressure, + patch=hydrofoilUpper, + direction=(0.15 -0.016 0), + nPoints=100, + p +) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/mixerVessel2D/system/controlDict b/tutorials/multiphaseEuler/mixerVessel2D/system/controlDict index d3a6cf86c6..8233ce1a09 100644 --- a/tutorials/multiphaseEuler/mixerVessel2D/system/controlDict +++ b/tutorials/multiphaseEuler/mixerVessel2D/system/controlDict @@ -52,9 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc phaseMap -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/mixerVessel2D/system/functions b/tutorials/multiphaseEuler/mixerVessel2D/system/functions new file mode 100644 index 0000000000..b75a163176 --- /dev/null +++ b/tutorials/multiphaseEuler/mixerVessel2D/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc phaseMap + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/mixerVessel2DMRF/system/controlDict b/tutorials/multiphaseEuler/mixerVessel2DMRF/system/controlDict index d3a6cf86c6..8233ce1a09 100644 --- a/tutorials/multiphaseEuler/mixerVessel2DMRF/system/controlDict +++ b/tutorials/multiphaseEuler/mixerVessel2DMRF/system/controlDict @@ -52,9 +52,5 @@ maxCo 0.5; maxDeltaT 1; -functions -{ - #includeFunc phaseMap -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/mixerVessel2DMRF/system/functions b/tutorials/multiphaseEuler/mixerVessel2DMRF/system/functions new file mode 100644 index 0000000000..b75a163176 --- /dev/null +++ b/tutorials/multiphaseEuler/mixerVessel2DMRF/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc phaseMap + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/pipeBend/system/controlDict b/tutorials/multiphaseEuler/pipeBend/system/controlDict index 247250797d..1baf1d6179 100644 --- a/tutorials/multiphaseEuler/pipeBend/system/controlDict +++ b/tutorials/multiphaseEuler/pipeBend/system/controlDict @@ -51,54 +51,6 @@ maxCo 1; maxDeltaT 1; -functions -{ - #includeFunc writeObjects(d.particles) - - #includeFunc populationBalanceSizeDistribution - ( - name=probabilityDensity.afterBend_1d, - populationBalance=agglomerates, - select=cellZone, - cellZone=afterBend_1d, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=probabilityDensity.afterBend_5d, - populationBalance=agglomerates, - select=cellZone, - cellZone=afterBend_5d, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=probabilityDensity.afterBend_9d, - populationBalance=agglomerates, - select=cellZone, - cellZone=afterBend_9d, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=probabilityDensity.beforeBend_1d, - populationBalance=agglomerates, - select=cellZone, - cellZone=beforeBend_1d, - functionType=volumeDensity, - coordinateType=diameter, - normalise=yes - ) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/pipeBend/system/functions b/tutorials/multiphaseEuler/pipeBend/system/functions new file mode 100644 index 0000000000..f1199609cc --- /dev/null +++ b/tutorials/multiphaseEuler/pipeBend/system/functions @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc writeObjects(d.particles) + +#includeFunc populationBalanceSizeDistribution +( + name=probabilityDensity.afterBend_1d, + populationBalance=agglomerates, + select=cellZone, + cellZone=afterBend_1d, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +#includeFunc populationBalanceSizeDistribution +( + name=probabilityDensity.afterBend_5d, + populationBalance=agglomerates, + select=cellZone, + cellZone=afterBend_5d, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +#includeFunc populationBalanceSizeDistribution +( + name=probabilityDensity.afterBend_9d, + populationBalance=agglomerates, + select=cellZone, + cellZone=afterBend_9d, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +#includeFunc populationBalanceSizeDistribution +( + name=probabilityDensity.beforeBend_1d, + populationBalance=agglomerates, + select=cellZone, + cellZone=beforeBend_1d, + functionType=volumeDensity, + coordinateType=diameter, + normalise=yes +) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/steamInjection/system/controlDict b/tutorials/multiphaseEuler/steamInjection/system/controlDict index 73a80bb7f4..411eab4e04 100644 --- a/tutorials/multiphaseEuler/steamInjection/system/controlDict +++ b/tutorials/multiphaseEuler/steamInjection/system/controlDict @@ -52,11 +52,6 @@ maxCo 0.25; maxDeltaT 1e-2; -functions -{ - #includeFunc cellMin(T.steam,T.water,p) - #includeFunc cellMax(T.steam,T.water,p) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/steamInjection/system/functions b/tutorials/multiphaseEuler/steamInjection/system/functions new file mode 100644 index 0000000000..4ac856113e --- /dev/null +++ b/tutorials/multiphaseEuler/steamInjection/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc cellMin(T.steam,T.water,p) +#includeFunc cellMax(T.steam,T.water,p) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/titaniaSynthesis/system/controlDict b/tutorials/multiphaseEuler/titaniaSynthesis/system/controlDict index dce1dfd101..232893f0f1 100644 --- a/tutorials/multiphaseEuler/titaniaSynthesis/system/controlDict +++ b/tutorials/multiphaseEuler/titaniaSynthesis/system/controlDict @@ -52,35 +52,6 @@ maxCo 0.8; maxDeltaT 1e-3; -functions -{ - #includeFunc graphCell - ( - name=graph, - start=(0 0 1e-3), - end=(0.44 0 1e-3), - fields=(TiCl4.vapour O2.vapour Cl2.vapour alpha.particles) - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=aggregates, - select=cellZone, - cellZone=outlet, - functionType=numberDensity, - coordinateType=projectedAreaDiameter, - allCoordinates=yes, - normalise=yes, - logTransform=yes - ) - - #includeFunc writeObjects - ( - d.particles, - phaseTransfer:dmidtf.TiO2.particles_vapour - ) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/titaniaSynthesis/system/functions b/tutorials/multiphaseEuler/titaniaSynthesis/system/functions new file mode 100644 index 0000000000..9b5f3dea3d --- /dev/null +++ b/tutorials/multiphaseEuler/titaniaSynthesis/system/functions @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc graphCell +( + name=graph, + start=(0 0 1e-3), + end=(0.44 0 1e-3), + fields=(TiCl4.vapour O2.vapour Cl2.vapour alpha.particles) +) + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=aggregates, + select=cellZone, + cellZone=outlet, + functionType=numberDensity, + coordinateType=projectedAreaDiameter, + allCoordinates=yes, + normalise=yes, + logTransform=yes +) + +#includeFunc writeObjects +( + d.particles, + phaseTransfer:dmidtf.TiO2.particles_vapour +) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/controlDict b/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/controlDict index 6cb50e532e..232893f0f1 100644 --- a/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/controlDict +++ b/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/controlDict @@ -52,36 +52,6 @@ maxCo 0.8; maxDeltaT 1e-3; -functions -{ - #includeFunc graphCell - ( - name=graph, - start=(0 0 1e-3), - end=(0.44 0 1e-3), - fields=(TiCl4.vapour O2.vapour Cl2.vapour alpha.particles) - ) - - #includeFunc populationBalanceSizeDistribution - ( - name=numberDensity, - populationBalance=aggregates, - select=cellZone, - cellZone=outlet, - functionType=numberDensity, - coordinateType=projectedAreaDiameter, - allCoordinates=yes, - normalise=yes, - logTransform=yes - ) - - #includeFunc writeObjects - ( - d.particles, - phaseTransfer:dmidtf.TiO2.particles_vapour, - phaseTransfer:dmidtf.TiO2_s.particles_vapour - ) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/functions b/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/functions new file mode 100644 index 0000000000..b73622b993 --- /dev/null +++ b/tutorials/multiphaseEuler/titaniaSynthesisSurface/system/functions @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc graphCell +( + name=graph, + start=(0 0 1e-3), + end=(0.44 0 1e-3), + fields=(TiCl4.vapour O2.vapour Cl2.vapour alpha.particles) +) + +#includeFunc populationBalanceSizeDistribution +( + name=numberDensity, + populationBalance=aggregates, + select=cellZone, + cellZone=outlet, + functionType=numberDensity, + coordinateType=projectedAreaDiameter, + allCoordinates=yes, + normalise=yes, + logTransform=yes +) + +#includeFunc writeObjects +( + d.particles, + phaseTransfer:dmidtf.TiO2.particles_vapour, + phaseTransfer:dmidtf.TiO2_s.particles_vapour +) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/wallBoilingIATE/system/controlDict b/tutorials/multiphaseEuler/wallBoilingIATE/system/controlDict index 62b18d5419..f595db3ca0 100644 --- a/tutorials/multiphaseEuler/wallBoilingIATE/system/controlDict +++ b/tutorials/multiphaseEuler/wallBoilingIATE/system/controlDict @@ -52,87 +52,6 @@ maxCo 0.5; maxDeltaT 0.001; -functions -{ - writeWallBoilingProperties - { - type wallBoilingProperties; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl writeTime; - phase liquid; - } - outflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); - } - inflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); - } - outletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - outletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - inletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - inletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - #includeFunc writeObjects(d.gas) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/wallBoilingIATE/system/functions b/tutorials/multiphaseEuler/wallBoilingIATE/system/functions new file mode 100644 index 0000000000..c1c5a6cfe2 --- /dev/null +++ b/tutorials/multiphaseEuler/wallBoilingIATE/system/functions @@ -0,0 +1,96 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +writeWallBoilingProperties +{ + type wallBoilingProperties; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl writeTime; + phase liquid; +} +outflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); +} +inflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.liquid); +} +outletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +outletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +inletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +inletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +#includeFunc writeObjects(d.gas) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/controlDict b/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/controlDict index 174679fd59..f595db3ca0 100644 --- a/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/controlDict +++ b/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/controlDict @@ -52,129 +52,6 @@ maxCo 0.5; maxDeltaT 0.001; -functions -{ - writeWallBoilingProperties - { - type wallBoilingProperties; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl writeTime; - phase liquid; - } - volumeDensity.diameter.bubbles - { - type populationBalanceSizeDistribution; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl runTime; - writeInterval 0.5; - setFormat raw; - log yes; - functionType volumeConcentration; - coordinateType diameter; - select cellZone; - cellZone x349; - populationBalance bubbles; - } - volumeDensity_bulk.diameter.bubbles - { - type populationBalanceSizeDistribution; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl runTime; - writeInterval 0.5; - setFormat raw; - log yes; - functionType volumeConcentration; - coordinateType diameter; - select cellZone; - cellZone x349_bulk; - populationBalance bubbles; - } - volumeDensity_wall.diameter.bubbles - { - type populationBalanceSizeDistribution; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl runTime; - writeInterval 0.5; - setFormat raw; - log yes; - functionType volumeConcentration; - coordinateType diameter; - select cellZone; - cellZone x349_wall; - populationBalance bubbles; - } - outflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.liquid ); - } - inflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.liquid ); - } - outletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - outletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - inletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - inletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - #includeFunc writeObjects(d.gas) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/functions b/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/functions new file mode 100644 index 0000000000..76e900be2d --- /dev/null +++ b/tutorials/multiphaseEuler/wallBoilingPolydisperse/system/functions @@ -0,0 +1,138 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +writeWallBoilingProperties +{ + type wallBoilingProperties; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl writeTime; + phase liquid; +} +volumeDensity.diameter.bubbles +{ + type populationBalanceSizeDistribution; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl runTime; + writeInterval 0.5; + setFormat raw; + log yes; + functionType volumeConcentration; + coordinateType diameter; + select cellZone; + cellZone x349; + populationBalance bubbles; +} +volumeDensity_bulk.diameter.bubbles +{ + type populationBalanceSizeDistribution; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl runTime; + writeInterval 0.5; + setFormat raw; + log yes; + functionType volumeConcentration; + coordinateType diameter; + select cellZone; + cellZone x349_bulk; + populationBalance bubbles; +} +volumeDensity_wall.diameter.bubbles +{ + type populationBalanceSizeDistribution; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl runTime; + writeInterval 0.5; + setFormat raw; + log yes; + functionType volumeConcentration; + coordinateType diameter; + select cellZone; + cellZone x349_wall; + populationBalance bubbles; +} +outflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.liquid ); +} +inflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.liquid ); +} +outletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +outletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +inletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +inletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +#includeFunc writeObjects(d.gas) + +// ************************************************************************* // diff --git a/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/controlDict b/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/controlDict index 8ec9df200a..f595db3ca0 100644 --- a/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/controlDict +++ b/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/controlDict @@ -52,153 +52,6 @@ maxCo 0.5; maxDeltaT 0.001; -functions -{ - writeWallBoilingProperties - { - type wallBoilingProperties; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl writeTime; - phase liquid; - } - volumeDensity.diameter.bubbles - { - type populationBalanceSizeDistribution; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl runTime; - writeInterval 0.5; - setFormat raw; - log yes; - functionType volumeConcentration; - coordinateType diameter; - select cellZone; - cellZone x349; - populationBalance bubbles; - } - volumeDensity_bulk.diameter.bubbles - { - type populationBalanceSizeDistribution; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl runTime; - writeInterval 0.5; - setFormat raw; - log yes; - functionType volumeConcentration; - coordinateType diameter; - select cellZone; - cellZone x349_bulk; - populationBalance bubbles; - } - volumeDensity_wall.diameter.bubbles - { - type populationBalanceSizeDistribution; - libs ( "libmultiphaseEulerFunctionObjects.so" ); - writeControl runTime; - writeInterval 0.5; - setFormat raw; - log yes; - functionType volumeConcentration; - coordinateType diameter; - select cellZone; - cellZone x349_wall; - populationBalance bubbles; - } - outflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid ); - } - inflow - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid ); - } - outletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - outletGas2 - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.gas2; - fields ( h.gas2 ); - } - outletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch outlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - inletGas - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.gas; - fields ( h.gas ); - } - inletGas2 - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.gas2; - fields ( h.gas2 ); - } - inletLiquid - { - type surfaceFieldValue; - libs ( "libfieldFunctionObjects.so" ); - log yes; - writeFields false; - select patch; - patch inlet; - operation sum; - weightField alphaRhoPhi.liquid; - fields ( h.liquid ); - } - #includeFunc writeObjects(d.gas, d.gas2) -} // ************************************************************************* // diff --git a/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/functions b/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/functions new file mode 100644 index 0000000000..b61439f0e7 --- /dev/null +++ b/tutorials/multiphaseEuler/wallBoilingPolydisperseTwoGroups/system/functions @@ -0,0 +1,162 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +writeWallBoilingProperties +{ + type wallBoilingProperties; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl writeTime; + phase liquid; +} +volumeDensity.diameter.bubbles +{ + type populationBalanceSizeDistribution; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl runTime; + writeInterval 0.5; + setFormat raw; + log yes; + functionType volumeConcentration; + coordinateType diameter; + select cellZone; + cellZone x349; + populationBalance bubbles; +} +volumeDensity_bulk.diameter.bubbles +{ + type populationBalanceSizeDistribution; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl runTime; + writeInterval 0.5; + setFormat raw; + log yes; + functionType volumeConcentration; + coordinateType diameter; + select cellZone; + cellZone x349_bulk; + populationBalance bubbles; +} +volumeDensity_wall.diameter.bubbles +{ + type populationBalanceSizeDistribution; + libs ( "libmultiphaseEulerFunctionObjects.so" ); + writeControl runTime; + writeInterval 0.5; + setFormat raw; + log yes; + functionType volumeConcentration; + coordinateType diameter; + select cellZone; + cellZone x349_wall; + populationBalance bubbles; +} +outflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid ); +} +inflow +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid ); +} +outletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +outletGas2 +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.gas2; + fields ( h.gas2 ); +} +outletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch outlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +inletGas +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.gas; + fields ( h.gas ); +} +inletGas2 +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.gas2; + fields ( h.gas2 ); +} +inletLiquid +{ + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + log yes; + writeFields false; + select patch; + patch inlet; + operation sum; + weightField alphaRhoPhi.liquid; + fields ( h.liquid ); +} +#includeFunc writeObjects(d.gas, d.gas2) + +// ************************************************************************* // diff --git a/tutorials/potentialFoam/cylinder/system/controlDict b/tutorials/potentialFoam/cylinder/system/controlDict index c152d2cf16..87551ee6e2 100644 --- a/tutorials/potentialFoam/cylinder/system/controlDict +++ b/tutorials/potentialFoam/cylinder/system/controlDict @@ -44,105 +44,6 @@ timePrecision 6; runTimeModifiable true; -functions -{ - error - { - type coded; - - // Load the library containing the 'coded' functionObject - libs ("libutilityFunctionObjects.so"); - - codeInclude - #{ - #include "volFields.H" - #}; - - codeEnd - #{ - // Lookup U - Info<< "Looking up field U\n" << endl; - const volVectorField& U = mesh().lookupObject("U"); - - Info<< "Reading inlet velocity uInfX\n" << endl; - - scalar ULeft = 0.0; - label leftI = mesh().boundaryMesh().findIndex("left"); - const fvPatchVectorField& fvp = U.boundaryField()[leftI]; - if (fvp.size()) - { - ULeft = fvp[0].x(); - } - reduce(ULeft, maxOp()); - - dimensionedScalar uInfX - ( - "uInfx", - dimensionSet(0, 1, -1, 0, 0), - ULeft - ); - - Info << "U at inlet = " << uInfX.value() << " m/s" << endl; - - - scalar magCylinder = 0.0; - label cylI = mesh().boundaryMesh().findIndex("cylinder"); - const fvPatchVectorField& cylFvp = mesh().C().boundaryField()[cylI]; - if (cylFvp.size()) - { - magCylinder = mag(cylFvp[0]); - } - reduce(magCylinder, maxOp()); - - dimensionedScalar radius - ( - "radius", - dimensionSet(0, 1, 0, 0, 0), - magCylinder - ); - - Info << "Cylinder radius = " << radius.value() << " m" << endl; - - volVectorField UA - ( - IOobject - ( - "UA", - mesh().time().name(), - U.mesh(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - U - ); - - Info<< "\nEvaluating analytical solution" << endl; - - const volVectorField& centres = UA.mesh().C(); - volScalarField magCentres(mag(centres)); - volScalarField theta(acos((centres & vector(1,0,0))/magCentres)); - - volVectorField cs2theta - ( - cos(2*theta)*vector(1,0,0) - + sin(2*theta)*vector(0,1,0) - ); - - UA = uInfX*(dimensionedVector(vector(1,0,0)) - - pow((radius/magCentres),2)*cs2theta); - - // Force writing of UA (since time has not changed) - UA.write(); - - volScalarField error("error", mag(U-UA)/mag(UA)); - - Info<<"Writing relative error in U to " << error.objectPath() - << endl; - - error.write(); - #}; - } -} // ************************************************************************* // diff --git a/tutorials/potentialFoam/cylinder/system/functions b/tutorials/potentialFoam/cylinder/system/functions new file mode 100644 index 0000000000..b251024e30 --- /dev/null +++ b/tutorials/potentialFoam/cylinder/system/functions @@ -0,0 +1,113 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +error +{ + type coded; + + // Load the library containing the 'coded' functionObject + libs ("libutilityFunctionObjects.so"); + + codeInclude + #{ + #include "volFields.H" + #}; + + codeEnd + #{ + // Lookup U + Info<< "Looking up field U\n" << endl; + const volVectorField& U = mesh().lookupObject("U"); + + Info<< "Reading inlet velocity uInfX\n" << endl; + + scalar ULeft = 0.0; + label leftI = mesh().boundaryMesh().findIndex("left"); + const fvPatchVectorField& fvp = U.boundaryField()[leftI]; + if (fvp.size()) + { + ULeft = fvp[0].x(); + } + reduce(ULeft, maxOp()); + + dimensionedScalar uInfX + ( + "uInfx", + dimensionSet(0, 1, -1, 0, 0), + ULeft + ); + + Info << "U at inlet = " << uInfX.value() << " m/s" << endl; + + scalar magCylinder = 0.0; + label cylI = mesh().boundaryMesh().findIndex("cylinder"); + const fvPatchVectorField& cylFvp = mesh().C().boundaryField()[cylI]; + if (cylFvp.size()) + { + magCylinder = mag(cylFvp[0]); + } + reduce(magCylinder, maxOp()); + + dimensionedScalar radius + ( + "radius", + dimensionSet(0, 1, 0, 0, 0), + magCylinder + ); + + Info << "Cylinder radius = " << radius.value() << " m" << endl; + + volVectorField UA + ( + IOobject + ( + "UA", + mesh().time().name(), + U.mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + U + ); + + Info<< "\nEvaluating analytical solution" << endl; + + const volVectorField& centres = UA.mesh().C(); + volScalarField magCentres(mag(centres)); + volScalarField theta(acos((centres & vector(1,0,0))/magCentres)); + + volVectorField cs2theta + ( + cos(2*theta)*vector(1,0,0) + + sin(2*theta)*vector(0,1,0) + ); + + UA = uInfX*(dimensionedVector(vector(1,0,0)) + - pow((radius/magCentres),2)*cs2theta); + + // Force writing of UA (since time has not changed) + UA.write(); + + volScalarField error("error", mag(U-UA)/mag(UA)); + + Info<<"Writing relative error in U to " << error.objectPath() + << endl; + + error.write(); + #}; +} + +// ************************************************************************* // diff --git a/tutorials/shockFluid/biconic25-55Run35/system/controlDict b/tutorials/shockFluid/biconic25-55Run35/system/controlDict index 28357677fb..945197e5e9 100644 --- a/tutorials/shockFluid/biconic25-55Run35/system/controlDict +++ b/tutorials/shockFluid/biconic25-55Run35/system/controlDict @@ -48,10 +48,5 @@ runTimeModifiable true; adjustTimeStep no; -functions -{ - #includeFunc wallHeatFlux - #includeFunc sample -} // ************************************************************************* // diff --git a/tutorials/shockFluid/biconic25-55Run35/system/functions b/tutorials/shockFluid/biconic25-55Run35/system/functions new file mode 100644 index 0000000000..8c1d6b7f3e --- /dev/null +++ b/tutorials/shockFluid/biconic25-55Run35/system/functions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc wallHeatFlux +#includeFunc sample + +// ************************************************************************* // diff --git a/tutorials/shockFluid/shockTube/system/controlDict b/tutorials/shockFluid/shockTube/system/controlDict index 643afed24b..24682ff1c9 100644 --- a/tutorials/shockFluid/shockTube/system/controlDict +++ b/tutorials/shockFluid/shockTube/system/controlDict @@ -52,9 +52,5 @@ maxCo 0.1; maxDeltaT 1; -functions -{ - #includeFunc mag(U) -} // ************************************************************************* // diff --git a/tutorials/shockFluid/shockTube/system/functions b/tutorials/shockFluid/shockTube/system/functions new file mode 100644 index 0000000000..efbe74a6e4 --- /dev/null +++ b/tutorials/shockFluid/shockTube/system/functions @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object functions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeFunc mag(U) + +// ************************************************************************* //