fvModels,fvConstraints: Changed Function1(time) to Function1(user time)
Time-dependent input data is now expected to be specified in user-time rather than real-time.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,7 +73,7 @@ Foam::displacementLinearMotionMotionSolver::curPoints() const
|
||||
tmp<pointField> tcurPoints(new pointField(points0()));
|
||||
pointField& curPoints = tcurPoints.ref();
|
||||
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
|
||||
const scalar displacement = displacement_->value(t);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,7 +107,7 @@ void Foam::uniformJumpFvPatchField<Type>::updateCoeffs()
|
||||
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
this->jump_ = jumpTable_->value(this->db().time().value());
|
||||
this->jump_ = jumpTable_->value(this->db().time().userTimeValue());
|
||||
}
|
||||
|
||||
fixedJumpFvPatchField<Type>::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,7 +104,7 @@ void Foam::uniformJumpAMIFvPatchField<Type>::updateCoeffs()
|
||||
|
||||
if (this->cyclicAMIPatch().owner())
|
||||
{
|
||||
this->jump_ = jumpTable_->value(this->db().time().value());
|
||||
this->jump_ = jumpTable_->value(this->db().time().userTimeValue());
|
||||
}
|
||||
|
||||
fixedJumpAMIFvPatchField<Type>::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -269,7 +269,7 @@ bool Foam::functionObjects::wallHeatFlux::write()
|
||||
if (Pstream::master())
|
||||
{
|
||||
file()
|
||||
<< mesh_.time().value()
|
||||
<< mesh_.time().userTimeValue()
|
||||
<< tab << pp.name()
|
||||
<< tab << minqp
|
||||
<< tab << maxqp
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -221,7 +221,7 @@ bool Foam::functionObjects::wallHeatTransferCoeff::write()
|
||||
if (Pstream::master())
|
||||
{
|
||||
file()
|
||||
<< mesh_.time().value()
|
||||
<< mesh_.time().userTimeValue()
|
||||
<< tab << pp.name()
|
||||
<< tab << minHtcp
|
||||
<< tab << maxHtcp
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -243,7 +243,7 @@ bool Foam::functionObjects::wallShearStress::write()
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
file() << mesh_.time().value()
|
||||
file() << mesh_.time().userTimeValue()
|
||||
<< tab << pp.name()
|
||||
<< tab << minSsp
|
||||
<< tab << maxSsp
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -137,7 +137,7 @@ bool Foam::fv::fixedTemperatureConstraint::constrain
|
||||
{
|
||||
case temperatureMode::uniform:
|
||||
{
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
scalarField Tuni(cells.size(), TValue_->value(t));
|
||||
eqn.setValues(cells, thermo.he(Tuni, cells));
|
||||
break;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,7 +73,7 @@ bool Foam::fv::fixedValueConstraint::constrainType
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
|
||||
eqn.setValues
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,7 +37,9 @@ void Foam::fv::accelerationSource::add
|
||||
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar dt = mesh().time().deltaTValue();
|
||||
const vector dU = velocity_->value(t) - velocity_->value(t - dt);
|
||||
const vector dU =
|
||||
velocity_->value(mesh().time().timeToUserTime(t))
|
||||
- velocity_->value(mesh().time().timeToUserTime(t - dt));
|
||||
const vector a = dU/mesh().time().deltaTValue();
|
||||
|
||||
const labelList& cells = set_.cells();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -129,7 +129,7 @@ void Foam::fv::heatSource::addSup
|
||||
{
|
||||
const labelList& cells = set_.cells();
|
||||
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
const scalar q = q_->value(t);
|
||||
|
||||
forAll(cells, i)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,7 +92,7 @@ void Foam::fv::massSource::addGeneralSupType
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
const scalar massFlowRate = massFlowRate_->value(t);
|
||||
const Type value = fieldValues_[fieldName]->value<Type>(t);
|
||||
|
||||
@ -127,7 +127,7 @@ void Foam::fv::massSource::addSupType
|
||||
|
||||
if (fieldName == rhoName_)
|
||||
{
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
const scalar massFlowRate = massFlowRate_->value(t);
|
||||
|
||||
forAll(cells, i)
|
||||
@ -146,7 +146,7 @@ void Foam::fv::massSource::addSupType
|
||||
<< endl;
|
||||
}
|
||||
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
const scalar massFlowRate = massFlowRate_->value(t);
|
||||
const scalar T = fieldValues_[TName_]->value<scalar>(t);
|
||||
const basicThermo& thermo =
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,10 @@ void Foam::fv::sixDoFAccelerationSource::addSup
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
Vector<vector> accelerations(accelerations_->value(mesh().time().value()));
|
||||
const Vector<vector> accelerations
|
||||
(
|
||||
accelerations_->value(mesh().time().userTimeValue())
|
||||
);
|
||||
|
||||
// If gravitational force is present combine with the linear acceleration
|
||||
if (mesh().foundObject<uniformDimensionedVectorField>("g"))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,7 +96,7 @@ void Foam::fv::semiImplicitSource::addSupType
|
||||
<< ">::addSup for source " << name() << endl;
|
||||
}
|
||||
|
||||
const scalar t = mesh().time().value();
|
||||
const scalar t = mesh().time().userTimeValue();
|
||||
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi = eqn.psi();
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -102,7 +102,7 @@ void constantRadiation::correct()
|
||||
|
||||
tmp<volScalarField::Internal> constantRadiation::Shs()
|
||||
{
|
||||
const scalar time = film().time().value();
|
||||
const scalar time = film().time().userTimeValue();
|
||||
|
||||
if ((time >= timeStart_) && (time <= timeStart_ + duration_))
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,7 +105,7 @@ Foam::timeVaryingAlphaContactAngleFvPatchScalarField::theta
|
||||
const fvsPatchVectorField&
|
||||
) const
|
||||
{
|
||||
scalar t = patch().boundaryMesh().mesh().time().value();
|
||||
scalar t = patch().boundaryMesh().mesh().time().userTimeValue();
|
||||
scalar theta0 = thetaT0_;
|
||||
|
||||
if (t < t0_)
|
||||
|
||||
Reference in New Issue
Block a user