MRFZone: Do not correct boundary conditions when inactive

Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2380
This commit is contained in:
Henry Weller
2016-12-09 16:29:27 +00:00
parent 9eb6736ef6
commit dc1c6d7600
2 changed files with 35 additions and 0 deletions

View File

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

View File

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