Refactoring mut wall functions to mirror incompressible form

This commit is contained in:
andy
2009-08-03 11:38:45 +01:00
parent d320fab4ab
commit 87d36bf3db
12 changed files with 231 additions and 271 deletions

View File

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

View File

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

View File

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

View File

@ -23,21 +23,20 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::compressible::RASModels:: Foam::compressible::RASModels::mutURoughWallFunctionFvPatchScalarField
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
Description Description
Wall function boundary condition for rough walls Wall function boundary condition for rough walls, based on velocity.
SourceFiles SourceFiles
mutSpalartAllamarasStandardWallFunctionFvPatchScalarField.C mutSpalartAllamarasStandardWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H #ifndef compressibleMutURoughWallFunctionFvPatchScalarField_H
#define compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_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: protected:
@ -69,7 +68,7 @@ protected:
scalar roughnessConstant_; scalar roughnessConstant_;
//- Scale factor //- Scale factor
scalar roughnessFudgeFactor_; scalar roughnessFactor_;
// Protected member functions // Protected member functions
@ -84,20 +83,20 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("mutSpalartAllmarasStandardRoughWallFunction"); TypeName("mutURoughWallFunction");
// Constructors // Constructors
//- Construct from patch and internal field //- Construct from patch and internal field
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField mutURoughWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField mutURoughWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
@ -105,20 +104,20 @@ public:
); );
//- Construct by mapping given //- Construct by mapping given
// mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField // mutURoughWallFunctionFvPatchScalarField
// onto a new patch // onto a new patch
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField mutURoughWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&, const mutURoughWallFunctionFvPatchScalarField&,
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper& const fvPatchFieldMapper&
); );
//- Construct as copy //- Construct as copy
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField mutURoughWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& const mutURoughWallFunctionFvPatchScalarField&
); );
//- Construct and return a clone //- Construct and return a clone
@ -126,17 +125,14 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField new mutURoughWallFunctionFvPatchScalarField(*this)
(
*this
)
); );
} }
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField mutURoughWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&, const mutURoughWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
@ -148,11 +144,7 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField new mutURoughWallFunctionFvPatchScalarField(*this, iF)
(
*this,
iF
)
); );
} }
@ -186,16 +178,16 @@ public:
} }
//- Return the roughness scale factor //- 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 //- Return reference to the roughness scale factor to allow
// adjustment // 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 "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "RASModel.H" #include "RASModel.H"
@ -41,7 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcUTau
( (
const scalarField& magGradU const scalarField& magGradU
) const ) const
@ -105,8 +105,7 @@ tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
} }
tmp<scalarField> tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcMut() const
mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const
{ {
const label patchI = patch().index(); const label patchI = patch().index();
@ -122,67 +121,66 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutSpalartAllmarasWallFunctionFvPatchScalarField:: mutUSpaldingWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
mutWallFunctionFvPatchScalarField(p, iF) mutkWallFunctionFvPatchScalarField(p, iF)
{} {}
mutSpalartAllmarasWallFunctionFvPatchScalarField:: mutUSpaldingWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasWallFunctionFvPatchScalarField& ptf, const mutUSpaldingWallFunctionFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper const fvPatchFieldMapper& mapper
) )
: :
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{} {}
mutSpalartAllmarasWallFunctionFvPatchScalarField:: mutUSpaldingWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict const dictionary& dict
) )
: :
mutWallFunctionFvPatchScalarField(p, iF, dict) mutkWallFunctionFvPatchScalarField(p, iF, dict)
{} {}
mutSpalartAllmarasWallFunctionFvPatchScalarField:: mutUSpaldingWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf
) )
: :
mutWallFunctionFvPatchScalarField(wfpsf) mutkWallFunctionFvPatchScalarField(wfpsf)
{} {}
mutSpalartAllmarasWallFunctionFvPatchScalarField:: mutUSpaldingWallFunctionFvPatchScalarField::
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf, const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
mutWallFunctionFvPatchScalarField(wfpsf, iF) mutkWallFunctionFvPatchScalarField(wfpsf, iF)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField> tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::yPlus() const
mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
{ {
const label patchI = patch().index(); const label patchI = patch().index();
@ -196,10 +194,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
} }
void mutSpalartAllmarasWallFunctionFvPatchScalarField::write void mutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const
(
Ostream& os
) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
writeLocalEntries(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 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::compressible::RASModels:: Foam::compressible::RASModels::mutUSpaldingWallFunctionFvPatchScalarField
mutSpalartAllmarasWallFunctionFvPatchScalarField
Description Description
Wall function boundary condition for walls Wall function boundary condition for walls
SourceFiles SourceFiles
mutSpalartAllmarasWallFunctionFvPatchScalarField.C mutUSpaldingWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H #ifndef compressibleMutUSpaldingWallFunctionFvPatchScalarField_H
#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_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: protected:
@ -70,20 +69,20 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("mutSpalartAllmarasWallFunction"); TypeName("mutUSpaldingWallFunction");
// Constructors // Constructors
//- Construct from patch and internal field //- Construct from patch and internal field
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
@ -91,20 +90,20 @@ public:
); );
//- Construct by mapping given //- Construct by mapping given
// mutSpalartAllmarasWallFunctionFvPatchScalarField // mutUSpaldingWallFunctionFvPatchScalarField
// onto a new patch // onto a new patch
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasWallFunctionFvPatchScalarField&, const mutUSpaldingWallFunctionFvPatchScalarField&,
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper& const fvPatchFieldMapper&
); );
//- Construct as copy //- Construct as copy
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasWallFunctionFvPatchScalarField& const mutUSpaldingWallFunctionFvPatchScalarField&
); );
//- Construct and return a clone //- Construct and return a clone
@ -112,14 +111,14 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this) new mutUSpaldingWallFunctionFvPatchScalarField(*this)
); );
} }
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
mutSpalartAllmarasWallFunctionFvPatchScalarField mutUSpaldingWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasWallFunctionFvPatchScalarField&, const mutUSpaldingWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
@ -131,7 +130,7 @@ public:
{ {
return tmp<fvPatchScalarField> 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 "RASModel.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
@ -41,8 +41,7 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField> tmp<scalarField> mutUWallFunctionFvPatchScalarField::calcYPlus
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
( (
const scalarField& magUp const scalarField& magUp
) const ) const
@ -81,8 +80,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
} }
tmp<scalarField> tmp<scalarField> mutUWallFunctionFvPatchScalarField::calcMut() const
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
{ {
const label patchI = patch().index(); const label patchI = patch().index();
@ -112,67 +110,61 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
mutWallFunctionFvPatchScalarField(p, iF) mutkWallFunctionFvPatchScalarField(p, iF)
{} {}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& ptf, const mutUWallFunctionFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper const fvPatchFieldMapper& mapper
) )
: :
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{} {}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict const dictionary& dict
) )
: :
mutWallFunctionFvPatchScalarField(p, iF, dict) mutkWallFunctionFvPatchScalarField(p, iF, dict)
{} {}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf const mutUWallFunctionFvPatchScalarField& sawfpsf
) )
: :
mutWallFunctionFvPatchScalarField(sawfpsf) mutkWallFunctionFvPatchScalarField(sawfpsf)
{} {}
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
( (
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf, const mutUWallFunctionFvPatchScalarField& sawfpsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
mutWallFunctionFvPatchScalarField(sawfpsf, iF) mutkWallFunctionFvPatchScalarField(sawfpsf, iF)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField> tmp<scalarField> mutUWallFunctionFvPatchScalarField::yPlus() const
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
{ {
const label patchI = patch().index(); const label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
@ -183,10 +175,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
} }
void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write void mutUWallFunctionFvPatchScalarField::write(Ostream& os) const
(
Ostream& os
) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
writeLocalEntries(os); writeLocalEntries(os);
@ -199,7 +188,7 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
makePatchTypeField makePatchTypeField
( (
fvPatchScalarField, fvPatchScalarField,
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField mutUWallFunctionFvPatchScalarField
); );
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

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

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mutRoughWallFunctionFvPatchScalarField.H" #include "mutkRoughWallFunctionFvPatchScalarField.H"
#include "RASModel.H" #include "RASModel.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
@ -39,10 +39,9 @@ namespace compressible
namespace RASModels namespace RASModels
{ {
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
scalar mutRoughWallFunctionFvPatchScalarField::fnRough scalar mutkRoughWallFunctionFvPatchScalarField::fnRough
( (
const scalar KsPlus, const scalar KsPlus,
const scalar Cs 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(); const label patchI = patch().index();
@ -121,63 +120,63 @@ tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
mutWallFunctionFvPatchScalarField(p, iF), mutkWallFunctionFvPatchScalarField(p, iF),
Ks_(p.size(), 0.0), Ks_(p.size(), 0.0),
Cs_(p.size(), 0.0) Cs_(p.size(), 0.0)
{} {}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
( (
const mutRoughWallFunctionFvPatchScalarField& ptf, const mutkRoughWallFunctionFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper const fvPatchFieldMapper& mapper
) )
: :
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
Ks_(ptf.Ks_, mapper), Ks_(ptf.Ks_, mapper),
Cs_(ptf.Cs_, mapper) Cs_(ptf.Cs_, mapper)
{} {}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict const dictionary& dict
) )
: :
mutWallFunctionFvPatchScalarField(p, iF, dict), mutkWallFunctionFvPatchScalarField(p, iF, dict),
Ks_("Ks", dict, p.size()), Ks_("Ks", dict, p.size()),
Cs_("Cs", 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_), Ks_(rwfpsf.Ks_),
Cs_(rwfpsf.Cs_) Cs_(rwfpsf.Cs_)
{} {}
mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField
( (
const mutRoughWallFunctionFvPatchScalarField& rwfpsf, const mutkRoughWallFunctionFvPatchScalarField& rwfpsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
mutWallFunctionFvPatchScalarField(rwfpsf, iF), mutkWallFunctionFvPatchScalarField(rwfpsf, iF),
Ks_(rwfpsf.Ks_), Ks_(rwfpsf.Ks_),
Cs_(rwfpsf.Cs_) Cs_(rwfpsf.Cs_)
{} {}
@ -185,34 +184,34 @@ mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void mutRoughWallFunctionFvPatchScalarField::autoMap void mutkRoughWallFunctionFvPatchScalarField::autoMap
( (
const fvPatchFieldMapper& m const fvPatchFieldMapper& m
) )
{ {
mutWallFunctionFvPatchScalarField::autoMap(m); mutkWallFunctionFvPatchScalarField::autoMap(m);
Ks_.autoMap(m); Ks_.autoMap(m);
Cs_.autoMap(m); Cs_.autoMap(m);
} }
void mutRoughWallFunctionFvPatchScalarField::rmap void mutkRoughWallFunctionFvPatchScalarField::rmap
( (
const fvPatchScalarField& ptf, const fvPatchScalarField& ptf,
const labelList& addr const labelList& addr
) )
{ {
mutWallFunctionFvPatchScalarField::rmap(ptf, addr); mutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
const mutRoughWallFunctionFvPatchScalarField& nrwfpsf = const mutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const mutRoughWallFunctionFvPatchScalarField>(ptf); refCast<const mutkRoughWallFunctionFvPatchScalarField>(ptf);
Cs_.rmap(nrwfpsf.Cs_, addr); Cs_.rmap(nrwfpsf.Cs_, addr);
Ks_.rmap(nrwfpsf.Ks_, addr); Ks_.rmap(nrwfpsf.Ks_, addr);
} }
void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const void mutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
writeLocalEntries(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 Description
Boundary condition for turbulent (kinematic) viscosity when using wall 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 Manipulates the E parameter to account for roughness effects, based on
KsPlus. KsPlus.
@ -36,14 +36,14 @@ Description
- roughness constant = 0.5-1.0 (0.5 default) - roughness constant = 0.5-1.0 (0.5 default)
SourceFiles SourceFiles
mutRoughWallFunctionFvPatchScalarField.C mutkRoughWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H #ifndef compressibleMutkRoughWallFunctionFvPatchScalarField_H
#define compressibleMutRoughWallFunctionFvPatchScalarField_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: protected:
@ -85,20 +85,20 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("mutRoughWallFunction"); TypeName("mutkRoughWallFunction");
// Constructors // Constructors
//- Construct from patch and internal field //- Construct from patch and internal field
mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
@ -106,20 +106,20 @@ public:
); );
//- Construct by mapping given //- Construct by mapping given
// mutRoughWallFunctionFvPatchScalarField // mutkRoughWallFunctionFvPatchScalarField
// onto a new patch // onto a new patch
mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField
( (
const mutRoughWallFunctionFvPatchScalarField&, const mutkRoughWallFunctionFvPatchScalarField&,
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper& const fvPatchFieldMapper&
); );
//- Construct as copy //- Construct as copy
mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField
( (
const mutRoughWallFunctionFvPatchScalarField& const mutkRoughWallFunctionFvPatchScalarField&
); );
//- Construct and return a clone //- Construct and return a clone
@ -127,14 +127,14 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutRoughWallFunctionFvPatchScalarField(*this) new mutkRoughWallFunctionFvPatchScalarField(*this)
); );
} }
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
mutRoughWallFunctionFvPatchScalarField mutkRoughWallFunctionFvPatchScalarField
( (
const mutRoughWallFunctionFvPatchScalarField&, const mutkRoughWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
@ -146,7 +146,7 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutRoughWallFunctionFvPatchScalarField(*this, iF) new mutkRoughWallFunctionFvPatchScalarField(*this, iF)
); );
} }
@ -156,10 +156,7 @@ public:
// Mapping functions // Mapping functions
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap virtual void autoMap(const fvPatchFieldMapper&);
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField //- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap virtual void rmap

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mutWallFunctionFvPatchScalarField.H" #include "mutkWallFunctionFvPatchScalarField.H"
#include "RASModel.H" #include "RASModel.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
@ -42,11 +42,11 @@ namespace RASModels
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void mutWallFunctionFvPatchScalarField::checkType() void mutkWallFunctionFvPatchScalarField::checkType()
{ {
if (!isA<wallFvPatch>(patch())) if (!isA<wallFvPatch>(patch()))
{ {
FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()") FatalErrorIn("mutkWallFunctionFvPatchScalarField::checkType()")
<< "Invalid wall function specification" << nl << "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name() << " Patch type for patch " << patch().name()
<< " must be wall" << nl << " must be wall" << nl
@ -56,7 +56,7 @@ void mutWallFunctionFvPatchScalarField::checkType()
} }
scalar mutWallFunctionFvPatchScalarField::calcYPlusLam scalar mutkWallFunctionFvPatchScalarField::calcYPlusLam
( (
const scalar kappa, const scalar kappa,
const scalar E 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 label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); 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("Cmu") << Cmu_ << token::END_STATEMENT << nl;
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
@ -115,7 +115,7 @@ void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF 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 fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper const fvPatchFieldMapper& mapper
@ -145,7 +145,7 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{} {}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -160,9 +160,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{} {}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
( (
const mutWallFunctionFvPatchScalarField& wfpsf const mutkWallFunctionFvPatchScalarField& wfpsf
) )
: :
fixedValueFvPatchScalarField(wfpsf), fixedValueFvPatchScalarField(wfpsf),
@ -173,9 +173,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
{} {}
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
( (
const mutWallFunctionFvPatchScalarField& wfpsf, const mutkWallFunctionFvPatchScalarField& wfpsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
@ -189,7 +189,7 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void mutWallFunctionFvPatchScalarField::updateCoeffs() void mutkWallFunctionFvPatchScalarField::updateCoeffs()
{ {
operator==(calcMut()); operator==(calcMut());
@ -197,7 +197,7 @@ void mutWallFunctionFvPatchScalarField::updateCoeffs()
} }
tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const tmp<scalarField> mutkWallFunctionFvPatchScalarField::yPlus() const
{ {
const label patchI = patch().index(); const label patchI = patch().index();
@ -214,7 +214,7 @@ tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const
} }
void mutWallFunctionFvPatchScalarField::write(Ostream& os) const void mutkWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
writeLocalEntries(os); writeLocalEntries(os);
@ -224,7 +224,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 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::compressible::RASModels::mutWallFunctionFvPatchScalarField Foam::compressible::RASModels::mutkWallFunctionFvPatchScalarField
Description Description
Boundary condition for turbulent (kinematic) viscosity when using wall Boundary condition for turbulent (kinematic) viscosity when using wall
functions functions, based on turbulence kinetic energy.
- replicates OpenFOAM v1.5 (and earlier) behaviour - replicates OpenFOAM v1.5 (and earlier) behaviour
SourceFiles SourceFiles
mutWallFunctionFvPatchScalarField.C mutkWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -50,10 +50,10 @@ namespace RASModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class mutWallFunctionFvPatchScalarField Declaration Class mutkWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class mutWallFunctionFvPatchScalarField class mutkWallFunctionFvPatchScalarField
: :
public fixedValueFvPatchScalarField public fixedValueFvPatchScalarField
{ {
@ -92,20 +92,20 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("mutWallFunction"); TypeName("mutkWallFunction");
// Constructors // Constructors
//- Construct from patch and internal field //- Construct from patch and internal field
mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
@ -113,20 +113,20 @@ public:
); );
//- Construct by mapping given //- Construct by mapping given
// mutWallFunctionFvPatchScalarField // mutkWallFunctionFvPatchScalarField
// onto a new patch // onto a new patch
mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField
( (
const mutWallFunctionFvPatchScalarField&, const mutkWallFunctionFvPatchScalarField&,
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper& const fvPatchFieldMapper&
); );
//- Construct as copy //- Construct as copy
mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField
( (
const mutWallFunctionFvPatchScalarField& const mutkWallFunctionFvPatchScalarField&
); );
//- Construct and return a clone //- Construct and return a clone
@ -134,14 +134,14 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutWallFunctionFvPatchScalarField(*this) new mutkWallFunctionFvPatchScalarField(*this)
); );
} }
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
mutWallFunctionFvPatchScalarField mutkWallFunctionFvPatchScalarField
( (
const mutWallFunctionFvPatchScalarField&, const mutkWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
@ -153,7 +153,7 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new mutWallFunctionFvPatchScalarField(*this, iF) new mutkWallFunctionFvPatchScalarField(*this, iF)
); );
} }