Commit 92217930 authored by graham's avatar graham
Browse files

Changing

    deltaT().value() to deltaTValue()
and
    deltaT0().value() to deltaT0Value()
across the whole code - faster to return especially if being used
often, in each call to a submodel for example.
parent d6a278f2
......@@ -13,7 +13,7 @@
);
volVectorField force =
U/dimensionedScalar("dt", dimTime, runTime.deltaT().value());
U/dimensionedScalar("dt", dimTime, runTime.deltaTValue());
Kmesh K(mesh);
UOprocess forceGen(K, runTime.deltaT().value(), turbulenceProperties);
UOprocess forceGen(K, runTime.deltaTValue(), turbulenceProperties);
......@@ -41,11 +41,11 @@ Description
StCoNum =
max(SfUfbyDelta/mesh.magSf()).value()
*runTime.deltaT().value();
*runTime.deltaTValue();
meanStCoNum =
(sum(SfUfbyDelta)/sum(mesh.magSf())).value()
*runTime.deltaT().value();
*runTime.deltaTValue();
}
Info<< "St courant Number mean: " << meanStCoNum
......
......@@ -41,12 +41,12 @@ if (adjustTimeStep)
(
min
(
deltaTFact*runTime.deltaT().value(),
deltaTFact*runTime.deltaTValue(),
maxDeltaT
)
);
Info<< "deltaT = " << runTime.deltaT().value() << endl;
Info<< "deltaT = " << runTime.deltaTValue() << endl;
}
// ************************************************************************* //
......@@ -40,7 +40,7 @@ if (ign.ignited())
(
mesh.surfaceInterpolation::deltaCoeffs()
*mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf())
).value()*runTime.deltaT().value();
).value()*runTime.deltaTValue();
Info<< "Max St-Courant Number = " << StCoNum << endl;
......
......@@ -89,8 +89,8 @@ int main(int argc, char *argv[])
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -80,8 +80,8 @@ int main(int argc, char *argv[])
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -3,8 +3,8 @@
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -3,8 +3,8 @@
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -38,11 +38,11 @@ if (mesh.nInternalFaces())
surfaceScalarField amaxSfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf;
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaT().value();
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaTValue();
meanCoNum =
(sum(amaxSfbyDelta)/sum(mesh.magSf())).value()
*runTime.deltaT().value();
*runTime.deltaTValue();
}
Info<< "Mean and max Courant Numbers = "
......
......@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
(
mesh.surfaceInterpolation::deltaCoeffs()
*mag(phiv)/mesh.magSf()
).value()*runTime.deltaT().value();
).value()*runTime.deltaTValue();
Info<< "\nMax Courant Number = " << CoNum << endl;
......
......@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
(
mesh.surfaceInterpolation::deltaCoeffs()
*mag(phiv)/mesh.magSf()
).value()*runTime.deltaT().value();
).value()*runTime.deltaTValue();
Info<< "Max Courant Number = " << CoNum << endl;
......
Info<< "magnetic flux divergence error = "
<< runTime.deltaT().value()
<< runTime.deltaTValue()
*mag(fvc::div(phiB))().weightedAverage(mesh.V()).value()
<< endl;
......@@ -47,10 +47,10 @@ Foam::scalar Foam::compressibleCourantNo
/ fvc::interpolate(rho);
CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
}
Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum
......
......@@ -42,10 +42,10 @@ if (mesh.nInternalFaces())
*mag(phi)/fvc::interpolate(h);
CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
// Gravity wave Courant number
waveCoNum =
......@@ -53,7 +53,7 @@ if (mesh.nInternalFaces())
(
mesh.surfaceInterpolation::deltaCoeffs()
*sqrt(fvc::interpolate(h))
).value()*sqrt(magg).value()*runTime.deltaT().value();
).value()*sqrt(magg).value()*runTime.deltaTValue();
}
Info<< "Courant number mean: " << meanCoNum
......
......@@ -3,8 +3,8 @@
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -3,8 +3,8 @@
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -3,8 +3,8 @@
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
......
......@@ -40,15 +40,15 @@ if (mesh.nInternalFaces())
mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv);
CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
acousticCoNum = max
(
mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi))
).value()*runTime.deltaT().value();
).value()*runTime.deltaTValue();
}
Info<< "phiv Courant Number mean: " << meanCoNum
......
......@@ -43,12 +43,12 @@ if (adjustTimeStep)
(
min
(
deltaTFact*runTime.deltaT().value(),
deltaTFact*runTime.deltaTValue(),
maxDeltaT
)
);
Info<< "deltaT = " << runTime.deltaT().value() << endl;
Info<< "deltaT = " << runTime.deltaTValue() << endl;
}
// ************************************************************************* //
......@@ -44,7 +44,7 @@ if (adjustTimeStep)
(
min
(
maxDeltaTFact*runTime.deltaT().value(),
maxDeltaTFact*runTime.deltaTValue(),
maxDeltaT
)
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment