ENH: Updated BCs using DataEntry to use timeOutputValue instead of time value

This commit is contained in:
andy
2011-11-25 14:26:17 +00:00
parent 169f15a593
commit 588926a724
7 changed files with 31 additions and 10 deletions

View File

@ -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());

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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
{

View File

@ -137,6 +137,12 @@ public:
);
// Evaluation functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};