mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Integrated OpenFOAM.org developments for wall functions
OpenFOAM.org commits for src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions were reviewed. The parts of the commits made by OpenFOAM.org removing various code duplications across wall functions were picked up by keeping the remaining functionalities the same. The duplications were mainly due to: - wall function model coefficients - yPlusLam(), checkPatch(), write() methods The duplications were united under the base nutWallFunction.
This commit is contained in:
committed by
Andrew Heather
parent
6532f27547
commit
ce9ea1ca08
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,10 +28,7 @@ License
|
|||||||
#include "epsilonWallFunctionFvPatchScalarField.H"
|
#include "epsilonWallFunctionFvPatchScalarField.H"
|
||||||
#include "nutWallFunctionFvPatchScalarField.H"
|
#include "nutWallFunctionFvPatchScalarField.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "fvMatrix.H"
|
#include "fvMatrix.H"
|
||||||
#include "volFields.H"
|
|
||||||
#include "wallFvPatch.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -40,31 +37,6 @@ Foam::scalar Foam::epsilonWallFunctionFvPatchScalarField::tolerance_ = 1e-5;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::epsilonWallFunctionFvPatchScalarField::checkType()
|
|
||||||
{
|
|
||||||
if (!isA<wallFvPatch>(patch()))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Invalid wall function specification" << nl
|
|
||||||
<< " Patch type for patch " << patch().name()
|
|
||||||
<< " must be wall" << nl
|
|
||||||
<< " Current patch type is " << patch().type() << nl << endl
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::epsilonWallFunctionFvPatchScalarField::writeLocalEntries
|
|
||||||
(
|
|
||||||
Ostream& os
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
os.writeEntry("Cmu", Cmu_);
|
|
||||||
os.writeEntry("kappa", kappa_);
|
|
||||||
os.writeEntry("E", E_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::epsilonWallFunctionFvPatchScalarField::setMaster()
|
void Foam::epsilonWallFunctionFvPatchScalarField::setMaster()
|
||||||
{
|
{
|
||||||
if (master_ != -1)
|
if (master_ != -1)
|
||||||
@ -213,24 +185,24 @@ void Foam::epsilonWallFunctionFvPatchScalarField::calculate
|
|||||||
{
|
{
|
||||||
const label patchi = patch.index();
|
const label patchi = patch.index();
|
||||||
|
|
||||||
|
const nutWallFunctionFvPatchScalarField& nutw =
|
||||||
|
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);
|
||||||
|
|
||||||
const scalarField& y = turbModel.y()[patchi];
|
const scalarField& y = turbModel.y()[patchi];
|
||||||
|
|
||||||
const scalar Cmu25 = pow025(Cmu_);
|
|
||||||
const scalar Cmu75 = pow(Cmu_, 0.75);
|
|
||||||
|
|
||||||
const tmp<volScalarField> tk = turbModel.k();
|
|
||||||
const volScalarField& k = tk();
|
|
||||||
|
|
||||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||||
const scalarField& nuw = tnuw();
|
const scalarField& nuw = tnuw();
|
||||||
|
|
||||||
const tmp<scalarField> tnutw = turbModel.nut(patchi);
|
const tmp<volScalarField> tk = turbModel.k();
|
||||||
const scalarField& nutw = tnutw();
|
const volScalarField& k = tk();
|
||||||
|
|
||||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
|
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
|
||||||
|
|
||||||
const scalarField magGradUw(mag(Uw.snGrad()));
|
const scalarField magGradUw(mag(Uw.snGrad()));
|
||||||
|
|
||||||
|
const scalar Cmu25 = pow025(nutw.Cmu());
|
||||||
|
const scalar Cmu75 = pow(nutw.Cmu(), 0.75);
|
||||||
|
|
||||||
// Set epsilon and G
|
// Set epsilon and G
|
||||||
forAll(nutw, facei)
|
forAll(nutw, facei)
|
||||||
{
|
{
|
||||||
@ -241,15 +213,15 @@ void Foam::epsilonWallFunctionFvPatchScalarField::calculate
|
|||||||
const scalar w = cornerWeights[facei];
|
const scalar w = cornerWeights[facei];
|
||||||
|
|
||||||
// Default high-Re form
|
// Default high-Re form
|
||||||
scalar epsilonc = w*Cmu75*pow(k[celli], 1.5)/(kappa_*y[facei]);
|
scalar epsilonc = w*Cmu75*pow(k[celli], 1.5)/(nutw.kappa()*y[facei]);
|
||||||
scalar Gc =
|
scalar Gc =
|
||||||
w
|
w
|
||||||
*(nutw[facei] + nuw[facei])
|
*(nutw[facei] + nuw[facei])
|
||||||
*magGradUw[facei]
|
*magGradUw[facei]
|
||||||
*Cmu25*sqrt(k[celli])
|
*Cmu25*sqrt(k[celli])
|
||||||
/(kappa_*y[facei]);
|
/(nutw.kappa()*y[facei]);
|
||||||
|
|
||||||
if (lowReCorrection_ && yPlus < yPlusLam_)
|
if (lowReCorrection_ && yPlus < nutw.yPlusLam())
|
||||||
{
|
{
|
||||||
epsilonc = w*2.0*k[celli]*nuw[facei]/sqr(y[facei]);
|
epsilonc = w*2.0*k[celli]*nuw[facei]/sqr(y[facei]);
|
||||||
Gc = 0;
|
Gc = 0;
|
||||||
@ -272,19 +244,13 @@ epsilonWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF),
|
fixedValueFvPatchField<scalar>(p, iF),
|
||||||
Cmu_(0.09),
|
|
||||||
kappa_(0.41),
|
|
||||||
E_(9.8),
|
|
||||||
yPlusLam_(nutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)),
|
|
||||||
G_(),
|
G_(),
|
||||||
epsilon_(),
|
epsilon_(),
|
||||||
lowReCorrection_(false),
|
lowReCorrection_(false),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::epsilonWallFunctionFvPatchScalarField::
|
Foam::epsilonWallFunctionFvPatchScalarField::
|
||||||
@ -297,19 +263,13 @@ epsilonWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||||
Cmu_(ptf.Cmu_),
|
|
||||||
kappa_(ptf.kappa_),
|
|
||||||
E_(ptf.E_),
|
|
||||||
yPlusLam_(ptf.yPlusLam_),
|
|
||||||
G_(),
|
G_(),
|
||||||
epsilon_(),
|
epsilon_(),
|
||||||
lowReCorrection_(ptf.lowReCorrection_),
|
lowReCorrection_(ptf.lowReCorrection_),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::epsilonWallFunctionFvPatchScalarField::
|
Foam::epsilonWallFunctionFvPatchScalarField::
|
||||||
@ -321,10 +281,6 @@ epsilonWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF, dict),
|
fixedValueFvPatchField<scalar>(p, iF, dict),
|
||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
|
||||||
yPlusLam_(nutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)),
|
|
||||||
G_(),
|
G_(),
|
||||||
epsilon_(),
|
epsilon_(),
|
||||||
lowReCorrection_(dict.lookupOrDefault("lowReCorrection", false)),
|
lowReCorrection_(dict.lookupOrDefault("lowReCorrection", false)),
|
||||||
@ -332,8 +288,6 @@ epsilonWallFunctionFvPatchScalarField
|
|||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{
|
||||||
checkType();
|
|
||||||
|
|
||||||
// Apply zero-gradient condition on start-up
|
// Apply zero-gradient condition on start-up
|
||||||
this->operator==(patchInternalField());
|
this->operator==(patchInternalField());
|
||||||
}
|
}
|
||||||
@ -346,19 +300,13 @@ epsilonWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ewfpsf),
|
fixedValueFvPatchField<scalar>(ewfpsf),
|
||||||
Cmu_(ewfpsf.Cmu_),
|
|
||||||
kappa_(ewfpsf.kappa_),
|
|
||||||
E_(ewfpsf.E_),
|
|
||||||
yPlusLam_(ewfpsf.yPlusLam_),
|
|
||||||
G_(),
|
G_(),
|
||||||
epsilon_(),
|
epsilon_(),
|
||||||
lowReCorrection_(ewfpsf.lowReCorrection_),
|
lowReCorrection_(ewfpsf.lowReCorrection_),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::epsilonWallFunctionFvPatchScalarField::
|
Foam::epsilonWallFunctionFvPatchScalarField::
|
||||||
@ -369,19 +317,13 @@ epsilonWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ewfpsf, iF),
|
fixedValueFvPatchField<scalar>(ewfpsf, iF),
|
||||||
Cmu_(ewfpsf.Cmu_),
|
|
||||||
kappa_(ewfpsf.kappa_),
|
|
||||||
E_(ewfpsf.E_),
|
|
||||||
yPlusLam_(ewfpsf.yPlusLam_),
|
|
||||||
G_(),
|
G_(),
|
||||||
epsilon_(),
|
epsilon_(),
|
||||||
lowReCorrection_(ewfpsf.lowReCorrection_),
|
lowReCorrection_(ewfpsf.lowReCorrection_),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -582,14 +524,6 @@ void Foam::epsilonWallFunctionFvPatchScalarField::manipulateMatrix
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|
||||||
{
|
|
||||||
writeLocalEntries(os);
|
|
||||||
fixedValueFvPatchField<scalar>::write(os);
|
|
||||||
os.writeEntry("lowReCorrection", lowReCorrection_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -47,7 +47,7 @@ Description
|
|||||||
The low-Re correction is activated by setting the entry
|
The low-Re correction is activated by setting the entry
|
||||||
\c lowReCorrection to 'on'; in this mode the model switches between
|
\c lowReCorrection to 'on'; in this mode the model switches between
|
||||||
laminar and turbulent functions based on the laminar-to-turbulent y+ value
|
laminar and turbulent functions based on the laminar-to-turbulent y+ value
|
||||||
derived from kappa and E. When the \c lowReCorrection is inactive, the
|
derived from the kappa and E specified in the corresponding nutWallFunction. When the \c lowReCorrection is inactive, the
|
||||||
wall function operates in high-Re mode.
|
wall function operates in high-Re mode.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
@ -103,18 +103,6 @@ protected:
|
|||||||
//- Tolerance used in weighted calculations
|
//- Tolerance used in weighted calculations
|
||||||
static scalar tolerance_;
|
static scalar tolerance_;
|
||||||
|
|
||||||
//- Cmu coefficient
|
|
||||||
scalar Cmu_;
|
|
||||||
|
|
||||||
//- Von Karman constant
|
|
||||||
scalar kappa_;
|
|
||||||
|
|
||||||
//- E coefficient
|
|
||||||
scalar E_;
|
|
||||||
|
|
||||||
//- y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam_;
|
|
||||||
|
|
||||||
//- Local copy of turbulence G field
|
//- Local copy of turbulence G field
|
||||||
scalarField G_;
|
scalarField G_;
|
||||||
|
|
||||||
@ -136,12 +124,6 @@ protected:
|
|||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Check the type of the patch
|
|
||||||
virtual void checkType();
|
|
||||||
|
|
||||||
//- Write local wall function variables
|
|
||||||
virtual void writeLocalEntries(Ostream&) const;
|
|
||||||
|
|
||||||
//- Set the master patch - master is responsible for updating all
|
//- Set the master patch - master is responsible for updating all
|
||||||
// wall function patches
|
// wall function patches
|
||||||
virtual void setMaster();
|
virtual void setMaster();
|
||||||
@ -253,7 +235,7 @@ public:
|
|||||||
virtual ~epsilonWallFunctionFvPatchScalarField() = default;
|
virtual ~epsilonWallFunctionFvPatchScalarField() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
@ -281,12 +263,6 @@ public:
|
|||||||
fvMatrix<scalar>& matrix,
|
fvMatrix<scalar>& matrix,
|
||||||
const scalarField& weights
|
const scalarField& weights
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Write
|
|
||||||
virtual void write(Ostream&) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
| Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -26,9 +26,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fWallFunctionFvPatchScalarField.H"
|
#include "fWallFunctionFvPatchScalarField.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "nutWallFunctionFvPatchScalarField.H"
|
||||||
#include "volFields.H"
|
|
||||||
#include "wallFvPatch.H"
|
|
||||||
#include "v2f.H"
|
#include "v2f.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
@ -39,47 +37,6 @@ namespace Foam
|
|||||||
namespace RASModels
|
namespace RASModels
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void fWallFunctionFvPatchScalarField::checkType()
|
|
||||||
{
|
|
||||||
if (!isA<wallFvPatch>(patch()))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Invalid wall function specification" << nl
|
|
||||||
<< " Patch type for patch " << patch().name()
|
|
||||||
<< " must be wall" << nl
|
|
||||||
<< " Current patch type is " << patch().type() << nl << endl
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeEntry("Cmu", Cmu_);
|
|
||||||
os.writeEntry("kappa", kappa_);
|
|
||||||
os.writeEntry("E", E_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
scalar fWallFunctionFvPatchScalarField::yPlusLam
|
|
||||||
(
|
|
||||||
const scalar kappa,
|
|
||||||
const scalar E
|
|
||||||
)
|
|
||||||
{
|
|
||||||
scalar ypl = 11.0;
|
|
||||||
|
|
||||||
for (int i=0; i<10; i++)
|
|
||||||
{
|
|
||||||
ypl = log(max(E*ypl, 1))/kappa;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ypl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
||||||
@ -88,14 +45,8 @@ fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF),
|
fixedValueFvPatchField<scalar>(p, iF)
|
||||||
Cmu_(0.09),
|
{}
|
||||||
kappa_(0.41),
|
|
||||||
E_(9.8),
|
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
||||||
@ -106,14 +57,8 @@ fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||||
Cmu_(ptf.Cmu_),
|
{}
|
||||||
kappa_(ptf.kappa_),
|
|
||||||
E_(ptf.E_),
|
|
||||||
yPlusLam_(ptf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
||||||
@ -123,14 +68,8 @@ fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF, dict),
|
fixedValueFvPatchField<scalar>(p, iF, dict)
|
||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
{}
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
||||||
@ -138,14 +77,8 @@ fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
|||||||
const fWallFunctionFvPatchScalarField& v2wfpsf
|
const fWallFunctionFvPatchScalarField& v2wfpsf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(v2wfpsf),
|
fixedValueFvPatchField<scalar>(v2wfpsf)
|
||||||
Cmu_(v2wfpsf.Cmu_),
|
{}
|
||||||
kappa_(v2wfpsf.kappa_),
|
|
||||||
E_(v2wfpsf.E_),
|
|
||||||
yPlusLam_(v2wfpsf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
||||||
@ -154,14 +87,8 @@ fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(v2wfpsf, iF),
|
fixedValueFvPatchField<scalar>(v2wfpsf, iF)
|
||||||
Cmu_(v2wfpsf.Cmu_),
|
{}
|
||||||
kappa_(v2wfpsf.kappa_),
|
|
||||||
E_(v2wfpsf.E_),
|
|
||||||
yPlusLam_(v2wfpsf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -185,6 +112,9 @@ void fWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
);
|
);
|
||||||
const v2fBase& v2fModel = refCast<const v2fBase>(turbModel);
|
const v2fBase& v2fModel = refCast<const v2fBase>(turbModel);
|
||||||
|
|
||||||
|
const nutWallFunctionFvPatchScalarField& nutw =
|
||||||
|
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);
|
||||||
|
|
||||||
const scalarField& y = turbModel.y()[patchi];
|
const scalarField& y = turbModel.y()[patchi];
|
||||||
|
|
||||||
const tmp<volScalarField> tk = turbModel.k();
|
const tmp<volScalarField> tk = turbModel.k();
|
||||||
@ -199,7 +129,7 @@ void fWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||||
const scalarField& nuw = tnuw();
|
const scalarField& nuw = tnuw();
|
||||||
|
|
||||||
const scalar Cmu25 = pow025(Cmu_);
|
const scalar Cmu25 = pow025(nutw.Cmu());
|
||||||
|
|
||||||
scalarField& f = *this;
|
scalarField& f = *this;
|
||||||
|
|
||||||
@ -212,7 +142,7 @@ void fWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
scalar yPlus = uTau*y[facei]/nuw[facei];
|
scalar yPlus = uTau*y[facei]/nuw[facei];
|
||||||
|
|
||||||
if (yPlus > yPlusLam_)
|
if (yPlus > nutw.yPlusLam())
|
||||||
{
|
{
|
||||||
scalar N = 6.0;
|
scalar N = 6.0;
|
||||||
scalar v2c = v2[celli];
|
scalar v2c = v2[celli];
|
||||||
@ -234,22 +164,6 @@ void fWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fWallFunctionFvPatchScalarField::evaluate
|
|
||||||
(
|
|
||||||
const Pstream::commsTypes commsType
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<scalar>::evaluate(commsType);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void fWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|
||||||
{
|
|
||||||
writeLocalEntries(os);
|
|
||||||
fixedValueFvPatchField<scalar>::write(os);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePatchTypeField
|
makePatchTypeField
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
| Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,7 +34,8 @@ Description
|
|||||||
function condition for low- and high Reynolds number, turbulent flow cases
|
function condition for low- and high Reynolds number, turbulent flow cases
|
||||||
|
|
||||||
The model operates in two modes, based on the computed laminar-to-turbulent
|
The model operates in two modes, based on the computed laminar-to-turbulent
|
||||||
switch-over y+ value derived from kappa and E.
|
switch-over y+ value derived from kappa and E specified in the corresponding
|
||||||
|
nutWallFunction.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
\table
|
\table
|
||||||
@ -80,34 +81,6 @@ class fWallFunctionFvPatchScalarField
|
|||||||
:
|
:
|
||||||
public fixedValueFvPatchField<scalar>
|
public fixedValueFvPatchField<scalar>
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
//- Cmu coefficient
|
|
||||||
scalar Cmu_;
|
|
||||||
|
|
||||||
//- Von Karman constant
|
|
||||||
scalar kappa_;
|
|
||||||
|
|
||||||
//- E coefficient
|
|
||||||
scalar E_;
|
|
||||||
|
|
||||||
//- Y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
|
||||||
|
|
||||||
//- Check the type of the patch
|
|
||||||
virtual void checkType();
|
|
||||||
|
|
||||||
//- Write local wall function variables
|
|
||||||
virtual void writeLocalEntries(Ostream&) const;
|
|
||||||
|
|
||||||
//- Calculate the Y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam(const scalar kappa, const scalar E);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -177,21 +150,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
//- Evaluate the patchField
|
|
||||||
virtual void evaluate(const Pstream::commsTypes);
|
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Write
|
|
||||||
virtual void write(Ostream&) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
| Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -26,50 +26,15 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "kLowReWallFunctionFvPatchScalarField.H"
|
#include "kLowReWallFunctionFvPatchScalarField.H"
|
||||||
|
#include "nutWallFunctionFvPatchScalarField.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "volFields.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "wallFvPatch.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void kLowReWallFunctionFvPatchScalarField::checkType()
|
|
||||||
{
|
|
||||||
if (!isA<wallFvPatch>(patch()))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Invalid wall function specification" << nl
|
|
||||||
<< " Patch type for patch " << patch().name()
|
|
||||||
<< " must be wall" << nl
|
|
||||||
<< " Current patch type is " << patch().type() << nl << endl
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
scalar kLowReWallFunctionFvPatchScalarField::yPlusLam
|
|
||||||
(
|
|
||||||
const scalar kappa,
|
|
||||||
const scalar E
|
|
||||||
)
|
|
||||||
{
|
|
||||||
scalar ypl = 11.0;
|
|
||||||
|
|
||||||
for (int i=0; i<10; i++)
|
|
||||||
{
|
|
||||||
ypl = log(max(E*ypl, 1))/kappa;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ypl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
||||||
@ -79,14 +44,8 @@ kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF),
|
fixedValueFvPatchField<scalar>(p, iF),
|
||||||
Cmu_(0.09),
|
Ceps2_(1.9)
|
||||||
kappa_(0.41),
|
{}
|
||||||
E_(9.8),
|
|
||||||
Ceps2_(1.9),
|
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
||||||
@ -98,14 +57,8 @@ kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||||
Cmu_(ptf.Cmu_),
|
Ceps2_(ptf.Ceps2_)
|
||||||
kappa_(ptf.kappa_),
|
{}
|
||||||
E_(ptf.E_),
|
|
||||||
Ceps2_(ptf.Ceps2_),
|
|
||||||
yPlusLam_(ptf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
||||||
@ -116,14 +69,8 @@ kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF, dict),
|
fixedValueFvPatchField<scalar>(p, iF, dict),
|
||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
Ceps2_(dict.lookupOrDefault<scalar>("Ceps2", 1.9))
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
{}
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
|
||||||
Ceps2_(dict.lookupOrDefault<scalar>("Ceps2", 1.9)),
|
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
||||||
@ -132,14 +79,8 @@ kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(kwfpsf),
|
fixedValueFvPatchField<scalar>(kwfpsf),
|
||||||
Cmu_(kwfpsf.Cmu_),
|
Ceps2_(kwfpsf.Ceps2_)
|
||||||
kappa_(kwfpsf.kappa_),
|
{}
|
||||||
E_(kwfpsf.E_),
|
|
||||||
Ceps2_(kwfpsf.Ceps2_),
|
|
||||||
yPlusLam_(kwfpsf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
||||||
@ -149,14 +90,8 @@ kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(kwfpsf, iF),
|
fixedValueFvPatchField<scalar>(kwfpsf, iF),
|
||||||
Cmu_(kwfpsf.Cmu_),
|
Ceps2_(kwfpsf.Ceps2_)
|
||||||
kappa_(kwfpsf.kappa_),
|
{}
|
||||||
E_(kwfpsf.E_),
|
|
||||||
Ceps2_(kwfpsf.Ceps2_),
|
|
||||||
yPlusLam_(kwfpsf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -178,6 +113,10 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
internalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const nutWallFunctionFvPatchScalarField& nutw =
|
||||||
|
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);
|
||||||
|
|
||||||
const scalarField& y = turbModel.y()[patchi];
|
const scalarField& y = turbModel.y()[patchi];
|
||||||
|
|
||||||
const tmp<volScalarField> tk = turbModel.k();
|
const tmp<volScalarField> tk = turbModel.k();
|
||||||
@ -186,7 +125,7 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||||
const scalarField& nuw = tnuw();
|
const scalarField& nuw = tnuw();
|
||||||
|
|
||||||
const scalar Cmu25 = pow025(Cmu_);
|
const scalar Cmu25 = pow025(nutw.Cmu());
|
||||||
|
|
||||||
scalarField& kw = *this;
|
scalarField& kw = *this;
|
||||||
|
|
||||||
@ -199,11 +138,11 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
scalar yPlus = uTau*y[facei]/nuw[facei];
|
scalar yPlus = uTau*y[facei]/nuw[facei];
|
||||||
|
|
||||||
if (yPlus > yPlusLam_)
|
if (yPlus > nutw.yPlusLam())
|
||||||
{
|
{
|
||||||
scalar Ck = -0.416;
|
scalar Ck = -0.416;
|
||||||
scalar Bk = 8.366;
|
scalar Bk = 8.366;
|
||||||
kw[facei] = Ck/kappa_*log(yPlus) + Bk;
|
kw[facei] = Ck/nutw.kappa()*log(yPlus) + Bk;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -224,20 +163,8 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void kLowReWallFunctionFvPatchScalarField::evaluate
|
|
||||||
(
|
|
||||||
const Pstream::commsTypes commsType
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<scalar>::evaluate(commsType);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os.writeEntry("Cmu", Cmu_);
|
|
||||||
os.writeEntry("kappa", kappa_);
|
|
||||||
os.writeEntry("E", E_);
|
|
||||||
os.writeEntry("Ceps2", Ceps2_);
|
os.writeEntry("Ceps2", Ceps2_);
|
||||||
fixedValueFvPatchField<scalar>::write(os);
|
fixedValueFvPatchField<scalar>::write(os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
| Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,7 +34,8 @@ Description
|
|||||||
condition for low- and high-Reynolds number turbulent flow cases.
|
condition for low- and high-Reynolds number turbulent flow cases.
|
||||||
|
|
||||||
The model operates in two modes, based on the computed laminar-to-turbulent
|
The model operates in two modes, based on the computed laminar-to-turbulent
|
||||||
switch-over y+ value derived from kappa and E.
|
switch-over y+ value derived from kappa and E specified in the corresponding
|
||||||
|
nutWallFunction.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
\table
|
\table
|
||||||
@ -83,30 +84,9 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Cmu coefficient
|
|
||||||
scalar Cmu_;
|
|
||||||
|
|
||||||
//- Von Karman constant
|
|
||||||
scalar kappa_;
|
|
||||||
|
|
||||||
//- E coefficient
|
|
||||||
scalar E_;
|
|
||||||
|
|
||||||
//- Ceps2 coefficient
|
//- Ceps2 coefficient
|
||||||
scalar Ceps2_;
|
scalar Ceps2_;
|
||||||
|
|
||||||
//- Y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
|
||||||
|
|
||||||
//- Check the type of the patch
|
|
||||||
virtual void checkType();
|
|
||||||
|
|
||||||
//- Calculate the Y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam(const scalar kappa, const scalar E);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -183,9 +163,6 @@ public:
|
|||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
//- Evaluate the patchField
|
|
||||||
virtual void evaluate(const Pstream::commsTypes);
|
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2015 OpenFOAM Foundation
|
| Copyright (C) 2011-2015, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -26,27 +26,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "kqRWallFunctionFvPatchField.H"
|
#include "kqRWallFunctionFvPatchField.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "wallFvPatch.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::kqRWallFunctionFvPatchField<Type>::checkType()
|
|
||||||
{
|
|
||||||
if (!isA<wallFvPatch>(this->patch()))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Invalid wall function specification" << nl
|
|
||||||
<< " Patch type for patch " << this->patch().name()
|
|
||||||
<< " must be wall" << nl
|
|
||||||
<< " Current patch type is " << this->patch().type()
|
|
||||||
<< nl << endl
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -58,9 +38,7 @@ Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
zeroGradientFvPatchField<Type>(p, iF)
|
zeroGradientFvPatchField<Type>(p, iF)
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -72,9 +50,7 @@ Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
zeroGradientFvPatchField<Type>(p, iF, dict)
|
zeroGradientFvPatchField<Type>(p, iF, dict)
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -87,9 +63,7 @@ Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
|
zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -99,9 +73,7 @@ Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
zeroGradientFvPatchField<Type>(tkqrwfpf)
|
zeroGradientFvPatchField<Type>(tkqrwfpf)
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -112,9 +84,7 @@ Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
|
zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
| Copyright (C) 2011-2017, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -73,12 +73,6 @@ class kqRWallFunctionFvPatchField
|
|||||||
public zeroGradientFvPatchField<Type>
|
public zeroGradientFvPatchField<Type>
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Check the type of the patch
|
|
||||||
void checkType();
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -148,7 +142,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Evaluate the patchField
|
//- Evaluate the patchField
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -146,7 +146,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Calculate and return the yPlus at the boundary
|
//- Calculate and return the yPlus at the boundary
|
||||||
virtual tmp<scalarField> yPlus() const;
|
virtual tmp<scalarField> yPlus() const;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -178,6 +178,21 @@ Foam::nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::nutWallFunctionFvPatchScalarField&
|
||||||
|
Foam::nutWallFunctionFvPatchScalarField::nutw
|
||||||
|
(
|
||||||
|
const turbulenceModel& turbModel,
|
||||||
|
const label patchi
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
refCast<const nutWallFunctionFvPatchScalarField>
|
||||||
|
(
|
||||||
|
turbModel.nut()().boundaryField()[patchi]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::scalar Foam::nutWallFunctionFvPatchScalarField::yPlusLam
|
Foam::scalar Foam::nutWallFunctionFvPatchScalarField::yPlusLam
|
||||||
(
|
(
|
||||||
const scalar kappa,
|
const scalar kappa,
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -172,7 +172,32 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return Cmu
|
||||||
|
scalar Cmu() const
|
||||||
|
{
|
||||||
|
return Cmu_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return kappa
|
||||||
|
scalar kappa() const
|
||||||
|
{
|
||||||
|
return kappa_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return E
|
||||||
|
scalar E() const
|
||||||
|
{
|
||||||
|
return E_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the nut patchField for the given wall patch
|
||||||
|
static const nutWallFunctionFvPatchScalarField& nutw
|
||||||
|
(
|
||||||
|
const turbulenceModel& turbModel,
|
||||||
|
const label patchi
|
||||||
|
);
|
||||||
|
|
||||||
//- Calculate the Y+ at the edge of the laminar sublayer
|
//- Calculate the Y+ at the edge of the laminar sublayer
|
||||||
static scalar yPlusLam(const scalar kappa, const scalar E);
|
static scalar yPlusLam(const scalar kappa, const scalar E);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -171,7 +171,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
// Access functions
|
// Access functions
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -146,7 +146,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Calculate and return the yPlus at the boundary
|
//- Calculate and return the yPlus at the boundary
|
||||||
virtual tmp<scalarField> yPlus() const;
|
virtual tmp<scalarField> yPlus() const;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,10 +28,7 @@ License
|
|||||||
#include "omegaWallFunctionFvPatchScalarField.H"
|
#include "omegaWallFunctionFvPatchScalarField.H"
|
||||||
#include "nutWallFunctionFvPatchScalarField.H"
|
#include "nutWallFunctionFvPatchScalarField.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "fvMatrix.H"
|
#include "fvMatrix.H"
|
||||||
#include "volFields.H"
|
|
||||||
#include "wallFvPatch.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -45,30 +42,6 @@ scalar omegaWallFunctionFvPatchScalarField::tolerance_ = 1e-5;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void omegaWallFunctionFvPatchScalarField::checkType()
|
|
||||||
{
|
|
||||||
if (!isA<wallFvPatch>(patch()))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Invalid wall function specification" << nl
|
|
||||||
<< " Patch type for patch " << patch().name()
|
|
||||||
<< " must be wall" << nl
|
|
||||||
<< " Current patch type is " << patch().type() << nl << endl
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeEntry("Cmu", Cmu_);
|
|
||||||
os.writeEntry("kappa", kappa_);
|
|
||||||
os.writeEntry("E", E_);
|
|
||||||
os.writeEntry("beta1", beta1_);
|
|
||||||
os.writeEntry("blended", blended_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void omegaWallFunctionFvPatchScalarField::setMaster()
|
void omegaWallFunctionFvPatchScalarField::setMaster()
|
||||||
{
|
{
|
||||||
if (master_ != -1)
|
if (master_ != -1)
|
||||||
@ -218,9 +191,12 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
|||||||
{
|
{
|
||||||
const label patchi = patch.index();
|
const label patchi = patch.index();
|
||||||
|
|
||||||
|
const nutWallFunctionFvPatchScalarField& nutw =
|
||||||
|
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);
|
||||||
|
|
||||||
const scalarField& y = turbModel.y()[patchi];
|
const scalarField& y = turbModel.y()[patchi];
|
||||||
|
|
||||||
const scalar Cmu25 = pow025(Cmu_);
|
const scalar Cmu25 = pow025(nutw.Cmu());
|
||||||
|
|
||||||
const tmp<volScalarField> tk = turbModel.k();
|
const tmp<volScalarField> tk = turbModel.k();
|
||||||
const volScalarField& k = tk();
|
const volScalarField& k = tk();
|
||||||
@ -228,9 +204,6 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
|||||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||||
const scalarField& nuw = tnuw();
|
const scalarField& nuw = tnuw();
|
||||||
|
|
||||||
const tmp<scalarField> tnutw = turbModel.nut(patchi);
|
|
||||||
const scalarField& nutw = tnutw();
|
|
||||||
|
|
||||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
|
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
|
||||||
|
|
||||||
const scalarField magGradUw(mag(Uw.snGrad()));
|
const scalarField magGradUw(mag(Uw.snGrad()));
|
||||||
@ -245,7 +218,7 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
|||||||
const scalar w = cornerWeights[facei];
|
const scalar w = cornerWeights[facei];
|
||||||
|
|
||||||
const scalar omegaVis = 6*nuw[facei]/(beta1_*sqr(y[facei]));
|
const scalar omegaVis = 6*nuw[facei]/(beta1_*sqr(y[facei]));
|
||||||
const scalar omegaLog = sqrt(k[celli])/(Cmu25*kappa_*y[facei]);
|
const scalar omegaLog = sqrt(k[celli])/(Cmu25*nutw.kappa()*y[facei]);
|
||||||
|
|
||||||
// Switching between the laminar sub-layer and the log-region rather
|
// Switching between the laminar sub-layer and the log-region rather
|
||||||
// than blending has been found to provide more accurate results over a
|
// than blending has been found to provide more accurate results over a
|
||||||
@ -264,7 +237,7 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (yPlus > yPlusLam_)
|
if (yPlus > nutw.yPlusLam())
|
||||||
{
|
{
|
||||||
omega0[celli] += w*omegaLog;
|
omega0[celli] += w*omegaLog;
|
||||||
}
|
}
|
||||||
@ -282,7 +255,7 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
|||||||
*(nutw[facei] + nuw[facei])
|
*(nutw[facei] + nuw[facei])
|
||||||
*magGradUw[facei]
|
*magGradUw[facei]
|
||||||
*Cmu25*sqrt(k[celli])
|
*Cmu25*sqrt(k[celli])
|
||||||
/(kappa_*y[facei]);
|
/(nutw.kappa()*y[facei]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -297,20 +270,14 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF),
|
fixedValueFvPatchField<scalar>(p, iF),
|
||||||
Cmu_(0.09),
|
|
||||||
kappa_(0.41),
|
|
||||||
E_(9.8),
|
|
||||||
beta1_(0.075),
|
beta1_(0.075),
|
||||||
blended_(true),
|
blended_(true),
|
||||||
yPlusLam_(nutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)),
|
|
||||||
G_(),
|
G_(),
|
||||||
omega_(),
|
omega_(),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
||||||
@ -322,20 +289,14 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||||
Cmu_(ptf.Cmu_),
|
|
||||||
kappa_(ptf.kappa_),
|
|
||||||
E_(ptf.E_),
|
|
||||||
beta1_(ptf.beta1_),
|
beta1_(ptf.beta1_),
|
||||||
blended_(ptf.blended_),
|
blended_(ptf.blended_),
|
||||||
yPlusLam_(ptf.yPlusLam_),
|
|
||||||
G_(),
|
G_(),
|
||||||
omega_(),
|
omega_(),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
||||||
@ -346,20 +307,14 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF, dict),
|
fixedValueFvPatchField<scalar>(p, iF, dict),
|
||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
|
||||||
beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)),
|
beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)),
|
||||||
blended_(dict.lookupOrDefault<Switch>("blended", true)),
|
blended_(dict.lookupOrDefault<Switch>("blended", true)),
|
||||||
yPlusLam_(nutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)),
|
|
||||||
G_(),
|
G_(),
|
||||||
omega_(),
|
omega_(),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{
|
||||||
checkType();
|
|
||||||
|
|
||||||
// apply zero-gradient condition on start-up
|
// apply zero-gradient condition on start-up
|
||||||
this->operator==(patchInternalField());
|
this->operator==(patchInternalField());
|
||||||
}
|
}
|
||||||
@ -371,20 +326,14 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(owfpsf),
|
fixedValueFvPatchField<scalar>(owfpsf),
|
||||||
Cmu_(owfpsf.Cmu_),
|
|
||||||
kappa_(owfpsf.kappa_),
|
|
||||||
E_(owfpsf.E_),
|
|
||||||
beta1_(owfpsf.beta1_),
|
beta1_(owfpsf.beta1_),
|
||||||
blended_(owfpsf.blended_),
|
blended_(owfpsf.blended_),
|
||||||
yPlusLam_(owfpsf.yPlusLam_),
|
|
||||||
G_(),
|
G_(),
|
||||||
omega_(),
|
omega_(),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
||||||
@ -394,20 +343,14 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(owfpsf, iF),
|
fixedValueFvPatchField<scalar>(owfpsf, iF),
|
||||||
Cmu_(owfpsf.Cmu_),
|
|
||||||
kappa_(owfpsf.kappa_),
|
|
||||||
E_(owfpsf.E_),
|
|
||||||
beta1_(owfpsf.beta1_),
|
beta1_(owfpsf.beta1_),
|
||||||
blended_(owfpsf.blended_),
|
blended_(owfpsf.blended_),
|
||||||
yPlusLam_(owfpsf.yPlusLam_),
|
|
||||||
G_(),
|
G_(),
|
||||||
omega_(),
|
omega_(),
|
||||||
initialised_(false),
|
initialised_(false),
|
||||||
master_(-1),
|
master_(-1),
|
||||||
cornerWeights_()
|
cornerWeights_()
|
||||||
{
|
{}
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -607,7 +550,8 @@ void omegaWallFunctionFvPatchScalarField::manipulateMatrix
|
|||||||
|
|
||||||
void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
writeLocalEntries(os);
|
os.writeEntry("beta1", beta1_);
|
||||||
|
os.writeEntry("blended", blended_);
|
||||||
fixedValueFvPatchField<scalar>::write(os);
|
fixedValueFvPatchField<scalar>::write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,11 +56,12 @@ Description
|
|||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
or switched between these values based on the laminar-to-turbulent y+ value
|
or switched between these values based on the laminar-to-turbulent y+ value
|
||||||
derived from kappa and E. Recent tests have shown that the standard
|
derived from kappa and E specified in the corresponding nutWallFunction.
|
||||||
switching method provides more accurate results for 10 < y+ < 30 when used
|
Recent tests have shown that the standard switching method provides more
|
||||||
with high Reynolds number wall-functions and both methods provide accurate
|
accurate results for 10 < y+ < 30 when used with high Reynolds number
|
||||||
results when used with continuous wall-functions. Based on this the
|
wall-functions and both methods provide accurate results when used with
|
||||||
standard switching method is used by default.
|
continuous wall-functions. Based on this the standard switching method is
|
||||||
|
used by default.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
\table
|
\table
|
||||||
@ -116,24 +117,12 @@ protected:
|
|||||||
//- Tolerance used in weighted calculations
|
//- Tolerance used in weighted calculations
|
||||||
static scalar tolerance_;
|
static scalar tolerance_;
|
||||||
|
|
||||||
//- Cmu coefficient
|
|
||||||
scalar Cmu_;
|
|
||||||
|
|
||||||
//- Von Karman constant
|
|
||||||
scalar kappa_;
|
|
||||||
|
|
||||||
//- E coefficient
|
|
||||||
scalar E_;
|
|
||||||
|
|
||||||
//- beta1 coefficient
|
//- beta1 coefficient
|
||||||
scalar beta1_;
|
scalar beta1_;
|
||||||
|
|
||||||
//- beta1 coefficient
|
//- beta1 coefficient
|
||||||
Switch blended_;
|
Switch blended_;
|
||||||
|
|
||||||
//- y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam_;
|
|
||||||
|
|
||||||
//- Local copy of turbulence G field
|
//- Local copy of turbulence G field
|
||||||
scalarField G_;
|
scalarField G_;
|
||||||
|
|
||||||
@ -152,12 +141,6 @@ protected:
|
|||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Check the type of the patch
|
|
||||||
virtual void checkType();
|
|
||||||
|
|
||||||
//- Write local wall function variables
|
|
||||||
virtual void writeLocalEntries(Ostream&) const;
|
|
||||||
|
|
||||||
//- Set the master patch - master is responsible for updating all
|
//- Set the master patch - master is responsible for updating all
|
||||||
// wall function patches
|
// wall function patches
|
||||||
virtual void setMaster();
|
virtual void setMaster();
|
||||||
@ -266,7 +249,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
| Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -26,11 +26,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "v2WallFunctionFvPatchScalarField.H"
|
#include "v2WallFunctionFvPatchScalarField.H"
|
||||||
|
#include "nutWallFunctionFvPatchScalarField.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "volFields.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "wallFvPatch.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -39,47 +37,6 @@ namespace Foam
|
|||||||
namespace RASModels
|
namespace RASModels
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void v2WallFunctionFvPatchScalarField::checkType()
|
|
||||||
{
|
|
||||||
if (!isA<wallFvPatch>(patch()))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Invalid wall function specification" << nl
|
|
||||||
<< " Patch type for patch " << patch().name()
|
|
||||||
<< " must be wall" << nl
|
|
||||||
<< " Current patch type is " << patch().type() << nl << endl
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void v2WallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeEntry("Cmu", Cmu_);
|
|
||||||
os.writeEntry("kappa", kappa_);
|
|
||||||
os.writeEntry("E", E_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
scalar v2WallFunctionFvPatchScalarField::yPlusLam
|
|
||||||
(
|
|
||||||
const scalar kappa,
|
|
||||||
const scalar E
|
|
||||||
)
|
|
||||||
{
|
|
||||||
scalar ypl = 11.0;
|
|
||||||
|
|
||||||
for (int i=0; i<10; i++)
|
|
||||||
{
|
|
||||||
ypl = log(max(E*ypl, 1))/kappa;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ypl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
||||||
@ -88,14 +45,8 @@ v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF),
|
fixedValueFvPatchField<scalar>(p, iF)
|
||||||
Cmu_(0.09),
|
{}
|
||||||
kappa_(0.41),
|
|
||||||
E_(9.8),
|
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
||||||
@ -106,14 +57,8 @@ v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||||
Cmu_(ptf.Cmu_),
|
{}
|
||||||
kappa_(ptf.kappa_),
|
|
||||||
E_(ptf.E_),
|
|
||||||
yPlusLam_(ptf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
||||||
@ -123,14 +68,8 @@ v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(p, iF, dict),
|
fixedValueFvPatchField<scalar>(p, iF, dict)
|
||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
{}
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
||||||
@ -138,14 +77,8 @@ v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
|||||||
const v2WallFunctionFvPatchScalarField& v2wfpsf
|
const v2WallFunctionFvPatchScalarField& v2wfpsf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(v2wfpsf),
|
fixedValueFvPatchField<scalar>(v2wfpsf)
|
||||||
Cmu_(v2wfpsf.Cmu_),
|
{}
|
||||||
kappa_(v2wfpsf.kappa_),
|
|
||||||
E_(v2wfpsf.E_),
|
|
||||||
yPlusLam_(v2wfpsf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
||||||
@ -154,14 +87,8 @@ v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<scalar>(v2wfpsf, iF),
|
fixedValueFvPatchField<scalar>(v2wfpsf, iF)
|
||||||
Cmu_(v2wfpsf.Cmu_),
|
{}
|
||||||
kappa_(v2wfpsf.kappa_),
|
|
||||||
E_(v2wfpsf.E_),
|
|
||||||
yPlusLam_(v2wfpsf.yPlusLam_)
|
|
||||||
{
|
|
||||||
checkType();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -183,6 +110,10 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
internalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const nutWallFunctionFvPatchScalarField& nutw =
|
||||||
|
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);
|
||||||
|
|
||||||
const scalarField& y = turbModel.y()[patchi];
|
const scalarField& y = turbModel.y()[patchi];
|
||||||
|
|
||||||
const tmp<volScalarField> tk = turbModel.k();
|
const tmp<volScalarField> tk = turbModel.k();
|
||||||
@ -191,7 +122,7 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||||
const scalarField& nuw = tnuw();
|
const scalarField& nuw = tnuw();
|
||||||
|
|
||||||
const scalar Cmu25 = pow025(Cmu_);
|
const scalar Cmu25 = pow025(nutw.Cmu());
|
||||||
|
|
||||||
scalarField& v2 = *this;
|
scalarField& v2 = *this;
|
||||||
|
|
||||||
@ -204,11 +135,11 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
scalar yPlus = uTau*y[facei]/nuw[facei];
|
scalar yPlus = uTau*y[facei]/nuw[facei];
|
||||||
|
|
||||||
if (yPlus > yPlusLam_)
|
if (yPlus > nutw.yPlusLam())
|
||||||
{
|
{
|
||||||
scalar Cv2 = 0.193;
|
scalar Cv2 = 0.193;
|
||||||
scalar Bv2 = -0.94;
|
scalar Bv2 = -0.94;
|
||||||
v2[facei] = Cv2/kappa_*log(yPlus) + Bv2;
|
v2[facei] = Cv2/nutw.kappa()*log(yPlus) + Bv2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -225,22 +156,6 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void v2WallFunctionFvPatchScalarField::evaluate
|
|
||||||
(
|
|
||||||
const Pstream::commsTypes commsType
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<scalar>::evaluate(commsType);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void v2WallFunctionFvPatchScalarField::write(Ostream& os) const
|
|
||||||
{
|
|
||||||
writeLocalEntries(os);
|
|
||||||
fixedValueFvPatchField<scalar>::write(os);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePatchTypeField
|
makePatchTypeField
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd |
|
\\ / A nd |
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
| Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -35,7 +35,8 @@ Description
|
|||||||
cases.
|
cases.
|
||||||
|
|
||||||
The model operates in two modes, based on the computed laminar-to-turbulent
|
The model operates in two modes, based on the computed laminar-to-turbulent
|
||||||
switch-over y+ value derived from kappa and E.
|
switch-over y+ value derived from kappa and E specified in the corresponding
|
||||||
|
nutWallFunction.
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
@ -82,34 +83,6 @@ class v2WallFunctionFvPatchScalarField
|
|||||||
:
|
:
|
||||||
public fixedValueFvPatchField<scalar>
|
public fixedValueFvPatchField<scalar>
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
//- Cmu coefficient
|
|
||||||
scalar Cmu_;
|
|
||||||
|
|
||||||
//- Von Karman constant
|
|
||||||
scalar kappa_;
|
|
||||||
|
|
||||||
//- E coefficient
|
|
||||||
scalar E_;
|
|
||||||
|
|
||||||
//- Y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
|
||||||
|
|
||||||
//- Check the type of the patch
|
|
||||||
virtual void checkType();
|
|
||||||
|
|
||||||
//- Write local wall function variables
|
|
||||||
virtual void writeLocalEntries(Ostream&) const;
|
|
||||||
|
|
||||||
//- Calculate the Y+ at the edge of the laminar sublayer
|
|
||||||
scalar yPlusLam(const scalar kappa, const scalar E);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -179,21 +152,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
//- Evaluate the patchField
|
|
||||||
virtual void evaluate(const Pstream::commsTypes);
|
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Write
|
|
||||||
virtual void write(Ostream&) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user