diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index d56bf6421ad00131d1741590b43cea2a56cd967d..f09f38d4ee7450d7bdf56559d0e949d08144815c 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -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 diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H index 74160cf39b82616e999fb0082e27b12f7708916c..5c6e05e2d3988620e5f0f67b799e3004a3d0e6ff 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H @@ -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 diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C index 872bf53a823b50eba145d6870e80fbfd29a4ad60..bc0087826c9af18eef9cee6a1267e3019c1e3bad 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C @@ -27,6 +27,7 @@ License #include "fvMesh.H" #include "volFields.H" #include "surfaceFields.H" +#include "fvMatrices.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //