MRFZone: Rationalized the update of Omega for tabulated omega

This commit is contained in:
Henry
2012-11-14 15:47:22 +00:00
parent 051afeb419
commit f780dcd2b6
3 changed files with 17 additions and 7 deletions

View File

@ -296,6 +296,12 @@ Foam::MRFZone::MRFZone
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::vector Foam::MRFZone::Omega() const
{
return omega_->value(mesh_.time().timeOutputValue())*axis_;
}
void Foam::MRFZone::addCoriolis
(
const volVectorField& U,
@ -312,7 +318,7 @@ void Foam::MRFZone::addCoriolis
vectorField& ddtUc = ddtU.internalField();
const vectorField& Uc = U.internalField();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vector Omega = this->Omega();
forAll(cells, i)
{
@ -334,7 +340,7 @@ void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) const
vectorField& Usource = UEqn.source();
const vectorField& U = UEqn.psi();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vector Omega = this->Omega();
forAll(cells, i)
{
@ -360,7 +366,7 @@ void Foam::MRFZone::addCoriolis
vectorField& Usource = UEqn.source();
const vectorField& U = UEqn.psi();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vector Omega = this->Omega();
forAll(cells, i)
{
@ -374,7 +380,7 @@ void Foam::MRFZone::relativeVelocity(volVectorField& U) const
{
const volVectorField& C = mesh_.C();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vector Omega = this->Omega();
const labelList& cells = mesh_.cellZones()[cellZoneID_];
@ -412,7 +418,7 @@ void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
{
const volVectorField& C = mesh_.C();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vector Omega = this->Omega();
const labelList& cells = mesh_.cellZones()[cellZoneID_];
@ -480,7 +486,7 @@ void Foam::MRFZone::absoluteFlux
void Foam::MRFZone::correctBoundaryVelocity(volVectorField& U) const
{
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vector Omega = this->Omega();
// Included patches

View File

@ -47,7 +47,7 @@ SourceFiles
#include "volFieldsFwd.H"
#include "surfaceFieldsFwd.H"
#include "fvMatricesFwd.H"
#include "fvMatrices.H"
#include "mapPolyMesh.H"
#include "DataEntry.H"
#include "autoPtr.H"
@ -164,6 +164,9 @@ public:
//- Return const access to the MRF active flag
inline bool active() const;
//- Return the current Omega vector
vector Omega() const;
// Evaluation

View File

@ -27,6 +27,7 @@ License
#include "fvMesh.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "fvMatrices.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //