Skip to content

Commit

Permalink
Updated kivaTest to run without restart at CA = -15 degs
Browse files Browse the repository at this point in the history
using coded function object to change time step at CA = -15 degs
  • Loading branch information
Chris Greenshields committed May 20, 2015
1 parent 7b66c4d commit 9585db0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 203 deletions.
6 changes: 4 additions & 2 deletions tutorials/combustion/engineFoam/kivaTest/Allclean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions

mv ./-180 temp180
rm -rf 0
cp system/controlDict.1st system/controlDict
cleanCase

rm -rf 0 > /dev/null 2>&1
rm -f constant/polyMesh/boundary > /dev/null 2>&1

mv temp180 ./-180

# ----------------------------------------------------------------- end-of-file
6 changes: 0 additions & 6 deletions tutorials/combustion/engineFoam/kivaTest/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ application=`getApplication`

runApplication kivaToFoam -file otape17

cp system/controlDict.1st system/controlDict
runApplication $application
mv log.$application log.$application.1

cp system/controlDict.2nd system/controlDict
runApplication $application
mv log.$application log.$application.2

# ----------------------------------------------------------------- end-of-file

This file was deleted.

This file was deleted.

23 changes: 22 additions & 1 deletion tutorials/combustion/engineFoam/kivaTest/system/controlDict
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ startTime -180;

stopAt endTime;

endTime -15;
endTime 60;

deltaT 0.25;

Expand Down Expand Up @@ -51,5 +51,26 @@ maxCo 0.2;

maxDeltaT 1;

functions
{
timeStep
{
type coded;
functionObjectLibs ("libutilityFunctionObjects.so");
redirectType setDeltaT;

code
#{
const Time& runTime = mesh().time();
if (runTime.timeToUserTime(runTime.value()) >= -15.0)
{
const_cast<Time&>(runTime).setDeltaT
(
runTime.userTimeToTime(0.025)
);
}
#};
}
}

// ************************************************************************* //
55 changes: 0 additions & 55 deletions tutorials/combustion/engineFoam/kivaTest/system/controlDict.1st

This file was deleted.

55 changes: 0 additions & 55 deletions tutorials/combustion/engineFoam/kivaTest/system/controlDict.2nd

This file was deleted.

0 comments on commit 9585db0

Please sign in to comment.