mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: changes to Time and TimeState
- update TimeState access methods - use writeTime() instead of old method name outputTime() - use deltaTValue() instead of deltaT().value() to avoids pointless construct of intermediate
This commit is contained in:
@ -18,6 +18,6 @@ dimensionedScalar rho("rho", dimDensity, transportProperties);
|
||||
|
||||
scalar MaxCo =
|
||||
max(mesh.surfaceInterpolation::deltaCoeffs()*c0).value()
|
||||
*runTime.deltaT().value();
|
||||
*runTime.deltaTValue();
|
||||
|
||||
Info<< "Max acoustic Courant Number = " << MaxCo << endl;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
if (adjustTimeStep)
|
||||
{
|
||||
runTime.setDeltaT(min(dtChem, maxDeltaT));
|
||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
||||
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||
}
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
dtChem = chemistry.solve(runTime.deltaT().value());
|
||||
dtChem = chemistry.solve(runTime.deltaTValue());
|
||||
scalar Qdot = chemistry.Qdot()()[0]/rho[0];
|
||||
integratedHeat += Qdot*runTime.deltaT().value();
|
||||
integratedHeat += Qdot*runTime.deltaTValue();
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
*mag(aMesh.edgeInterpolation::deltaCoeffs())
|
||||
/rhol
|
||||
)
|
||||
).value()*runTime.deltaT().value();
|
||||
).value()*runTime.deltaTValue();
|
||||
|
||||
Info<< "Max Capillary Courant Number = " << CoNumSigma << '\n' << endl;
|
||||
}
|
||||
|
||||
@ -47,10 +47,10 @@ if (aMesh.nInternalEdges())
|
||||
);
|
||||
|
||||
CoNum = max(SfUfbyDelta/aMesh.magLe())
|
||||
.value()*runTime.deltaT().value();
|
||||
.value()*runTime.deltaTValue();
|
||||
|
||||
meanCoNum = (sum(SfUfbyDelta)/sum(aMesh.magLe()))
|
||||
.value()*runTime.deltaT().value();
|
||||
.value()*runTime.deltaTValue();
|
||||
|
||||
velMag = max(mag(phis)/aMesh.magLe()).value();
|
||||
}
|
||||
|
||||
@ -49,11 +49,11 @@ if (adjustTimeStep)
|
||||
(
|
||||
min
|
||||
(
|
||||
min(maxCo/CoNum, maxDi/DiNum)*runTime.deltaT().value(),
|
||||
min(maxCo/CoNum, maxDi/DiNum)*runTime.deltaTValue(),
|
||||
min(runTime.deltaTValue(), maxDeltaT)
|
||||
)
|
||||
);
|
||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
||||
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -59,12 +59,12 @@ if (adjustTimeStep)
|
||||
(
|
||||
min
|
||||
(
|
||||
min(deltaTFluid, maxDeltaTSolid)*runTime.deltaT().value(),
|
||||
min(deltaTFluid, maxDeltaTSolid)*runTime.deltaTValue(),
|
||||
maxDeltaT
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
||||
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1075,7 +1075,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas
|
||||
|
||||
MULES::limit
|
||||
(
|
||||
1.0/mesh_.time().deltaT().value(),
|
||||
1.0/mesh_.time().deltaTValue(),
|
||||
geometricOneField(),
|
||||
alpha,
|
||||
phi_,
|
||||
|
||||
@ -699,7 +699,7 @@ void Foam::radiation::laserDTRM::calculate()
|
||||
scalar totalQ = gSum(Q_.primitiveFieldRef()*mesh_.V());
|
||||
Info << "Total energy absorbed [W]: " << totalQ << endl;
|
||||
|
||||
if (mesh_.time().outputTime())
|
||||
if (mesh_.time().writeTime())
|
||||
{
|
||||
reflectingCellsVol.write();
|
||||
nHat.write();
|
||||
|
||||
@ -124,7 +124,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
|
||||
* max(TSat - T, T0)
|
||||
);
|
||||
|
||||
if (mesh_.time().outputTime())
|
||||
if (mesh_.time().writeTime())
|
||||
{
|
||||
mDotC.write();
|
||||
mDotE.write();
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
MULES::limiter
|
||||
(
|
||||
allLambda,
|
||||
1.0/runTime.deltaT().value(),
|
||||
1.0/runTime.deltaTValue(),
|
||||
geometricOneField(),
|
||||
alpha1,
|
||||
alphaPhi1BD,
|
||||
@ -164,7 +164,7 @@
|
||||
MULES::limiter
|
||||
(
|
||||
allLambda,
|
||||
1.0/runTime.deltaT().value(),
|
||||
1.0/runTime.deltaTValue(),
|
||||
geometricOneField(),
|
||||
alpha2,
|
||||
alphaPhi2BD,
|
||||
|
||||
@ -628,7 +628,7 @@ void Foam::multiphaseMixture::solveAlphas
|
||||
|
||||
MULES::limit
|
||||
(
|
||||
1.0/mesh_.time().deltaT().value(),
|
||||
1.0/mesh_.time().deltaTValue(),
|
||||
geometricOneField(),
|
||||
alpha,
|
||||
phi_,
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
IOobject rhoIO
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(0),
|
||||
Time::timeName(0),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -75,7 +75,7 @@
|
||||
IOobject EHeader
|
||||
(
|
||||
"E",
|
||||
runTime.timeName(0),
|
||||
Time::timeName(0),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -127,7 +127,7 @@
|
||||
IOobject nuIO
|
||||
(
|
||||
"nu",
|
||||
runTime.timeName(0),
|
||||
Time::timeName(0),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
|
||||
@ -51,7 +51,7 @@ if (thermalStress)
|
||||
IOobject CIO
|
||||
(
|
||||
"C",
|
||||
runTime.timeName(0),
|
||||
Time::timeName(0),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -106,7 +106,7 @@ if (thermalStress)
|
||||
IOobject rhoKIO
|
||||
(
|
||||
"k",
|
||||
runTime.timeName(0),
|
||||
Time::timeName(0),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -161,7 +161,7 @@ if (thermalStress)
|
||||
IOobject alphaIO
|
||||
(
|
||||
"alpha",
|
||||
runTime.timeName(0),
|
||||
Time::timeName(0),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
|
||||
Reference in New Issue
Block a user