mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: redistributePar
This commit is contained in:
111
tutorials/IO/fileHandler_dynamicCode/system/controlDict
Normal file
111
tutorials/IO/fileHandler_dynamicCode/system/controlDict
Normal file
@ -0,0 +1,111 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2312 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
// OSspecific 1;
|
||||
// POSIX 2;
|
||||
// codeStream 1;
|
||||
// codedBase 1;
|
||||
// masterUncollated 1;
|
||||
// hostCollated 1;
|
||||
// collated 1;
|
||||
// fileMonitor 1;
|
||||
}
|
||||
|
||||
OptimisationSwitches
|
||||
{
|
||||
fileModificationSkew 1;
|
||||
}
|
||||
|
||||
//- Set deltaT
|
||||
#include "solverControls"
|
||||
|
||||
|
||||
application icoFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
//stopAt #codeStream
|
||||
//{
|
||||
// code
|
||||
// #{
|
||||
// os << "nextWrite;" << nl;
|
||||
// #};
|
||||
//};
|
||||
|
||||
|
||||
endTime 0.04;
|
||||
|
||||
//deltaT 0.005;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 20;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
fileUpdate
|
||||
{
|
||||
type timeActivatedFileUpdate;
|
||||
libs (utilityFunctionObjects);
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
fileToUpdate "<system>/solverControls";
|
||||
|
||||
timeVsFile
|
||||
(
|
||||
(-1 "<system>/solverControls.0" )
|
||||
( 0.02 "<system>/solverControls.5" )
|
||||
);
|
||||
}
|
||||
|
||||
// Wait a bit to make runTimeModifiable work.
|
||||
// - see also fileModificationSkew
|
||||
// - could also directly use system FO
|
||||
sleep
|
||||
{
|
||||
type coded;
|
||||
libs (utilityFunctionObjects);
|
||||
name sleep;
|
||||
writeControl timeStep;
|
||||
|
||||
codeExecute
|
||||
#{
|
||||
sleep(1);
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user