/*--------------------------------*- 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 controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application foamRun; solver XiFluid; 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; userTime { type engine; 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) ); } #}; } } // ************************************************************************* //