mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Updated BCs using DataEntry to use timeOutputValue instead of time value
This commit is contained in:
@ -112,7 +112,7 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar t = db().time().value();
|
||||
const scalar t = db().time().timeOutputValue();
|
||||
|
||||
// a simpler way of doing this would be nice
|
||||
const scalar avgU = -flowRate_->value(t)/gSum(patch().magSf());
|
||||
|
||||
@ -36,7 +36,7 @@ namespace Foam
|
||||
template<class Type>
|
||||
scalar oscillatingFixedValueFvPatchField<Type>::currentScale() const
|
||||
{
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
const scalar a = amplitude_->value(t);
|
||||
const scalar f = frequency_->value(t);
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ License
|
||||
void Foam::rotatingPressureInletOutletVelocityFvPatchVectorField::
|
||||
calcTangentialVelocity()
|
||||
{
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
vector om = omega_->value(t);
|
||||
|
||||
vector axisHat = om/mag(om);
|
||||
|
||||
@ -102,7 +102,7 @@ void Foam::rotatingTotalPressureFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
const vector om = omega_->value(t);
|
||||
|
||||
vector axisHat = om/mag(om);
|
||||
|
||||
@ -114,7 +114,7 @@ void Foam::rotatingWallVelocityFvPatchVectorField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
scalar om = omega_->value(t);
|
||||
|
||||
// Calculate the rotating wall velocity from the specification of the motion
|
||||
|
||||
@ -56,7 +56,7 @@ uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
uniformValue_(ptf.uniformValue_().clone().ptr())
|
||||
{
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
uniformValue_(DataEntry<Type>::New("uniformValue", dict))
|
||||
{
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
|
||||
fixedValueFvPatchField<Type>(ptf),
|
||||
uniformValue_(ptf.uniformValue_().clone().ptr())
|
||||
{
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
|
||||
fixedValueFvPatchField<Type>(ptf, iF),
|
||||
uniformValue_(ptf.uniformValue_().clone().ptr())
|
||||
{
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||
}
|
||||
|
||||
@ -115,11 +115,26 @@ void uniformFixedValueFvPatchField<Type>::autoMap
|
||||
)
|
||||
{
|
||||
this->setSize(m.size());
|
||||
const scalar t = this->db().time().value();
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void uniformFixedValueFvPatchField<Type>::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar t = this->db().time().timeOutputValue();
|
||||
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||
|
||||
fixedValueFvPatchField<Type>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void uniformFixedValueFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
|
||||
@ -137,6 +137,12 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user