Time: Simplification and rationalisation of userTime

First step towards merging userTime into Time so that post-processing tools
operate with the same userTime mode as the solvers.
This commit is contained in:
Henry Weller
2021-10-14 15:05:14 +01:00
parent 45c8a4695a
commit 686f7fb21a
53 changed files with 136 additions and 180 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -123,7 +123,7 @@ void Foam::tractionDisplacementFvPatchVectorField::updateCoeffs()
return; return;
} }
this->updateCoeffs(pressure_->value(this->db().time().timeOutputValue())); this->updateCoeffs(pressure_->value(this->db().time().userTime()));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,7 +47,7 @@ adaptiveLinear::adaptiveLinear
relaxationModel(typeName, relaxationDict, runTime), relaxationModel(typeName, relaxationDict, runTime),
relaxationStart_(coeffDict().lookup<scalar>("relaxationStart")), relaxationStart_(coeffDict().lookup<scalar>("relaxationStart")),
relaxationEnd_(coeffDict().lookup<scalar>("relaxationEnd")), relaxationEnd_(coeffDict().lookup<scalar>("relaxationEnd")),
lastTimeValue_(runTime_.time().timeOutputValue()), lastTimeValue_(runTime_.time().userTime()),
relaxation_(relaxationStart_) relaxation_(relaxationStart_)
{} {}
@ -56,7 +56,7 @@ adaptiveLinear::adaptiveLinear
scalar adaptiveLinear::relaxation() scalar adaptiveLinear::relaxation()
{ {
if (runTime_.time().timeOutputValue() > lastTimeValue_) if (runTime_.time().userTime() > lastTimeValue_)
{ {
scalar currentRelaxation = relaxation_; scalar currentRelaxation = relaxation_;
@ -65,13 +65,13 @@ scalar adaptiveLinear::relaxation()
/( /(
( (
runTime_.time().endTime().value() runTime_.time().endTime().value()
- runTime_.time().timeOutputValue() - runTime_.time().userTime()
) )
/(runTime_.time().timeOutputValue() - lastTimeValue_) /(runTime_.time().userTime() - lastTimeValue_)
+ 1 + 1
); );
lastTimeValue_ = runTime_.time().timeOutputValue(); lastTimeValue_ = runTime_.time().userTime();
return currentRelaxation; return currentRelaxation;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,7 +62,7 @@ rampHoldFall::rampHoldFall
scalar rampHoldFall::relaxation() scalar rampHoldFall::relaxation()
{ {
scalar t = runTime_.time().timeOutputValue(); scalar t = runTime_.time().userTime();
scalar tStart = runTime_.time().startTime().value(); scalar tStart = runTime_.time().startTime().value();
scalar tEnd = runTime_.time().endTime().value(); scalar tEnd = runTime_.time().endTime().value();

View File

@ -34,7 +34,7 @@ License
template<class Type> template<class Type>
Foam::scalar Foam::CLASS::t() const Foam::scalar Foam::CLASS::t() const
{ {
return this->db().time().timeOutputValue(); return this->db().time().userTime();
} }

View File

@ -678,7 +678,7 @@ Foam::word Foam::Time::findInstance
fileHandler().findInstance fileHandler().findInstance
( (
startIO, startIO,
timeOutputValue(), userTime(),
stopInstance stopInstance
) )
); );
@ -807,6 +807,24 @@ Foam::dimensionedScalar Foam::Time::endTime() const
} }
Foam::scalar Foam::Time::userTimeToTime(const scalar tau) const
{
return tau;
}
Foam::scalar Foam::Time::timeToUserTime(const scalar t) const
{
return t;
}
Foam::scalar Foam::Time::userTime() const
{
return timeToUserTime(value());
}
bool Foam::Time::running() const bool Foam::Time::running() const
{ {
return value() < (endTime_ - 0.5*deltaT_); return value() < (endTime_ - 0.5*deltaT_);

View File

@ -431,6 +431,15 @@ public:
return prevTimeState_(); return prevTimeState_();
} }
//- Convert the user-time (e.g. CA deg) to real-time (s).
virtual scalar userTimeToTime(const scalar tau) const;
//- Convert the real-time (s) into user-time (e.g. CA deg)
virtual scalar timeToUserTime(const scalar t) const;
//- Return current user time value
scalar userTime() const;
// Check // Check

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,30 +41,4 @@ Foam::TimeState::TimeState()
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
Foam::TimeState::~TimeState()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::scalar Foam::TimeState::userTimeToTime(const scalar theta) const
{
return theta;
}
Foam::scalar Foam::TimeState::timeToUserTime(const scalar t) const
{
return t;
}
Foam::scalar Foam::TimeState::timeToUserTimeRatio() const
{
return 1;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,6 +42,10 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declaration of classes
class Time;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class TimeState Declaration Class TimeState Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -51,6 +55,7 @@ class TimeState
public dimensionedScalar public dimensionedScalar
{ {
// ***HGW temporary until
protected: protected:
label timeIndex_; label timeIndex_;
@ -64,31 +69,19 @@ protected:
public: public:
//- Declare friendship with the Time class
friend class Time;
// Constructors // Constructors
TimeState(); TimeState();
//- Destructor
virtual ~TimeState();
// Member Functions // Member Functions
// Access // Access
//- Convert the user-time (e.g. CA deg) to real-time (s).
virtual scalar userTimeToTime(const scalar theta) const;
//- Convert the real-time (s) into user-time (e.g. CA deg)
virtual scalar timeToUserTime(const scalar t) const;
//- Ratio between real-time and user-time
virtual scalar timeToUserTimeRatio() const;
//- Return current time value
inline scalar timeOutputValue() const;
//- Return current time index //- Return current time index
inline label timeIndex() const; inline label timeIndex() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,13 +25,6 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::TimeState::timeOutputValue() const
{
return timeToUserTime(value());
}
inline Foam::label Foam::TimeState::timeIndex() const inline Foam::label Foam::TimeState::timeIndex() const
{ {
return timeIndex_; return timeIndex_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ uniformFixedValuePointPatchField
} }
else else
{ {
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fixedValuePointPatchField<Type>::operator=(uniformValue_->value(t)); fixedValuePointPatchField<Type>::operator=(uniformValue_->value(t));
} }
} }
@ -81,7 +81,7 @@ uniformFixedValuePointPatchField
uniformValue_(ptf.uniformValue_, false) uniformValue_(ptf.uniformValue_, false)
{ {
// For safety re-evaluate // For safety re-evaluate
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fixedValuePointPatchField<Type>::operator=(uniformValue_->value(t)); fixedValuePointPatchField<Type>::operator=(uniformValue_->value(t));
} }
@ -98,7 +98,7 @@ uniformFixedValuePointPatchField
uniformValue_(ptf.uniformValue_, false) uniformValue_(ptf.uniformValue_, false)
{ {
// For safety re-evaluate // For safety re-evaluate
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fixedValuePointPatchField<Type>::operator==(uniformValue_->value(t)); fixedValuePointPatchField<Type>::operator==(uniformValue_->value(t));
} }
@ -113,7 +113,7 @@ void Foam::uniformFixedValuePointPatchField<Type>::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fixedValuePointPatchField<Type>::operator==(uniformValue_->value(t)); fixedValuePointPatchField<Type>::operator==(uniformValue_->value(t));
fixedValuePointPatchField<Type>::updateCoeffs(); fixedValuePointPatchField<Type>::updateCoeffs();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -97,7 +97,7 @@ Type Foam::TimeFunction1<Type>::integral
) const ) const
{ {
return return
time_.timeToUserTimeRatio() time_.timeToUserTime(1)
*function_->integral *function_->integral
( (
time_.userTimeToTime(x1), time_.userTimeToTime(x1),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -363,7 +363,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
} }
} }
const scalar Ta = Ta_->value(this->db().time().timeOutputValue()); const scalar Ta = Ta_->value(this->db().time().userTime());
const scalarField hp const scalarField hp
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -235,7 +235,7 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate
{ {
Function1s::Table<vector> timeSeries(word::null, dict); Function1s::Table<vector> timeSeries(word::null, dict);
fld = timeSeries.value(mesh().time().timeOutputValue()); fld = timeSeries.value(mesh().time().userTime());
} }
else if (type == "slip") else if (type == "slip")
{ {

View File

@ -112,7 +112,7 @@ Foam::dynamicMeshPointInterpolator::curPointField() const
( (
interpolatorPtr_->valueWeights interpolatorPtr_->valueWeights
( (
t.timeOutputValue(), t.userTime(),
currentIndices_, currentIndices_,
currentWeights_ currentWeights_
) )

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -145,24 +145,6 @@ Foam::word Foam::crankConRod::unit() const
} }
Foam::scalar Foam::crankConRod::thetaRevolution() const
{
scalar t = theta();
while (t > 180.0)
{
t -= 360.0;
}
while (t < -180.0)
{
t += 360.0;
}
return t;
}
Foam::scalar Foam::crankConRod::deltaTheta() const Foam::scalar Foam::crankConRod::deltaTheta() const
{ {
return timeToDeg(deltaTValue()); return timeToDeg(deltaTValue());
@ -201,10 +183,4 @@ Foam::scalar Foam::crankConRod::timeToUserTime(const scalar t) const
} }
Foam::scalar Foam::crankConRod::timeToUserTimeRatio() const
{
return timeToDeg(1);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -167,10 +167,6 @@ public:
//- Return time unit //- Return time unit
virtual word unit() const; virtual word unit() const;
//- Return current crank-angle translated to a single revolution
// (value between -180 and 180 with 0 = top dead centre)
scalar thetaRevolution() const;
//- Return crank-angle increment //- Return crank-angle increment
virtual scalar deltaTheta() const; virtual scalar deltaTheta() const;
@ -183,9 +179,6 @@ public:
//- Convert the real-time (s) into user-time (CA deg) //- Convert the real-time (s) into user-time (CA deg)
virtual scalar timeToUserTime(const scalar t) const; virtual scalar timeToUserTime(const scalar t) const;
//- Ratio between real-time and user-time
virtual scalar timeToUserTimeRatio() const;
//- Read the control dictionary and set the write controls etc. //- Read the control dictionary and set the write controls etc.
virtual void readDict(); virtual void readDict();

View File

@ -120,7 +120,7 @@ public:
// Conversion // Conversion
//- Calculate the piston position from the engine geometry //- Calculate the piston position from the engine geometry
// and given timr (CA or s) // and given time (CA or s)
virtual scalar pistonPosition(const scalar theta) const = 0; virtual scalar pistonPosition(const scalar theta) const = 0;

View File

@ -295,7 +295,7 @@ Foam::MRFZone::MRFZone
Foam::vector Foam::MRFZone::Omega() const Foam::vector Foam::MRFZone::Omega() const
{ {
return omega_->value(mesh_.time().timeOutputValue())*axis_; return omega_->value(mesh_.time().userTime())*axis_;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,7 +41,7 @@ void Foam::MRFZone::makeRelativeRhoFlux
const surfaceVectorField& Cf = mesh_.Cf(); const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf(); const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_; const vector Omega = omega_->value(mesh_.time().userTime())*axis_;
const vectorField& Cfi = Cf; const vectorField& Cfi = Cf;
const vectorField& Sfi = Sf; const vectorField& Sfi = Sf;
@ -68,7 +68,7 @@ void Foam::MRFZone::makeRelativeRhoFlux
const surfaceVectorField& Cf = mesh_.Cf(); const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf(); const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_; const vector Omega = omega_->value(mesh_.time().userTime())*axis_;
// Included patches // Included patches
forAll(includedFaces_, patchi) forAll(includedFaces_, patchi)
@ -108,7 +108,7 @@ void Foam::MRFZone::makeRelativeRhoFlux
const surfaceVectorField& Cf = mesh_.Cf(); const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf(); const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_; const vector Omega = omega_->value(mesh_.time().userTime())*axis_;
// Included patches // Included patches
forAll(includedFaces_[patchi], i) forAll(includedFaces_[patchi], i)
@ -141,7 +141,7 @@ void Foam::MRFZone::makeAbsoluteRhoFlux
const surfaceVectorField& Cf = mesh_.Cf(); const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf(); const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_; const vector Omega = omega_->value(mesh_.time().userTime())*axis_;
const vectorField& Cfi = Cf; const vectorField& Cfi = Cf;
const vectorField& Sfi = Sf; const vectorField& Sfi = Sf;

View File

@ -108,7 +108,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
const scalar axialVelocity = axialVelocity_->value(t); const scalar axialVelocity = axialVelocity_->value(t);
const scalar radialVelocity = radialVelocity_->value(t); const scalar radialVelocity = radialVelocity_->value(t);
const scalar rpm = rpm_->value(t); const scalar rpm = rpm_->value(t);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,7 +89,7 @@ void Foam::fixedMeanFvPatchField<Type>::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
Type meanValue = meanValue_->value(t); Type meanValue = meanValue_->value(t);
Field<Type> newValues(this->patchInternalField()); Field<Type> newValues(this->patchInternalField());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -101,7 +101,7 @@ void Foam::fixedMeanOutletInletFvPatchField<Type>::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
Type meanValue = meanValue_->value(t); Type meanValue = meanValue_->value(t);
Field<Type> newValues(this->patchInternalField()); Field<Type> newValues(this->patchInternalField());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -144,7 +144,7 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateValues
const RhoType& rho const RhoType& rho
) )
{ {
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
const vectorField n(patch().nf()); const vectorField n(patch().nf());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -132,7 +132,7 @@ void Foam::flowRateOutletVelocityFvPatchVectorField::updateValues
const RhoType& rho const RhoType& rho
) )
{ {
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
const vectorField n(patch().nf()); const vectorField n(patch().nf());

View File

@ -115,7 +115,7 @@ void Foam::outletPhaseMeanVelocityFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
scalarField alphap = scalarField alphap =
patch().lookupPatchField<volScalarField, scalar>(alphaName_); patch().lookupPatchField<volScalarField, scalar>(alphaName_);

View File

@ -111,7 +111,7 @@ void Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs()
if (tangentialVelocity_.valid()) if (tangentialVelocity_.valid())
{ {
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
const vector tangentialVelocity = tangentialVelocity_->value(t); const vector tangentialVelocity = tangentialVelocity_->value(t);
const vectorField n(patch().nf()); const vectorField n(patch().nf());
refValue() = tangentialVelocity - n*(n & tangentialVelocity); refValue() = tangentialVelocity - n*(n & tangentialVelocity);

View File

@ -33,7 +33,7 @@ License
void Foam::rotatingPressureInletOutletVelocityFvPatchVectorField:: void Foam::rotatingPressureInletOutletVelocityFvPatchVectorField::
calcTangentialVelocity() calcTangentialVelocity()
{ {
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
vector om = omega_->value(t); vector om = omega_->value(t);
vector axisHat = om/mag(om); vector axisHat = om/mag(om);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,7 +91,7 @@ void Foam::rotatingTotalPressureFvPatchScalarField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
const vector omega = omega_->value(t); const vector omega = omega_->value(t);
const vector axis = omega/mag(omega); const vector axis = omega/mag(omega);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -111,7 +111,7 @@ void Foam::rotatingWallVelocityFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
scalar om = omega_->value(t); scalar om = omega_->value(t);
// Calculate the rotating wall velocity from the specification of the motion // Calculate the rotating wall velocity from the specification of the motion

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -101,7 +101,7 @@ void Foam::surfaceNormalUniformFixedValueFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fvPatchVectorField::operator=(uniformValue_->value(t)*patch().nf()); fvPatchVectorField::operator=(uniformValue_->value(t)*patch().nf());
fvPatchVectorField::updateCoeffs(); fvPatchVectorField::updateCoeffs();

View File

@ -130,7 +130,7 @@ void Foam::swirlFlowRateInletVelocityFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
const scalar flowRate = flowRate_->value(t); const scalar flowRate = flowRate_->value(t);
const scalar rpm = rpm_->value(t); const scalar rpm = rpm_->value(t);

View File

@ -503,7 +503,7 @@ Foam::tmp<Foam::Field<Type>> Foam::timeVaryingMappedFvPatchField<Type>::map()
// Apply offset to mapped values // Apply offset to mapped values
if (offset_.valid()) if (offset_.valid())
{ {
const scalar t = time().timeOutputValue(); const scalar t = time().userTime();
fld += offset_->value(t); fld += offset_->value(t);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -92,7 +92,7 @@ void Foam::translatingWallVelocityFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
const vector U = U_->value(t); const vector U = U_->value(t);
// Remove the component of U normal to the wall in case the wall is not flat // Remove the component of U normal to the wall in case the wall is not flat

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -109,7 +109,7 @@ void Foam::uniformFixedGradientFvPatchField<Type>::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
this->gradient() = uniformGradient_->value(t); this->gradient() = uniformGradient_->value(t);
fixedGradientFvPatchField<Type>::updateCoeffs(); fixedGradientFvPatchField<Type>::updateCoeffs();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -112,7 +112,7 @@ void Foam::uniformFixedValueFvPatchField<Type>::updateCoeffs()
return; return;
} }
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fvPatchField<Type>::operator==(uniformValue_->value(t)); fvPatchField<Type>::operator==(uniformValue_->value(t));
fixedValueFvPatchField<Type>::updateCoeffs(); fixedValueFvPatchField<Type>::updateCoeffs();

View File

@ -56,7 +56,7 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
uniformInletValue_(Function1<Type>::New("uniformInletValue", dict)) uniformInletValue_(Function1<Type>::New("uniformInletValue", dict))
{ {
this->refValue() = this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue()); uniformInletValue_->value(this->db().time().userTime());
if (dict.found("value")) if (dict.found("value"))
{ {
@ -90,7 +90,7 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
{ {
// Evaluate refValue since not mapped // Evaluate refValue since not mapped
this->refValue() = this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue()); uniformInletValue_->value(this->db().time().userTime());
this->refGrad() = Zero; this->refGrad() = Zero;
this->valueFraction() = 0.0; this->valueFraction() = 0.0;
@ -126,7 +126,7 @@ void Foam::uniformInletOutletFvPatchField<Type>::updateCoeffs()
} }
this->refValue() = this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue()); uniformInletValue_->value(this->db().time().userTime());
const Field<scalar>& phip = const Field<scalar>& phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar> this->patch().template lookupPatchField<surfaceScalarField, scalar>
@ -165,7 +165,7 @@ void Foam::uniformInletOutletFvPatchField<Type>::autoMap
// Override // Override
this->refValue() = this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue()); uniformInletValue_->value(this->db().time().userTime());
} }
@ -180,7 +180,7 @@ void Foam::uniformInletOutletFvPatchField<Type>::rmap
// Override // Override
this->refValue() = this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue()); uniformInletValue_->value(this->db().time().userTime());
} }

View File

@ -73,7 +73,7 @@ uniformTotalPressureFvPatchScalarField
} }
else else
{ {
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fvPatchScalarField::operator==(p0_->value(t)); fvPatchScalarField::operator==(p0_->value(t));
} }
} }
@ -98,7 +98,7 @@ uniformTotalPressureFvPatchScalarField
{ {
// Set the patch pressure to the current total pressure // Set the patch pressure to the current total pressure
// This is not ideal but avoids problems with the creation of patch faces // This is not ideal but avoids problems with the creation of patch faces
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
fvPatchScalarField::operator==(p0_->value(t)); fvPatchScalarField::operator==(p0_->value(t));
} }
@ -132,7 +132,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
return; return;
} }
scalar p0 = p0_->value(this->db().time().timeOutputValue()); scalar p0 = p0_->value(this->db().time().userTime());
const fvsPatchField<scalar>& phip = const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -100,7 +100,7 @@ updateCoeffs()
alphap = max(alphap, scalar(0)); alphap = max(alphap, scalar(0));
alphap = min(alphap, scalar(1)); alphap = min(alphap, scalar(1));
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
scalar flowRate = flowRate_->value(t); scalar flowRate = flowRate_->value(t);
// a simpler way of doing this would be nice // a simpler way of doing this would be nice

View File

@ -88,7 +88,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::execute()
{ {
const_cast<Time&>(time_).setDeltaT const_cast<Time&>(time_).setDeltaT
( (
timeStepPtr_().value(time_.timeOutputValue()) timeStepPtr_().value(time_.userTime())
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ bool Foam::functionObjects::setWriteIntervalFunctionObject::execute()
{ {
const_cast<Time&>(time_).setWriteInterval const_cast<Time&>(time_).setWriteInterval
( (
writeIntervalPtr_().value(time_.timeOutputValue()) writeIntervalPtr_().value(time_.userTime())
); );
return true; return true;

View File

@ -549,7 +549,7 @@ void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::updateCoeffs()
// Apply offset to mapped values // Apply offset to mapped values
if (offset_.valid()) if (offset_.valid())
{ {
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
this->operator==(*this + offset_->value(t)); this->operator==(*this + offset_->value(t));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ Foam::fileName Foam::fileFormats::edgeMeshFormatsCore::findMeshInstance
for (instanceI = ts.size()-1; instanceI >= 0; --instanceI) for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
{ {
if (ts[instanceI].value() <= t.timeOutputValue()) if (ts[instanceI].value() <= t.userTime())
{ {
break; break;
} }
@ -125,7 +125,7 @@ Foam::fileName Foam::fileFormats::edgeMeshFormatsCore::findMeshFile
for (instanceI = ts.size()-1; instanceI >= 0; --instanceI) for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
{ {
if (ts[instanceI].value() <= t.timeOutputValue()) if (ts[instanceI].value() <= t.userTime())
{ {
break; break;
} }

View File

@ -150,7 +150,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
// calculate the wavy film height // calculate the wavy film height
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
const scalar GMean = GammaMean_->value(t); const scalar GMean = GammaMean_->value(t);
const scalar a = a_->value(t); const scalar a = a_->value(t);

View File

@ -149,7 +149,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
// calculate the wavy film height // calculate the wavy film height
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
const scalar GMean = GammaMean_->value(t); const scalar GMean = GammaMean_->value(t);
const scalar a = a_->value(t); const scalar a = a_->value(t);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ Foam::fileName Foam::fileFormats::surfaceFormatsCore::findMeshInstance
for (instanceI = ts.size()-1; instanceI >= 0; --instanceI) for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
{ {
if (ts[instanceI].value() <= t.timeOutputValue()) if (ts[instanceI].value() <= t.userTime())
{ {
break; break;
} }
@ -125,7 +125,7 @@ Foam::fileName Foam::fileFormats::surfaceFormatsCore::findMeshFile
for (instanceI = ts.size()-1; instanceI >= 0; --instanceI) for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
{ {
if (ts[instanceI].value() <= t.timeOutputValue()) if (ts[instanceI].value() <= t.userTime())
{ {
break; break;
} }

View File

@ -764,7 +764,7 @@ Foam::scalar Foam::chemistryModel<ThermoType>::solve
if (log_) if (log_)
{ {
cpuSolveFile_() cpuSolveFile_()
<< this->time().timeOutputValue() << this->time().userTime()
<< " " << solveChemistryCpuTime_ << endl; << " " << solveChemistryCpuTime_ << endl;
} }

View File

@ -95,14 +95,14 @@ void Foam::chemistryReduction<ThermoType>::update()
if (log_) if (log_)
{ {
cpuReduceFile_() cpuReduceFile_()
<< this->chemistry_.time().timeOutputValue() << this->chemistry_.time().userTime()
<< " " << reduceMechCpuTime_ << endl; << " " << reduceMechCpuTime_ << endl;
if (sumn_) if (sumn_)
{ {
// Write average number of species // Write average number of species
nActiveSpeciesFile_() nActiveSpeciesFile_()
<< this->chemistry_.time().timeOutputValue() << this->chemistry_.time().userTime()
<< " " << sumnActiveSpecies_/sumn_ << endl; << " " << sumnActiveSpecies_/sumn_ << endl;
} }

View File

@ -656,33 +656,33 @@ void Foam::chemistryTabulationMethods::ISAT<ThermoType>::writePerformance()
if (log_) if (log_)
{ {
nRetrievedFile_() nRetrievedFile_()
<< runTime_.timeOutputValue() << " " << nRetrieved_ << endl; << runTime_.userTime() << " " << nRetrieved_ << endl;
nRetrieved_ = 0; nRetrieved_ = 0;
nGrowthFile_() nGrowthFile_()
<< runTime_.timeOutputValue() << " " << nGrowth_ << endl; << runTime_.userTime() << " " << nGrowth_ << endl;
nGrowth_ = 0; nGrowth_ = 0;
nAddFile_() nAddFile_()
<< runTime_.timeOutputValue() << " " << nAdd_ << endl; << runTime_.userTime() << " " << nAdd_ << endl;
nAdd_ = 0; nAdd_ = 0;
sizeFile_() sizeFile_()
<< runTime_.timeOutputValue() << " " << runTime_.userTime() << " "
<< chemisTree_.size() << endl; << chemisTree_.size() << endl;
cpuRetrieveFile_() cpuRetrieveFile_()
<< runTime_.timeOutputValue() << runTime_.userTime()
<< " " << searchISATCpuTime_ << endl; << " " << searchISATCpuTime_ << endl;
searchISATCpuTime_ = 0; searchISATCpuTime_ = 0;
cpuGrowFile_() cpuGrowFile_()
<< runTime_.timeOutputValue() << runTime_.userTime()
<< " " << growCpuTime_ << endl; << " " << growCpuTime_ << endl;
growCpuTime_ = 0; growCpuTime_ = 0;
cpuAddFile_() cpuAddFile_()
<< runTime_.timeOutputValue() << runTime_.userTime()
<< " " << addNewLeafCpuTime_ << endl; << " " << addNewLeafCpuTime_ << endl;
addNewLeafCpuTime_ = 0; addNewLeafCpuTime_ = 0;
} }

View File

@ -59,7 +59,7 @@ Foam::fileName Foam::triSurface::triSurfInstance(const Time& d)
for (i=ts.size()-1; i>=0; i--) for (i=ts.size()-1; i>=0; i--)
{ {
if (ts[i].value() <= d.timeOutputValue()) if (ts[i].value() <= d.userTime())
{ {
break; break;
} }

View File

@ -183,7 +183,7 @@ void Foam::waveAlphaFvPatchScalarField::updateCoeffs()
return; return;
} }
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
operator==(alpha(t)); operator==(alpha(t));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -121,7 +121,7 @@ void Foam::waveInletOutletFvPatchField<Type>::updateCoeffs()
phiName_ phiName_
); );
const scalar t = this->db().time().timeOutputValue(); const scalar t = this->db().time().userTime();
const waveSuperposition& waves = waveSuperposition::New(this->db()); const waveSuperposition& waves = waveSuperposition::New(this->db());
const pointField& localPoints = this->patch().patch().localPoints(); const pointField& localPoints = this->patch().patch().localPoints();

View File

@ -185,7 +185,7 @@ void Foam::waveVelocityFvPatchVectorField::updateCoeffs()
return; return;
} }
const scalar t = db().time().timeOutputValue(); const scalar t = db().time().userTime();
operator==(U(t)); operator==(U(t));

View File

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
const scalar LOGvGreat = ::log(vGreat); const scalar LOGvGreat = ::log(vGreat);
while (!runTime.end()) while (!runTime.end())
{ {
scalar t = runTime.timeOutputValue()/lambda; scalar t = runTime.userTime()/lambda;
forAll(A, i) forAll(A, i)
{ {
if (bk[i]*t < LOGvGreat) if (bk[i]*t < LOGvGreat)