mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: adjustments for SPDP, int64
This commit is contained in:
@ -118,7 +118,7 @@ void Foam::Time::adjustDeltaT()
|
|||||||
scalar nSteps = timeToNextWrite/deltaT_;
|
scalar nSteps = timeToNextWrite/deltaT_;
|
||||||
|
|
||||||
// For tiny deltaT the label can overflow!
|
// For tiny deltaT the label can overflow!
|
||||||
if (nSteps < labelMax)
|
if (nSteps < scalar(labelMax))
|
||||||
{
|
{
|
||||||
// nSteps can be < 1 so make sure at least 1
|
// nSteps can be < 1 so make sure at least 1
|
||||||
label nStepsToNextWrite = max(1, round(nSteps));
|
label nStepsToNextWrite = max(1, round(nSteps));
|
||||||
|
|||||||
@ -598,7 +598,7 @@ bool Foam::functionObjects::timeControl::adjustTimeStep()
|
|||||||
// For tiny deltaT the label can overflow!
|
// For tiny deltaT the label can overflow!
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
nSteps < labelMax
|
nSteps < scalar(labelMax)
|
||||||
&& (
|
&& (
|
||||||
deltaTCoeff_ != GREAT
|
deltaTCoeff_ != GREAT
|
||||||
|| nSteps < nStepsToStartTimeChange_
|
|| nSteps < nStepsToStartTimeChange_
|
||||||
@ -644,7 +644,7 @@ bool Foam::functionObjects::timeControl::adjustTimeStep()
|
|||||||
requiredDeltaTCoeff = seriesDTCoeff_;
|
requiredDeltaTCoeff = seriesDTCoeff_;
|
||||||
}
|
}
|
||||||
// Avoid divide by zero if we need ratio = 1
|
// Avoid divide by zero if we need ratio = 1
|
||||||
if (1/Foam::log(requiredDeltaTCoeff)> labelMax)
|
if (1/Foam::log(requiredDeltaTCoeff) > scalar(labelMax))
|
||||||
{
|
{
|
||||||
requiredDeltaTCoeff = deltaTCoeff_;
|
requiredDeltaTCoeff = deltaTCoeff_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,7 +97,7 @@ Foam::vector2D Foam::eigenValues(const symmTensor2D& T)
|
|||||||
//(K:Eqs. 3.2-3.3)
|
//(K:Eqs. 3.2-3.3)
|
||||||
const scalar skewTrace = T.xx() - T.yy();
|
const scalar skewTrace = T.xx() - T.yy();
|
||||||
const scalar trace = tr(T);
|
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));
|
return vector2D(0.5*(trace + gap), 0.5*(trace - gap));
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ Foam::tensor2D Foam::eigenVectors
|
|||||||
|
|
||||||
if (mag(skewTrace) > SMALL)
|
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 cphi = cos(phi);
|
||||||
const scalar sphi = sin(phi);
|
const scalar sphi = sin(phi);
|
||||||
return tensor2D(cphi, sphi, -sphi, cphi);
|
return tensor2D(cphi, sphi, -sphi, cphi);
|
||||||
|
|||||||
@ -88,7 +88,7 @@ Foam::C6H14::C6H14()
|
|||||||
mu_(-20.715, 1207.5, 1.4993, 0.0, 0.0),
|
mu_(-20.715, 1207.5, 1.4993, 0.0, 0.0),
|
||||||
mug_(1.7514e-07, 0.70737, 157.14, 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),
|
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),
|
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
|
D_(147.18, 20.1, 86.177, 28) // note: Same as nHeptane
|
||||||
{}
|
{}
|
||||||
|
|||||||
Reference in New Issue
Block a user