mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Moved example of systemCall function object from cavity tutorial
This commit is contained in:
80
src/postProcessing/functionObjects/systemCall/controlDict
Normal file
80
src/postProcessing/functionObjects/systemCall/controlDict
Normal file
@ -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 \*\*\*"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -45,36 +45,5 @@ timePrecision 6;
|
|||||||
|
|
||||||
runTimeModifiable true;
|
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 \*\*\*"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user