mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
This changes simplifies the specification of functionObjects in controlDict and is consistent with the 'libs' option in controlDict to load special solver libraries. Support for the old 'functionObjectLibs' name is supported for backward compatibility.
81 lines
1.7 KiB
C++
81 lines
1.7 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: dev |
|
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
location "system";
|
|
object controlDict.1st;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
application engineFoam;
|
|
|
|
startFrom startTime;
|
|
|
|
startTime -180;
|
|
|
|
stopAt endTime;
|
|
|
|
endTime 60;
|
|
|
|
deltaT 0.25;
|
|
|
|
writeControl runTime;
|
|
|
|
writeInterval 5;
|
|
|
|
purgeWrite 0;
|
|
|
|
writeFormat ascii;
|
|
|
|
writePrecision 6;
|
|
|
|
writeCompression off;
|
|
|
|
timeFormat general;
|
|
|
|
timePrecision 6;
|
|
|
|
runTimeModifiable true;
|
|
|
|
adjustTimeStep no;
|
|
|
|
maxCo 0.2;
|
|
|
|
maxDeltaT 1;
|
|
|
|
functions
|
|
{
|
|
timeStep
|
|
{
|
|
type coded;
|
|
libs ("libutilityFunctionObjects.so");
|
|
redirectType setDeltaT;
|
|
|
|
code
|
|
#{
|
|
#};
|
|
|
|
codeExecute
|
|
#{
|
|
const Time& runTime = mesh().time();
|
|
if (runTime.timeToUserTime(runTime.value()) >= -15.0)
|
|
{
|
|
const_cast<Time&>(runTime).setDeltaT
|
|
(
|
|
runTime.userTimeToTime(0.025)
|
|
);
|
|
}
|
|
#};
|
|
}
|
|
}
|
|
|
|
// ************************************************************************* //
|