mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
MRFZone: Rationalized the update of Omega for tabulated omega
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "fvMatrices.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user