Merge branch 'master' into cvm

This commit is contained in:
graham
2009-08-04 14:31:32 +01:00
270 changed files with 2201 additions and 3927 deletions

View File

@ -3,8 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory
if [ "$PWD" != "$WM_PROJECT_DIR/src" ]
then
echo "Error: Current directory in not \$WM_PROJECT_DIR/src"
echo " The environment variable are not consistent with the installation."
echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
echo " The environment variables are inconsistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
fi

View File

@ -81,7 +81,8 @@ bool Foam::functionEntry::execute
(
"functionEntry::execute"
"(const word& functionName, dictionary& parentDict, Istream&)"
) << "Unknown functionEntry " << functionName
) << "Unknown functionEntry '" << functionName
<< "' in " << is.name() << " near line " << is.lineNumber()
<< endl << endl
<< "Valid functionEntries are :" << endl
<< executedictionaryIstreamMemberFunctionTablePtr_->toc()
@ -126,7 +127,8 @@ bool Foam::functionEntry::execute
(
"functionEntry::execute"
"(const word&, const dictionary&, primitiveEntry&, Istream&)"
) << "Unknown functionEntry " << functionName
) << "Unknown functionEntry '" << functionName
<< "' in " << is.name() << " near line " << is.lineNumber()
<< endl << endl
<< "Valid functionEntries are :" << endl
<< executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc()

View File

@ -26,6 +26,7 @@ License
#include "removeEntry.H"
#include "dictionary.H"
#include "stringListOps.H"
#include "IStringStream.H"
#include "OStringStream.H"
#include "addToMemberFunctionSelectionTable.H"
@ -64,22 +65,12 @@ bool Foam::functionEntries::removeEntry::execute
Istream& is
)
{
token currToken(is);
is.putBack(currToken);
wordList dictKeys = parentDict.toc();
labelList indices = findStrings<word>(readList<wordRe>(is), dictKeys);
if (currToken == token::BEGIN_LIST)
forAll(indices, indexI)
{
wordList keys(is);
forAll(keys, keyI)
{
parentDict.remove(keys[keyI]);
}
}
else
{
word key(is);
parentDict.remove(key);
parentDict.remove(dictKeys[indices[indexI]]);
}
return true;

View File

@ -28,13 +28,16 @@ Class
Description
Remove a dictionary entry.
The @c \#remove directive takes a word or a list of words. For example,
The @c \#remove directive takes a list or a single wordRe.
For example,
@verbatim
#remove entry0
#remove ( entry1 entry2 entry3 )
#remove ( entry1 entry2 entry3 otherEntry )
#remove "entry[1-3]"
#remove ( "entry[1-3]" otherEntry )
@endverbatim
The removable only occurs in the current context.
The removal only occurs in the current context.
Removing sub-entries or parent entries is not supported.
SourceFiles

View File

@ -136,7 +136,7 @@ void buoyantPressureFvPatchScalarField::updateCoeffs()
void buoyantPressureFvPatchScalarField::write(Ostream& os) const
{
fixedGradientFvPatchScalarField::write(os);
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
writeEntry("value", os);
}

View File

@ -159,14 +159,8 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
{
fvPatchField<vector>::write(os);
os.writeKeyword("flowRate") << flowRate_ << token::END_STATEMENT << nl;
if (phiName_ != "phi")
{
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
}
if (rhoName_ != "rho")
{
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
}
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
writeEntry("value", os);
}

View File

@ -96,8 +96,8 @@ public:
//- Runtime type information
TypeName("fvsPatchField");
//- Debug switch to disallow the use of
static int disallowDefaultFvsPatchField;
//- Debug switch to disallow the use of genericFvsPatchField
static int disallowGenericFvsPatchField;
// Declare run-time constructor selection tables

View File

@ -37,9 +37,9 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0); \
template<> \
int fvsPatchTypeField::disallowDefaultFvsPatchField \
int fvsPatchTypeField::disallowGenericFvsPatchField \
( \
debug::debugSwitch("disallowDefaultFvsPatchField", 0) \
debug::debugSwitch("disallowGenericFvsPatchField", 0) \
); \
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \

View File

@ -100,9 +100,9 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
if (!disallowDefaultFvsPatchField)
if (!disallowGenericFvsPatchField)
{
cstrIter = dictionaryConstructorTablePtr_->find("default");
cstrIter = dictionaryConstructorTablePtr_->find("generic");
}
if (cstrIter == dictionaryConstructorTablePtr_->end())
@ -120,7 +120,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
}
}
if
if
(
!dict.found("patchType")
|| word(dict.lookup("patchType")) != p.type()

View File

@ -1,102 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InNamespace
Foam::fvm
Description
Calculate the matrix for the adjDivergence of the given field and flux.
SourceFiles
fvmAdjDiv.C
\*---------------------------------------------------------------------------*/
#ifndef fvmAdjDiv_H
#define fvmAdjDiv_H
#include "volFieldsFwd.H"
#include "surfaceFieldsFwd.H"
#include "surfaceInterpolationScheme.H"
#include "fvMatrix.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Namespace fvm functions Declaration
\*---------------------------------------------------------------------------*/
namespace fvm
{
template<class Type>
tmp<fvMatrix<Type> > adjDiv
(
const surfaceScalarField&,
GeometricField<Type, fvPatchField, volMesh>&,
const word& name
);
template<class Type>
tmp<fvMatrix<Type> > adjDiv
(
const tmp<surfaceScalarField>&,
GeometricField<Type, fvPatchField, volMesh>&,
const word& name
);
template<class Type>
tmp<fvMatrix<Type> > adjDiv
(
const surfaceScalarField&,
GeometricField<Type, fvPatchField, volMesh>&
);
template<class Type>
tmp<fvMatrix<Type> > adjDiv
(
const tmp<surfaceScalarField>&,
GeometricField<Type, fvPatchField, volMesh>&
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "fvmAdjDiv.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -84,6 +84,10 @@ LESModel::LESModel
delta_(LESdelta::New("delta", U.mesh(), *this))
{
readIfPresent("k0", k0_);
// Force the construction of the mesh deltaCoeffs which may be needed
// for the construction of the derived models and BCs
mesh_.deltaCoeffs();
}

View File

@ -15,7 +15,7 @@ vanDriestDelta/vanDriestDelta.C
wallFunctions=derivedFvPatchFields/wallFunctions
muSgsWallFunctions=$(wallFunctions)/muSgsWallFunctions
$(muSgsWallFunctions)/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C
$(muSgsWallFunctions)/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C
alphaSgsWallFunctions=$(wallFunctions)/alphaSgsWallFunctions
$(alphaSgsWallFunctions)/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "muSgsWallFunctionFvPatchScalarField.H"
#include "muSgsUSpaldingWallFunctionFvPatchScalarField.H"
#include "LESModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -41,7 +41,8 @@ namespace LESModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField::
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -56,9 +57,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField::
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const muSgsWallFunctionFvPatchScalarField& ptf,
const muSgsUSpaldingWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -73,7 +75,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField::
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -89,9 +92,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField::
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const muSgsWallFunctionFvPatchScalarField& mwfpsf
const muSgsUSpaldingWallFunctionFvPatchScalarField& mwfpsf
)
:
fixedValueFvPatchScalarField(mwfpsf),
@ -103,9 +107,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField::
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const muSgsWallFunctionFvPatchScalarField& mwfpsf,
const muSgsUSpaldingWallFunctionFvPatchScalarField& mwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -120,7 +125,7 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void muSgsWallFunctionFvPatchScalarField::evaluate
void muSgsUSpaldingWallFunctionFvPatchScalarField::evaluate
(
const Pstream::commsTypes
)
@ -190,7 +195,7 @@ void muSgsWallFunctionFvPatchScalarField::evaluate
}
void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const
void muSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeEntryIfDifferent<word>(os, "U", "U", UName_);
@ -207,7 +212,7 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const
makePatchTypeField
(
fvPatchScalarField,
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,18 +24,19 @@ License
Class
Foam::compressible::LESModels::
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
Description
Spalart Allmaas wall function boundary condition for compressible flows
Wall function boundary condition for walls, based on velocity, using
Spaldings law to give a continuous muSgs profile to the wall (y+ = 0).
SourceFiles
muSgsWallFunctionFvPatchScalarField.C
muSgsUSpaldingWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef muSgsWallFunctionFvPatchScalarField_H
#define muSgsWallFunctionFvPatchScalarField_H
#ifndef muSgsUSpaldingWallFunctionFvPatchScalarField_H
#define muSgsUSpaldingWallFunctionFvPatchScalarField_H
#include "fixedValueFvPatchFields.H"
@ -49,10 +50,10 @@ namespace LESModels
{
/*---------------------------------------------------------------------------*\
Class muSgsWallFunctionFvPatchScalarField Declaration
Class muSgsUSpaldingWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class muSgsWallFunctionFvPatchScalarField
class muSgsUSpaldingWallFunctionFvPatchScalarField
:
public fixedValueFvPatchScalarField
{
@ -77,20 +78,20 @@ class muSgsWallFunctionFvPatchScalarField
public:
//- Runtime type information
TypeName("muSgsWallFunction");
TypeName("muSgsUSpaldingWallFunction");
// Constructors
//- Construct from patch and internal field
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -98,20 +99,20 @@ public:
);
//- Construct by mapping given
// muSgsWallFunctionFvPatchScalarField
// muSgsUSpaldingWallFunctionFvPatchScalarField
// onto a new patch
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const muSgsWallFunctionFvPatchScalarField&,
const muSgsUSpaldingWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const muSgsWallFunctionFvPatchScalarField&
const muSgsUSpaldingWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -119,14 +120,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new muSgsWallFunctionFvPatchScalarField(*this)
new muSgsUSpaldingWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
muSgsWallFunctionFvPatchScalarField
muSgsUSpaldingWallFunctionFvPatchScalarField
(
const muSgsWallFunctionFvPatchScalarField&,
const muSgsUSpaldingWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -138,11 +139,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new muSgsWallFunctionFvPatchScalarField
(
*this,
iF
)
new muSgsUSpaldingWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -17,11 +17,11 @@ alphatWallFunctions = $(wallFunctions)/alphatWallFunctions
$(alphatWallFunctions)/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
mutWallFunctions = $(wallFunctions)/mutWallFunctions
$(mutWallFunctions)/mutWallFunction/mutWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C
epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions
$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C

View File

@ -88,7 +88,11 @@ RASModel::RASModel
omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL),
y_(mesh_)
{}
{
// Force the construction of the mesh deltaCoeffs which may be needed
// for the construction of the derived models and BCs
mesh_.deltaCoeffs();
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //

View File

@ -249,6 +249,54 @@ SpalartAllmaras::SpalartAllmaras
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> SpalartAllmaras::k() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::k() const")
<< "Turbulence kinetic energy not defined for Spalart-Allmaras model. "
<< "Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"k",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
)
);
}
tmp<volScalarField> SpalartAllmaras::epsilon() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const")
<< "Turbulence kinetic energy dissipation rate not defined for "
<< "Spalart-Allmaras model. Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"epslion",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
)
);
}
tmp<volSymmTensorField> SpalartAllmaras::R() const
{
return tmp<volSymmTensorField>

View File

@ -188,42 +188,10 @@ public:
}
//- Return the turbulence kinetic energy
virtual tmp<volScalarField> k() const
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"k",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
)
);
}
virtual tmp<volScalarField> k() const;
//- Return the turbulence kinetic energy dissipation rate
virtual tmp<volScalarField> epsilon() const
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"epslion",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
)
);
}
virtual tmp<volScalarField> epsilon() const;
//- Return the Reynolds stress tensor
virtual tmp<volSymmTensorField> R() const;

View File

@ -28,7 +28,7 @@ License
#include "calculatedFvPatchField.H"
#include "alphatWallFunctionFvPatchScalarField.H"
#include "mutWallFunctionFvPatchScalarField.H"
#include "mutkWallFunctionFvPatchScalarField.H"
#include "epsilonWallFunctionFvPatchScalarField.H"
#include "kqRWallFunctionFvPatchField.H"
#include "omegaWallFunctionFvPatchScalarField.H"
@ -146,7 +146,7 @@ tmp<volScalarField> autoCreateMut
if (isType<wallFvPatch>(bm[patchI]))
{
mutBoundaryTypes[patchI] =
RASModels::mutWallFunctionFvPatchScalarField::typeName;
RASModels::mutkWallFunctionFvPatchScalarField::typeName;
}
else
{

View File

@ -111,10 +111,17 @@ alphatWallFunctionFvPatchScalarField
void alphatWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const scalarField& mutw =
patch().lookupPatchField<volScalarField, scalar>(mutName_);
operator==(mutw/Prt_);
fixedValueFvPatchScalarField::updateCoeffs();
}

View File

@ -169,6 +169,11 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu25 = pow(Cmu_, 0.25);
@ -224,6 +229,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
}
}
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H"
#include "mutURoughWallFunctionFvPatchScalarField.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "RASModel.H"
@ -41,8 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField>
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcYPlus
(
const scalarField& magUp
) const
@ -90,7 +89,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
}
// Additional tuning parameter (fudge factor) - nominally = 1
dKsPlusdYPlus *= roughnessFudgeFactor_;
dKsPlusdYPlus *= roughnessFactor_;
do
{
@ -172,8 +171,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
}
tmp<scalarField>
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const
tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcMut() const
{
const label patchI = patch().index();
@ -206,82 +204,76 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(p, iF),
mutkWallFunctionFvPatchScalarField(p, iF),
roughnessHeight_(pTraits<scalar>::zero),
roughnessConstant_(pTraits<scalar>::zero),
roughnessFudgeFactor_(pTraits<scalar>::zero)
roughnessFactor_(pTraits<scalar>::zero)
{}
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& ptf,
const mutURoughWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
roughnessHeight_(ptf.roughnessHeight_),
roughnessConstant_(ptf.roughnessConstant_),
roughnessFudgeFactor_(ptf.roughnessFudgeFactor_)
roughnessFactor_(ptf.roughnessFactor_)
{}
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mutWallFunctionFvPatchScalarField(p, iF, dict),
mutkWallFunctionFvPatchScalarField(p, iF, dict),
roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))),
roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))),
roughnessFudgeFactor_(readScalar(dict.lookup("roughnessFudgeFactor")))
roughnessFactor_(readScalar(dict.lookup("roughnessFactor")))
{}
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf
const mutURoughWallFunctionFvPatchScalarField& rwfpsf
)
:
mutWallFunctionFvPatchScalarField(rwfpsf),
mutkWallFunctionFvPatchScalarField(rwfpsf),
roughnessHeight_(rwfpsf.roughnessHeight_),
roughnessConstant_(rwfpsf.roughnessConstant_),
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
roughnessFactor_(rwfpsf.roughnessFactor_)
{}
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf,
const mutURoughWallFunctionFvPatchScalarField& rwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(rwfpsf, iF),
mutkWallFunctionFvPatchScalarField(rwfpsf, iF),
roughnessHeight_(rwfpsf.roughnessHeight_),
roughnessConstant_(rwfpsf.roughnessConstant_),
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
roughnessFactor_(rwfpsf.roughnessFactor_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
@ -293,10 +285,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const
}
void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
(
Ostream& os
) const
void mutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fixedValueFvPatchScalarField::write(os);
writeLocalEntries(os);
@ -304,8 +293,8 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
<< roughnessHeight_ << token::END_STATEMENT << nl;
os.writeKeyword("roughnessConstant")
<< roughnessConstant_ << token::END_STATEMENT << nl;
os.writeKeyword("roughnessFudgeFactor")
<< roughnessFudgeFactor_ << token::END_STATEMENT << nl;
os.writeKeyword("roughnessFactor")
<< roughnessFactor_ << token::END_STATEMENT << nl;
}
@ -314,7 +303,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
makePatchTypeField
(
fvPatchScalarField,
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,21 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::RASModels::
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
Foam::compressible::RASModels::mutURoughWallFunctionFvPatchScalarField
Description
Wall function boundary condition for rough walls
Wall function boundary condition for rough walls, based on velocity.
SourceFiles
mutSpalartAllamarasStandardWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
#define compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
#ifndef compressibleMutURoughWallFunctionFvPatchScalarField_H
#define compressibleMutURoughWallFunctionFvPatchScalarField_H
#include "mutWallFunctionFvPatchScalarField.H"
#include "mutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,12 +48,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration
Class mutURoughWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
class mutURoughWallFunctionFvPatchScalarField
:
public mutWallFunctionFvPatchScalarField
public mutkWallFunctionFvPatchScalarField
{
protected:
@ -69,7 +68,7 @@ protected:
scalar roughnessConstant_;
//- Scale factor
scalar roughnessFudgeFactor_;
scalar roughnessFactor_;
// Protected member functions
@ -84,20 +83,20 @@ protected:
public:
//- Runtime type information
TypeName("mutSpalartAllmarasStandardRoughWallFunction");
TypeName("mutURoughWallFunction");
// Constructors
//- Construct from patch and internal field
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -105,20 +104,20 @@ public:
);
//- Construct by mapping given
// mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
// mutURoughWallFunctionFvPatchScalarField
// onto a new patch
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&,
const mutURoughWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&
const mutURoughWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -126,17 +125,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
(
*this
)
new mutURoughWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
mutURoughWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&,
const mutURoughWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -148,11 +144,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
(
*this,
iF
)
new mutURoughWallFunctionFvPatchScalarField(*this, iF)
);
}
@ -186,16 +178,16 @@ public:
}
//- Return the roughness scale factor
const scalar& roughnessFudgeFactor() const
const scalar& roughnessFactor() const
{
return roughnessFudgeFactor_;
return roughnessFactor_;
}
//- Return reference to the roughness scale factor to allow
// adjustment
scalar& roughnessFudgeFactor()
scalar& roughnessFactor()
{
return roughnessFudgeFactor_;
return roughnessFactor_;
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "mutSpalartAllmarasWallFunctionFvPatchScalarField.H"
#include "mutUSpaldingWallFunctionFvPatchScalarField.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "RASModel.H"
@ -41,7 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcUTau
(
const scalarField& magGradU
) const
@ -105,8 +105,7 @@ tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
}
tmp<scalarField>
mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const
tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcMut() const
{
const label patchI = patch().index();
@ -122,67 +121,66 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutSpalartAllmarasWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField::
mutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(p, iF)
mutkWallFunctionFvPatchScalarField(p, iF)
{}
mutSpalartAllmarasWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField::
mutUSpaldingWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasWallFunctionFvPatchScalarField& ptf,
const mutUSpaldingWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{}
mutSpalartAllmarasWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField::
mutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mutWallFunctionFvPatchScalarField(p, iF, dict)
mutkWallFunctionFvPatchScalarField(p, iF, dict)
{}
mutSpalartAllmarasWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField::
mutUSpaldingWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf
const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf
)
:
mutWallFunctionFvPatchScalarField(wfpsf)
mutkWallFunctionFvPatchScalarField(wfpsf)
{}
mutSpalartAllmarasWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField::
mutUSpaldingWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf,
const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(wfpsf, iF)
mutkWallFunctionFvPatchScalarField(wfpsf, iF)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
@ -196,10 +194,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
}
void mutSpalartAllmarasWallFunctionFvPatchScalarField::write
(
Ostream& os
) const
void mutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -209,7 +204,11 @@ void mutSpalartAllmarasWallFunctionFvPatchScalarField::write
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, mutSpalartAllmarasWallFunctionFvPatchScalarField);
makePatchTypeField
(
fvPatchScalarField,
mutUSpaldingWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,21 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::RASModels::
mutSpalartAllmarasWallFunctionFvPatchScalarField
Foam::compressible::RASModels::mutUSpaldingWallFunctionFvPatchScalarField
Description
Wall function boundary condition for walls
SourceFiles
mutSpalartAllmarasWallFunctionFvPatchScalarField.C
mutUSpaldingWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H
#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H
#ifndef compressibleMutUSpaldingWallFunctionFvPatchScalarField_H
#define compressibleMutUSpaldingWallFunctionFvPatchScalarField_H
#include "mutWallFunctionFvPatchScalarField.H"
#include "mutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,12 +48,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class mutSpalartAllmarasWallFunctionFvPatchScalarField Declaration
Class mutUSpaldingWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class mutSpalartAllmarasWallFunctionFvPatchScalarField
class mutUSpaldingWallFunctionFvPatchScalarField
:
public mutWallFunctionFvPatchScalarField
public mutkWallFunctionFvPatchScalarField
{
protected:
@ -70,20 +69,20 @@ protected:
public:
//- Runtime type information
TypeName("mutSpalartAllmarasWallFunction");
TypeName("mutUSpaldingWallFunction");
// Constructors
//- Construct from patch and internal field
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -91,20 +90,20 @@ public:
);
//- Construct by mapping given
// mutSpalartAllmarasWallFunctionFvPatchScalarField
// mutUSpaldingWallFunctionFvPatchScalarField
// onto a new patch
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasWallFunctionFvPatchScalarField&,
const mutUSpaldingWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasWallFunctionFvPatchScalarField&
const mutUSpaldingWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -112,14 +111,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this)
new mutUSpaldingWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
mutSpalartAllmarasWallFunctionFvPatchScalarField
mutUSpaldingWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasWallFunctionFvPatchScalarField&,
const mutUSpaldingWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -131,7 +130,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this, iF)
new mutUSpaldingWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H"
#include "mutUWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -41,8 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField>
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
tmp<scalarField> mutUWallFunctionFvPatchScalarField::calcYPlus
(
const scalarField& magUp
) const
@ -81,8 +80,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
}
tmp<scalarField>
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
tmp<scalarField> mutUWallFunctionFvPatchScalarField::calcMut() const
{
const label patchI = patch().index();
@ -112,67 +110,61 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(p, iF)
mutkWallFunctionFvPatchScalarField(p, iF)
{}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& ptf,
const mutUWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mutWallFunctionFvPatchScalarField(p, iF, dict)
mutkWallFunctionFvPatchScalarField(p, iF, dict)
{}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf
const mutUWallFunctionFvPatchScalarField& sawfpsf
)
:
mutWallFunctionFvPatchScalarField(sawfpsf)
mutkWallFunctionFvPatchScalarField(sawfpsf)
{}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf,
const mutUWallFunctionFvPatchScalarField& sawfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(sawfpsf, iF)
mutkWallFunctionFvPatchScalarField(sawfpsf, iF)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> mutUWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
@ -183,10 +175,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
}
void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
(
Ostream& os
) const
void mutUWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -199,7 +188,7 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
makePatchTypeField
(
fvPatchScalarField,
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,21 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::RASModels::
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
Foam::compressible::RASModels::mutUWallFunctionFvPatchScalarField
Description
Wall function boundary condition for walls
Wall function boundary condition for walls, based on velocity.
SourceFiles
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
mutUWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
#define compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
#ifndef compressibleMutUWallFunctionFvPatchScalarField_H
#define compressibleMutUWallFunctionFvPatchScalarField_H
#include "mutWallFunctionFvPatchScalarField.H"
#include "mutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,12 +48,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField Declaration
Class mutUWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
class mutUWallFunctionFvPatchScalarField
:
public mutWallFunctionFvPatchScalarField
public mutkWallFunctionFvPatchScalarField
{
protected:
@ -70,20 +69,20 @@ protected:
public:
//- Runtime type information
TypeName("mutSpalartAllmarasStandardWallFunction");
TypeName("mutUWallFunction");
// Constructors
//- Construct from patch and internal field
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -91,20 +90,20 @@ public:
);
//- Construct by mapping given
// mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
// mutUWallFunctionFvPatchScalarField
// onto a new patch
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&,
const mutUWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&
const mutUWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -112,17 +111,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
(
*this
)
new mutUWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
mutUWallFunctionFvPatchScalarField
(
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&,
const mutUWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -134,11 +130,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
(
*this,
iF
)
new mutUWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "mutRoughWallFunctionFvPatchScalarField.H"
#include "mutkRoughWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -39,10 +39,9 @@ namespace compressible
namespace RASModels
{
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
scalar mutRoughWallFunctionFvPatchScalarField::fnRough
scalar mutkRoughWallFunctionFvPatchScalarField::fnRough
(
const scalar KsPlus,
const scalar Cs
@ -65,7 +64,7 @@ scalar mutRoughWallFunctionFvPatchScalarField::fnRough
}
tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const
tmp<scalarField> mutkRoughWallFunctionFvPatchScalarField::calcMut() const
{
const label patchI = patch().index();
@ -121,63 +120,63 @@ tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(p, iF),
mutkWallFunctionFvPatchScalarField(p, iF),
Ks_(p.size(), 0.0),
Cs_(p.size(), 0.0)
{}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
(
const mutRoughWallFunctionFvPatchScalarField& ptf,
const mutkRoughWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
Ks_(ptf.Ks_, mapper),
Cs_(ptf.Cs_, mapper)
{}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mutWallFunctionFvPatchScalarField(p, iF, dict),
mutkWallFunctionFvPatchScalarField(p, iF, dict),
Ks_("Ks", dict, p.size()),
Cs_("Cs", dict, p.size())
{}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
(
const mutRoughWallFunctionFvPatchScalarField& rwfpsf
const mutkRoughWallFunctionFvPatchScalarField& rwfpsf
)
:
mutWallFunctionFvPatchScalarField(rwfpsf),
mutkWallFunctionFvPatchScalarField(rwfpsf),
Ks_(rwfpsf.Ks_),
Cs_(rwfpsf.Cs_)
{}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
(
const mutRoughWallFunctionFvPatchScalarField& rwfpsf,
const mutkRoughWallFunctionFvPatchScalarField& rwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
mutWallFunctionFvPatchScalarField(rwfpsf, iF),
mutkWallFunctionFvPatchScalarField(rwfpsf, iF),
Ks_(rwfpsf.Ks_),
Cs_(rwfpsf.Cs_)
{}
@ -185,34 +184,34 @@ mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void mutRoughWallFunctionFvPatchScalarField::autoMap
void mutkRoughWallFunctionFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
mutWallFunctionFvPatchScalarField::autoMap(m);
mutkWallFunctionFvPatchScalarField::autoMap(m);
Ks_.autoMap(m);
Cs_.autoMap(m);
}
void mutRoughWallFunctionFvPatchScalarField::rmap
void mutkRoughWallFunctionFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
mutWallFunctionFvPatchScalarField::rmap(ptf, addr);
mutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
const mutRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const mutRoughWallFunctionFvPatchScalarField>(ptf);
const mutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const mutkRoughWallFunctionFvPatchScalarField>(ptf);
Cs_.rmap(nrwfpsf.Cs_, addr);
Ks_.rmap(nrwfpsf.Ks_, addr);
}
void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
void mutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -224,7 +223,11 @@ void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, mutRoughWallFunctionFvPatchScalarField);
makePatchTypeField
(
fvPatchScalarField,
mutkRoughWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -27,7 +27,7 @@ Class
Description
Boundary condition for turbulent (kinematic) viscosity when using wall
functions for rough walls.
functions for rough walls, based on turbulence kinetic energy.
Manipulates the E parameter to account for roughness effects, based on
KsPlus.
@ -36,14 +36,14 @@ Description
- roughness constant = 0.5-1.0 (0.5 default)
SourceFiles
mutRoughWallFunctionFvPatchScalarField.C
mutkRoughWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H
#define compressibleMutRoughWallFunctionFvPatchScalarField_H
#ifndef compressibleMutkRoughWallFunctionFvPatchScalarField_H
#define compressibleMutkRoughWallFunctionFvPatchScalarField_H
#include "mutWallFunctionFvPatchScalarField.H"
#include "mutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,12 +55,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class mutRoughWallFunctionFvPatchScalarField Declaration
Class mutkRoughWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class mutRoughWallFunctionFvPatchScalarField
class mutkRoughWallFunctionFvPatchScalarField
:
public mutWallFunctionFvPatchScalarField
public mutkWallFunctionFvPatchScalarField
{
protected:
@ -85,20 +85,20 @@ protected:
public:
//- Runtime type information
TypeName("mutRoughWallFunction");
TypeName("mutkRoughWallFunction");
// Constructors
//- Construct from patch and internal field
mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -106,20 +106,20 @@ public:
);
//- Construct by mapping given
// mutRoughWallFunctionFvPatchScalarField
// mutkRoughWallFunctionFvPatchScalarField
// onto a new patch
mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField
(
const mutRoughWallFunctionFvPatchScalarField&,
const mutkRoughWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField
(
const mutRoughWallFunctionFvPatchScalarField&
const mutkRoughWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -127,14 +127,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutRoughWallFunctionFvPatchScalarField(*this)
new mutkRoughWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
mutRoughWallFunctionFvPatchScalarField
mutkRoughWallFunctionFvPatchScalarField
(
const mutRoughWallFunctionFvPatchScalarField&,
const mutkRoughWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -146,7 +146,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutRoughWallFunctionFvPatchScalarField(*this, iF)
new mutkRoughWallFunctionFvPatchScalarField(*this, iF)
);
}
@ -156,10 +156,7 @@ public:
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
virtual void autoMap(const fvPatchFieldMapper&);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "mutWallFunctionFvPatchScalarField.H"
#include "mutkWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -42,11 +42,11 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void mutWallFunctionFvPatchScalarField::checkType()
void mutkWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()")
FatalErrorIn("mutkWallFunctionFvPatchScalarField::checkType()")
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl
@ -56,7 +56,7 @@ void mutWallFunctionFvPatchScalarField::checkType()
}
scalar mutWallFunctionFvPatchScalarField::calcYPlusLam
scalar mutkWallFunctionFvPatchScalarField::calcYPlusLam
(
const scalar kappa,
const scalar E
@ -73,7 +73,7 @@ scalar mutWallFunctionFvPatchScalarField::calcYPlusLam
}
tmp<scalarField> mutWallFunctionFvPatchScalarField::calcMut() const
tmp<scalarField> mutkWallFunctionFvPatchScalarField::calcMut() const
{
const label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
@ -105,7 +105,7 @@ tmp<scalarField> mutWallFunctionFvPatchScalarField::calcMut() const
}
void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
void mutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
{
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
@ -115,7 +115,7 @@ void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -129,9 +129,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
(
const mutWallFunctionFvPatchScalarField& ptf,
const mutkWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -145,7 +145,7 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -160,9 +160,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
(
const mutWallFunctionFvPatchScalarField& wfpsf
const mutkWallFunctionFvPatchScalarField& wfpsf
)
:
fixedValueFvPatchScalarField(wfpsf),
@ -173,9 +173,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
(
const mutWallFunctionFvPatchScalarField& wfpsf,
const mutkWallFunctionFvPatchScalarField& wfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -189,15 +189,20 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void mutWallFunctionFvPatchScalarField::updateCoeffs()
void mutkWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
operator==(calcMut());
fixedValueFvPatchScalarField::updateCoeffs();
}
tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> mutkWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
@ -214,7 +219,7 @@ tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const
}
void mutWallFunctionFvPatchScalarField::write(Ostream& os) const
void mutkWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -224,7 +229,7 @@ void mutWallFunctionFvPatchScalarField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, mutWallFunctionFvPatchScalarField);
makePatchTypeField(fvPatchScalarField, mutkWallFunctionFvPatchScalarField);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,15 +23,15 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::RASModels::mutWallFunctionFvPatchScalarField
Foam::compressible::RASModels::mutkWallFunctionFvPatchScalarField
Description
Boundary condition for turbulent (kinematic) viscosity when using wall
functions
functions, based on turbulence kinetic energy.
- replicates OpenFOAM v1.5 (and earlier) behaviour
SourceFiles
mutWallFunctionFvPatchScalarField.C
mutkWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
@ -50,10 +50,10 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class mutWallFunctionFvPatchScalarField Declaration
Class mutkWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class mutWallFunctionFvPatchScalarField
class mutkWallFunctionFvPatchScalarField
:
public fixedValueFvPatchScalarField
{
@ -92,20 +92,20 @@ protected:
public:
//- Runtime type information
TypeName("mutWallFunction");
TypeName("mutkWallFunction");
// Constructors
//- Construct from patch and internal field
mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -113,20 +113,20 @@ public:
);
//- Construct by mapping given
// mutWallFunctionFvPatchScalarField
// mutkWallFunctionFvPatchScalarField
// onto a new patch
mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField
(
const mutWallFunctionFvPatchScalarField&,
const mutkWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField
(
const mutWallFunctionFvPatchScalarField&
const mutkWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -134,14 +134,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutWallFunctionFvPatchScalarField(*this)
new mutkWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
mutWallFunctionFvPatchScalarField
mutkWallFunctionFvPatchScalarField
(
const mutWallFunctionFvPatchScalarField&,
const mutkWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -153,7 +153,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new mutWallFunctionFvPatchScalarField(*this, iF)
new mutkWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -169,6 +169,11 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
void omegaWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()];
@ -222,6 +227,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
}
}
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face
}

View File

@ -82,6 +82,10 @@ LESModel::LESModel
delta_(LESdelta::New("delta", U.mesh(), *this))
{
readIfPresent("k0", k0_);
// Force the construction of the mesh deltaCoeffs which may be needed
// for the construction of the derived models and BCs
mesh_.deltaCoeffs();
}

View File

@ -32,7 +32,7 @@ kOmegaSSTSAS/kOmegaSSTSAS.C
wallFunctions=derivedFvPatchFields/wallFunctions
nuSgsWallFunctions=$(wallFunctions)/nuSgsWallFunctions
$(nuSgsWallFunctions)/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C
$(nuSgsWallFunctions)/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libincompressibleLESModels

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nuSgsWallFunctionFvPatchScalarField.H"
#include "nuSgsUSpaldingWallFunctionFvPatchScalarField.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
@ -40,8 +40,8 @@ namespace LESModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nuSgsWallFunctionFvPatchScalarField::
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField::
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -55,10 +55,10 @@ nuSgsWallFunctionFvPatchScalarField
{}
nuSgsWallFunctionFvPatchScalarField::
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField::
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const nuSgsWallFunctionFvPatchScalarField& ptf,
const nuSgsUSpaldingWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -72,8 +72,8 @@ nuSgsWallFunctionFvPatchScalarField
{}
nuSgsWallFunctionFvPatchScalarField::
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField::
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -88,10 +88,10 @@ nuSgsWallFunctionFvPatchScalarField
{}
nuSgsWallFunctionFvPatchScalarField::
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField::
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const nuSgsWallFunctionFvPatchScalarField& nwfpsf
const nuSgsUSpaldingWallFunctionFvPatchScalarField& nwfpsf
)
:
fixedValueFvPatchScalarField(nwfpsf),
@ -102,10 +102,10 @@ nuSgsWallFunctionFvPatchScalarField
{}
nuSgsWallFunctionFvPatchScalarField::
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField::
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const nuSgsWallFunctionFvPatchScalarField& nwfpsf,
const nuSgsUSpaldingWallFunctionFvPatchScalarField& nwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -119,7 +119,7 @@ nuSgsWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void nuSgsWallFunctionFvPatchScalarField::evaluate
void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate
(
const Pstream::commsTypes
)
@ -133,8 +133,8 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate
const scalarField& nuw =
patch().lookupPatchField<volScalarField, scalar>(nuName_);
scalarField& nuSgsw = *this;
scalarField& nuSgsw = *this;
scalarField magFaceGradU = mag(U.snGrad());
@ -178,10 +178,12 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate
nuSgsw[facei] = 0;
}
}
fixedValueFvPatchScalarField::evaluate();
}
void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const
void nuSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeEntryIfDifferent<word>(os, "U", "U", UName_);
@ -197,7 +199,7 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const
makePatchTypeField
(
fvPatchScalarField,
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,18 +24,19 @@ License
Class
Foam::incompressible::LESModels::
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
Description
Spalart Allmaras wall function boundary condition for incompressible flows
Wall function boundary condition for walls, based on velocity, using
Spaldings law to give a continuous nuSgs profile to the wall (y+ = 0)
SourceFiles
nuSgsWallFunctionFvPatchScalarField.C
nuSgsUSpaldingWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nuSgsWallFunctionFvPatchScalarField_H
#define nuSgsWallFunctionFvPatchScalarField_H
#ifndef nuSgsUSpaldingWallFunctionFvPatchScalarField_H
#define nuSgsUSpaldingWallFunctionFvPatchScalarField_H
#include "fixedValueFvPatchFields.H"
@ -49,10 +50,10 @@ namespace LESModels
{
/*---------------------------------------------------------------------------*\
Class nuSgsWallFunctionFvPatchScalarField Declaration
Class nuSgsUSpaldingWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class nuSgsWallFunctionFvPatchScalarField
class nuSgsUSpaldingWallFunctionFvPatchScalarField
:
public fixedValueFvPatchScalarField
{
@ -74,20 +75,20 @@ class nuSgsWallFunctionFvPatchScalarField
public:
//- Runtime type information
TypeName("nuSgsWallFunction");
TypeName("nuSgsUSpaldingWallFunction");
// Constructors
//- Construct from patch and internal field
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -95,20 +96,20 @@ public:
);
//- Construct by mapping given
// nuSgsWallFunctionFvPatchScalarField
// nuSgsUSpaldingWallFunctionFvPatchScalarField
// onto a new patch
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const nuSgsWallFunctionFvPatchScalarField&,
const nuSgsUSpaldingWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const nuSgsWallFunctionFvPatchScalarField&
const nuSgsUSpaldingWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -116,14 +117,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new nuSgsWallFunctionFvPatchScalarField(*this)
new nuSgsUSpaldingWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nuSgsWallFunctionFvPatchScalarField
nuSgsUSpaldingWallFunctionFvPatchScalarField
(
const nuSgsWallFunctionFvPatchScalarField&,
const nuSgsUSpaldingWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -135,11 +136,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new nuSgsWallFunctionFvPatchScalarField
(
*this,
iF
)
new nuSgsUSpaldingWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -293,6 +293,7 @@ bool LaunderGibsonRSTM::read()
if (RASModel::read())
{
Cmu_.readIfPresent(coeffDict());
kappa_.readIfPresent(coeffDict());
Clg1_.readIfPresent(coeffDict());
Clg2_.readIfPresent(coeffDict());
C1_.readIfPresent(coeffDict());

View File

@ -241,6 +241,7 @@ bool LienLeschzinerLowRe::read()
sigmak_.readIfPresent(coeffDict());
sigmaEps_.readIfPresent(coeffDict());
Cmu_.readIfPresent(coeffDict());
kappa_.readIfPresent(coeffDict());
Am_.readIfPresent(coeffDict());
Aepsilon_.readIfPresent(coeffDict());
Amu_.readIfPresent(coeffDict());

View File

@ -21,11 +21,11 @@ LamBremhorstKE/LamBremhorstKE.C
wallFunctions = derivedFvPatchFields/wallFunctions
nutWallFunctions = $(wallFunctions)/nutWallFunctions
$(nutWallFunctions)/nutWallFunction/nutWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions
$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C

View File

@ -87,7 +87,11 @@ RASModel::RASModel
omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL),
y_(mesh_)
{}
{
// Force the construction of the mesh deltaCoeffs which may be needed
// for the construction of the derived models and BCs
mesh_.deltaCoeffs();
}
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //

View File

@ -233,6 +233,10 @@ tmp<volScalarField> SpalartAllmaras::DnuTildaEff() const
tmp<volScalarField> SpalartAllmaras::k() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::k() const")
<< "Turbulence kinetic energy not defined for Spalart-Allmaras model. "
<< "Returning zero field" << endl;
return tmp<volScalarField>
(
new volScalarField
@ -252,6 +256,11 @@ tmp<volScalarField> SpalartAllmaras::k() const
tmp<volScalarField> SpalartAllmaras::epsilon() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const")
<< "Turbulence kinetic energy dissipation rate not defined for "
<< "Spalart-Allmaras model. Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField
@ -326,6 +335,7 @@ bool SpalartAllmaras::read()
if (RASModel::read())
{
sigmaNut_.readIfPresent(coeffDict());
kappa_.readIfPresent(coeffDict());
Cb1_.readIfPresent(coeffDict());
Cb2_.readIfPresent(coeffDict());

View File

@ -27,7 +27,7 @@ License
#include "backwardsCompatibilityWallFunctions.H"
#include "calculatedFvPatchField.H"
#include "nutWallFunctionFvPatchScalarField.H"
#include "nutkWallFunctionFvPatchScalarField.H"
#include "epsilonWallFunctionFvPatchScalarField.H"
#include "kqRWallFunctionFvPatchField.H"
#include "omegaWallFunctionFvPatchScalarField.H"
@ -75,7 +75,7 @@ tmp<volScalarField> autoCreateNut
if (isType<wallFvPatch>(bm[patchI]))
{
nutBoundaryTypes[patchI] =
RASModels::nutWallFunctionFvPatchScalarField::typeName;
RASModels::nutkWallFunctionFvPatchScalarField::typeName;
}
else
{

View File

@ -164,6 +164,11 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()];
@ -213,6 +218,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
}
}
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H"
#include "nutURoughWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -41,8 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField>
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const
tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcNut() const
{
const label patchI = patch().index();
@ -73,8 +72,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const
}
tmp<scalarField>
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus
(
const scalarField& magUp
) const
@ -120,8 +118,8 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
dKsPlusdYPlus = 1;
}
// Additional tuning parameter (fudge factor) - nominally = 1
dKsPlusdYPlus *= roughnessFudgeFactor_;
// Additional tuning parameter - nominally = 1
dKsPlusdYPlus *= roughnessFactor_;
do
{
@ -200,82 +198,76 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(p, iF),
nutkWallFunctionFvPatchScalarField(p, iF),
roughnessHeight_(pTraits<scalar>::zero),
roughnessConstant_(pTraits<scalar>::zero),
roughnessFudgeFactor_(pTraits<scalar>::zero)
roughnessFactor_(pTraits<scalar>::zero)
{}
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& ptf,
const nutURoughWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
roughnessHeight_(ptf.roughnessHeight_),
roughnessConstant_(ptf.roughnessConstant_),
roughnessFudgeFactor_(ptf.roughnessFudgeFactor_)
roughnessFactor_(ptf.roughnessFactor_)
{}
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
nutWallFunctionFvPatchScalarField(p, iF, dict),
nutkWallFunctionFvPatchScalarField(p, iF, dict),
roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))),
roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))),
roughnessFudgeFactor_(readScalar(dict.lookup("roughnessFudgeFactor")))
roughnessFactor_(readScalar(dict.lookup("roughnessFactor")))
{}
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf
const nutURoughWallFunctionFvPatchScalarField& rwfpsf
)
:
nutWallFunctionFvPatchScalarField(rwfpsf),
nutkWallFunctionFvPatchScalarField(rwfpsf),
roughnessHeight_(rwfpsf.roughnessHeight_),
roughnessConstant_(rwfpsf.roughnessConstant_),
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
roughnessFactor_(rwfpsf.roughnessFactor_)
{}
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf,
const nutURoughWallFunctionFvPatchScalarField& rwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(rwfpsf, iF),
nutkWallFunctionFvPatchScalarField(rwfpsf, iF),
roughnessHeight_(rwfpsf.roughnessHeight_),
roughnessConstant_(rwfpsf.roughnessConstant_),
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
roughnessFactor_(rwfpsf.roughnessFactor_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
@ -287,10 +279,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const
}
void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
(
Ostream& os
) const
void nutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -298,8 +287,8 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
<< roughnessHeight_ << token::END_STATEMENT << nl;
os.writeKeyword("roughnessConstant")
<< roughnessConstant_ << token::END_STATEMENT << nl;
os.writeKeyword("roughnessFudgeFactor")
<< roughnessFudgeFactor_ << token::END_STATEMENT << nl;
os.writeKeyword("roughnessFactor")
<< roughnessFactor_ << token::END_STATEMENT << nl;
writeEntry("value", os);
}
@ -309,7 +298,7 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
makePatchTypeField
(
fvPatchScalarField,
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,21 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::incompressible::RASModels::
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
Foam::incompressible::RASModels::nutURoughWallFunctionFvPatchScalarField
Description
Wall function boundary condition for rough walls
Wall function boundary condition for rough walls, based on velocity.
SourceFiles
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
#define nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
#ifndef nutURoughWallFunctionFvPatchScalarField_H
#define nutURoughWallFunctionFvPatchScalarField_H
#include "nutWallFunctionFvPatchScalarField.H"
#include "nutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,12 +48,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration
Class nutURoughWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
class nutURoughWallFunctionFvPatchScalarField
:
public nutWallFunctionFvPatchScalarField
public nutkWallFunctionFvPatchScalarField
{
// Private data
@ -67,7 +66,7 @@ class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
scalar roughnessConstant_;
//- Scale factor
scalar roughnessFudgeFactor_;
scalar roughnessFactor_;
// Protected member functions
@ -82,20 +81,20 @@ class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
public:
//- Runtime type information
TypeName("nutSpalartAllmarasStandardRoughWallFunction");
TypeName("nutURoughWallFunction");
// Constructors
//- Construct from patch and internal field
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -103,20 +102,20 @@ public:
);
//- Construct by mapping given
// nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
// nutURoughWallFunctionFvPatchScalarField
// onto a new patch
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&,
const nutURoughWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&
const nutURoughWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -124,17 +123,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
(
*this
)
new nutURoughWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
nutURoughWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&,
const nutURoughWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -146,11 +142,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
(
*this,
iF
)
new nutURoughWallFunctionFvPatchScalarField(*this, iF)
);
}
@ -185,16 +177,16 @@ public:
}
//- Return the roughness scale factor
const scalar& roughnessFudgeFactor() const
const scalar& roughnessFactor() const
{
return roughnessFudgeFactor_;
return roughnessFactor_;
}
//- Return reference to the roughness scale factor to allow
// adjustment
scalar& roughnessFudgeFactor()
scalar& roughnessFactor()
{
return roughnessFudgeFactor_;
return roughnessFactor_;
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nutSpalartAllmarasWallFunctionFvPatchScalarField.H"
#include "nutUSpaldingWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -41,8 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField>
nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const
tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcNut() const
{
const label patchI = patch().index();
@ -55,7 +54,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const
}
tmp<scalarField> nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
(
const scalarField& magGradU
) const
@ -114,67 +113,66 @@ tmp<scalarField> nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutSpalartAllmarasWallFunctionFvPatchScalarField::
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField::
nutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(p, iF)
nutkWallFunctionFvPatchScalarField(p, iF)
{}
nutSpalartAllmarasWallFunctionFvPatchScalarField::
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField::
nutUSpaldingWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasWallFunctionFvPatchScalarField& ptf,
const nutUSpaldingWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{}
nutSpalartAllmarasWallFunctionFvPatchScalarField::
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField::
nutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
nutWallFunctionFvPatchScalarField(p, iF, dict)
nutkWallFunctionFvPatchScalarField(p, iF, dict)
{}
nutSpalartAllmarasWallFunctionFvPatchScalarField::
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField::
nutUSpaldingWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf
const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf
)
:
nutWallFunctionFvPatchScalarField(wfpsf)
nutkWallFunctionFvPatchScalarField(wfpsf)
{}
nutSpalartAllmarasWallFunctionFvPatchScalarField::
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField::
nutUSpaldingWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf,
const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(wfpsf, iF)
nutkWallFunctionFvPatchScalarField(wfpsf, iF)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
@ -187,10 +185,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
}
void nutSpalartAllmarasWallFunctionFvPatchScalarField::write
(
Ostream& os
) const
void nutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -203,7 +198,7 @@ void nutSpalartAllmarasWallFunctionFvPatchScalarField::write
makePatchTypeField
(
fvPatchScalarField,
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,21 +23,21 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::incompressible::RASModels::
nutSpalartAllmarasWallFunctionFvPatchScalarField
Foam::incompressible::RASModels::nutUSpaldingWallFunctionFvPatchScalarField
Description
Wall function boundary condition for walls
Wall function boundary condition for walls, based on velocity, using
Spaldings law to give a continuous nut profile to the wall (y+ = 0)
SourceFiles
nutSpalartAllmarasWallFunctionFvPatchScalarField.C
nutUSpaldingWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nutSpalartAllmarasWallFunctionFvPatchScalarField_H
#define nutSpalartAllmarasWallFunctionFvPatchScalarField_H
#ifndef nutUSpaldingWallFunctionFvPatchScalarField_H
#define nutUSpaldingWallFunctionFvPatchScalarField_H
#include "nutWallFunctionFvPatchScalarField.H"
#include "nutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,12 +49,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class nutSpalartAllmarasWallFunctionFvPatch Declaration
Class nutUSpaldingWallFunctionFvPatch Declaration
\*---------------------------------------------------------------------------*/
class nutSpalartAllmarasWallFunctionFvPatchScalarField
class nutUSpaldingWallFunctionFvPatchScalarField
:
public nutWallFunctionFvPatchScalarField
public nutkWallFunctionFvPatchScalarField
{
protected:
@ -70,20 +70,20 @@ protected:
public:
//- Runtime type information
TypeName("nutSpalartAllmarasWallFunction");
TypeName("nutUSpaldingWallFunction");
// Constructors
//- Construct from patch and internal field
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -91,20 +91,20 @@ public:
);
//- Construct by mapping given
// nutSpalartAllmarasWallFunctionFvPatchScalarField
// nutUSpaldingWallFunctionFvPatchScalarField
// onto a new patch
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasWallFunctionFvPatchScalarField&,
const nutUSpaldingWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasWallFunctionFvPatchScalarField&
const nutUSpaldingWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -112,14 +112,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutSpalartAllmarasWallFunctionFvPatchScalarField(*this)
new nutUSpaldingWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nutSpalartAllmarasWallFunctionFvPatchScalarField
nutUSpaldingWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasWallFunctionFvPatchScalarField&,
const nutUSpaldingWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -131,7 +131,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutSpalartAllmarasWallFunctionFvPatchScalarField(*this, iF)
new nutUSpaldingWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H"
#include "nutUWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -41,8 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField>
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const
tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const
{
const label patchI = patch().index();
@ -70,8 +69,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const
}
tmp<scalarField>
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus
(
const scalarField& magUp
) const
@ -111,67 +109,61 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(p, iF)
nutkWallFunctionFvPatchScalarField(p, iF)
{}
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& ptf,
const nutUWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{}
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
nutWallFunctionFvPatchScalarField(p, iF, dict)
nutkWallFunctionFvPatchScalarField(p, iF, dict)
{}
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf
const nutUWallFunctionFvPatchScalarField& sawfpsf
)
:
nutWallFunctionFvPatchScalarField(sawfpsf)
nutkWallFunctionFvPatchScalarField(sawfpsf)
{}
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf,
const nutUWallFunctionFvPatchScalarField& sawfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(sawfpsf, iF)
nutkWallFunctionFvPatchScalarField(sawfpsf, iF)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> nutUWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
@ -182,10 +174,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
}
void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
(
Ostream& os
) const
void nutUWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -198,7 +187,7 @@ void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
makePatchTypeField
(
fvPatchScalarField,
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,21 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::incompressible::RASModels::
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
Foam::incompressible::RASModels::nutUWallFunctionFvPatchScalarField
Description
Wall function boundary condition for walls
Wall function boundary condition for walls, based on velocity.
SourceFiles
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
nutUWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
#define nutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
#ifndef nutUWallFunctionFvPatchScalarField_H
#define nutUWallFunctionFvPatchScalarField_H
#include "nutWallFunctionFvPatchScalarField.H"
#include "nutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,12 +48,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class nutSpalartAllmarasStandardWallFunctionFvPatchScalarField Declaration
Class nutUWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
class nutUWallFunctionFvPatchScalarField
:
public nutWallFunctionFvPatchScalarField
public nutkWallFunctionFvPatchScalarField
{
protected:
@ -70,20 +69,20 @@ protected:
public:
//- Runtime type information
TypeName("nutSpalartAllmarasStandardWallFunction");
TypeName("nutUWallFunction");
// Constructors
//- Construct from patch and internal field
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -91,20 +90,20 @@ public:
);
//- Construct by mapping given
// nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
// nutUWallFunctionFvPatchScalarField
// onto a new patch
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField&,
const nutUWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField&
const nutUWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -112,17 +111,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
(
*this
)
new nutUWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField
(
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField&,
const nutUWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -134,11 +130,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
(
*this,
iF
)
new nutUWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nutRoughWallFunctionFvPatchScalarField.H"
#include "nutkRoughWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -41,7 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
scalar nutRoughWallFunctionFvPatchScalarField::fnRough
scalar nutkRoughWallFunctionFvPatchScalarField::fnRough
(
const scalar KsPlus,
const scalar Cs
@ -64,7 +64,7 @@ scalar nutRoughWallFunctionFvPatchScalarField::fnRough
}
tmp<scalarField> nutRoughWallFunctionFvPatchScalarField::calcNut() const
tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const
{
const label patchI = patch().index();
@ -128,63 +128,63 @@ tmp<scalarField> nutRoughWallFunctionFvPatchScalarField::calcNut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(p, iF),
nutkWallFunctionFvPatchScalarField(p, iF),
Ks_(p.size(), 0.0),
Cs_(p.size(), 0.0)
{}
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
(
const nutRoughWallFunctionFvPatchScalarField& ptf,
const nutkRoughWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
Ks_(ptf.Ks_, mapper),
Cs_(ptf.Cs_, mapper)
{}
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
nutWallFunctionFvPatchScalarField(p, iF, dict),
nutkWallFunctionFvPatchScalarField(p, iF, dict),
Ks_("Ks", dict, p.size()),
Cs_("Cs", dict, p.size())
{}
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
(
const nutRoughWallFunctionFvPatchScalarField& rwfpsf
const nutkRoughWallFunctionFvPatchScalarField& rwfpsf
)
:
nutWallFunctionFvPatchScalarField(rwfpsf),
nutkWallFunctionFvPatchScalarField(rwfpsf),
Ks_(rwfpsf.Ks_),
Cs_(rwfpsf.Cs_)
{}
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
(
const nutRoughWallFunctionFvPatchScalarField& rwfpsf,
const nutkRoughWallFunctionFvPatchScalarField& rwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
nutWallFunctionFvPatchScalarField(rwfpsf, iF),
nutkWallFunctionFvPatchScalarField(rwfpsf, iF),
Ks_(rwfpsf.Ks_),
Cs_(rwfpsf.Cs_)
{}
@ -192,34 +192,34 @@ nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void nutRoughWallFunctionFvPatchScalarField::autoMap
void nutkRoughWallFunctionFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
nutWallFunctionFvPatchScalarField::autoMap(m);
nutkWallFunctionFvPatchScalarField::autoMap(m);
Ks_.autoMap(m);
Cs_.autoMap(m);
}
void nutRoughWallFunctionFvPatchScalarField::rmap
void nutkRoughWallFunctionFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
nutWallFunctionFvPatchScalarField::rmap(ptf, addr);
nutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
const nutRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const nutRoughWallFunctionFvPatchScalarField>(ptf);
const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);
Ks_.rmap(nrwfpsf.Ks_, addr);
Cs_.rmap(nrwfpsf.Cs_, addr);
}
void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
void nutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -231,7 +231,11 @@ void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, nutRoughWallFunctionFvPatchScalarField);
makePatchTypeField
(
fvPatchScalarField,
nutkRoughWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,11 +23,11 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::incompressible::RASModels::nutRoughWallFunctionFvPatchScalarField
Foam::incompressible::RASModels::nutkRoughWallFunctionFvPatchScalarField
Description
Boundary condition for turbulent (kinematic) viscosity when using wall
functions for rough walls.
functions for rough walls, based on turbulence kinetic energy.
Manipulates the E parameter to account for roughness effects, based on
KsPlus.
@ -36,14 +36,14 @@ Description
- roughness constant = 0.5-1.0 (0.5 default)
SourceFiles
nutRoughWallFunctionFvPatchScalarField.C
nutkRoughWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nutRoughWallFunctionFvPatchScalarField_H
#define nutRoughWallFunctionFvPatchScalarField_H
#ifndef nutkRoughWallFunctionFvPatchScalarField_H
#define nutkRoughWallFunctionFvPatchScalarField_H
#include "nutWallFunctionFvPatchScalarField.H"
#include "nutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,12 +55,12 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class nutRoughWallFunctionFvPatchScalarField Declaration
Class nutkRoughWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class nutRoughWallFunctionFvPatchScalarField
class nutkRoughWallFunctionFvPatchScalarField
:
public nutWallFunctionFvPatchScalarField
public nutkWallFunctionFvPatchScalarField
{
protected:
@ -85,20 +85,20 @@ protected:
public:
//- Runtime type information
TypeName("nutRoughWallFunction");
TypeName("nutkRoughWallFunction");
// Constructors
//- Construct from patch and internal field
nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -106,20 +106,20 @@ public:
);
//- Construct by mapping given
// nutRoughWallFunctionFvPatchScalarField
// nutkRoughWallFunctionFvPatchScalarField
// onto a new patch
nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField
(
const nutRoughWallFunctionFvPatchScalarField&,
const nutkRoughWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField
(
const nutRoughWallFunctionFvPatchScalarField&
const nutkRoughWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -127,14 +127,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutRoughWallFunctionFvPatchScalarField(*this)
new nutkRoughWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nutRoughWallFunctionFvPatchScalarField
nutkRoughWallFunctionFvPatchScalarField
(
const nutRoughWallFunctionFvPatchScalarField&,
const nutkRoughWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -146,7 +146,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutRoughWallFunctionFvPatchScalarField(*this, iF)
new nutkRoughWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nutWallFunctionFvPatchScalarField.H"
#include "nutkWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -42,11 +42,11 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void nutWallFunctionFvPatchScalarField::checkType()
void nutkWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("nutWallFunctionFvPatchScalarField::checkType()")
FatalErrorIn("nutkWallFunctionFvPatchScalarField::checkType()")
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl
@ -56,7 +56,7 @@ void nutWallFunctionFvPatchScalarField::checkType()
}
scalar nutWallFunctionFvPatchScalarField::calcYPlusLam
scalar nutkWallFunctionFvPatchScalarField::calcYPlusLam
(
const scalar kappa,
const scalar E
@ -73,7 +73,7 @@ scalar nutWallFunctionFvPatchScalarField::calcYPlusLam
}
tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const
tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const
{
const label patchI = patch().index();
@ -104,7 +104,7 @@ tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const
}
void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
void nutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
{
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
@ -114,7 +114,7 @@ void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -130,9 +130,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
(
const nutWallFunctionFvPatchScalarField& ptf,
const nutkWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -148,7 +148,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -165,9 +165,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
(
const nutWallFunctionFvPatchScalarField& wfpsf
const nutkWallFunctionFvPatchScalarField& wfpsf
)
:
fixedValueFvPatchScalarField(wfpsf),
@ -180,9 +180,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
(
const nutWallFunctionFvPatchScalarField& wfpsf,
const nutkWallFunctionFvPatchScalarField& wfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -198,15 +198,20 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void nutWallFunctionFvPatchScalarField::updateCoeffs()
void nutkWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
operator==(calcNut());
fixedValueFvPatchScalarField::updateCoeffs();
}
tmp<scalarField> nutWallFunctionFvPatchScalarField::yPlus() const
tmp<scalarField> nutkWallFunctionFvPatchScalarField::yPlus() const
{
const label patchI = patch().index();
@ -222,7 +227,7 @@ tmp<scalarField> nutWallFunctionFvPatchScalarField::yPlus() const
}
void nutWallFunctionFvPatchScalarField::write(Ostream& os) const
void nutkWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeLocalEntries(os);
@ -232,7 +237,7 @@ void nutWallFunctionFvPatchScalarField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, nutWallFunctionFvPatchScalarField);
makePatchTypeField(fvPatchScalarField, nutkWallFunctionFvPatchScalarField);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,20 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::incompressible::RASModels::nutWallFunctionFvPatchScalarField
Foam::incompressible::RASModels::nutkWallFunctionFvPatchScalarField
Description
Boundary condition for turbulent (kinematic) viscosity when using wall
functions
functions, based on turbulence kinetic energy.
- replicates OpenFOAM v1.5 (and earlier) behaviour
SourceFiles
nutWallFunctionFvPatchScalarField.C
nutkWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nutWallFunctionFvPatchScalarField_H
#define nutWallFunctionFvPatchScalarField_H
#ifndef nutkWallFunctionFvPatchScalarField_H
#define nutkWallFunctionFvPatchScalarField_H
#include "fixedValueFvPatchFields.H"
@ -50,10 +50,10 @@ namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class nutWallFunctionFvPatchScalarField Declaration
Class nutkWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class nutWallFunctionFvPatchScalarField
class nutkWallFunctionFvPatchScalarField
:
public fixedValueFvPatchScalarField
{
@ -92,20 +92,20 @@ protected:
public:
//- Runtime type information
TypeName("nutWallFunction");
TypeName("nutkWallFunction");
// Constructors
//- Construct from patch and internal field
nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -113,20 +113,20 @@ public:
);
//- Construct by mapping given
// nutWallFunctionFvPatchScalarField
// nutkWallFunctionFvPatchScalarField
// onto a new patch
nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField
(
const nutWallFunctionFvPatchScalarField&,
const nutkWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField
(
const nutWallFunctionFvPatchScalarField&
const nutkWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
@ -134,14 +134,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutWallFunctionFvPatchScalarField(*this)
new nutkWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nutWallFunctionFvPatchScalarField
nutkWallFunctionFvPatchScalarField
(
const nutWallFunctionFvPatchScalarField&,
const nutkWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -153,7 +153,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new nutWallFunctionFvPatchScalarField(*this, iF)
new nutkWallFunctionFvPatchScalarField(*this, iF)
);
}

View File

@ -164,6 +164,11 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
void omegaWallFunctionFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()];
@ -212,6 +217,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
}
}
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face
}