From 98df99b20acc15d209da97b52683c45435f66d9f Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 3 Jul 2012 13:56:05 +0100 Subject: [PATCH 1/4] nutWallFunctions: Changed base class of nutkWallFunctions to nutWallFunctions and other improvements --- .../fixedShearStressFvPatchVectorField.C | 15 +-- ...ayatillekeWallFunctionFvPatchScalarField.C | 15 +-- .../nutWallFunctionFvPatchScalarField.C | 5 + .../nutkWallFunctionFvPatchScalarField.C | 110 ++---------------- .../nutkWallFunctionFvPatchScalarField.H | 44 +------ 5 files changed, 35 insertions(+), 154 deletions(-) diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C index 59ab80e4fe..9bb31c8fa1 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C @@ -106,11 +106,12 @@ void fixedShearStressFvPatchVectorField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const vectorField Ui(Uw.patchInternalField()); @@ -118,9 +119,9 @@ void fixedShearStressFvPatchVectorField::updateCoeffs() const scalarField& ry = patch().deltaCoeffs(); - tmp tnuEff = rasModel.nuEff(); + tmp tnuEff = turbModel.nuEff(); const volScalarField& nuEff = tnuEff(); - const scalarField& nuEffw = nuEff.boundaryField()[patchI]; + const scalarField& nuEffw = nuEff.boundaryField()[patchi]; tmp UwUpdated = tauHat*(tauHat & (tau0_*(1.0/(ry*nuEffw)) + Ui)); @@ -130,8 +131,8 @@ void fixedShearStressFvPatchVectorField::updateCoeffs() if (debug) { tmp nHat = this->patch().nf(); - volSymmTensorField Reff(rasModel.devReff()); - Info << "tau : " << (nHat & Reff.boundaryField()[patchI])() << endl; + volSymmTensorField Reff(turbModel.devReff()); + Info << "tau : " << (nHat & Reff.boundaryField()[patchi])() << endl; } fixedValueFvPatchVectorField::updateCoeffs(); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C index 917c65ca5f..2700a816a9 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C @@ -201,21 +201,22 @@ void kappatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); // Retrieve turbulence properties from model - const RASModel& rasModel = db().lookupObject("RASProperties"); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); const scalar Cmu25 = pow(Cmu_, 0.25); - const scalarField& y = rasModel.y()[patchI]; - const tmp tnu = rasModel.nu(); + const scalarField& y = turbModel.y()[patchi]; + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; - const tmp tk = rasModel.k(); + const scalarField& nuw = nu.boundaryField()[patchi]; + const tmp tk = turbModel.k(); const volScalarField& k = tk(); // Molecular Prandtl number const scalar - Pr(dimensionedScalar(rasModel.transport().lookup("Pr")).value()); + Pr(dimensionedScalar(turbModel.transport().lookup("Pr")).value()); // Populate boundary values scalarField& kappatw = *this; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index 065270eea6..c23aea5551 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -39,6 +39,11 @@ namespace incompressible namespace RASModels { +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(nutWallFunctionFvPatchScalarField, 0); + + // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void nutWallFunctionFvPatchScalarField::checkType() diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index eabc768d86..afbd1548d1 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -41,20 +41,6 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -void nutkWallFunctionFvPatchScalarField::checkType() -{ - if (!isA(patch())) - { - FatalErrorIn("nutkWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - tmp nutkWallFunctionFvPatchScalarField::calcNut() const { const label patchi = patch().index(); @@ -89,14 +75,6 @@ tmp nutkWallFunctionFvPatchScalarField::calcNut() const } -void nutkWallFunctionFvPatchScalarField::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; -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField @@ -105,14 +83,8 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField const DimensionedField& iF ) : - fixedValueFvPatchScalarField(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} + nutWallFunctionFvPatchScalarField(p, iF) +{} nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField @@ -123,14 +95,8 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - yPlusLam_(ptf.yPlusLam_) -{ - checkType(); -} + nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) +{} nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField @@ -140,14 +106,8 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField const dictionary& dict ) : - fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} + nutWallFunctionFvPatchScalarField(p, iF, dict) +{} nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField @@ -155,14 +115,8 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField const nutkWallFunctionFvPatchScalarField& wfpsf ) : - fixedValueFvPatchScalarField(wfpsf), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) -{ - checkType(); -} + nutWallFunctionFvPatchScalarField(wfpsf) +{} nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField @@ -171,48 +125,12 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField const DimensionedField& iF ) : - fixedValueFvPatchScalarField(wfpsf, iF), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) -{ - checkType(); -} + nutWallFunctionFvPatchScalarField(wfpsf, iF) +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -scalar nutkWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -void nutkWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - operator==(calcNut()); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - tmp nutkWallFunctionFvPatchScalarField::yPlus() const { const label patchi = patch().index(); @@ -232,14 +150,6 @@ tmp nutkWallFunctionFvPatchScalarField::yPlus() const } -void nutkWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePatchTypeField diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H index 8b4b181c20..d4ffd6167a 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H @@ -37,7 +37,7 @@ SourceFiles #ifndef nutkWallFunctionFvPatchScalarField_H #define nutkWallFunctionFvPatchScalarField_H -#include "fixedValueFvPatchFields.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,36 +54,15 @@ namespace RASModels class nutkWallFunctionFvPatchScalarField : - public fixedValueFvPatchScalarField + public nutWallFunctionFvPatchScalarField { protected: - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - // Protected Member Functions - //- Check the type of the patch - virtual void checkType(); - //- Calculate the turbulence viscosity virtual tmp calcNut() const; - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - public: @@ -156,23 +135,8 @@ public: // Member functions - //- Calculate the Y+ at the edge of the laminar sublayer - static scalar yPlusLam(const scalar kappa, const scalar E); - - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp yPlus() const; - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - // I-O - - //- Write - virtual void write(Ostream&) const; + //- Calculate and return the yPlus at the boundary + virtual tmp yPlus() const; }; From c1696f9cde98e1d912367ca1fd4457449a8b3ded Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 3 Jul 2012 13:57:27 +0100 Subject: [PATCH 2/4] mutWallFunctions: Generalised for RAS and LES muSgsUSpaldingWallFunction removed, now use mutUSpaldingWallFunction --- .../compressible/LES/LESModel/LESModel.C | 1 + .../compressible/LES/Make/files | 10 - ...ayatillekeWallFunctionFvPatchScalarField.C | 341 ------------------ ...ayatillekeWallFunctionFvPatchScalarField.H | 197 ---------- .../alphaSgsWallFunctionFvPatchScalarField.C | 164 --------- ...sUSpaldingWallFunctionFvPatchScalarField.C | 223 ------------ ...sUSpaldingWallFunctionFvPatchScalarField.H | 173 --------- .../compressible/RAS/Make/files | 9 +- .../compressible/RAS/RASModel/RASModel.C | 54 +-- .../compressible/RAS/RASModel/RASModel.H | 20 - ...ayatillekeWallFunctionFvPatchScalarField.C | 21 +- .../epsilonWallFunctionFvPatchScalarField.C | 22 +- .../epsilonWallFunctionFvPatchScalarField.H | 3 - .../mutLowReWallFunctionFvPatchScalarField.C | 29 +- .../mutLowReWallFunctionFvPatchScalarField.H | 12 +- .../mutURoughWallFunctionFvPatchScalarField.C | 43 ++- .../mutURoughWallFunctionFvPatchScalarField.H | 4 +- ...tUSpaldingWallFunctionFvPatchScalarField.C | 48 +-- ...tUSpaldingWallFunctionFvPatchScalarField.H | 4 +- .../mutUWallFunctionFvPatchScalarField.C | 39 +- .../mutUWallFunctionFvPatchScalarField.H | 4 +- .../mutWallFunctionFvPatchScalarField.C | 191 ++++++++++ .../mutWallFunctionFvPatchScalarField.H} | 108 +++--- .../mutkRoughWallFunctionFvPatchScalarField.C | 14 +- .../mutkWallFunctionFvPatchScalarField.C | 119 ++---- .../mutkWallFunctionFvPatchScalarField.H | 37 +- .../omegaWallFunctionFvPatchScalarField.C | 22 +- .../omegaWallFunctionFvPatchScalarField.H | 3 - .../turbulenceModel/turbulenceModel.C | 11 +- .../turbulenceModel/turbulenceModel.H | 10 + .../XiFoam/les/pitzDaily/0/alphaSgs | 4 +- .../combustion/XiFoam/les/pitzDaily/0/muSgs | 4 +- .../XiFoam/les/pitzDaily3D/0/alphaSgs | 4 +- .../combustion/XiFoam/les/pitzDaily3D/0/muSgs | 4 +- .../les/oppositeBurningPanels/0/alphaSgs | 4 +- .../les/oppositeBurningPanels/0/muSgs | 2 +- 36 files changed, 449 insertions(+), 1509 deletions(-) delete mode 100644 src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H create mode 100644 src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C rename src/turbulenceModels/compressible/{LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H => RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H} (58%) diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 3e68d95ada..e3ecd7ef7a 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -155,6 +155,7 @@ autoPtr LESModel::New void LESModel::correct(const tmp&) { + turbulenceModel::correct(); delta_().correct(); } diff --git a/src/turbulenceModels/compressible/LES/Make/files b/src/turbulenceModels/compressible/LES/Make/files index 653eb2b28f..cc52d88433 100644 --- a/src/turbulenceModels/compressible/LES/Make/files +++ b/src/turbulenceModels/compressible/LES/Make/files @@ -11,14 +11,4 @@ SpalartAllmaras/SpalartAllmaras.C vanDriestDelta/vanDriestDelta.C -/* Wall functions */ -wallFunctions=derivedFvPatchFields/wallFunctions - -muSgsWallFunctions=$(wallFunctions)/muSgsWallFunctions -$(muSgsWallFunctions)/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C - -alphaSgsWallFunctions=$(wallFunctions)/alphaSgsWallFunctions -$(alphaSgsWallFunctions)/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C -$(alphaSgsWallFunctions)/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C - LIB = $(FOAM_LIBBIN)/libcompressibleLESModels diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C deleted file mode 100644 index 44ac46edc5..0000000000 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,341 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "alphaSgsJayatillekeWallFunctionFvPatchScalarField.H" -#include "LESModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0; -scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01; -label alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10; - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void alphaSgsJayatillekeWallFunctionFvPatchScalarField::checkType() -{ - if (!isA(patch())) - { - FatalErrorIn - ( - "alphaSgsJayatillekeWallFunctionFvPatchScalarField::checkType()" - ) - << "Patch type for patch " << patch().name() << " must be wall\n" - << "Current patch type is " << patch().type() << nl - << exit(FatalError); - } -} - - -scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::Psmooth -( - const scalar Prat -) const -{ - return 9.24*(pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*exp(-0.007*Prat)); -} - - -scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::yPlusTherm -( - const scalar P, - const scalar Prat -) const -{ - scalar ypt = 11.0; - - for (int i=0; i& iF -) -: - fixedValueFvPatchScalarField(p, iF), - Prt_(0.85), - kappa_(0.41), - E_(9.8), - heName_("he") - -{ - checkType(); -} - - -alphaSgsJayatillekeWallFunctionFvPatchScalarField:: -alphaSgsJayatillekeWallFunctionFvPatchScalarField -( - const alphaSgsJayatillekeWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - Prt_(ptf.Prt_), - kappa_(ptf.kappa_), - E_(ptf.E_), - heName_(ptf.heName_) - -{} - - -alphaSgsJayatillekeWallFunctionFvPatchScalarField:: -alphaSgsJayatillekeWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", 0.85)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), - heName_(dict.lookupOrDefault("he", "he")) -{ - checkType(); -} - - -alphaSgsJayatillekeWallFunctionFvPatchScalarField:: -alphaSgsJayatillekeWallFunctionFvPatchScalarField -( - const alphaSgsJayatillekeWallFunctionFvPatchScalarField& awfpsf -) -: - fixedValueFvPatchScalarField(awfpsf), - Prt_(awfpsf.Prt_), - kappa_(awfpsf.kappa_), - E_(awfpsf.E_), - heName_(awfpsf.heName_) -{ - checkType(); -} - - -alphaSgsJayatillekeWallFunctionFvPatchScalarField:: -alphaSgsJayatillekeWallFunctionFvPatchScalarField -( - const alphaSgsJayatillekeWallFunctionFvPatchScalarField& awfpsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(awfpsf, iF), - Prt_(awfpsf.Prt_), - kappa_(awfpsf.kappa_), - E_(awfpsf.E_), - heName_(awfpsf.heName_) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void alphaSgsJayatillekeWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes -) -{ - const LESModel& lesModel = db().lookupObject("LESProperties"); - - // Field data - const label patchI = patch().index(); - - const scalarField& muw = lesModel.mu().boundaryField()[patchI]; - const scalarField muSgsw(lesModel.muSgs()().boundaryField()[patchI]); - - const scalarField& alphaw = lesModel.alpha().boundaryField()[patchI]; - scalarField& alphaSgsw = *this; - - const fvPatchVectorField& Uw = lesModel.U().boundaryField()[patchI]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const scalarField magGradUw(mag(Uw.snGrad())); - - const scalarField& rhow = lesModel.rho().boundaryField()[patchI]; - const fvPatchScalarField& hw = - patch().lookupPatchField(heName_); - - const scalarField& ry = patch().deltaCoeffs(); - - // Heat flux [W/m2] - lagging alphaSgsw - const scalarField qDot((alphaw + alphaSgsw)*hw.snGrad()); - - // Populate boundary values - forAll(alphaSgsw, faceI) - { - // Calculate uTau using Newton-Raphson iteration - scalar uTau = - sqrt((muSgsw[faceI] + muw[faceI])/rhow[faceI]*magGradUw[faceI]); - - if (uTau > ROOTVSMALL) - { - label iter = 0; - scalar err = GREAT; - - do - { - scalar kUu = min(kappa_*magUp[faceI]/uTau, maxExp_); - scalar fkUu = exp(kUu) - 1.0 - kUu*(1.0 + 0.5*kUu); - - scalar f = - - uTau/(ry[faceI]*muw[faceI]/rhow[faceI]) - + magUp[faceI]/uTau - + 1.0/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); - - scalar df = - - 1.0/(ry[faceI]*muw[faceI]/rhow[faceI]) - - magUp[faceI]/sqr(uTau) - - 1.0/E_*kUu*fkUu/uTau; - - scalar uTauNew = uTau - f/df; - err = mag((uTau - uTauNew)/uTau); - uTau = uTauNew; - - } while (uTau>VSMALL && err>tolerance_ && ++iteryPlusTherm(P, Prat); - - // Evaluate new effective thermal diffusivity - scalar alphaEff = 0.0; - if (yPlus < yPlusTherm) - { - scalar A = qDot[faceI]*rhow[faceI]*uTau/ry[faceI]; - scalar B = qDot[faceI]*Pr*yPlus; - scalar C = Pr*0.5*rhow[faceI]*uTau*sqr(magUp[faceI]); - alphaEff = A/(B + C + VSMALL); - } - else - { - scalar A = qDot[faceI]*rhow[faceI]*uTau/ry[faceI]; - scalar B = qDot[faceI]*Prt_*(1.0/kappa_*log(E_*yPlus) + P); - scalar magUc = uTau/kappa_*log(E_*yPlusTherm) - mag(Uw[faceI]); - scalar C = - 0.5*rhow[faceI]*uTau - *(Prt_*sqr(magUp[faceI]) + (Pr - Prt_)*sqr(magUc)); - alphaEff = A/(B + C + VSMALL); - } - - // Update turbulent thermal diffusivity - alphaSgsw[faceI] = max(0.0, alphaEff - alphaw[faceI]); - - if (debug) - { - Info<< " uTau = " << uTau << nl - << " Pr = " << Pr << nl - << " Prt = " << Prt_ << nl - << " qDot = " << qDot[faceI] << nl - << " yPlus = " << yPlus << nl - << " yPlusTherm = " << yPlusTherm << nl - << " alphaEff = " << alphaEff << nl - << " alphaw = " << alphaw[faceI] << nl - << " alphaSgsw = " << alphaSgsw[faceI] << nl - << endl; - } - } - else - { - alphaSgsw[faceI] = 0.0; - } - } -} - - -void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField::write(os); - os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("he") << heName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - alphaSgsJayatillekeWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H deleted file mode 100644 index c5d4d70241..0000000000 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - alphaSgsJayatillekeWallFunctionFvPatchScalarField - -Description - Thermal wall function for turbulent thermal diffusivity based on the - Jayatilleke thermal wall function - -SourceFiles - alphaSgsJayatillekeWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef alphaSgsJayatillekeWallFunctionFvPatchScalarField_H -#define alphaSgsJayatillekeWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class alphaSgsJayatillekeWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class alphaSgsJayatillekeWallFunctionFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - // Private data - - //- Turbulent Prandtl number - scalar Prt_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Name of (sensible/total) enthalpy field - word heName_; - - - // Solution parameters - - static scalar maxExp_; - static scalar tolerance_; - static label maxIters_; - - - // Private Member Functions - - //- Check the type of the patch - void checkType(); - - //- `P' function - scalar Psmooth(const scalar Prat) const; - - //- Calculate y+ at the edge of the thermal laminar sublayer - scalar yPlusTherm - ( - const scalar P, - const scalar Prat - ) const; - - -public: - - //- Runtime type information - TypeName("alphaSgsJayatillekeWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - alphaSgsJayatillekeWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - alphaSgsJayatillekeWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given an - // alphaSgsJayatillekeWallFunctionFvPatchScalarField - // onto a new patch - alphaSgsJayatillekeWallFunctionFvPatchScalarField - ( - const alphaSgsJayatillekeWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - alphaSgsJayatillekeWallFunctionFvPatchScalarField - ( - const alphaSgsJayatillekeWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaSgsJayatillekeWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - alphaSgsJayatillekeWallFunctionFvPatchScalarField - ( - const alphaSgsJayatillekeWallFunctionFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new alphaSgsJayatillekeWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - // Evaluation functions - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::Pstream::blocking - ); - - - // I-O - - //- Write - void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C deleted file mode 100644 index 181c8022a7..0000000000 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,164 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "alphaSgsWallFunctionFvPatchScalarField.H" -#include "LESModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void alphaSgsWallFunctionFvPatchScalarField::checkType() -{ - if (!isA(patch())) - { - FatalErrorIn - ( - "alphaSgsWallFunctionFvPatchScalarField::checkType()" - ) - << "Patch type for patch " << patch().name() << " must be wall\n" - << "Current patch type is " << patch().type() << nl - << exit(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -alphaSgsWallFunctionFvPatchScalarField:: -alphaSgsWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF), - Prt_(0.85) -{ - checkType(); -} - - -alphaSgsWallFunctionFvPatchScalarField:: -alphaSgsWallFunctionFvPatchScalarField -( - const alphaSgsWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - Prt_(ptf.Prt_) -{} - - -alphaSgsWallFunctionFvPatchScalarField:: -alphaSgsWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", 0.85)) -{ - checkType(); -} - - -alphaSgsWallFunctionFvPatchScalarField:: -alphaSgsWallFunctionFvPatchScalarField -( - const alphaSgsWallFunctionFvPatchScalarField& awfpsf -) -: - fixedValueFvPatchScalarField(awfpsf), - Prt_(awfpsf.Prt_) -{ - checkType(); -} - - -alphaSgsWallFunctionFvPatchScalarField:: -alphaSgsWallFunctionFvPatchScalarField -( - const alphaSgsWallFunctionFvPatchScalarField& awfpsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(awfpsf, iF), - Prt_(awfpsf.Prt_) - -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void alphaSgsWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes -) -{ - const LESModel& lesModel = db().lookupObject("LESProperties"); - - const scalarField muSgsw - ( - lesModel.muSgs()().boundaryField()[patch().index()] - ); - - operator==(muSgsw/Prt_); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - alphaSgsWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C deleted file mode 100644 index e6de9e1813..0000000000 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "muSgsUSpaldingWallFunctionFvPatchScalarField.H" -#include "LESModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -muSgsUSpaldingWallFunctionFvPatchScalarField:: -muSgsUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF), - UName_("U"), - rhoName_("rho"), - muName_("mu"), - kappa_(0.41), - E_(9.8) -{} - - -muSgsUSpaldingWallFunctionFvPatchScalarField:: -muSgsUSpaldingWallFunctionFvPatchScalarField -( - const muSgsUSpaldingWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - UName_(ptf.UName_), - rhoName_(ptf.rhoName_), - muName_(ptf.muName_), - kappa_(ptf.kappa_), - E_(ptf.E_) -{} - - -muSgsUSpaldingWallFunctionFvPatchScalarField:: -muSgsUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict), - UName_(dict.lookupOrDefault("U", "U")), - rhoName_(dict.lookupOrDefault("rho", "rho")), - muName_(dict.lookupOrDefault("mu", "mu")), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) -{} - - -muSgsUSpaldingWallFunctionFvPatchScalarField:: -muSgsUSpaldingWallFunctionFvPatchScalarField -( - const muSgsUSpaldingWallFunctionFvPatchScalarField& mwfpsf -) -: - fixedValueFvPatchScalarField(mwfpsf), - UName_(mwfpsf.UName_), - rhoName_(mwfpsf.rhoName_), - muName_(mwfpsf.muName_), - kappa_(mwfpsf.kappa_), - E_(mwfpsf.E_) -{} - - -muSgsUSpaldingWallFunctionFvPatchScalarField:: -muSgsUSpaldingWallFunctionFvPatchScalarField -( - const muSgsUSpaldingWallFunctionFvPatchScalarField& mwfpsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(mwfpsf, iF), - UName_(mwfpsf.UName_), - rhoName_(mwfpsf.rhoName_), - muName_(mwfpsf.muName_), - kappa_(mwfpsf.kappa_), - E_(mwfpsf.E_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void muSgsUSpaldingWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes -) -{ - const scalarField& ry = patch().deltaCoeffs(); - - const fvPatchVectorField& U = - patch().lookupPatchField(UName_); - - const scalarField magUp(mag(U.patchInternalField() - U)); - - const scalarField& muw = - patch().lookupPatchField(muName_); - - const scalarField& rhow = - patch().lookupPatchField(rhoName_); - - scalarField& muSgsw = *this; - - const scalarField magFaceGradU(mag(U.snGrad())); - - forAll(muSgsw, facei) - { - scalar magUpara = magUp[facei]; - - scalar utau = - sqrt((muSgsw[facei] + muw[facei])*magFaceGradU[facei]/rhow[facei]); - - if (utau > 0) - { - int iter = 0; - scalar err = GREAT; - - do - { - scalar kUu = kappa_*magUpara/utau; - scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); - - scalar f = - - utau/(ry[facei]*muw[facei]/rhow[facei]) - + magUpara/utau - + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); - - scalar df = - - 1.0/(ry[facei]*muw[facei]/rhow[facei]) - - magUpara/sqr(utau) - - 1/E_*kUu*fkUu/utau; - - scalar utauNew = utau - f/df; - err = mag((utau - utauNew)/utau); - utau = utauNew; - - } while (utau > VSMALL && err > 0.01 && ++iter < 10); - - muSgsw[facei] = - max - ( - rhow[facei]*sqr(utau)/magFaceGradU[facei] - muw[facei], - 0.0 - ); - } - else - { - muSgsw[facei] = 0; - } - } -} - - -void muSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField::write(os); - writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "rho", "rho", rhoName_); - writeEntryIfDifferent(os, "mu", "mu", muName_); - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - muSgsUSpaldingWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H deleted file mode 100644 index 9d8adf869c..0000000000 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,173 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::compressible::LESModels:: - muSgsUSpaldingWallFunctionFvPatchScalarField - -Description - Wall function boundary condition for walls, based on velocity, using - Spaldings law to give a continuous muSgs profile to the wall (y+ = 0). - -SourceFiles - muSgsUSpaldingWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef muSgsUSpaldingWallFunctionFvPatchScalarField_H -#define muSgsUSpaldingWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class muSgsUSpaldingWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class muSgsUSpaldingWallFunctionFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - // Private data - - //- Name of velocity field - word UName_; - - //- Name of density field - word rhoName_; - - //- Name of laminar viscosity field - word muName_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - -public: - - //- Runtime type information - TypeName("muSgsUSpaldingWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - muSgsUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - muSgsUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // muSgsUSpaldingWallFunctionFvPatchScalarField - // onto a new patch - muSgsUSpaldingWallFunctionFvPatchScalarField - ( - const muSgsUSpaldingWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - muSgsUSpaldingWallFunctionFvPatchScalarField - ( - const muSgsUSpaldingWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new muSgsUSpaldingWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - muSgsUSpaldingWallFunctionFvPatchScalarField - ( - const muSgsUSpaldingWallFunctionFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new muSgsUSpaldingWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - - // I-O - - //- Write - void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/Make/files b/src/turbulenceModels/compressible/RAS/Make/files index a6ae97b5a8..524f89b653 100644 --- a/src/turbulenceModels/compressible/RAS/Make/files +++ b/src/turbulenceModels/compressible/RAS/Make/files @@ -18,11 +18,14 @@ $(alphatWallFunctions)/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C $(alphatWallFunctions)/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C mutWallFunctions = $(wallFunctions)/mutWallFunctions -$(mutWallFunctions)/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutWallFunction/mutWallFunctionFvPatchScalarField.C + $(mutWallFunctions)/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C + +$(mutWallFunctions)/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C $(mutWallFunctions)/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C $(mutWallFunctions)/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C $(mutWallFunctions)/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions @@ -35,7 +38,7 @@ kqRWallFunctions = $(wallFunctions)/kqRWallFunctions $(kqRWallFunctions)/kqRWallFunction/kqRWallFunctionFvPatchFields.C /* Patch fields */ -derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C +derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index a3e7d7281c..b5e53288a1 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -83,9 +83,7 @@ RASModel::RASModel kMin_("kMin", sqr(dimVelocity), SMALL), epsilonMin_("epsilonMin", kMin_.dimensions()/dimTime, SMALL), - omegaMin_("omegaMin", dimless/dimTime, SMALL), - - y_(mesh_) + omegaMin_("omegaMin", dimless/dimTime, SMALL) { kMin_.readIfPresent(*this); epsilonMin_.readIfPresent(*this); @@ -159,57 +157,9 @@ autoPtr RASModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -tmp RASModel::yPlus(const label patchNo, const scalar Cmu) const -{ - const fvPatch& curPatch = mesh_.boundary()[patchNo]; - - tmp tYp(new scalarField(curPatch.size())); - scalarField& Yp = tYp(); - - if (isA(curPatch)) - { - Yp = pow025(Cmu) - *y_[patchNo] - *sqrt(k()().boundaryField()[patchNo].patchInternalField()) - /( - mu().boundaryField()[patchNo].patchInternalField() - /rho_.boundaryField()[patchNo] - ); - } - else - { - WarningIn - ( - "tmp RASModel::yPlus(const label patchNo) const" - ) << "Patch " << patchNo << " is not a wall. Returning null field" - << nl << endl; - - Yp.setSize(0); - } - - return tYp; -} - - void RASModel::correct() { - if (mesh_.changing()) - { - y_.correct(); - } + turbulenceModel::correct(); } diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 6251da74fe..1a24cb78ee 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -46,7 +46,6 @@ SourceFiles #include "compressible/turbulenceModel/turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" -#include "nearWallDist.H" #include "fvm.H" #include "fvc.H" #include "fvMatrices.H" @@ -96,9 +95,6 @@ protected: //- Lower limit for omega dimensionedScalar omegaMin_; - //- Near wall distance boundary field - nearWallDist y_; - // Protected Member Functions @@ -213,15 +209,6 @@ public: return omegaMin_; } - //- Return the near wall distances - const nearWallDist& y() const - { - return y_; - } - - //- Calculate y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E) const; - //- Const access to the coefficients dictionary const dictionary& coeffDict() const { @@ -264,13 +251,6 @@ public: thermo().alphaEff(alphat()().boundaryField()[patchI], patchI); } - //- Return yPlus for the given patch - virtual tmp yPlus - ( - const label patchI, - const scalar Cmu - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index b4820095cc..5db232e85e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -199,34 +199,35 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); const scalar Cmu25 = pow025(Cmu_); - const scalarField& y = rasModel.y()[patchI]; + const scalarField& y = turbModel.y()[patchi]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - const scalarField& alphaw = rasModel.alpha().boundaryField()[patchI]; + const scalarField& alphaw = turbModel.alpha().boundaryField()[patchi]; scalarField& alphatw = *this; - const tmp tk = rasModel.k(); + const tmp tk = turbModel.k(); const volScalarField& k = tk(); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); const scalarField magGradUw(mag(Uw.snGrad())); - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; const fvPatchScalarField& hew = - rasModel.thermo().he().boundaryField()[patchI]; + turbModel.thermo().he().boundaryField()[patchi]; // Heat flux [W/m2] - lagging alphatw const scalarField qDot ( - rasModel.thermo().alphaEff(alphatw, patchI)*hew.snGrad() + turbModel.thermo().alphaEff(alphatw, patchi)*hew.snGrad() ); // Populate boundary values diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 1c0e11d789..dac735f160 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -28,6 +28,7 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" +#include "mutWallFunctionFvPatchScalarField.H" #include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,23 +56,6 @@ void epsilonWallFunctionFvPatchScalarField::checkType() } -scalar epsilonWallFunctionFvPatchScalarField::calcYPlusLam -( - const scalar kappa, - const scalar E -) const -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(E*ypl)/kappa; - } - - return ypl; -} - - void epsilonWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { writeEntryIfDifferent(os, "G", "RASModel::G", GName_); @@ -94,7 +78,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField Cmu_(0.09), kappa_(0.41), E_(9.8), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(mutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { @@ -134,7 +118,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField Cmu_(dict.lookupOrDefault("Cmu", 0.09)), kappa_(dict.lookupOrDefault("kappa", 0.41)), E_(dict.lookupOrDefault("E", 9.8)), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(mutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index ff7447a2e5..f473bc3c4c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -81,9 +81,6 @@ protected: //- Check the type of the patch virtual void checkType(); - //- Calculate the Y+ at the edge of the laminar sublayer - virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const; - //- Write local wall function variables virtual void writeLocalEntries(Ostream&) const; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C index 770fd54a81..6cab8e9f37 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C @@ -54,7 +54,7 @@ mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(p, iF) + mutWallFunctionFvPatchScalarField(p, iF) {} @@ -66,7 +66,7 @@ mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -77,7 +77,7 @@ mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField const dictionary& dict ) : - mutkWallFunctionFvPatchScalarField(p, iF, dict) + mutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -86,7 +86,7 @@ mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField const mutLowReWallFunctionFvPatchScalarField& mlrwfpsf ) : - mutkWallFunctionFvPatchScalarField(mlrwfpsf) + mutWallFunctionFvPatchScalarField(mlrwfpsf) {} @@ -96,10 +96,29 @@ mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(mlrwfpsf, iF) + mutWallFunctionFvPatchScalarField(mlrwfpsf, iF) {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +tmp mutLowReWallFunctionFvPatchScalarField::yPlus() const +{ + const label patchi = patch().index(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const scalarField nuw + ( + turbModel.mu().boundaryField()[patchi] + /turbModel.rho().boundaryField()[patchi] + ); + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + + return y*sqrt(nuw*mag(Uw.snGrad()))/nuw; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePatchTypeField diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H index cffec80fb3..027e5d8b0b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H @@ -38,7 +38,7 @@ SourceFiles #ifndef compressibleMutLowReWallFunctionFvPatchScalarField_H #define compressibleMutLowReWallFunctionFvPatchScalarField_H -#include "mutkWallFunctionFvPatchScalarField.H" +#include "mutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +55,7 @@ namespace RASModels class mutLowReWallFunctionFvPatchScalarField : - public mutkWallFunctionFvPatchScalarField + public mutWallFunctionFvPatchScalarField { protected: @@ -132,6 +132,14 @@ public: new mutLowReWallFunctionFvPatchScalarField(*this, iF) ); } + + + // Member functions + + // Evaluation functions + + //- Calculate and return the yPlus at the boundary + virtual tmp yPlus() const; }; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C index a90cf48686..a6ef3c41b3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C @@ -45,12 +45,14 @@ tmp mutURoughWallFunctionFvPatchScalarField::calcYPlus const scalarField& magUp ) const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const scalarField& y = turbModel.y()[patchi]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; + const fvPatchScalarField& rho = turbModel.rho().boundaryField()[patchi]; tmp tyPlus(new scalarField(patch().size(), 0.0)); scalarField& yPlus = tyPlus(); @@ -170,13 +172,15 @@ tmp mutURoughWallFunctionFvPatchScalarField::calcYPlus tmp mutURoughWallFunctionFvPatchScalarField::calcMut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; + const fvPatchScalarField& rho = turbModel.rho().boundaryField()[patchi]; scalarField magUp(mag(Uw.patchInternalField() - Uw)); @@ -208,7 +212,7 @@ mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(p, iF), + mutWallFunctionFvPatchScalarField(p, iF), roughnessHeight_(pTraits::zero), roughnessConstant_(pTraits::zero), roughnessFactor_(pTraits::zero) @@ -223,7 +227,7 @@ mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), roughnessHeight_(ptf.roughnessHeight_), roughnessConstant_(ptf.roughnessConstant_), roughnessFactor_(ptf.roughnessFactor_) @@ -237,7 +241,7 @@ mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField const dictionary& dict ) : - mutkWallFunctionFvPatchScalarField(p, iF, dict), + mutWallFunctionFvPatchScalarField(p, iF, dict), roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) @@ -249,7 +253,7 @@ mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField const mutURoughWallFunctionFvPatchScalarField& rwfpsf ) : - mutkWallFunctionFvPatchScalarField(rwfpsf), + mutWallFunctionFvPatchScalarField(rwfpsf), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), roughnessFactor_(rwfpsf.roughnessFactor_) @@ -262,7 +266,7 @@ mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(rwfpsf, iF), + mutWallFunctionFvPatchScalarField(rwfpsf, iF), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), roughnessFactor_(rwfpsf.roughnessFactor_) @@ -273,10 +277,11 @@ mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField tmp mutURoughWallFunctionFvPatchScalarField::yPlus() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); return calcYPlus(magUp); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H index 74596ff781..52dac81fbd 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H @@ -35,7 +35,7 @@ SourceFiles #ifndef compressibleMutURoughWallFunctionFvPatchScalarField_H #define compressibleMutURoughWallFunctionFvPatchScalarField_H -#include "mutkWallFunctionFvPatchScalarField.H" +#include "mutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace RASModels class mutURoughWallFunctionFvPatchScalarField : - public mutkWallFunctionFvPatchScalarField + public mutWallFunctionFvPatchScalarField { protected: diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C index 4e24d39e06..b8f9a7beee 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C @@ -45,19 +45,21 @@ tmp mutUSpaldingWallFunctionFvPatchScalarField::calcUTau const scalarField& magGradU ) const { - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patch().index()]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const scalarField& y = turbModel.y()[patch().index()]; const fvPatchVectorField& Uw = - rasModel.U().boundaryField()[patch().index()]; + turbModel.U().boundaryField()[patch().index()]; scalarField magUp(mag(Uw.patchInternalField() - Uw)); const fvPatchScalarField& rhow = - rasModel.rho().boundaryField()[patch().index()]; + turbModel.rho().boundaryField()[patch().index()]; const fvPatchScalarField& muw = - rasModel.mu().boundaryField()[patch().index()]; + turbModel.mu().boundaryField()[patch().index()]; const scalarField& mutw = *this; tmp tuTau(new scalarField(patch().size(), 0.0)); @@ -104,13 +106,15 @@ tmp mutUSpaldingWallFunctionFvPatchScalarField::calcUTau tmp mutUSpaldingWallFunctionFvPatchScalarField::calcMut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magGradU(mag(Uw.snGrad())); - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; return max ( @@ -129,7 +133,7 @@ mutUSpaldingWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(p, iF) + mutWallFunctionFvPatchScalarField(p, iF) {} @@ -142,7 +146,7 @@ mutUSpaldingWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -154,7 +158,7 @@ mutUSpaldingWallFunctionFvPatchScalarField const dictionary& dict ) : - mutkWallFunctionFvPatchScalarField(p, iF, dict) + mutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -164,7 +168,7 @@ mutUSpaldingWallFunctionFvPatchScalarField const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf ) : - mutkWallFunctionFvPatchScalarField(wfpsf) + mutWallFunctionFvPatchScalarField(wfpsf) {} @@ -175,7 +179,7 @@ mutUSpaldingWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(wfpsf, iF) + mutWallFunctionFvPatchScalarField(wfpsf, iF) {} @@ -183,13 +187,15 @@ mutUSpaldingWallFunctionFvPatchScalarField tmp mutUSpaldingWallFunctionFvPatchScalarField::yPlus() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; return y*calcUTau(mag(Uw.snGrad()))/(muw/rhow); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H index 4070203552..a014036ca0 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H @@ -35,7 +35,7 @@ SourceFiles #ifndef compressibleMutUSpaldingWallFunctionFvPatchScalarField_H #define compressibleMutUSpaldingWallFunctionFvPatchScalarField_H -#include "mutkWallFunctionFvPatchScalarField.H" +#include "mutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace RASModels class mutUSpaldingWallFunctionFvPatchScalarField : - public mutkWallFunctionFvPatchScalarField + public mutWallFunctionFvPatchScalarField { protected: diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C index 725c7794a5..a1f91801eb 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C @@ -45,12 +45,14 @@ tmp mutUWallFunctionFvPatchScalarField::calcYPlus const scalarField& magUp ) const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchScalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const scalarField& y = turbModel.y()[patchi]; + const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const fvPatchScalarField& muw = turbModel.mu().boundaryField()[patchi]; tmp tyPlus(new scalarField(patch().size(), 0.0)); scalarField& yPlus = tyPlus(); @@ -81,12 +83,14 @@ tmp mutUWallFunctionFvPatchScalarField::calcYPlus tmp mutUWallFunctionFvPatchScalarField::calcMut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; + const fvPatchScalarField& muw = turbModel.mu().boundaryField()[patchi]; tmp tyPlus = calcYPlus(magUp); scalarField& yPlus = tyPlus(); @@ -115,7 +119,7 @@ mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(p, iF) + mutWallFunctionFvPatchScalarField(p, iF) {} @@ -127,7 +131,7 @@ mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -138,7 +142,7 @@ mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField const dictionary& dict ) : - mutkWallFunctionFvPatchScalarField(p, iF, dict) + mutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -147,7 +151,7 @@ mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField const mutUWallFunctionFvPatchScalarField& sawfpsf ) : - mutkWallFunctionFvPatchScalarField(sawfpsf) + mutWallFunctionFvPatchScalarField(sawfpsf) {} @@ -157,7 +161,7 @@ mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField const DimensionedField& iF ) : - mutkWallFunctionFvPatchScalarField(sawfpsf, iF) + mutWallFunctionFvPatchScalarField(sawfpsf, iF) {} @@ -165,9 +169,10 @@ mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField tmp mutUWallFunctionFvPatchScalarField::yPlus() const { - const label patchI = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const label patchi = patch().index(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); return calcYPlus(magUp); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H index 882725186b..4ac7886329 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H @@ -35,7 +35,7 @@ SourceFiles #ifndef compressibleMutUWallFunctionFvPatchScalarField_H #define compressibleMutUWallFunctionFvPatchScalarField_H -#include "mutkWallFunctionFvPatchScalarField.H" +#include "mutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace RASModels class mutUWallFunctionFvPatchScalarField : - public mutkWallFunctionFvPatchScalarField + public mutWallFunctionFvPatchScalarField { protected: diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C new file mode 100644 index 0000000000..9825f014c1 --- /dev/null +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -0,0 +1,191 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "mutWallFunctionFvPatchScalarField.H" +#include "RASModel.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "wallFvPatch.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(mutWallFunctionFvPatchScalarField, 0); + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void mutWallFunctionFvPatchScalarField::checkType() +{ + if (!isA(patch())) + { + FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()") + << "Invalid wall function specification" << nl + << " Patch type for patch " << patch().name() + << " must be wall" << nl + << " Current patch type is " << patch().type() << nl << endl + << abort(FatalError); + } +} + + +void mutWallFunctionFvPatchScalarField::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; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(p, iF), + Cmu_(0.09), + kappa_(0.41), + E_(9.8), + yPlusLam_(yPlusLam(kappa_, E_)) +{} + + +mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +( + const mutWallFunctionFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchScalarField(ptf, p, iF, mapper), + Cmu_(ptf.Cmu_), + kappa_(ptf.kappa_), + E_(ptf.E_), + yPlusLam_(ptf.yPlusLam_) +{} + + +mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchScalarField(p, iF, dict), + Cmu_(dict.lookupOrDefault("Cmu", 0.09)), + kappa_(dict.lookupOrDefault("kappa", 0.41)), + E_(dict.lookupOrDefault("E", 9.8)), + yPlusLam_(yPlusLam(kappa_, E_)) +{} + + +mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +( + const mutWallFunctionFvPatchScalarField& wfpsf +) +: + fixedValueFvPatchScalarField(wfpsf), + Cmu_(wfpsf.Cmu_), + kappa_(wfpsf.kappa_), + E_(wfpsf.E_), + yPlusLam_(wfpsf.yPlusLam_) +{} + + +mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +( + const mutWallFunctionFvPatchScalarField& wfpsf, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(wfpsf, iF), + Cmu_(wfpsf.Cmu_), + kappa_(wfpsf.kappa_), + E_(wfpsf.E_), + yPlusLam_(wfpsf.yPlusLam_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +scalar mutWallFunctionFvPatchScalarField::yPlusLam +( + const scalar kappa, + const scalar E +) +{ + scalar ypl = 11.0; + + for (int i=0; i<10; i++) + { + ypl = log(max(E*ypl, 1))/kappa; + } + + return ypl; +} + + +void mutWallFunctionFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + operator==(calcMut()); + + fixedValueFvPatchScalarField::updateCoeffs(); +} + + +void mutWallFunctionFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + writeLocalEntries(os); + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H similarity index 58% rename from src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H index 95de3d0230..fb40664570 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H @@ -22,19 +22,20 @@ License along with OpenFOAM. If not, see . Class - alphaSgsWallFunctionFvPatchScalarField + Foam::compressible::RASModels::mutWallFunctionFvPatchScalarField Description - Boundary condition for thermal diffusivity when using wall functions + Boundary condition for turbulent (kinematic) viscosity when using wall + functions, based on turbulence kinetic energy. - replicates OpenFOAM v1.5 (and earlier) behaviour SourceFiles - alphaSgsWallFunctionFvPatchScalarField.C + mutWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef alphaSgsWallFunctionFvPatchScalarField_H -#define alphaSgsWallFunctionFvPatchScalarField_H +#ifndef compressibleMutWallFunctionFvPatchScalarField_H +#define compressibleMutWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -44,112 +45,119 @@ namespace Foam { namespace compressible { -namespace LESModels +namespace RASModels { /*---------------------------------------------------------------------------*\ - Class alphaSgsWallFunctionFvPatchScalarField Declaration + Class mutWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class alphaSgsWallFunctionFvPatchScalarField +class mutWallFunctionFvPatchScalarField : public fixedValueFvPatchScalarField { - // Private data +protected: - //- Turbulent Prandtl number - scalar Prt_; + // Protected data + + //- Cmu coefficient + scalar Cmu_; + + //- Von Karman constant + scalar kappa_; + + //- E coefficient + scalar E_; + + //- Y+ at the edge of the laminar sublayer + scalar yPlusLam_; - // Private Member Functions + // Protected Member Functions //- Check the type of the patch - void checkType(); + virtual void checkType(); + + //- Calculate the turbulence viscosity + virtual tmp calcMut() const = 0; + + //- Write local wall function variables + virtual void writeLocalEntries(Ostream&) const; public: //- Runtime type information - TypeName("alphaSgsWallFunction"); + TypeName("mutWallFunction"); // Constructors //- Construct from patch and internal field - alphaSgsWallFunctionFvPatchScalarField + mutWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - alphaSgsWallFunctionFvPatchScalarField + mutWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given alphaSgsWallFunctionFvPatchScalarField + //- Construct by mapping given + // mutWallFunctionFvPatchScalarField // onto a new patch - alphaSgsWallFunctionFvPatchScalarField + mutWallFunctionFvPatchScalarField ( - const alphaSgsWallFunctionFvPatchScalarField&, + const mutWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - alphaSgsWallFunctionFvPatchScalarField + mutWallFunctionFvPatchScalarField ( - const alphaSgsWallFunctionFvPatchScalarField& + const mutWallFunctionFvPatchScalarField& ); - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new alphaSgsWallFunctionFvPatchScalarField(*this) - ); - } - //- Construct as copy setting internal field reference - alphaSgsWallFunctionFvPatchScalarField + mutWallFunctionFvPatchScalarField ( - const alphaSgsWallFunctionFvPatchScalarField&, + const mutWallFunctionFvPatchScalarField&, const DimensionedField& ); - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new alphaSgsWallFunctionFvPatchScalarField(*this, iF) - ); - } - // Member functions + //- Calculate the Y+ at the edge of the laminar sublayer + static scalar yPlusLam(const scalar kappa, const scalar E); + + //- Calculate and return the yPlus at the boundary + virtual tmp yPlus() const = 0; + + // Evaluation functions - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::Pstream::blocking - ); + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESModels +} // End namespace RASModels } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C index 62458f329b..222c90ab8a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C @@ -65,14 +65,16 @@ scalar mutkRoughWallFunctionFvPatchScalarField::fnRough tmp mutkRoughWallFunctionFvPatchScalarField::calcMut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const tmp tk = rasModel.k(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + + const scalarField& y = turbModel.y()[patchi]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const tmp tk = turbModel.k(); const volScalarField& k = tk(); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; const scalar Cmu25 = pow025(Cmu_); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C index 5f303b0721..e57efb039b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C @@ -41,46 +41,16 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -void mutkWallFunctionFvPatchScalarField::checkType() -{ - if (!isA(patch())) - { - FatalErrorIn("mutkWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -scalar mutkWallFunctionFvPatchScalarField::calcYPlusLam -( - const scalar kappa, - const scalar E -) const -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(E*ypl)/kappa; - } - - return ypl; -} - - tmp mutkWallFunctionFvPatchScalarField::calcMut() const { - const label patchI = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const tmp tk = rasModel.k(); + const label patchi = patch().index(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const tmp tk = turbModel.k(); const volScalarField& k = tk(); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; const scalar Cmu25 = pow025(Cmu_); @@ -104,14 +74,6 @@ tmp mutkWallFunctionFvPatchScalarField::calcMut() const } -void mutkWallFunctionFvPatchScalarField::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; -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField @@ -120,11 +82,7 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField const DimensionedField& iF ) : - fixedValueFvPatchScalarField(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - yPlusLam_(calcYPlusLam(kappa_, E_)) + mutWallFunctionFvPatchScalarField(p, iF) {} @@ -136,11 +94,7 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - yPlusLam_(ptf.yPlusLam_) + mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -151,11 +105,7 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField const dictionary& dict ) : - fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), - yPlusLam_(calcYPlusLam(kappa_, E_)) + mutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -164,11 +114,7 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField const mutkWallFunctionFvPatchScalarField& wfpsf ) : - fixedValueFvPatchScalarField(wfpsf), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) + mutWallFunctionFvPatchScalarField(wfpsf) {} @@ -178,54 +124,30 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField const DimensionedField& iF ) : - fixedValueFvPatchScalarField(wfpsf, iF), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) + mutWallFunctionFvPatchScalarField(wfpsf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void mutkWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - operator==(calcMut()); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - tmp mutkWallFunctionFvPatchScalarField::yPlus() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; - const tmp tk = rasModel.k(); + const tmp tk = turbModel.k(); const volScalarField& k = tk(); - const scalarField kwc(k.boundaryField()[patchI].patchInternalField()); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const scalarField kwc(k.boundaryField()[patchi].patchInternalField()); + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; return pow025(Cmu_)*y*sqrt(kwc)/(muw/rhow); } -void mutkWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePatchTypeField @@ -234,6 +156,7 @@ makePatchTypeField mutkWallFunctionFvPatchScalarField ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace RASModels diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H index 9a686f8ad6..07bf997392 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H @@ -37,7 +37,7 @@ SourceFiles #ifndef compressibleMutkWallFunctionFvPatchScalarField_H #define compressibleMutkWallFunctionFvPatchScalarField_H -#include "fixedValueFvPatchFields.H" +#include "mutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,39 +54,15 @@ namespace RASModels class mutkWallFunctionFvPatchScalarField : - public fixedValueFvPatchScalarField + public mutWallFunctionFvPatchScalarField { protected: - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - // Protected Member Functions - //- Check the type of the patch - virtual void checkType(); - - //- Calculate the Y+ at the edge of the laminar sublayer - virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const; - //- Calculate the turbulence viscosity virtual tmp calcMut() const; - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - public: @@ -163,15 +139,6 @@ public: //- Calculate and return the yPlus at the boundary virtual tmp yPlus() const; - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - // I-O - - //- Write - virtual void write(Ostream&) const; }; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index c8f5085445..d681b7af72 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -28,6 +28,7 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" +#include "mutWallFunctionFvPatchScalarField.H" #include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,23 +56,6 @@ void omegaWallFunctionFvPatchScalarField::checkType() } -scalar omegaWallFunctionFvPatchScalarField::calcYPlusLam -( - const scalar kappa, - const scalar E -) const -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(E*ypl)/kappa; - } - - return ypl; -} - - void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { writeEntryIfDifferent(os, "G", "RASModel::G", GName_); @@ -96,7 +80,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField kappa_(0.41), E_(9.8), beta1_(0.075), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(mutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); @@ -136,7 +120,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField kappa_(dict.lookupOrDefault("kappa", 0.41)), E_(dict.lookupOrDefault("E", 9.8)), beta1_(dict.lookupOrDefault("beta1", 0.075)), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(mutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index 64faf11f64..9e9dc6f893 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H @@ -98,9 +98,6 @@ protected: //- Check the type of the patch virtual void checkType(); - //- Calculate the Y+ at the edge of the laminar sublayer - virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const; - //- Write local wall function variables virtual void writeLocalEntries(Ostream&) const; diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 6d998d74a4..4adcfb723e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -68,7 +68,9 @@ turbulenceModel::turbulenceModel rho_(rho), U_(U), phi_(phi), - thermophysicalModel_(thermophysicalModel) + thermophysicalModel_(thermophysicalModel), + + y_(mesh_) {} @@ -137,7 +139,12 @@ tmp turbulenceModel::rhoEpsilonEff() const void turbulenceModel::correct() -{} +{ + if (mesh_.changing()) + { + y_.correct(); + } +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 464b70d85e..790e6e99e4 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -49,6 +49,7 @@ SourceFiles #include "surfaceFieldsFwd.H" #include "fvMatricesFwd.H" #include "basicThermo.H" +#include "nearWallDist.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -85,6 +86,9 @@ protected: const basicThermo& thermophysicalModel_; + //- Near wall distance boundary field + nearWallDist y_; + private: @@ -178,6 +182,12 @@ public: return thermophysicalModel_; } + //- Return the near wall distances + const nearWallDist& y() const + { + return y_; + } + //- Return the laminar viscosity const volScalarField& mu() const { diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs index 16b4384a8e..c417948180 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs @@ -32,14 +32,14 @@ boundaryField upperWall { - type alphaSgsJayatillekeWallFunction; + type alphatJayatillekeWallFunction; he ha; value uniform 0; } lowerWall { - type alphaSgsJayatillekeWallFunction; + type alphatJayatillekeWallFunction; he ha; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs index a6e489dcf1..cec3a41ed6 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs @@ -32,13 +32,13 @@ boundaryField upperWall { - type muSgsUSpaldingWallFunction; + type mutUSpaldingWallFunction; value uniform 0; } lowerWall { - type muSgsUSpaldingWallFunction; + type mutUSpaldingWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs index 1a913f8b78..07d5fba6de 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs @@ -31,13 +31,13 @@ boundaryField } upperWall { - type alphaSgsJayatillekeWallFunction; + type alphatJayatillekeWallFunction; he ha; value uniform 0; } lowerWall { - type alphaSgsJayatillekeWallFunction; + type alphatJayatillekeWallFunction; he ha; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs index 127f76d8cb..684139326d 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs @@ -31,12 +31,12 @@ boundaryField } upperWall { - type muSgsUSpaldingWallFunction; + type mutUSpaldingWallFunction; value uniform 0; } lowerWall { - type muSgsUSpaldingWallFunction; + type mutUSpaldingWallFunction; value uniform 0; } front diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs index 4da8c755f2..f50fb4a481 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs @@ -23,7 +23,7 @@ boundaryField { ground { - type alphaSgsWallFunction; + type alphatWallFunction; value uniform 0; } @@ -44,7 +44,7 @@ boundaryField "(region0_to.*)" { - type alphaSgsWallFunction; + type alphatWallFunction; value uniform 0; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs index 16cb592081..cf1d551364 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs @@ -43,7 +43,7 @@ boundaryField "(region0_to.*)" { - type muSgsUSpaldingWallFunction; + type mutUSpaldingWallFunction; value uniform 0; } } From d21b61a88370e37fdc843d0b1a6e22cc02531d73 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 3 Jul 2012 14:00:21 +0100 Subject: [PATCH 3/4] Updated headers --- .../postProcessing/wall/yPlusRAS/Make/options | 2 +- .../postProcessing/wall/yPlusRAS/yPlusRAS.C | 8 +-- .../utilities/yPlusRAS/yPlusRAS.C | 8 +-- .../compressible/LES/LESModel/LESModel.C | 2 +- .../compressible/RAS/RASModel/RASModel.C | 2 +- ...onvectiveHeatTransferFvPatchScalarField.C} | 50 +++++++++++-------- ...onvectiveHeatTransferFvPatchScalarField.H} | 32 ++++++------ .../epsilonWallFunctionFvPatchScalarField.C | 2 +- .../epsilonWallFunctionFvPatchScalarField.H | 2 +- .../mutLowReWallFunctionFvPatchScalarField.C | 2 +- .../mutLowReWallFunctionFvPatchScalarField.H | 2 +- .../mutURoughWallFunctionFvPatchScalarField.C | 2 +- .../mutURoughWallFunctionFvPatchScalarField.H | 2 +- ...tUSpaldingWallFunctionFvPatchScalarField.C | 2 +- ...tUSpaldingWallFunctionFvPatchScalarField.H | 2 +- .../mutUWallFunctionFvPatchScalarField.C | 2 +- .../mutUWallFunctionFvPatchScalarField.H | 2 +- .../mutWallFunctionFvPatchScalarField.C | 2 +- .../mutWallFunctionFvPatchScalarField.H | 2 +- .../mutkRoughWallFunctionFvPatchScalarField.C | 2 +- .../mutkWallFunctionFvPatchScalarField.C | 2 +- .../mutkWallFunctionFvPatchScalarField.H | 2 +- .../omegaWallFunctionFvPatchScalarField.C | 2 +- .../omegaWallFunctionFvPatchScalarField.H | 2 +- .../turbulenceModel/turbulenceModel.C | 2 +- .../fixedShearStressFvPatchVectorField.C | 2 +- ...ayatillekeWallFunctionFvPatchScalarField.C | 2 +- .../hotBoxes/0.org/htcConv | 2 +- 28 files changed, 76 insertions(+), 70 deletions(-) rename src/turbulenceModels/compressible/RAS/derivedFvPatchFields/{htcConv/htcConvFvPatchScalarField.C => convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C} (69%) rename src/turbulenceModels/compressible/RAS/derivedFvPatchFields/{htcConv/htcConvFvPatchScalarField.H => convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H} (80%) diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options index 888f9e440e..55e668ee86 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options @@ -2,8 +2,8 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index 7af0a901af..5b0c4b4957 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -37,11 +37,11 @@ Description #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/RAS/RASModel/RASModel.H" -#include "nutkWallFunction/nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H" #include "basicThermo.H" #include "compressible/RAS/RASModel/RASModel.H" -#include "mutkWallFunction/mutkWallFunctionFvPatchScalarField.H" +#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H" #include "wallDist.H" @@ -55,7 +55,7 @@ void calcIncompressibleYPlus volScalarField& yPlus ) { - typedef incompressible::RASModels::nutkWallFunctionFvPatchScalarField + typedef incompressible::RASModels::nutWallFunctionFvPatchScalarField wallFunctionPatchField; #include "createPhi.H" @@ -107,7 +107,7 @@ void calcCompressibleYPlus volScalarField& yPlus ) { - typedef compressible::RASModels::mutkWallFunctionFvPatchScalarField + typedef compressible::RASModels::mutWallFunctionFvPatchScalarField wallFunctionPatchField; IOobject rhoHeader diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C index 81bb1df7ec..104a6f58e5 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C @@ -27,10 +27,10 @@ License #include "volFields.H" #include "incompressible/RAS/RASModel/RASModel.H" -#include "nutkWallFunction/nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H" #include "compressible/RAS/RASModel/RASModel.H" -#include "mutkWallFunction/mutkWallFunctionFvPatchScalarField.H" +#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H" #include "wallDist.H" @@ -92,7 +92,7 @@ void Foam::yPlusRAS::calcIncompressibleYPlus volScalarField& yPlus ) { - typedef incompressible::RASModels::nutkWallFunctionFvPatchScalarField + typedef incompressible::RASModels::nutWallFunctionFvPatchScalarField wallFunctionPatchField; const incompressible::RASModel& model = @@ -150,7 +150,7 @@ void Foam::yPlusRAS::calcCompressibleYPlus volScalarField& yPlus ) { - typedef compressible::RASModels::mutkWallFunctionFvPatchScalarField + typedef compressible::RASModels::mutWallFunctionFvPatchScalarField wallFunctionPatchField; const compressible::RASModel& model = diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index e3ecd7ef7a..7f7b86d1bb 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index b5e53288a1..26878b8bc6 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C similarity index 69% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C index 0a427a3f1a..c747a97b84 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "htcConvFvPatchScalarField.H" +#include "convectiveHeatTransferFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "addToRunTimeSelectionTable.H" @@ -39,7 +39,8 @@ namespace RASModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -htcConvFvPatchScalarField::htcConvFvPatchScalarField +convectiveHeatTransferFvPatchScalarField:: +convectiveHeatTransferFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -50,9 +51,10 @@ htcConvFvPatchScalarField::htcConvFvPatchScalarField {} -htcConvFvPatchScalarField::htcConvFvPatchScalarField +convectiveHeatTransferFvPatchScalarField:: +convectiveHeatTransferFvPatchScalarField ( - const htcConvFvPatchScalarField& ptf, + const convectiveHeatTransferFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -63,7 +65,8 @@ htcConvFvPatchScalarField::htcConvFvPatchScalarField {} -htcConvFvPatchScalarField::htcConvFvPatchScalarField +convectiveHeatTransferFvPatchScalarField:: +convectiveHeatTransferFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -75,9 +78,10 @@ htcConvFvPatchScalarField::htcConvFvPatchScalarField {} -htcConvFvPatchScalarField::htcConvFvPatchScalarField +convectiveHeatTransferFvPatchScalarField:: +convectiveHeatTransferFvPatchScalarField ( - const htcConvFvPatchScalarField& htcpsf + const convectiveHeatTransferFvPatchScalarField& htcpsf ) : fixedValueFvPatchScalarField(htcpsf), @@ -85,9 +89,10 @@ htcConvFvPatchScalarField::htcConvFvPatchScalarField {} -htcConvFvPatchScalarField::htcConvFvPatchScalarField +convectiveHeatTransferFvPatchScalarField:: +convectiveHeatTransferFvPatchScalarField ( - const htcConvFvPatchScalarField& htcpsf, + const convectiveHeatTransferFvPatchScalarField& htcpsf, const DimensionedField& iF ) : @@ -98,24 +103,25 @@ htcConvFvPatchScalarField::htcConvFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void htcConvFvPatchScalarField::updateCoeffs() +void convectiveHeatTransferFvPatchScalarField::updateCoeffs() { if (updated()) { return; } - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField alphaEffw(rasModel.alphaEff(patchI)); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const vectorField& Uc = rasModel.U(); - const vectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField& Tw = rasModel.thermo().T().boundaryField()[patchI]; - const scalarField& pw = rasModel.thermo().p().boundaryField()[patchI]; - const scalarField Cpw(rasModel.thermo().Cp(pw, Tw, patchI)); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField alphaEffw(turbModel.alphaEff(patchi)); + const scalarField& muw = turbModel.mu().boundaryField()[patchi]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const vectorField& Uc = turbModel.U(); + const vectorField& Uw = turbModel.U().boundaryField()[patchi]; + const scalarField& Tw = turbModel.thermo().T().boundaryField()[patchi]; + const scalarField& pw = turbModel.thermo().p().boundaryField()[patchi]; + const scalarField Cpw(turbModel.thermo().Cp(pw, Tw, patchi)); const scalarField kappaw(Cpw*alphaEffw); const scalarField Pr(muw*Cpw/kappaw); @@ -141,7 +147,7 @@ void htcConvFvPatchScalarField::updateCoeffs() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void htcConvFvPatchScalarField::write(Ostream& os) const +void convectiveHeatTransferFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); os.writeKeyword("L") << L_ << token::END_STATEMENT << nl; @@ -154,7 +160,7 @@ void htcConvFvPatchScalarField::write(Ostream& os) const makePatchTypeField ( fvPatchScalarField, - htcConvFvPatchScalarField + convectiveHeatTransferFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H similarity index 80% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H index 0b5a4d228c..fc8cb2c153 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H @@ -22,13 +22,13 @@ License along with OpenFOAM. If not, see . Class - Foam::compressible::RASModels::htcConvFvPatchScalarField + Foam::compressible::RASModels::convectiveHeatTransferFvPatchScalarField Description Convective heat transfer boundary condition SourceFiles - htcConvFvPatchScalarField.C + convectiveHeatTransferFvPatchScalarField.C \*---------------------------------------------------------------------------*/ @@ -47,10 +47,10 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class htcConvFvPatchScalarField Declaration + Class convectiveHeatTransferFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class htcConvFvPatchScalarField +class convectiveHeatTransferFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -65,20 +65,20 @@ protected: public: //- Runtime type information - TypeName("htcConvection"); + TypeName("convectiveHeatTransfer"); // Constructors //- Construct from patch and internal field - htcConvFvPatchScalarField + convectiveHeatTransferFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - htcConvFvPatchScalarField + convectiveHeatTransferFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -86,20 +86,20 @@ public: ); //- Construct by mapping given - // htcConvFvPatchScalarField + // convectiveHeatTransferFvPatchScalarField // onto a new patch - htcConvFvPatchScalarField + convectiveHeatTransferFvPatchScalarField ( - const htcConvFvPatchScalarField&, + const convectiveHeatTransferFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - htcConvFvPatchScalarField + convectiveHeatTransferFvPatchScalarField ( - const htcConvFvPatchScalarField& + const convectiveHeatTransferFvPatchScalarField& ); //- Construct and return a clone @@ -107,14 +107,14 @@ public: { return tmp ( - new htcConvFvPatchScalarField(*this) + new convectiveHeatTransferFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - htcConvFvPatchScalarField + convectiveHeatTransferFvPatchScalarField ( - const htcConvFvPatchScalarField&, + const convectiveHeatTransferFvPatchScalarField&, const DimensionedField& ); @@ -126,7 +126,7 @@ public: { return tmp ( - new htcConvFvPatchScalarField(*this, iF) + new convectiveHeatTransferFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index dac735f160..edd4dea763 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index f473bc3c4c..d523c8d38f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C index 6cab8e9f37..5eee5c2702 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H index 027e5d8b0b..bbed4a8bbf 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C index a6ef3c41b3..f5571451a1 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H index 52dac81fbd..05f82c57f6 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C index b8f9a7beee..4a4691c12c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H index a014036ca0..4157f384a1 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C index a1f91801eb..85efec0327 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H index 4ac7886329..6071a32128 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C index 9825f014c1..6f0dbb1a9f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H index fb40664570..ab0478508f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C index 222c90ab8a..cc04471f4f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C index e57efb039b..9aeb96b297 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H index 07bf997392..0aa935d59b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index d681b7af72..3fb0f1c36b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index 9e9dc6f893..db1b91b688 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 4adcfb723e..111cd2a536 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C index 9bb31c8fa1..c5a2c5f8e8 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C index 2700a816a9..a87f311441 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kappatWallFunctions/kappatJayatillekeWallFunction/kappatJayatillekeWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/htcConv b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/htcConv index 4546c74039..d1baf0bd37 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/htcConv +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/htcConv @@ -28,7 +28,7 @@ boundaryField } wallFilm { - type htcConvection; + type convectiveHeatTransfer; L 1.0; value uniform 0; } From ccf4bbc8e9c1bd51940981c15bb089aa3b37e36b Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 3 Jul 2012 14:00:39 +0100 Subject: [PATCH 4/4] Corrected line lengths --- .../convectiveHeatTransferFvPatchScalarField.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H index fc8cb2c153..8731d01a6e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License