Boundary conditions: Added extrapolatedCalculatedFvPatchField

To be used instead of zeroGradientFvPatchField for temporary fields for
which zero-gradient extrapolation is use to evaluate the boundary field
but avoiding fields derived from temporary field using field algebra
inheriting the zeroGradient boundary condition by the reuse of the
temporary field storage.

zeroGradientFvPatchField should not be used as the default patch field
for any temporary fields and should be avoided for non-temporary fields
except where it is clearly appropriate;
extrapolatedCalculatedFvPatchField and calculatedFvPatchField are
generally more suitable defaults depending on the manner in which the
boundary values are specified or evaluated.

The entire OpenFOAM-dev code-base has been updated following the above
recommendations.

Henry G. Weller
CFD Direct
This commit is contained in:
Henry Weller
2016-02-20 22:44:37 +00:00
parent 979e1ee191
commit 99a10ecea6
110 changed files with 1004 additions and 552 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,8 +59,6 @@ void Foam::multiphaseMixtureThermo::calcAlphas()
alphas_ += level*phase();
level += 1.0;
}
alphas_.correctBoundaryConditions();
}
@ -104,8 +102,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("alphas", dimless, 0.0),
zeroGradientFvPatchScalarField::typeName
dimensionedScalar("alphas", dimless, 0.0)
),
sigmas_(lookup("sigmas")),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,8 +54,6 @@ void Foam::multiphaseSystem::calcAlphas()
alphas_ += level*iter();
level += 1.0;
}
alphas_.correctBoundaryConditions();
}
@ -417,8 +415,7 @@ Foam::multiphaseSystem::multiphaseSystem
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("alphas", dimless, 0.0),
zeroGradientFvPatchScalarField::typeName
dimensionedScalar("alphas", dimless, 0.0)
),
sigmas_(lookup("sigmas")),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,8 +52,6 @@ void Foam::multiphaseMixture::calcAlphas()
alphas_ += level*iter();
level += 1.0;
}
alphas_.correctBoundaryConditions();
}
@ -108,8 +106,7 @@ Foam::multiphaseMixture::multiphaseMixture
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("alphas", dimless, 0.0),
zeroGradientFvPatchScalarField::typeName
dimensionedScalar("alphas", dimless, 0.0)
),
nu_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,7 @@ License
#include "phasePair.H"
#include "fvcGrad.H"
#include "surfaceInterpolate.H"
#include "zeroGradientFvPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,6 +34,7 @@ License
#include "fvcDiv.H"
#include "fvmSup.H"
#include "fvMatrix.H"
#include "zeroGradientFvPatchFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,8 +78,7 @@ Foam::InertPhaseModel<BasePhaseModel>::Sh() const
this->mesh()
),
this->mesh(),
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0),
zeroGradientFvPatchScalarField::typeName
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0)
)
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,8 +64,6 @@ void Foam::multiphaseSystem::calcAlphas()
alphas_ += level*phases()[i];
level += 1.0;
}
alphas_.correctBoundaryConditions();
}
@ -506,8 +504,7 @@ Foam::multiphaseSystem::multiphaseSystem
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("alphas", dimless, 0.0),
zeroGradientFvPatchScalarField::typeName
dimensionedScalar("alphas", dimless, 0.0)
),
cAlphas_(lookup("interfaceCompression")),

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -ggdb3 \
-ItwoPhaseSystem/lnInclude \
-I../phaseSystems/lnInclude \
-I../interfacialModels/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,7 @@ License
#include "phasePair.H"
#include "fvcGrad.H"
#include "surfaceInterpolate.H"
#include "zeroGradientFvPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //