From 67a819bcab0899a8a77429c0b39ab56e639a1d8f Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 7 Mar 2011 10:31:31 +0000 Subject: [PATCH] ENH: Moved example of systemCall function object from cavity tutorial --- .../functionObjects/systemCall/controlDict | 80 +++++++++++++++++++ .../icoFoam/cavity/system/controlDict | 31 ------- 2 files changed, 80 insertions(+), 31 deletions(-) create mode 100644 src/postProcessing/functionObjects/systemCall/controlDict diff --git a/src/postProcessing/functionObjects/systemCall/controlDict b/src/postProcessing/functionObjects/systemCall/controlDict new file mode 100644 index 0000000000..db2105c440 --- /dev/null +++ b/src/postProcessing/functionObjects/systemCall/controlDict @@ -0,0 +1,80 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ + systemCall1 + { + type systemCall; + functionObjectLibs ("libsystemCall.so"); + enabled true; + outputControl outputTime; + + // called every time step + executeCalls + ( + "echo execute" + ); + + // called at the end of the run + endCalls + ( + "echo \*\*\* writing .bashrc \*\*\*" + "cat ~/.bashrc" + "echo \*\*\* done \*\*\*" + ); + + // called every ouput time + writeCalls + ( + "echo \*\*\* writing data \*\*\*" + ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/icoFoam/cavity/system/controlDict b/tutorials/incompressible/icoFoam/cavity/system/controlDict index db2105c440..8644d48460 100644 --- a/tutorials/incompressible/icoFoam/cavity/system/controlDict +++ b/tutorials/incompressible/icoFoam/cavity/system/controlDict @@ -45,36 +45,5 @@ timePrecision 6; runTimeModifiable true; -functions -{ - systemCall1 - { - type systemCall; - functionObjectLibs ("libsystemCall.so"); - enabled true; - outputControl outputTime; - - // called every time step - executeCalls - ( - "echo execute" - ); - - // called at the end of the run - endCalls - ( - "echo \*\*\* writing .bashrc \*\*\*" - "cat ~/.bashrc" - "echo \*\*\* done \*\*\*" - ); - - // called every ouput time - writeCalls - ( - "echo \*\*\* writing data \*\*\*" - ); - } -} - // ************************************************************************* //