mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
volVectorField force =
|
volVectorField force =
|
||||||
U/dimensionedScalar("dt", dimTime, runTime.deltaT().value());
|
U/dimensionedScalar("dt", dimTime, runTime.deltaTValue());
|
||||||
|
|
||||||
Kmesh K(mesh);
|
Kmesh K(mesh);
|
||||||
UOprocess forceGen(K, runTime.deltaT().value(), turbulenceProperties);
|
UOprocess forceGen(K, runTime.deltaTValue(), turbulenceProperties);
|
||||||
|
|||||||
@ -41,11 +41,11 @@ Description
|
|||||||
|
|
||||||
StCoNum =
|
StCoNum =
|
||||||
max(SfUfbyDelta/mesh.magSf()).value()
|
max(SfUfbyDelta/mesh.magSf()).value()
|
||||||
*runTime.deltaT().value();
|
*runTime.deltaTValue();
|
||||||
|
|
||||||
meanStCoNum =
|
meanStCoNum =
|
||||||
(sum(SfUfbyDelta)/sum(mesh.magSf())).value()
|
(sum(SfUfbyDelta)/sum(mesh.magSf())).value()
|
||||||
*runTime.deltaT().value();
|
*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "St courant Number mean: " << meanStCoNum
|
Info<< "St courant Number mean: " << meanStCoNum
|
||||||
|
|||||||
@ -41,12 +41,12 @@ if (adjustTimeStep)
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
deltaTFact*runTime.deltaT().value(),
|
deltaTFact*runTime.deltaTValue(),
|
||||||
maxDeltaT
|
maxDeltaT
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -40,7 +40,7 @@ if (ign.ignited())
|
|||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
mesh.surfaceInterpolation::deltaCoeffs()
|
||||||
*mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf())
|
*mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf())
|
||||||
).value()*runTime.deltaT().value();
|
).value()*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "Max St-Courant Number = " << StCoNum << endl;
|
Info<< "Max St-Courant Number = " << StCoNum << endl;
|
||||||
|
|
||||||
|
|||||||
@ -89,8 +89,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -80,8 +80,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -38,11 +38,11 @@ if (mesh.nInternalFaces())
|
|||||||
surfaceScalarField amaxSfbyDelta =
|
surfaceScalarField amaxSfbyDelta =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf;
|
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf;
|
||||||
|
|
||||||
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaT().value();
|
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum =
|
meanCoNum =
|
||||||
(sum(amaxSfbyDelta)/sum(mesh.magSf())).value()
|
(sum(amaxSfbyDelta)/sum(mesh.magSf())).value()
|
||||||
*runTime.deltaT().value();
|
*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Mean and max Courant Numbers = "
|
Info<< "Mean and max Courant Numbers = "
|
||||||
|
|||||||
@ -68,7 +68,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
mesh.surfaceInterpolation::deltaCoeffs()
|
||||||
*mag(phiv)/mesh.magSf()
|
*mag(phiv)/mesh.magSf()
|
||||||
).value()*runTime.deltaT().value();
|
).value()*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "\nMax Courant Number = " << CoNum << endl;
|
Info<< "\nMax Courant Number = " << CoNum << endl;
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
mesh.surfaceInterpolation::deltaCoeffs()
|
||||||
*mag(phiv)/mesh.magSf()
|
*mag(phiv)/mesh.magSf()
|
||||||
).value()*runTime.deltaT().value();
|
).value()*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "Max Courant Number = " << CoNum << endl;
|
Info<< "Max Courant Number = " << CoNum << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Info<< "magnetic flux divergence error = "
|
Info<< "magnetic flux divergence error = "
|
||||||
<< runTime.deltaT().value()
|
<< runTime.deltaTValue()
|
||||||
*mag(fvc::div(phiB))().weightedAverage(mesh.V()).value()
|
*mag(fvc::div(phiB))().weightedAverage(mesh.V()).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -47,10 +47,10 @@ Foam::scalar Foam::compressibleCourantNo
|
|||||||
/ fvc::interpolate(rho);
|
/ fvc::interpolate(rho);
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum
|
Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -42,10 +42,10 @@ if (mesh.nInternalFaces())
|
|||||||
*mag(phi)/fvc::interpolate(h);
|
*mag(phi)/fvc::interpolate(h);
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
// Gravity wave Courant number
|
// Gravity wave Courant number
|
||||||
waveCoNum =
|
waveCoNum =
|
||||||
@ -53,7 +53,7 @@ if (mesh.nInternalFaces())
|
|||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
mesh.surfaceInterpolation::deltaCoeffs()
|
||||||
*sqrt(fvc::interpolate(h))
|
*sqrt(fvc::interpolate(h))
|
||||||
).value()*sqrt(magg).value()*runTime.deltaT().value();
|
).value()*sqrt(magg).value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Courant number mean: " << meanCoNum
|
Info<< "Courant number mean: " << meanCoNum
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
runTime.value() - runTime.deltaT().value(),
|
runTime.value() - runTime.deltaTValue(),
|
||||||
runTime.deltaT().value()
|
runTime.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
// turbulent time scale
|
// turbulent time scale
|
||||||
|
|||||||
@ -40,15 +40,15 @@ if (mesh.nInternalFaces())
|
|||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv);
|
mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv);
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
acousticCoNum = max
|
acousticCoNum = max
|
||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi))
|
mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi))
|
||||||
).value()*runTime.deltaT().value();
|
).value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "phiv Courant Number mean: " << meanCoNum
|
Info<< "phiv Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -43,12 +43,12 @@ if (adjustTimeStep)
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
deltaTFact*runTime.deltaT().value(),
|
deltaTFact*runTime.deltaTValue(),
|
||||||
maxDeltaT
|
maxDeltaT
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if (adjustTimeStep)
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
maxDeltaTFact*runTime.deltaT().value(),
|
maxDeltaTFact*runTime.deltaTValue(),
|
||||||
maxDeltaT
|
maxDeltaT
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
scalar sumLocalContErr =
|
scalar sumLocalContErr =
|
||||||
runTime.deltaT().value()*
|
runTime.deltaTValue()*
|
||||||
mag
|
mag
|
||||||
(
|
(
|
||||||
fvc::ddt(rho)
|
fvc::ddt(rho)
|
||||||
@ -7,7 +7,7 @@
|
|||||||
)().weightedAverage(rho*mesh.V()).value();
|
)().weightedAverage(rho*mesh.V()).value();
|
||||||
|
|
||||||
scalar globalContErr =
|
scalar globalContErr =
|
||||||
runTime.deltaT().value()*
|
runTime.deltaTValue()*
|
||||||
(
|
(
|
||||||
fvc::ddt(rho)
|
fvc::ddt(rho)
|
||||||
+ fvc::div(phi)
|
+ fvc::div(phi)
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phia - phib)
|
mesh.surfaceInterpolation::deltaCoeffs()*mag(phia - phib)
|
||||||
/mesh.magSf()
|
/mesh.magSf()
|
||||||
).value()*runTime.deltaT().value();
|
).value()*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
||||||
|
|
||||||
|
|||||||
@ -39,10 +39,10 @@ if (mesh.nInternalFaces())
|
|||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(mesh.phi());
|
mesh.surfaceInterpolation::deltaCoeffs()*mag(mesh.phi());
|
||||||
|
|
||||||
meshCoNum = max(SfUfbyDelta/mesh.magSf())
|
meshCoNum = max(SfUfbyDelta/mesh.magSf())
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanMeshCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanMeshCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Mesh Courant Number mean: " << meanMeshCoNum
|
Info<< "Mesh Courant Number mean: " << meanMeshCoNum
|
||||||
|
|||||||
@ -119,7 +119,7 @@ void fvMotionSolverEngineMesh::move()
|
|||||||
|
|
||||||
|
|
||||||
pistonPosition_.value() += deltaZ;
|
pistonPosition_.value() += deltaZ;
|
||||||
scalar pistonSpeed = deltaZ/engineDB_.deltaT().value();
|
scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
|
||||||
|
|
||||||
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
|
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
|
||||||
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
|
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void layeredEngineMesh::move()
|
|||||||
}
|
}
|
||||||
|
|
||||||
pistonPosition_.value() += deltaZ;
|
pistonPosition_.value() += deltaZ;
|
||||||
scalar pistonSpeed = deltaZ/engineDB_.deltaT().value();
|
scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
|
||||||
|
|
||||||
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
|
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
|
||||||
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
|
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
|
||||||
|
|||||||
@ -165,7 +165,7 @@ Foam::scalar Foam::engineTime::thetaRevolution() const
|
|||||||
|
|
||||||
Foam::scalar Foam::engineTime::deltaTheta() const
|
Foam::scalar Foam::engineTime::deltaTheta() const
|
||||||
{
|
{
|
||||||
return timeToDeg(deltaT().value());
|
return timeToDeg(deltaTValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ Foam::dimensionedScalar Foam::engineTime::pistonSpeed() const
|
|||||||
(
|
(
|
||||||
"pistonSpeed",
|
"pistonSpeed",
|
||||||
dimVelocity,
|
dimVelocity,
|
||||||
pistonDisplacement().value()/(deltaT().value() + VSMALL)
|
pistonDisplacement().value()/(deltaTValue() + VSMALL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,7 @@ Foam::scalar Foam::engineValve::curVelocity() const
|
|||||||
lift(engineDB_.theta() - engineDB_.deltaTheta()),
|
lift(engineDB_.theta() - engineDB_.deltaTheta()),
|
||||||
minLift_
|
minLift_
|
||||||
)
|
)
|
||||||
)/(engineDB_.deltaT().value() + VSMALL);
|
)/(engineDB_.deltaTValue() + VSMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ const labelList& ignitionSite::cells() const
|
|||||||
bool ignitionSite::igniting() const
|
bool ignitionSite::igniting() const
|
||||||
{
|
{
|
||||||
scalar curTime = db_.value();
|
scalar curTime = db_.value();
|
||||||
scalar deltaT = db_.deltaT().value();
|
scalar deltaT = db_.deltaTValue();
|
||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -120,7 +120,7 @@ bool ignitionSite::igniting() const
|
|||||||
bool ignitionSite::ignited() const
|
bool ignitionSite::ignited() const
|
||||||
{
|
{
|
||||||
scalar curTime = db_.value();
|
scalar curTime = db_.value();
|
||||||
scalar deltaT = db_.deltaT().value();
|
scalar deltaT = db_.deltaTValue();
|
||||||
|
|
||||||
return(curTime - deltaT >= time_);
|
return(curTime - deltaT >= time_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,10 +39,10 @@ if (mesh.nInternalFaces())
|
|||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi)/fvc::interpolate(rho);
|
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi)/fvc::interpolate(rho);
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Courant Number mean: " << meanCoNum
|
Info<< "Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -180,7 +180,7 @@ Foam::timeActivatedExplicitMulticomponentPointSource::Su
|
|||||||
DimensionedField<scalar, volMesh>& sourceField = tSource();
|
DimensionedField<scalar, volMesh>& sourceField = tSource();
|
||||||
|
|
||||||
const scalarField& V = mesh_.V();
|
const scalarField& V = mesh_.V();
|
||||||
const scalar dt = runTime_.deltaT().value();
|
const scalar dt = runTime_.deltaTValue();
|
||||||
|
|
||||||
forAll(pointSources_, sourceI)
|
forAll(pointSources_, sourceI)
|
||||||
{
|
{
|
||||||
@ -240,7 +240,7 @@ Foam::timeActivatedExplicitMulticomponentPointSource::Su()
|
|||||||
DimensionedField<scalar, volMesh>& sourceField = tSource();
|
DimensionedField<scalar, volMesh>& sourceField = tSource();
|
||||||
|
|
||||||
const scalarField& V = mesh_.V();
|
const scalarField& V = mesh_.V();
|
||||||
const scalar dt = runTime_.deltaT().value();
|
const scalar dt = runTime_.deltaTValue();
|
||||||
|
|
||||||
forAll(pointSources_, sourceI)
|
forAll(pointSources_, sourceI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,12 +41,12 @@ if (adjustTimeStep)
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
deltaTFact*runTime.deltaT().value(),
|
deltaTFact*runTime.deltaTValue(),
|
||||||
maxDeltaT
|
maxDeltaT
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (adjustTimeStep)
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
maxCo*runTime.deltaT().value()/CoNum,
|
maxCo*runTime.deltaTValue()/CoNum,
|
||||||
maxDeltaT
|
maxDeltaT
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,12 +4,12 @@
|
|||||||
// Backward Differencing in time.
|
// Backward Differencing in time.
|
||||||
|
|
||||||
conserve.internalField() +=
|
conserve.internalField() +=
|
||||||
(1.0 - mesh.V0()/mesh.V())/runTime.deltaT().value();
|
(1.0 - mesh.V0()/mesh.V())/runTime.deltaTValue();
|
||||||
|
|
||||||
scalar sumLocalContErr = runTime.deltaT().value()*
|
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||||
mag(conserve)().weightedAverage(mesh.V()).value();
|
mag(conserve)().weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
scalar globalContErr = runTime.deltaT().value()*
|
scalar globalContErr = runTime.deltaTValue()*
|
||||||
conserve.weightedAverage(mesh.V()).value();
|
conserve.weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
Info<< "volume continuity errors : sum local = " << sumLocalContErr
|
Info<< "volume continuity errors : sum local = " << sumLocalContErr
|
||||||
|
|||||||
@ -39,10 +39,10 @@ if (mesh.nInternalFaces())
|
|||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
|
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||||
.value()*runTime.deltaT().value();
|
.value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Courant Number mean: " << meanCoNum
|
Info<< "Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -33,10 +33,10 @@ Description
|
|||||||
{
|
{
|
||||||
volScalarField contErr = fvc::div(phi);
|
volScalarField contErr = fvc::div(phi);
|
||||||
|
|
||||||
scalar sumLocalContErr = runTime.deltaT().value()*
|
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||||
mag(contErr)().weightedAverage(mesh.V()).value();
|
mag(contErr)().weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
scalar globalContErr = runTime.deltaT().value()*
|
scalar globalContErr = runTime.deltaTValue()*
|
||||||
contErr.weightedAverage(mesh.V()).value();
|
contErr.weightedAverage(mesh.V()).value();
|
||||||
cumulativeContErr += globalContErr;
|
cumulativeContErr += globalContErr;
|
||||||
|
|
||||||
|
|||||||
@ -33,10 +33,10 @@ Description
|
|||||||
{
|
{
|
||||||
volScalarField contErr = fvc::div(phi + fvc::meshPhi(U));
|
volScalarField contErr = fvc::div(phi + fvc::meshPhi(U));
|
||||||
|
|
||||||
scalar sumLocalContErr = runTime.deltaT().value()*
|
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||||
mag(contErr)().weightedAverage(mesh.V()).value();
|
mag(contErr)().weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
scalar globalContErr = runTime.deltaT().value()*
|
scalar globalContErr = runTime.deltaTValue()*
|
||||||
contErr.weightedAverage(mesh.V()).value();
|
contErr.weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
cumulativeContErr += globalContErr;
|
cumulativeContErr += globalContErr;
|
||||||
|
|||||||
@ -32,11 +32,11 @@ Description
|
|||||||
|
|
||||||
if (mesh.moving())
|
if (mesh.moving())
|
||||||
{
|
{
|
||||||
scalar sumLocalContErr = runTime.deltaT().value()*
|
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||||
mag(fvc::div(phi + fvc::meshPhi(rho, U)))()
|
mag(fvc::div(phi + fvc::meshPhi(rho, U)))()
|
||||||
.weightedAverage(mesh.V()).value();
|
.weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
scalar globalContErr = runTime.deltaT().value()*
|
scalar globalContErr = runTime.deltaTValue()*
|
||||||
fvc::div(phi + fvc::meshPhi(rho, U))()
|
fvc::div(phi + fvc::meshPhi(rho, U))()
|
||||||
.weightedAverage(mesh.V()).value();
|
.weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
|
|||||||
@ -223,7 +223,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
openFraction_
|
openFraction_
|
||||||
+ max
|
+ max
|
||||||
(
|
(
|
||||||
this->db().time().deltaT().value()/openingTime_,
|
this->db().time().deltaTValue()/openingTime_,
|
||||||
maxOpenFractionDelta_
|
maxOpenFractionDelta_
|
||||||
)
|
)
|
||||||
*(orientation_*sign(forceDiff)),
|
*(orientation_*sign(forceDiff)),
|
||||||
|
|||||||
@ -202,7 +202,7 @@ void advectiveFvPatchField<Type>::updateCoeffs()
|
|||||||
this->dimensionedInternalField().mesh()
|
this->dimensionedInternalField().mesh()
|
||||||
.ddtScheme(this->dimensionedInternalField().name())
|
.ddtScheme(this->dimensionedInternalField().name())
|
||||||
);
|
);
|
||||||
scalar deltaT = this->db().time().deltaT().value();
|
scalar deltaT = this->db().time().deltaTValue();
|
||||||
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& field =
|
const GeometricField<Type, fvPatchField, volMesh>& field =
|
||||||
this->db().objectRegistry::
|
this->db().objectRegistry::
|
||||||
|
|||||||
@ -112,7 +112,7 @@ void movingWallVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
oldFc[i] = pp[i].centre(oldPoints);
|
oldFc[i] = pp[i].centre(oldPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
vectorField Up = (pp.faceCentres() - oldFc)/mesh.time().deltaT().value();
|
vectorField Up = (pp.faceCentres() - oldFc)/mesh.time().deltaTValue();
|
||||||
|
|
||||||
const volVectorField& U = db().lookupObject<volVectorField>("U");
|
const volVectorField& U = db().lookupObject<volVectorField>("U");
|
||||||
scalarField phip =
|
scalarField phip =
|
||||||
|
|||||||
@ -196,7 +196,7 @@ void syringePressureFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
scalar t = db().time().value();
|
scalar t = db().time().value();
|
||||||
scalar deltaT = db().time().deltaT().value();
|
scalar deltaT = db().time().deltaTValue();
|
||||||
|
|
||||||
const surfaceScalarField& phi =
|
const surfaceScalarField& phi =
|
||||||
db().lookupObject<surfaceScalarField>("phi");
|
db().lookupObject<surfaceScalarField>("phi");
|
||||||
|
|||||||
@ -59,8 +59,8 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar deltaT = mesh().time().deltaT().value();
|
scalar deltaT = mesh().time().deltaTValue();
|
||||||
scalar deltaT0 = mesh().time().deltaT0().value();
|
scalar deltaT0 = mesh().time().deltaT0Value();
|
||||||
|
|
||||||
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
||||||
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
||||||
@ -137,8 +137,8 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar deltaT = mesh().time().deltaT().value();
|
scalar deltaT = mesh().time().deltaTValue();
|
||||||
scalar deltaT0 = mesh().time().deltaT0().value();
|
scalar deltaT0 = mesh().time().deltaT0Value();
|
||||||
|
|
||||||
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
||||||
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
||||||
@ -246,8 +246,8 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
|
|||||||
|
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalar deltaT = mesh().time().deltaT().value();
|
scalar deltaT = mesh().time().deltaTValue();
|
||||||
scalar deltaT0 = mesh().time().deltaT0().value();
|
scalar deltaT0 = mesh().time().deltaT0Value();
|
||||||
|
|
||||||
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
||||||
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
||||||
@ -307,8 +307,8 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
|
|||||||
|
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalar deltaT = mesh().time().deltaT().value();
|
scalar deltaT = mesh().time().deltaTValue();
|
||||||
scalar deltaT0 = mesh().time().deltaT0().value();
|
scalar deltaT0 = mesh().time().deltaT0Value();
|
||||||
|
|
||||||
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
||||||
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
||||||
@ -368,8 +368,8 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
|
|||||||
|
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalar deltaT = mesh().time().deltaT().value();
|
scalar deltaT = mesh().time().deltaTValue();
|
||||||
scalar deltaT0 = mesh().time().deltaT0().value();
|
scalar deltaT0 = mesh().time().deltaT0Value();
|
||||||
|
|
||||||
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
scalar coefft = (deltaT + deltaT0)/(2*deltaT);
|
||||||
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);
|
||||||
|
|||||||
@ -276,7 +276,7 @@ EulerDdtScheme<Type>::fvmDdt
|
|||||||
|
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalar rDeltaT = 1.0/mesh().time().deltaT().value();
|
scalar rDeltaT = 1.0/mesh().time().deltaTValue();
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*mesh().V();
|
fvm.diag() = rDeltaT*mesh().V();
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ EulerDdtScheme<Type>::fvmDdt
|
|||||||
);
|
);
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalar rDeltaT = 1.0/mesh().time().deltaT().value();
|
scalar rDeltaT = 1.0/mesh().time().deltaTValue();
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*rho.value()*mesh().V();
|
fvm.diag() = rDeltaT*rho.value()*mesh().V();
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ EulerDdtScheme<Type>::fvmDdt
|
|||||||
);
|
);
|
||||||
fvMatrix<Type>& fvm = tfvm();
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
scalar rDeltaT = 1.0/mesh().time().deltaT().value();
|
scalar rDeltaT = 1.0/mesh().time().deltaTValue();
|
||||||
|
|
||||||
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
|
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
|
||||||
|
|
||||||
|
|||||||
@ -44,14 +44,14 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
scalar backwardDdtScheme<Type>::deltaT_() const
|
scalar backwardDdtScheme<Type>::deltaT_() const
|
||||||
{
|
{
|
||||||
return mesh().time().deltaT().value();
|
return mesh().time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
scalar backwardDdtScheme<Type>::deltaT0_() const
|
scalar backwardDdtScheme<Type>::deltaT0_() const
|
||||||
{
|
{
|
||||||
return mesh().time().deltaT0().value();
|
return mesh().time().deltaT0Value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,13 +42,13 @@ namespace fv
|
|||||||
|
|
||||||
scalar boundedBackwardDdtScheme::deltaT_() const
|
scalar boundedBackwardDdtScheme::deltaT_() const
|
||||||
{
|
{
|
||||||
return mesh().time().deltaT().value();
|
return mesh().time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
scalar boundedBackwardDdtScheme::deltaT0_() const
|
scalar boundedBackwardDdtScheme::deltaT0_() const
|
||||||
{
|
{
|
||||||
return mesh().time().deltaT0().value();
|
return mesh().time().deltaT0Value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ void Foam::MULES::explicitSolve
|
|||||||
|
|
||||||
scalarField& psiIf = psi;
|
scalarField& psiIf = psi;
|
||||||
const scalarField& psi0 = psi.oldTime();
|
const scalarField& psi0 = psi.oldTime();
|
||||||
const scalar deltaT = mesh.time().deltaT().value();
|
const scalar deltaT = mesh.time().deltaTValue();
|
||||||
|
|
||||||
psiIf = 0.0;
|
psiIf = 0.0;
|
||||||
fvc::surfaceIntegrate(psiIf, phiPsi);
|
fvc::surfaceIntegrate(psiIf, phiPsi);
|
||||||
@ -328,7 +328,7 @@ void Foam::MULES::limiter
|
|||||||
const unallocLabelList& owner = mesh.owner();
|
const unallocLabelList& owner = mesh.owner();
|
||||||
const unallocLabelList& neighb = mesh.neighbour();
|
const unallocLabelList& neighb = mesh.neighbour();
|
||||||
const scalarField& V = mesh.V();
|
const scalarField& V = mesh.V();
|
||||||
const scalar deltaT = mesh.time().deltaT().value();
|
const scalar deltaT = mesh.time().deltaTValue();
|
||||||
|
|
||||||
const scalarField& phiBDIf = phiBD;
|
const scalarField& phiBDIf = phiBD;
|
||||||
const surfaceScalarField::GeometricBoundaryField& phiBDBf =
|
const surfaceScalarField::GeometricBoundaryField& phiBDBf =
|
||||||
|
|||||||
@ -576,7 +576,7 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p)
|
|||||||
|
|
||||||
// Move the polyMesh and set the mesh motion fluxes to the swept-volumes
|
// Move the polyMesh and set the mesh motion fluxes to the swept-volumes
|
||||||
|
|
||||||
scalar rDeltaT = 1.0/time().deltaT().value();
|
scalar rDeltaT = 1.0/time().deltaTValue();
|
||||||
|
|
||||||
tmp<scalarField> tsweptVols = polyMesh::movePoints(p);
|
tmp<scalarField> tsweptVols = polyMesh::movePoints(p);
|
||||||
scalarField& sweptVols = tsweptVols();
|
scalarField& sweptVols = tsweptVols();
|
||||||
|
|||||||
@ -142,7 +142,7 @@ Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
|
|||||||
(
|
(
|
||||||
cmpt_,
|
cmpt_,
|
||||||
tcurPoints().component(cmpt_)
|
tcurPoints().component(cmpt_)
|
||||||
+ fvMesh_.time().deltaT().value()*pointMotionU_.internalField()
|
+ fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
|
||||||
);
|
);
|
||||||
|
|
||||||
twoDCorrectPoints(tcurPoints());
|
twoDCorrectPoints(tcurPoints());
|
||||||
|
|||||||
@ -112,7 +112,7 @@ Foam::velocityLaplacianFvMotionSolver::curPoints() const
|
|||||||
tmp<pointField> tcurPoints
|
tmp<pointField> tcurPoints
|
||||||
(
|
(
|
||||||
fvMesh_.points()
|
fvMesh_.points()
|
||||||
+ fvMesh_.time().deltaT().value()*pointMotionU_.internalField()
|
+ fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
|
||||||
);
|
);
|
||||||
|
|
||||||
twoDCorrectPoints(tcurPoints());
|
twoDCorrectPoints(tcurPoints());
|
||||||
|
|||||||
@ -146,7 +146,7 @@ void angularOscillatingVelocityPointPatchVectorField::updateCoeffs()
|
|||||||
+ (axisHat ^ p0Rel*sin(angle))
|
+ (axisHat ^ p0Rel*sin(angle))
|
||||||
+ (axisHat & p0Rel)*(1 - cos(angle))*axisHat
|
+ (axisHat & p0Rel)*(1 - cos(angle))*axisHat
|
||||||
- p.localPoints()
|
- p.localPoints()
|
||||||
)/t.deltaT().value()
|
)/t.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||||
|
|||||||
@ -125,7 +125,7 @@ void oscillatingVelocityPointPatchVectorField::updateCoeffs()
|
|||||||
Field<vector>::operator=
|
Field<vector>::operator=
|
||||||
(
|
(
|
||||||
(p0_ + amplitude_*sin(omega_*t.value()) - p.localPoints())
|
(p0_ + amplitude_*sin(omega_*t.value()) - p.localPoints())
|
||||||
/t.deltaT().value()
|
/t.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||||
|
|||||||
@ -129,7 +129,7 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
|||||||
// calculate the forces on the motion object from this data, then
|
// calculate the forces on the motion object from this data, then
|
||||||
// update the positions
|
// update the positions
|
||||||
|
|
||||||
motion_.updatePosition(t.deltaT().value());
|
motion_.updatePosition(t.deltaTValue());
|
||||||
|
|
||||||
dictionary forcesDict;
|
dictionary forcesDict;
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
|||||||
(
|
(
|
||||||
fm.first().first() + fm.first().second() + gravity*motion_.mass(),
|
fm.first().first() + fm.first().second() + gravity*motion_.mass(),
|
||||||
fm.second().first() + fm.second().second(),
|
fm.second().first() + fm.second().second(),
|
||||||
t.deltaT().value()
|
t.deltaTValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
Field<vector>::operator=(motion_.generatePositions(p0_) - p0_);
|
Field<vector>::operator=(motion_.generatePositions(p0_) - p0_);
|
||||||
|
|||||||
@ -64,7 +64,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection
|
|||||||
const pointField& localPoints = patch().localPoints();
|
const pointField& localPoints = patch().localPoints();
|
||||||
const labelList& meshPoints = patch().meshPoints();
|
const labelList& meshPoints = patch().meshPoints();
|
||||||
|
|
||||||
//const scalar deltaT = mesh.time().deltaT().value();
|
//const scalar deltaT = mesh.time().deltaTValue();
|
||||||
|
|
||||||
// Construct large enough vector in direction of projectDir so
|
// Construct large enough vector in direction of projectDir so
|
||||||
// we're guaranteed to hit something.
|
// we're guaranteed to hit something.
|
||||||
@ -451,7 +451,7 @@ void surfaceDisplacementPointPatchVectorField::updateCoeffs()
|
|||||||
|
|
||||||
// Clip offset to maximum displacement possible: velocity*timestep
|
// Clip offset to maximum displacement possible: velocity*timestep
|
||||||
|
|
||||||
const scalar deltaT = mesh.time().deltaT().value();
|
const scalar deltaT = mesh.time().deltaTValue();
|
||||||
const vector clipVelocity = velocity_*deltaT;
|
const vector clipVelocity = velocity_*deltaT;
|
||||||
|
|
||||||
forAll(displacement, i)
|
forAll(displacement, i)
|
||||||
|
|||||||
@ -63,7 +63,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
|
|||||||
const pointField& localPoints = patch().localPoints();
|
const pointField& localPoints = patch().localPoints();
|
||||||
const labelList& meshPoints = patch().meshPoints();
|
const labelList& meshPoints = patch().meshPoints();
|
||||||
|
|
||||||
//const scalar deltaT = mesh.time().deltaT().value();
|
//const scalar deltaT = mesh.time().deltaTValue();
|
||||||
|
|
||||||
// Construct large enough vector in direction of projectDir so
|
// Construct large enough vector in direction of projectDir so
|
||||||
// we're guaranteed to hit something.
|
// we're guaranteed to hit something.
|
||||||
|
|||||||
@ -373,7 +373,7 @@ inline Foam::scalar Foam::Particle<ParticleType>::currentTime() const
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
cloud_.pMesh().time().value()
|
cloud_.pMesh().time().value()
|
||||||
+ stepFraction_*cloud_.pMesh().time().deltaT().value();
|
+ stepFraction_*cloud_.pMesh().time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,7 @@ bool Foam::parcel::move(spray& sDB)
|
|||||||
|
|
||||||
const liquidMixture& fuels = sDB.fuels();
|
const liquidMixture& fuels = sDB.fuels();
|
||||||
|
|
||||||
scalar deltaT = sDB.runTime().deltaT().value();
|
scalar deltaT = sDB.runTime().deltaTValue();
|
||||||
label Nf = fuels.components().size();
|
label Nf = fuels.components().size();
|
||||||
label Ns = sDB.composition().Y().size();
|
label Ns = sDB.composition().Y().size();
|
||||||
|
|
||||||
|
|||||||
@ -157,7 +157,7 @@ inline tmp<volVectorField> spray::momentumSource() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
tsource().internalField() = sms_/runTime_.deltaT().value()/mesh_.V();
|
tsource().internalField() = sms_/runTime_.deltaTValue()/mesh_.V();
|
||||||
|
|
||||||
return tsource;
|
return tsource;
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ inline tmp<volScalarField> spray::evaporationSource(const label si) const
|
|||||||
if (isLiquidFuel_[si])
|
if (isLiquidFuel_[si])
|
||||||
{
|
{
|
||||||
label fi = gasToLiquidIndex_[si];
|
label fi = gasToLiquidIndex_[si];
|
||||||
tsource().internalField() = srhos_[fi]/runTime_.deltaT().value()/mesh_.V();
|
tsource().internalField() = srhos_[fi]/runTime_.deltaTValue()/mesh_.V();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -216,7 +216,7 @@ inline tmp<volScalarField> spray::heatTransferSource() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
tsource().internalField() = shs_/runTime_.deltaT().value()/mesh_.V();
|
tsource().internalField() = shs_/runTime_.deltaTValue()/mesh_.V();
|
||||||
|
|
||||||
return tsource;
|
return tsource;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ void spray::inject()
|
|||||||
// deltaT is the duration of injection during this timestep
|
// deltaT is the duration of injection during this timestep
|
||||||
scalar deltaT = min
|
scalar deltaT = min
|
||||||
(
|
(
|
||||||
runTime_.deltaT().value(),
|
runTime_.deltaTValue(),
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
time - it->tsoi(),
|
time - it->tsoi(),
|
||||||
@ -150,8 +150,8 @@ void spray::inject()
|
|||||||
scalar dt = time - toi;
|
scalar dt = time - toi;
|
||||||
|
|
||||||
pPtr->stepFraction() =
|
pPtr->stepFraction() =
|
||||||
(runTime_.deltaT().value() - dt)
|
(runTime_.deltaTValue() - dt)
|
||||||
/runTime_.deltaT().value();
|
/runTime_.deltaTValue();
|
||||||
|
|
||||||
bool keepParcel = pPtr->move(*this);
|
bool keepParcel = pPtr->move(*this);
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ void spray::evolve()
|
|||||||
|
|
||||||
calculateAmbientPressure();
|
calculateAmbientPressure();
|
||||||
calculateAmbientTemperature();
|
calculateAmbientTemperature();
|
||||||
collisions().collideParcels(runTime_.deltaT().value());
|
collisions().collideParcels(runTime_.deltaTValue());
|
||||||
move();
|
move();
|
||||||
dispersion().disperseParcels();
|
dispersion().disperseParcels();
|
||||||
inject();
|
inject();
|
||||||
@ -103,7 +103,7 @@ void spray::breakupLoop()
|
|||||||
breakup().updateParcelProperties
|
breakup().updateParcelProperties
|
||||||
(
|
(
|
||||||
elmnt(),
|
elmnt(),
|
||||||
runTime_.deltaT().value(),
|
runTime_.deltaTValue(),
|
||||||
velocity,
|
velocity,
|
||||||
fuels_
|
fuels_
|
||||||
);
|
);
|
||||||
@ -111,7 +111,7 @@ void spray::breakupLoop()
|
|||||||
breakup().breakupParcel
|
breakup().breakupParcel
|
||||||
(
|
(
|
||||||
elmnt(),
|
elmnt(),
|
||||||
runTime_.deltaT().value(),
|
runTime_.deltaTValue(),
|
||||||
velocity,
|
velocity,
|
||||||
fuels_
|
fuels_
|
||||||
);
|
);
|
||||||
@ -137,7 +137,7 @@ void spray::atomizationLoop()
|
|||||||
atomization().atomizeParcel
|
atomization().atomizeParcel
|
||||||
(
|
(
|
||||||
elmnt(),
|
elmnt(),
|
||||||
runTime_.deltaT().value(),
|
runTime_.deltaTValue(),
|
||||||
velocity,
|
velocity,
|
||||||
fuels_
|
fuels_
|
||||||
);
|
);
|
||||||
|
|||||||
@ -72,7 +72,7 @@ void gradientDispersionRAS::disperseParcels() const
|
|||||||
|
|
||||||
const scalar cps = 0.16432;
|
const scalar cps = 0.16432;
|
||||||
|
|
||||||
scalar dt = spray_.runTime().deltaT().value();
|
scalar dt = spray_.runTime().deltaTValue();
|
||||||
const volScalarField& k = turbulence().k();
|
const volScalarField& k = turbulence().k();
|
||||||
volVectorField gradk = fvc::grad(k);
|
volVectorField gradk = fvc::grad(k);
|
||||||
const volScalarField& epsilon = turbulence().epsilon();
|
const volScalarField& epsilon = turbulence().epsilon();
|
||||||
|
|||||||
@ -73,7 +73,7 @@ void stochasticDispersionRAS::disperseParcels() const
|
|||||||
const scalar cps = 0.16432;
|
const scalar cps = 0.16432;
|
||||||
const vector one(1.0, 1.0, 1.0);
|
const vector one(1.0, 1.0, 1.0);
|
||||||
|
|
||||||
scalar dt = spray_.runTime().deltaT().value();
|
scalar dt = spray_.runTime().deltaTValue();
|
||||||
const volScalarField& k = turbulence().k();
|
const volScalarField& k = turbulence().k();
|
||||||
//volVectorField gradk = fvc::grad(k);
|
//volVectorField gradk = fvc::grad(k);
|
||||||
const volScalarField& epsilon = turbulence().epsilon();
|
const volScalarField& epsilon = turbulence().epsilon();
|
||||||
|
|||||||
@ -104,7 +104,7 @@ bool reflectParcel::wallTreatment
|
|||||||
vector Ub1 = U_.boundaryField()[patchi][facei];
|
vector Ub1 = U_.boundaryField()[patchi][facei];
|
||||||
vector Ub0 = U_.oldTime().boundaryField()[patchi][facei];
|
vector Ub0 = U_.oldTime().boundaryField()[patchi][facei];
|
||||||
|
|
||||||
scalar dt = spray_.runTime().deltaT().value();
|
scalar dt = spray_.runTime().deltaTValue();
|
||||||
const vectorField& oldPoints = mesh.oldPoints();
|
const vectorField& oldPoints = mesh.oldPoints();
|
||||||
|
|
||||||
const vector& Cf1 = mesh.faceCentres()[globalFacei];
|
const vector& Cf1 = mesh.faceCentres()[globalFacei];
|
||||||
|
|||||||
@ -128,7 +128,7 @@ inline Foam::Random& Foam::DsmcCloud<ParcelType>::rndGen()
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline void Foam::DsmcCloud<ParcelType>::storeDeltaT()
|
inline void Foam::DsmcCloud<ParcelType>::storeDeltaT()
|
||||||
{
|
{
|
||||||
cachedDeltaT_ = mesh().time().deltaT().value();
|
cachedDeltaT_ = mesh().time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -167,7 +167,7 @@ void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
|||||||
parcel.rho() = constProps_.rho0();
|
parcel.rho() = constProps_.rho0();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar carrierDt = this->db().time().deltaT().value();
|
scalar carrierDt = this->db().time().deltaTValue();
|
||||||
parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -226,7 +226,7 @@ bool Foam::KinematicParcel<ParcelType>::move(TrackData& td)
|
|||||||
const polyMesh& mesh = td.cloud().pMesh();
|
const polyMesh& mesh = td.cloud().pMesh();
|
||||||
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
|
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
|
||||||
|
|
||||||
const scalar deltaT = mesh.time().deltaT().value();
|
const scalar deltaT = mesh.time().deltaTValue();
|
||||||
scalar tEnd = (1.0 - p.stepFraction())*deltaT;
|
scalar tEnd = (1.0 - p.stepFraction())*deltaT;
|
||||||
const scalar dtMax = tEnd;
|
const scalar dtMax = tEnd;
|
||||||
|
|
||||||
|
|||||||
@ -351,7 +351,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scalar time = owner_.db().time().value();
|
const scalar time = owner_.db().time().value();
|
||||||
const scalar carrierDt = owner_.db().time().deltaT().value();
|
const scalar carrierDt = owner_.db().time().deltaTValue();
|
||||||
const polyMesh& mesh = owner_.mesh();
|
const polyMesh& mesh = owner_.mesh();
|
||||||
|
|
||||||
// Prepare for next time step
|
// Prepare for next time step
|
||||||
|
|||||||
@ -41,9 +41,9 @@ void Foam::correlationFunction<Type>::setTimesAndSizes
|
|||||||
const label tZeroBufferSize
|
const label tZeroBufferSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sampleSteps_ = ceil(sampleInterval_/mesh_.time().deltaT().value());
|
sampleSteps_ = ceil(sampleInterval_/mesh_.time().deltaTValue());
|
||||||
|
|
||||||
sampleInterval_ = sampleSteps_*mesh_.time().deltaT().value();
|
sampleInterval_ = sampleSteps_*mesh_.time().deltaTValue();
|
||||||
|
|
||||||
label bufferLength(ceil(duration_/sampleInterval_));
|
label bufferLength(ceil(duration_/sampleInterval_));
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ bool Foam::molecule::move(molecule::trackData& td)
|
|||||||
|
|
||||||
const constantProperties& constProps(td.molCloud().constProps(id_));
|
const constantProperties& constProps(td.molCloud().constProps(id_));
|
||||||
|
|
||||||
scalar deltaT = cloud().pMesh().time().deltaT().value();
|
scalar deltaT = cloud().pMesh().time().deltaTValue();
|
||||||
|
|
||||||
if (td.part() == 0)
|
if (td.part() == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,7 +36,7 @@ bool Foam::solidParticle::move(solidParticle::trackData& td)
|
|||||||
const polyMesh& mesh = cloud().pMesh();
|
const polyMesh& mesh = cloud().pMesh();
|
||||||
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
|
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
|
||||||
|
|
||||||
scalar deltaT = mesh.time().deltaT().value();
|
scalar deltaT = mesh.time().deltaTValue();
|
||||||
scalar tEnd = (1.0 - stepFraction())*deltaT;
|
scalar tEnd = (1.0 - stepFraction())*deltaT;
|
||||||
scalar dtMax = tEnd;
|
scalar dtMax = tEnd;
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ bool Foam::trackedParticle::move(trackedParticle::trackData& td)
|
|||||||
td.switchProcessor = false;
|
td.switchProcessor = false;
|
||||||
td.keepParticle = true;
|
td.keepParticle = true;
|
||||||
|
|
||||||
scalar deltaT = cloud().pMesh().time().deltaT().value();
|
scalar deltaT = cloud().pMesh().time().deltaTValue();
|
||||||
scalar tEnd = (1.0 - stepFraction())*deltaT;
|
scalar tEnd = (1.0 - stepFraction())*deltaT;
|
||||||
scalar dtMax = tEnd;
|
scalar dtMax = tEnd;
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ void Foam::fieldAverage::initialize()
|
|||||||
totalIter_.setSize(faItems_.size(), 1);
|
totalIter_.setSize(faItems_.size(), 1);
|
||||||
|
|
||||||
totalTime_.clear();
|
totalTime_.clear();
|
||||||
totalTime_.setSize(faItems_.size(), obr_.time().deltaT().value());
|
totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
|
||||||
|
|
||||||
|
|
||||||
// Add mean fields to the field lists
|
// Add mean fields to the field lists
|
||||||
@ -170,7 +170,7 @@ void Foam::fieldAverage::calcAverages()
|
|||||||
forAll(faItems_, fieldI)
|
forAll(faItems_, fieldI)
|
||||||
{
|
{
|
||||||
totalIter_[fieldI]++;
|
totalIter_[fieldI]++;
|
||||||
totalTime_[fieldI] += obr_.time().deltaT().value();
|
totalTime_[fieldI] += obr_.time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
addMeanSqrToPrime2Mean<scalar, scalar>
|
addMeanSqrToPrime2Mean<scalar, scalar>
|
||||||
|
|||||||
@ -150,7 +150,7 @@ const
|
|||||||
{
|
{
|
||||||
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||||
|
|
||||||
const scalar dt = obr_.time().deltaT().value();
|
const scalar dt = obr_.time().deltaTValue();
|
||||||
|
|
||||||
forAll(faItems_, i)
|
forAll(faItems_, i)
|
||||||
{
|
{
|
||||||
@ -193,7 +193,7 @@ void Foam::fieldAverage::calculatePrime2MeanFields
|
|||||||
typedef GeometricField<Type1, fvPatchField, volMesh> fieldType1;
|
typedef GeometricField<Type1, fvPatchField, volMesh> fieldType1;
|
||||||
typedef GeometricField<Type2, fvPatchField, volMesh> fieldType2;
|
typedef GeometricField<Type2, fvPatchField, volMesh> fieldType2;
|
||||||
|
|
||||||
const scalar dt = obr_.time().deltaT().value();
|
const scalar dt = obr_.time().deltaTValue();
|
||||||
|
|
||||||
forAll(faItems_, i)
|
forAll(faItems_, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -164,7 +164,7 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
|
|||||||
td.switchProcessor = false;
|
td.switchProcessor = false;
|
||||||
td.keepParticle = true;
|
td.keepParticle = true;
|
||||||
|
|
||||||
scalar deltaT = GREAT; //cloud().pMesh().time().deltaT().value();
|
scalar deltaT = GREAT; //cloud().pMesh().time().deltaTValue();
|
||||||
scalar tEnd = (1.0 - stepFraction())*deltaT;
|
scalar tEnd = (1.0 - stepFraction())*deltaT;
|
||||||
scalar dtMax = tEnd;
|
scalar dtMax = tEnd;
|
||||||
|
|
||||||
|
|||||||
@ -330,7 +330,7 @@ Foam::tmp<Foam::pointField> Foam::linearValveLayersFvMesh::newPoints() const
|
|||||||
|
|
||||||
forAll (patchPoints, ppI)
|
forAll (patchPoints, ppI)
|
||||||
{
|
{
|
||||||
np[patchPoints[ppI]] += vel*time().deltaT().value();
|
np[patchPoints[ppI]] += vel*time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return tnewPoints;
|
return tnewPoints;
|
||||||
|
|||||||
@ -349,7 +349,7 @@ bool Foam::mixerFvMesh::update()
|
|||||||
csPtr_->globalPosition
|
csPtr_->globalPosition
|
||||||
(
|
(
|
||||||
csPtr_->localPosition(points())
|
csPtr_->localPosition(points())
|
||||||
+ vector(0, rpm_*360.0*time().deltaT().value()/60.0, 0)
|
+ vector(0, rpm_*360.0*time().deltaTValue()/60.0, 0)
|
||||||
*movingPointsMask()
|
*movingPointsMask()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -372,7 +372,7 @@ bool Foam::mixerFvMesh::update()
|
|||||||
csPtr_->globalPosition
|
csPtr_->globalPosition
|
||||||
(
|
(
|
||||||
csPtr_->localPosition(oldPoints())
|
csPtr_->localPosition(oldPoints())
|
||||||
+ vector(0, rpm_*360.0*time().deltaT().value()/60.0, 0)
|
+ vector(0, rpm_*360.0*time().deltaTValue()/60.0, 0)
|
||||||
*movingPointsMask()
|
*movingPointsMask()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -420,7 +420,7 @@ bool Foam::movingConeTopoFvMesh::update()
|
|||||||
// )/
|
// )/
|
||||||
// (curLeft_ - leftEdge_)
|
// (curLeft_ - leftEdge_)
|
||||||
// )
|
// )
|
||||||
)*curMotionVel_*time().deltaT().value();
|
)*curMotionVel_*time().deltaTValue();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -442,11 +442,11 @@ bool Foam::movingConeTopoFvMesh::update()
|
|||||||
// )/
|
// )/
|
||||||
// (curLeft_ - leftEdge_)
|
// (curLeft_ - leftEdge_)
|
||||||
// )
|
// )
|
||||||
)*curMotionVel_*time().deltaT().value();
|
)*curMotionVel_*time().deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
// curLeft_ += curMotionVel_.x()*time().deltaT().value();
|
// curLeft_ += curMotionVel_.x()*time().deltaTValue();
|
||||||
// curRight_ += curMotionVel_.x()*time().deltaT().value();
|
// curRight_ += curMotionVel_.x()*time().deltaTValue();
|
||||||
curLeft_ = average
|
curLeft_ = average
|
||||||
(
|
(
|
||||||
faceZones()
|
faceZones()
|
||||||
|
|||||||
Reference in New Issue
Block a user