Commit b17a5685 authored by Henry Weller's avatar Henry Weller
Browse files

MRFZone: Do not correct boundary conditions when inactive

Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2380
parent 1b3d9858
......@@ -405,6 +405,11 @@ void Foam::MRFZone::addCoriolis
void Foam::MRFZone::makeRelative(volVectorField& U) const
{
if (cellZoneID_ == -1)
{
return;
}
const volVectorField& C = mesh_.C();
const vector Omega = this->Omega();
......@@ -474,6 +479,11 @@ void Foam::MRFZone::makeRelative
void Foam::MRFZone::makeAbsolute(volVectorField& U) const
{
if (cellZoneID_ == -1)
{
return;
}
const volVectorField& C = mesh_.C();
const vector Omega = this->Omega();
......@@ -530,6 +540,11 @@ void Foam::MRFZone::makeAbsolute
void Foam::MRFZone::correctBoundaryVelocity(volVectorField& U) const
{
if (!active_)
{
return;
}
const vector Omega = this->Omega();
// Included patches
......
......@@ -38,6 +38,11 @@ void Foam::MRFZone::makeRelativeRhoFlux
surfaceScalarField& phi
) const
{
if (!active_)
{
return;
}
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
......@@ -65,6 +70,11 @@ void Foam::MRFZone::makeRelativeRhoFlux
FieldField<fvsPatchField, scalar>& phi
) const
{
if (!active_)
{
return;
}
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
......@@ -105,6 +115,11 @@ void Foam::MRFZone::makeRelativeRhoFlux
const label patchi
) const
{
if (!active_)
{
return;
}
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
......@@ -138,6 +153,11 @@ void Foam::MRFZone::makeAbsoluteRhoFlux
surfaceScalarField& phi
) const
{
if (!active_)
{
return;
}
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment