Updated kivaTest to run without restart at CA = -15 degs

using coded function object to change time step at CA = -15 degs
This commit is contained in:
Chris Greenshields 2015-05-20 07:58:55 +01:00
parent 7b66c4d223
commit 9585db0bb1
7 changed files with 26 additions and 203 deletions

View file

@ -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

View file

@ -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

View file

@ -1,40 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
3
(
piston
{
type wall;
nFaces 1326;
startFace 79522;
}
liner
{
type wall;
nFaces 2710;
startFace 80848;
}
cylinderHead
{
type wall;
nFaces 2184;
startFace 83558;
}
)
// ************************************************************************* //

View file

@ -1,44 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
3
(
piston
{
type wall;
physicalType fixedTemperatureMovingWallFunctions;
nFaces 1326;
startFace 79522;
}
liner
{
type wall;
physicalType fixedTemperatureWallFunctions;
nFaces 2710;
startFace 80848;
}
cylinderHead
{
type wall;
physicalType fixedTemperatureWallFunctions;
nFaces 2184;
startFace 83558;
}
)
// ************************************************************************* //

View file

@ -23,7 +23,7 @@ startTime -180;
stopAt endTime;
endTime -15;
endTime 60;
deltaT 0.25;
@ -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)
);
}
#};
}
}
// ************************************************************************* //

View file

@ -1,55 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / 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 -15;
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;
// ************************************************************************* //

View file

@ -1,55 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict.2nd;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application engineFoam;
startFrom startTime;
startTime -15;
stopAt endTime;
endTime 60;
deltaT 0.025;
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;
// ************************************************************************* //