From 69d5a6950fb70660ebf78e5b71cc99a318e12ad9 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Fri, 19 Sep 2014 15:27:00 +0100 Subject: [PATCH] STYLE: fWallFunctions: consistent with epsilonWallFunction --- .../fWallFunctionFvPatchScalarField.C | 13 +++++++++---- .../fWallFunctionFvPatchScalarField.H | 5 ++++- .../v2WallFunctionFvPatchScalarField.C | 13 +++++++++---- .../v2WallFunctionFvPatchScalarField.H | 5 ++++- .../fWallFunctionFvPatchScalarField.C | 12 +++++++++--- .../fWallFunctionFvPatchScalarField.H | 5 ++++- .../v2WallFunctionFvPatchScalarField.C | 15 ++++++++++----- .../v2WallFunctionFvPatchScalarField.H | 5 ++++- 8 files changed, 53 insertions(+), 20 deletions(-) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C index d1ff2be0d0a..60ad82717c4 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C @@ -55,6 +55,14 @@ void fWallFunctionFvPatchScalarField::checkType() } +void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + scalar fWallFunctionFvPatchScalarField::yPlusLam ( const scalar kappa, @@ -233,11 +241,8 @@ void fWallFunctionFvPatchScalarField::evaluate void fWallFunctionFvPatchScalarField::write(Ostream& os) const { + writeLocalEntries(os); fixedValueFvPatchField<scalar>::write(os); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H index b78613eebad..6163d05ad9c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,9 @@ protected: //- Check the type of the patch virtual void checkType(); + //- Write local wall function variables + virtual void writeLocalEntries(Ostream&) const; + //- Calculate the Y+ at the edge of the laminar sublayer scalar yPlusLam(const scalar kappa, const scalar E); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C index 639dbafd922..6759772f177 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C @@ -55,6 +55,14 @@ void v2WallFunctionFvPatchScalarField::checkType() } +void v2WallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + scalar v2WallFunctionFvPatchScalarField::yPlusLam ( const scalar kappa, @@ -224,11 +232,8 @@ void v2WallFunctionFvPatchScalarField::evaluate void v2WallFunctionFvPatchScalarField::write(Ostream& os) const { + writeLocalEntries(os); fixedValueFvPatchField<scalar>::write(os); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H index bfedbbddf50..dc64df9345e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,6 +105,9 @@ protected: //- Check the type of the patch virtual void checkType(); + //- Write local wall function variables + virtual void writeLocalEntries(Ostream&) const; + //- Calculate the Y+ at the edge of the laminar sublayer scalar yPlusLam(const scalar kappa, const scalar E); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C index 383a206f0c1..c24937c520d 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C @@ -56,6 +56,14 @@ void fWallFunctionFvPatchScalarField::checkType() } +void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + scalar fWallFunctionFvPatchScalarField::yPlusLam ( const scalar kappa, @@ -232,10 +240,8 @@ void fWallFunctionFvPatchScalarField::evaluate void fWallFunctionFvPatchScalarField::write(Ostream& os) const { + writeLocalEntries(os); fixedValueFvPatchField<scalar>::write(os); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H index 771da70dfad..b5d92d94213 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,9 @@ protected: //- Check the type of the patch virtual void checkType(); + //- Write local wall function variables + virtual void writeLocalEntries(Ostream&) const; + //- Calculate the Y+ at the edge of the laminar sublayer scalar yPlusLam(const scalar kappa, const scalar E); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C index b2a3e38dedf..19ae103d79f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,6 +55,14 @@ void v2WallFunctionFvPatchScalarField::checkType() } +void v2WallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + scalar v2WallFunctionFvPatchScalarField::yPlusLam ( const scalar kappa, @@ -222,11 +230,8 @@ void v2WallFunctionFvPatchScalarField::evaluate void v2WallFunctionFvPatchScalarField::write(Ostream& os) const { + writeLocalEntries(os); fixedValueFvPatchField<scalar>::write(os); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H index 68bb2daaa0f..a0a8cde8e71 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,6 +105,9 @@ protected: //- Check the type of the patch virtual void checkType(); + //- Write local wall function variables + virtual void writeLocalEntries(Ostream&) const; + //- Calculate the Y+ at the edge of the laminar sublayer scalar yPlusLam(const scalar kappa, const scalar E); -- GitLab