BUG: wall functions: ensure consistent writing of traits
Previously, a number of wall functions were not not writing their boundary-condition entries in the defacto order (i.e. from type to value) while writing a field. For example: <patchName> { lowReCorrection 1; blending stepwise; n 2; type epsilonWallFunction; <!-- expected to be the first entry value uniform 1; <!-- expected to be the last entry } Also, various wall functions have been writing out entries that have not been being used by the wall function. For example: <patchName> { type nutUSpaldingWallFunction; ... blending stepwise; <!-- no blending treatment in nutUSpaldingWF ... } Additionally, various derived wall functions (e.g. atmOmegaWallFunction) have been failing to write some of the inherited entries even though these entries have been being used in carrying out wall-function calculations. Taken these into consideration, wall functions have been reworked to obtain reliable and consistent way of writing their traits while writing out a field. - writeLocalEntries uses writeIfDifferent if constructed with getOrDefault.
This commit is contained in:
parent
06b353f8cd
commit
486be34631
@ -324,9 +324,9 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("Prt", Prt_);
|
||||
os.writeEntry("kappa", kappa_);
|
||||
os.writeEntry("E", E_);
|
||||
os.writeEntryIfDifferent<scalar>("Prt", 0.85, Prt_);
|
||||
os.writeEntryIfDifferent<scalar>("kappa", 0.41, kappa_);
|
||||
os.writeEntryIfDifferent<scalar>("E", 9.8, E_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("Prt", Prt_);
|
||||
os.writeEntryIfDifferent<scalar>("Prt", 0.85, Prt_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -288,8 +288,8 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("Prt", Prt_);
|
||||
os.writeEntry("kappa", kappa_);
|
||||
os.writeEntry("E", E_);
|
||||
os.writeEntryIfDifferent<scalar>("kappa", 0.41, kappa_);
|
||||
os.writeEntryIfDifferent<scalar>("E", 9.8, E_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -298,6 +298,21 @@ void Foam::epsilonWallFunctionFvPatchScalarField::calculate
|
||||
}
|
||||
|
||||
|
||||
void Foam::epsilonWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<bool>("lowReCorrection", false, lowReCorrection_);
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
|
||||
if (blending_ == blendingType::BINOMIAL)
|
||||
{
|
||||
os.writeEntry("n", n_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::epsilonWallFunctionFvPatchScalarField::
|
||||
@ -622,10 +637,9 @@ void Foam::epsilonWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("lowReCorrection", lowReCorrection_);
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
os.writeEntry("n", n_);
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -280,6 +280,9 @@ protected:
|
||||
return master_;
|
||||
}
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -31,6 +31,19 @@ License
|
||||
#include "turbulenceModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::kLowReWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<scalar>("Ceps2", 1.9, Ceps2_);
|
||||
os.writeEntryIfDifferent<scalar>("Ck", -0.416, Ck_);
|
||||
os.writeEntryIfDifferent<scalar>("Bk", 8.366, Bk_);
|
||||
os.writeEntryIfDifferent<scalar>("C", 11.0, C_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -184,11 +197,9 @@ void Foam::kLowReWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("Ceps2", Ceps2_);
|
||||
os.writeEntry("Ck", Ck_);
|
||||
os.writeEntry("Bk", Bk_);
|
||||
os.writeEntry("C", C_);
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -132,6 +132,12 @@ protected:
|
||||
scalar C_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -129,6 +129,16 @@ yPlus() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutLowReWallFunctionFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -161,6 +161,12 @@ public:
|
||||
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -119,6 +119,15 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutUBlendedWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<scalar>("n", 4.0, n_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nutUBlendedWallFunctionFvPatchScalarField::
|
||||
@ -213,9 +222,8 @@ void Foam::nutUBlendedWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
os.writeEntry("n", n_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -135,6 +135,9 @@ protected:
|
||||
//- Calculate the friction velocity
|
||||
virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -211,7 +211,6 @@ void Foam::nutURoughWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
|
||||
os.writeEntry("roughnessHeight", roughnessHeight_);
|
||||
os.writeEntry("roughnessConstant", roughnessConstant_);
|
||||
os.writeEntry("roughnessFactor", roughnessFactor_);
|
||||
@ -331,7 +330,7 @@ void Foam::nutURoughWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -128,7 +128,7 @@ class nutURoughWallFunctionFvPatchScalarField
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
virtual void writeLocalEntries(Ostream&) const;
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -195,8 +195,6 @@ void Foam::nutUSpaldingWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
|
||||
|
||||
os.writeEntryIfDifferent<label>("maxIter", 10, maxIter_);
|
||||
os.writeEntryIfDifferent<scalar>("tolerance", 0.01, tolerance_);
|
||||
}
|
||||
@ -341,7 +339,7 @@ void Foam::nutUSpaldingWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -146,7 +146,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Write local wall function variables
|
||||
virtual void writeLocalEntries(Ostream&) const;
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,7 +32,6 @@ License
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
@ -84,6 +83,15 @@ Foam::nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutUTabulatedWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("uPlusTable", uPlusTableName_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nutUTabulatedWallFunctionFvPatchScalarField::
|
||||
@ -208,8 +216,8 @@ void Foam::nutUTabulatedWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("uPlusTable", uPlusTableName_);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -111,6 +111,9 @@ protected:
|
||||
//- Calculate wall u+ from table
|
||||
virtual tmp<scalarField> calcUPlus(const scalarField& Rey) const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -123,6 +123,20 @@ Foam::nutUWallFunctionFvPatchScalarField::calcYPlus
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutUWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
|
||||
if (blending_ == blendingType::BINOMIAL)
|
||||
{
|
||||
os.writeEntry("n", n_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
|
||||
@ -227,7 +241,7 @@ void Foam::nutUWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -98,6 +98,9 @@ protected:
|
||||
//- Calculate the turbulent viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -92,21 +92,10 @@ void Foam::nutWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
|
||||
if (blending_ == blendingType::BINOMIAL)
|
||||
{
|
||||
os.writeEntry("n", n_);
|
||||
}
|
||||
|
||||
if (UName_ != word::null)
|
||||
{
|
||||
os.writeEntry("U", UName_);
|
||||
}
|
||||
|
||||
os.writeEntry("Cmu", Cmu_);
|
||||
os.writeEntry("kappa", kappa_);
|
||||
os.writeEntry("E", E_);
|
||||
os.writeEntryIfDifferent<word>("U", word::null, UName_);
|
||||
}
|
||||
|
||||
|
||||
@ -347,7 +336,6 @@ void Foam::nutWallFunctionFvPatchScalarField::write
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -241,7 +241,7 @@ protected:
|
||||
virtual tmp<scalarField> calcNut() const = 0;
|
||||
|
||||
//- Write local wall function variables
|
||||
virtual void writeLocalEntries(Ostream&) const;
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,7 +32,6 @@ License
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::nutkRoughWallFunctionFvPatchScalarField::fnRough
|
||||
@ -125,6 +124,16 @@ calcNut() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutkRoughWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
Cs_.writeEntry("Cs", os);
|
||||
Ks_.writeEntry("Ks", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nutkRoughWallFunctionFvPatchScalarField::
|
||||
@ -228,10 +237,8 @@ void Foam::nutkRoughWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
Cs_.writeEntry("Cs", os);
|
||||
Ks_.writeEntry("Ks", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -109,6 +109,9 @@ protected:
|
||||
//- Calculate the turbulent viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream& os) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -80,6 +80,20 @@ calcNut() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutkWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
|
||||
if (blending_ == blendingType::BINOMIAL)
|
||||
{
|
||||
os.writeEntry("n", n_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
|
||||
@ -188,6 +202,17 @@ yPlus() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::nutkWallFunctionFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -91,6 +91,9 @@ protected:
|
||||
//- Calculate the turbulent viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -165,6 +168,12 @@ public:
|
||||
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -309,6 +309,21 @@ void Foam::omegaWallFunctionFvPatchScalarField::calculate
|
||||
}
|
||||
|
||||
|
||||
void Foam::omegaWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<scalar>("beta1", 0.075, beta1_);
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
|
||||
if (blending_ == blendingType::BINOMIAL)
|
||||
{
|
||||
os.writeEntry("n", n_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
||||
@ -651,10 +666,9 @@ void Foam::omegaWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntry("blending", blendingTypeNames[blending_]);
|
||||
os.writeEntry("n", n_);
|
||||
os.writeEntry("beta1", beta1_);
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -314,6 +314,9 @@ protected:
|
||||
return master_;
|
||||
}
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -61,6 +61,29 @@ void atmAlphatkWallFunctionFvPatchScalarField::checkType()
|
||||
}
|
||||
|
||||
|
||||
void atmAlphatkWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<scalar>("Cmu", 0.09, Cmu_);
|
||||
os.writeEntryIfDifferent<scalar>("kappa", 0.41, kappa_);
|
||||
|
||||
if (Pr_)
|
||||
{
|
||||
Pr_->writeData(os);
|
||||
}
|
||||
if (Prt_)
|
||||
{
|
||||
Prt_->writeData(os);
|
||||
}
|
||||
if (z0_)
|
||||
{
|
||||
z0_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
atmAlphatkWallFunctionFvPatchScalarField::
|
||||
@ -287,11 +310,7 @@ void atmAlphatkWallFunctionFvPatchScalarField::rmap
|
||||
void atmAlphatkWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("Cmu", Cmu_);
|
||||
os.writeEntry("kappa", kappa_);
|
||||
Pr_->writeData(os);
|
||||
Prt_->writeData(os);
|
||||
z0_->writeData(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -140,6 +140,9 @@ protected:
|
||||
//- Check the type of the patch
|
||||
virtual void checkType();
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -114,6 +114,20 @@ void Foam::atmEpsilonWallFunctionFvPatchScalarField::calculate
|
||||
}
|
||||
|
||||
|
||||
void Foam::atmEpsilonWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<bool>("lowReCorrection", false, lowReCorrection_);
|
||||
|
||||
if (z0_)
|
||||
{
|
||||
z0_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::atmEpsilonWallFunctionFvPatchScalarField::
|
||||
@ -210,8 +224,9 @@ void Foam::atmEpsilonWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
epsilonWallFunctionFvPatchScalarField::write(os);
|
||||
z0_->writeData(os);
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -131,6 +131,9 @@ protected:
|
||||
scalarField& epsilon
|
||||
);
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -98,6 +98,20 @@ tmp<scalarField> atmNutUWallFunctionFvPatchScalarField::calcNut() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::atmNutUWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<bool>("boundNut", true, boundNut_);
|
||||
|
||||
if (z0_)
|
||||
{
|
||||
z0_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
atmNutUWallFunctionFvPatchScalarField::atmNutUWallFunctionFvPatchScalarField
|
||||
@ -191,10 +205,8 @@ void atmNutUWallFunctionFvPatchScalarField::rmap
|
||||
|
||||
void atmNutUWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
|
||||
os.writeEntry("boundNut", boundNut_);
|
||||
z0_->writeData(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -132,6 +132,9 @@ protected:
|
||||
//- Calculate the turbulent viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 CENER
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -111,6 +111,20 @@ tmp<scalarField> atmNutWallFunctionFvPatchScalarField::calcNut() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::atmNutWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<scalar>("z0Min", SMALL, z0Min_);
|
||||
|
||||
if (z0_)
|
||||
{
|
||||
z0_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
atmNutWallFunctionFvPatchScalarField::atmNutWallFunctionFvPatchScalarField
|
||||
@ -212,10 +226,8 @@ void atmNutWallFunctionFvPatchScalarField::rmap
|
||||
|
||||
void atmNutWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
|
||||
os.writeEntry("z0Min", z0Min_);
|
||||
z0_->writeData(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 CENER
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -170,6 +170,9 @@ protected:
|
||||
//- Calculate the turbulent viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -106,6 +106,20 @@ tmp<scalarField> atmNutkWallFunctionFvPatchScalarField::calcNut() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::atmNutkWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<bool>("boundNut", false, boundNut_);
|
||||
|
||||
if (z0_)
|
||||
{
|
||||
z0_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
atmNutkWallFunctionFvPatchScalarField::atmNutkWallFunctionFvPatchScalarField
|
||||
@ -199,10 +213,8 @@ void atmNutkWallFunctionFvPatchScalarField::rmap
|
||||
|
||||
void atmNutkWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
|
||||
os.writeEntry("boundNut", boundNut_);
|
||||
z0_->writeData(os);
|
||||
nutWallFunctionFvPatchScalarField::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -152,6 +152,9 @@ protected:
|
||||
//- Calculate the turbulent viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -100,6 +100,18 @@ void Foam::atmOmegaWallFunctionFvPatchScalarField::calculate
|
||||
}
|
||||
|
||||
|
||||
void Foam::atmOmegaWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
if (z0_)
|
||||
{
|
||||
z0_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::atmOmegaWallFunctionFvPatchScalarField::
|
||||
@ -196,8 +208,9 @@ void Foam::atmOmegaWallFunctionFvPatchScalarField::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
omegaWallFunctionFvPatchScalarField::write(os);
|
||||
z0_->writeData(os);
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 ENERCON GmbH
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -130,6 +130,9 @@ protected:
|
||||
scalarField& omega
|
||||
);
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
@ -246,11 +246,11 @@ void alphatFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
"surfaceFilmProperties",
|
||||
filmRegionName_
|
||||
);
|
||||
os.writeEntry("B", B_);
|
||||
os.writeEntry("yPlusCrit", yPlusCrit_);
|
||||
os.writeEntry("Cmu", Cmu_);
|
||||
os.writeEntry("kappa", kappa_);
|
||||
os.writeEntry("Prt", Prt_);
|
||||
os.writeEntryIfDifferent<scalar>("B", 5.5, B_);
|
||||
os.writeEntryIfDifferent<scalar>("yPlusCrit", 11.05, yPlusCrit_);
|
||||
os.writeEntryIfDifferent<scalar>("Cmu", 0.09, Cmu_);
|
||||
os.writeEntryIfDifferent<scalar>("kappa", 0.41, kappa_);
|
||||
os.writeEntryIfDifferent<scalar>("Prt", 0.85, Prt_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -150,6 +150,24 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcNut() const
|
||||
}
|
||||
|
||||
|
||||
void nutkFilmWallFunctionFvPatchScalarField::writeLocalEntries
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeEntryIfDifferent<word>
|
||||
(
|
||||
"filmRegion",
|
||||
"surfaceFilmProperties",
|
||||
filmRegionName_
|
||||
);
|
||||
os.writeEntryIfDifferent<scalar>("B", 5.5, B_);
|
||||
os.writeEntryIfDifferent<scalar>("yPlusCrit", 11.05, yPlusCrit_);
|
||||
os.writeEntryIfDifferent<scalar>("Cmu", 0.09, Cmu_);
|
||||
os.writeEntryIfDifferent<scalar>("kappa", 0.41, kappa_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField
|
||||
@ -249,15 +267,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::yPlus() const
|
||||
void nutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntryIfDifferent<word>
|
||||
(
|
||||
"filmRegion",
|
||||
"surfaceFilmProperties",
|
||||
filmRegionName_
|
||||
);
|
||||
writeLocalEntries(os);
|
||||
os.writeEntry("B", B_);
|
||||
os.writeEntry("yPlusCrit", yPlusCrit_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -96,6 +97,9 @@ protected:
|
||||
//- Calculate the friction velocity
|
||||
virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
|
||||
|
||||
//- Write local wall function variables
|
||||
void writeLocalEntries(Ostream&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user