COMP: adjustments for SPDP, int64

This commit is contained in:
Mark Olesen
2020-06-16 10:46:09 +02:00
parent 5adb11f3d3
commit ddfe9ae2a3
4 changed files with 6 additions and 6 deletions

View File

@ -118,7 +118,7 @@ void Foam::Time::adjustDeltaT()
scalar nSteps = timeToNextWrite/deltaT_;
// For tiny deltaT the label can overflow!
if (nSteps < labelMax)
if (nSteps < scalar(labelMax))
{
// nSteps can be < 1 so make sure at least 1
label nStepsToNextWrite = max(1, round(nSteps));

View File

@ -598,7 +598,7 @@ bool Foam::functionObjects::timeControl::adjustTimeStep()
// For tiny deltaT the label can overflow!
if
(
nSteps < labelMax
nSteps < scalar(labelMax)
&& (
deltaTCoeff_ != GREAT
|| nSteps < nStepsToStartTimeChange_
@ -644,7 +644,7 @@ bool Foam::functionObjects::timeControl::adjustTimeStep()
requiredDeltaTCoeff = seriesDTCoeff_;
}
// Avoid divide by zero if we need ratio = 1
if (1/Foam::log(requiredDeltaTCoeff)> labelMax)
if (1/Foam::log(requiredDeltaTCoeff) > scalar(labelMax))
{
requiredDeltaTCoeff = deltaTCoeff_;
}

View File

@ -97,7 +97,7 @@ Foam::vector2D Foam::eigenValues(const symmTensor2D& T)
//(K:Eqs. 3.2-3.3)
const scalar skewTrace = T.xx() - T.yy();
const scalar trace = tr(T);
const scalar gap = sign(skewTrace)*hypot(skewTrace, 2.0*T.xy());
const scalar gap = sign(skewTrace)*hypot(skewTrace, 2*T.xy());
return vector2D(0.5*(trace + gap), 0.5*(trace - gap));
}
@ -163,7 +163,7 @@ Foam::tensor2D Foam::eigenVectors
if (mag(skewTrace) > SMALL)
{
const scalar phi = 0.5*atan(2.0*T.xy()/skewTrace);
const scalar phi = 0.5*atan(2*T.xy()/skewTrace);
const scalar cphi = cos(phi);
const scalar sphi = sin(phi);
return tensor2D(cphi, sphi, -sphi, cphi);

View File

@ -88,7 +88,7 @@ Foam::C6H14::C6H14()
mu_(-20.715, 1207.5, 1.4993, 0.0, 0.0),
mug_(1.7514e-07, 0.70737, 157.14, 0.0),
kappa_(0.22492, -0.0003533, 0.0, 0.0, 0.0, 0.0),
kappag_(-650.5, 0.8053, -1412100000, 0.0),
kappag_(-650.5, 0.8053, -1412100000.0, 0.0),
sigma_(507.60, 0.055003, 1.2674, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 86.177, 28) // note: Same as nHeptane
{}