diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index d02da85df5..09d945fc4a 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -34,6 +34,7 @@ Description #include "LESModel.H" #include "nearWallDist.H" #include "wallDist.H" +#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C index c93f42c3e8..433af459ec 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C +++ b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C @@ -30,7 +30,7 @@ License #include "compressible/LES/LESModel/LESModel.H" #include "wallFvPatch.H" #include "nearWallDist.H" -//#include "wallDist.H" + // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 382ae9d9d2..3cba1c064f 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -53,7 +53,6 @@ SourceFiles #include "fvc.H" #include "fvMatrices.H" #include "incompressible/transportModel/transportModel.H" -#include "wallFvPatch.H" #include "bound.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" diff --git a/src/turbulenceModels/incompressible/LES/Make/files b/src/turbulenceModels/incompressible/LES/Make/files index eadcf1a99f..aff6654ead 100644 --- a/src/turbulenceModels/incompressible/LES/Make/files +++ b/src/turbulenceModels/incompressible/LES/Make/files @@ -28,10 +28,4 @@ mixedSmagorinsky/mixedSmagorinsky.C kOmegaSSTSAS/kOmegaSSTSAS.C -/* Wall functions */ -wallFunctions=derivedFvPatchFields/wallFunctions - -nuSgsWallFunctions=$(wallFunctions)/nuSgsWallFunctions -$(nuSgsWallFunctions)/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C - LIB = $(FOAM_LIBBIN)/libincompressibleLESModels diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C deleted file mode 100644 index 73b89be91d..0000000000 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,199 +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 "nuSgsUSpaldingWallFunctionFvPatchScalarField.H" -#include "LESModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nuSgsUSpaldingWallFunctionFvPatchScalarField:: -nuSgsUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF), - kappa_(0.41), - E_(9.8) -{} - - -nuSgsUSpaldingWallFunctionFvPatchScalarField:: -nuSgsUSpaldingWallFunctionFvPatchScalarField -( - const nuSgsUSpaldingWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - kappa_(ptf.kappa_), - E_(ptf.E_) -{} - - -nuSgsUSpaldingWallFunctionFvPatchScalarField:: -nuSgsUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) -{} - - -nuSgsUSpaldingWallFunctionFvPatchScalarField:: -nuSgsUSpaldingWallFunctionFvPatchScalarField -( - const nuSgsUSpaldingWallFunctionFvPatchScalarField& nwfpsf -) -: - fixedValueFvPatchScalarField(nwfpsf), - kappa_(nwfpsf.kappa_), - E_(nwfpsf.E_) -{} - - -nuSgsUSpaldingWallFunctionFvPatchScalarField:: -nuSgsUSpaldingWallFunctionFvPatchScalarField -( - const nuSgsUSpaldingWallFunctionFvPatchScalarField& nwfpsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(nwfpsf, iF), - kappa_(nwfpsf.kappa_), - E_(nwfpsf.E_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes -) -{ - const LESModel& lesModel = db().lookupObject("LESProperties"); - const label patchi = patch().index(); - const fvPatchVectorField& U = lesModel.U().boundaryField()[patchi]; - const scalarField nuw = lesModel.nu()().boundaryField()[patchi]; - - const scalarField& ry = patch().deltaCoeffs(); - - const scalarField magUp(mag(U.patchInternalField() - U)); - - scalarField& nuSgsw = *this; - - const scalarField magFaceGradU(mag(U.snGrad())); - - forAll(nuSgsw, facei) - { - scalar magUpara = magUp[facei]; - - scalar utau = sqrt((nuSgsw[facei] + nuw[facei])*magFaceGradU[facei]); - - if (utau > VSMALL) - { - int iter = 0; - scalar err = GREAT; - - do - { - scalar kUu = min(kappa_*magUpara/utau, 50); - scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); - - scalar f = - - utau/(ry[facei]*nuw[facei]) - + magUpara/utau - + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); - - scalar df = - - 1.0/(ry[facei]*nuw[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); - - nuSgsw[facei] = - max(sqr(max(utau, 0))/magFaceGradU[facei] - nuw[facei], 0.0); - } - else - { - nuSgsw[facei] = 0; - } - } - - fixedValueFvPatchScalarField::evaluate(); -} - - -void nuSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField::write(os); - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nuSgsUSpaldingWallFunctionFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H deleted file mode 100644 index 11de1fb06f..0000000000 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,165 +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::incompressible::LESModels:: - nuSgsUSpaldingWallFunctionFvPatchScalarField - -Description - Wall function boundary condition for walls, based on velocity, using - Spaldings law to give a continuous nuSgs profile to the wall (y+ = 0) - -SourceFiles - nuSgsUSpaldingWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nuSgsUSpaldingWallFunctionFvPatchScalarField_H -#define nuSgsUSpaldingWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class nuSgsUSpaldingWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nuSgsUSpaldingWallFunctionFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - // Private data - - //- Von Karman constant - scalar kappa_; - - //- E constant - scalar E_; - - -public: - - //- Runtime type information - TypeName("nuSgsUSpaldingWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nuSgsUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - nuSgsUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // nuSgsUSpaldingWallFunctionFvPatchScalarField - // onto a new patch - nuSgsUSpaldingWallFunctionFvPatchScalarField - ( - const nuSgsUSpaldingWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nuSgsUSpaldingWallFunctionFvPatchScalarField - ( - const nuSgsUSpaldingWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new nuSgsUSpaldingWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nuSgsUSpaldingWallFunctionFvPatchScalarField - ( - const nuSgsUSpaldingWallFunctionFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new nuSgsUSpaldingWallFunctionFvPatchScalarField(*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 incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/Make/files b/src/turbulenceModels/incompressible/RAS/Make/files index d667a8b26e..b76fb0c411 100644 --- a/src/turbulenceModels/incompressible/RAS/Make/files +++ b/src/turbulenceModels/incompressible/RAS/Make/files @@ -22,14 +22,17 @@ kkLOmega/kkLOmega.C wallFunctions = derivedFvPatchFields/wallFunctions nutWallFunctions = $(wallFunctions)/nutWallFunctions -$(nutWallFunctions)/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutWallFunction/nutWallFunctionFvPatchScalarField.C + $(nutWallFunctions)/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C + $(nutWallFunctions)/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C $(nutWallFunctions)/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C $(nutWallFunctions)/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions $(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C index 09c025dc02..33cc03edac 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C @@ -26,6 +26,7 @@ License #include "NonlinearKEShih.H" #include "addToRunTimeSelectionTable.H" #include "wallFvPatch.H" +#include "nutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 29b6b72836..e01730b9f5 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "RASModel.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,9 +81,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); @@ -156,57 +153,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()) - /nu()().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() { turbulenceModel::correct(); - - if (turbulence_ && mesh_.changing()) - { - y_.correct(); - } } diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index 60fc04c286..0fe2b7c958 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -44,7 +44,6 @@ SourceFiles #include "incompressible/turbulenceModel/turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" -#include "nearWallDist.H" #include "fvm.H" #include "fvc.H" #include "fvMatrices.H" @@ -94,9 +93,6 @@ protected: //- Lower limit for omega dimensionedScalar omegaMin_; - //- Near wall distance boundary field - nearWallDist y_; - // Protected Member Functions @@ -208,15 +204,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 { @@ -233,13 +220,6 @@ public: ); } - //- 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/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 1126dff8f2..753ba8ae13 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -29,6 +29,8 @@ License #include "volFields.H" #include "addToRunTimeSelectionTable.H" #include "wallFvPatch.H" +#include "nutkWallFunctionFvPatchScalarField.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,23 +57,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 +79,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField Cmu_(0.09), kappa_(0.41), E_(9.8), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(nutkWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); } @@ -131,7 +116,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_(nutkWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index 08ab779aaf..95bbb2a18b 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -82,9 +82,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/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C index f46370799b..8e9c98fa9f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C @@ -54,7 +54,7 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(p, iF) + nutWallFunctionFvPatchScalarField(p, iF) {} @@ -66,7 +66,7 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -77,7 +77,7 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField const dictionary& dict ) : - nutkWallFunctionFvPatchScalarField(p, iF, dict) + nutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -86,7 +86,7 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField const nutLowReWallFunctionFvPatchScalarField& nlrwfpsf ) : - nutkWallFunctionFvPatchScalarField(nlrwfpsf) + nutWallFunctionFvPatchScalarField(nlrwfpsf) {} @@ -96,10 +96,27 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(nlrwfpsf, iF) + nutWallFunctionFvPatchScalarField(nlrwfpsf, iF) {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +tmp nutLowReWallFunctionFvPatchScalarField::yPlus() const +{ + const label patchi = patch().index(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const tmp tnu = turbModel.nu(); + const volScalarField& nu = tnu(); + const scalarField& nuw = nu.boundaryField()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + + return y*sqrt(nuw*mag(Uw.snGrad()))/nuw; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePatchTypeField diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H index 7f847e39ea..663817b1ec 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H @@ -38,7 +38,7 @@ SourceFiles #ifndef nutLowReWallFunctionFvPatchScalarField_H #define nutLowReWallFunctionFvPatchScalarField_H -#include "nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +55,7 @@ namespace RASModels class nutLowReWallFunctionFvPatchScalarField : - public nutkWallFunctionFvPatchScalarField + public nutWallFunctionFvPatchScalarField { protected: @@ -132,6 +132,12 @@ public: new nutLowReWallFunctionFvPatchScalarField(*this, iF) ); } + + + // Member functions + + //- Calculate and return the yPlus at the boundary + virtual tmp yPlus() const; }; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C index c203b720d8..4be408474d 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C @@ -42,14 +42,15 @@ namespace RASModels tmp nutURoughWallFunctionFvPatchScalarField::calcNut() 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 tmp tnu = rasModel.nu(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; // The flow velocity at the adjacent cell centre const scalarField magUp(mag(Uw.patchInternalField() - Uw)); @@ -78,13 +79,14 @@ tmp nutURoughWallFunctionFvPatchScalarField::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 tmp tnu = rasModel.nu(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; tmp tyPlus(new scalarField(patch().size(), 0.0)); scalarField& yPlus = tyPlus(); @@ -200,7 +202,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(p, iF), + nutWallFunctionFvPatchScalarField(p, iF), roughnessHeight_(pTraits::zero), roughnessConstant_(pTraits::zero), roughnessFactor_(pTraits::zero) @@ -215,7 +217,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), roughnessHeight_(ptf.roughnessHeight_), roughnessConstant_(ptf.roughnessConstant_), roughnessFactor_(ptf.roughnessFactor_) @@ -229,7 +231,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField const dictionary& dict ) : - nutkWallFunctionFvPatchScalarField(p, iF, dict), + nutWallFunctionFvPatchScalarField(p, iF, dict), roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) @@ -241,7 +243,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField const nutURoughWallFunctionFvPatchScalarField& rwfpsf ) : - nutkWallFunctionFvPatchScalarField(rwfpsf), + nutWallFunctionFvPatchScalarField(rwfpsf), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), roughnessFactor_(rwfpsf.roughnessFactor_) @@ -254,7 +256,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(rwfpsf, iF), + nutWallFunctionFvPatchScalarField(rwfpsf, iF), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), roughnessFactor_(rwfpsf.roughnessFactor_) @@ -265,10 +267,11 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField tmp nutURoughWallFunctionFvPatchScalarField::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]; tmp magUp = mag(Uw.patchInternalField() - Uw); return calcYPlus(magUp()); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H index f615fdd879..10851aa6d1 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H @@ -35,7 +35,7 @@ SourceFiles #ifndef nutURoughWallFunctionFvPatchScalarField_H #define nutURoughWallFunctionFvPatchScalarField_H -#include "nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace RASModels class nutURoughWallFunctionFvPatchScalarField : - public nutkWallFunctionFvPatchScalarField + public nutWallFunctionFvPatchScalarField { // Private data diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C index 93b6376601..1fb0250b3e 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C @@ -42,14 +42,15 @@ namespace RASModels tmp nutUSpaldingWallFunctionFvPatchScalarField::calcNut() 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 tmp tnu = rasModel.nu(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; return max ( @@ -64,14 +65,15 @@ tmp nutUSpaldingWallFunctionFvPatchScalarField::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()]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const scalarField& nuw = rasModel.nu()().boundaryField()[patch().index()]; + const scalarField& nuw = turbModel.nu()().boundaryField()[patch().index()]; const scalarField& nutw = *this; tmp tuTau(new scalarField(patch().size(), 0.0)); @@ -124,7 +126,7 @@ nutUSpaldingWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(p, iF) + nutWallFunctionFvPatchScalarField(p, iF) {} @@ -137,7 +139,7 @@ nutUSpaldingWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -149,7 +151,7 @@ nutUSpaldingWallFunctionFvPatchScalarField const dictionary& dict ) : - nutkWallFunctionFvPatchScalarField(p, iF, dict) + nutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -159,7 +161,7 @@ nutUSpaldingWallFunctionFvPatchScalarField const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf ) : - nutkWallFunctionFvPatchScalarField(wfpsf) + nutWallFunctionFvPatchScalarField(wfpsf) {} @@ -170,7 +172,7 @@ nutUSpaldingWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(wfpsf, iF) + nutWallFunctionFvPatchScalarField(wfpsf, iF) {} @@ -178,14 +180,15 @@ nutUSpaldingWallFunctionFvPatchScalarField tmp nutUSpaldingWallFunctionFvPatchScalarField::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 tmp tnu = rasModel.nu(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; return y*calcUTau(mag(Uw.snGrad()))/nuw; } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H index a4c350b45c..85e5d3cf23 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H @@ -36,7 +36,7 @@ SourceFiles #ifndef nutUSpaldingWallFunctionFvPatchScalarField_H #define nutUSpaldingWallFunctionFvPatchScalarField_H -#include "nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,7 +53,7 @@ namespace RASModels class nutUSpaldingWallFunctionFvPatchScalarField : - public nutkWallFunctionFvPatchScalarField + public nutWallFunctionFvPatchScalarField { protected: diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C index 4bb2c1ea19..a1a9bb094c 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C @@ -42,16 +42,17 @@ namespace RASModels tmp nutUTabulatedWallFunctionFvPatchScalarField::calcNut() 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 turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); const scalarField magGradU(mag(Uw.snGrad())); - const tmp tnu = rasModel.nu(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; return max @@ -90,7 +91,7 @@ nutUTabulatedWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(p, iF), + nutWallFunctionFvPatchScalarField(p, iF), uPlusTableName_("undefined-uPlusTableName"), uPlusTable_ ( @@ -117,7 +118,7 @@ nutUTabulatedWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), uPlusTableName_(ptf.uPlusTableName_), uPlusTable_(ptf.uPlusTable_) {} @@ -131,7 +132,7 @@ nutUTabulatedWallFunctionFvPatchScalarField const dictionary& dict ) : - nutkWallFunctionFvPatchScalarField(p, iF, dict), + nutWallFunctionFvPatchScalarField(p, iF, dict), uPlusTableName_(dict.lookup("uPlusTable")), uPlusTable_ ( @@ -155,7 +156,7 @@ nutUTabulatedWallFunctionFvPatchScalarField const nutUTabulatedWallFunctionFvPatchScalarField& wfpsf ) : - nutkWallFunctionFvPatchScalarField(wfpsf), + nutWallFunctionFvPatchScalarField(wfpsf), uPlusTableName_(wfpsf.uPlusTableName_), uPlusTable_(wfpsf.uPlusTable_) {} @@ -168,7 +169,7 @@ nutUTabulatedWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(wfpsf, iF), + nutWallFunctionFvPatchScalarField(wfpsf, iF), uPlusTableName_(wfpsf.uPlusTableName_), uPlusTable_(wfpsf.uPlusTable_) {} @@ -178,15 +179,16 @@ nutUTabulatedWallFunctionFvPatchScalarField tmp nutUTabulatedWallFunctionFvPatchScalarField::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 turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const tmp tnu = rasModel.nu(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; const scalarField Rey(magUp*y/nuw); return Rey/(calcUPlus(Rey) + ROOTVSMALL); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H index 962528e685..32a6cf9ce2 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H @@ -39,7 +39,7 @@ SourceFiles #ifndef nutUTabulatedWallFunctionFvPatchScalarField_H #define nutUTabulatedWallFunctionFvPatchScalarField_H -#include "nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunctionFvPatchScalarField.H" #include "uniformInterpolationTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +57,7 @@ namespace RASModels class nutUTabulatedWallFunctionFvPatchScalarField : - public nutkWallFunctionFvPatchScalarField + public nutWallFunctionFvPatchScalarField { protected: diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C index 77fc20e46a..2348188b3a 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C @@ -42,14 +42,15 @@ namespace RASModels tmp nutUWallFunctionFvPatchScalarField::calcNut() 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 tmp tnu = rasModel.nu(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; tmp tyPlus = calcYPlus(magUp); scalarField& yPlus = tyPlus(); @@ -75,13 +76,14 @@ tmp nutUWallFunctionFvPatchScalarField::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 tmp tnu = rasModel.nu(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; tmp tyPlus(new scalarField(patch().size(), 0.0)); scalarField& yPlus = tyPlus(); @@ -118,7 +120,7 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(p, iF) + nutWallFunctionFvPatchScalarField(p, iF) {} @@ -130,7 +132,7 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField const fvPatchFieldMapper& mapper ) : - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} @@ -141,7 +143,7 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField const dictionary& dict ) : - nutkWallFunctionFvPatchScalarField(p, iF, dict) + nutWallFunctionFvPatchScalarField(p, iF, dict) {} @@ -150,7 +152,7 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField const nutUWallFunctionFvPatchScalarField& sawfpsf ) : - nutkWallFunctionFvPatchScalarField(sawfpsf) + nutWallFunctionFvPatchScalarField(sawfpsf) {} @@ -160,7 +162,7 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField const DimensionedField& iF ) : - nutkWallFunctionFvPatchScalarField(sawfpsf, iF) + nutWallFunctionFvPatchScalarField(sawfpsf, iF) {} @@ -168,9 +170,10 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField tmp nutUWallFunctionFvPatchScalarField::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/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H index a34ae08a01..e609ab41ab 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H @@ -35,7 +35,7 @@ SourceFiles #ifndef nutUWallFunctionFvPatchScalarField_H #define nutUWallFunctionFvPatchScalarField_H -#include "nutkWallFunctionFvPatchScalarField.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace RASModels class nutUWallFunctionFvPatchScalarField : - public nutkWallFunctionFvPatchScalarField + public nutWallFunctionFvPatchScalarField { protected: diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C index 9dc82a03ad..bb437a83c0 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C @@ -65,15 +65,16 @@ scalar nutkRoughWallFunctionFvPatchScalarField::fnRough tmp nutkRoughWallFunctionFvPatchScalarField::calcNut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const tmp tk = rasModel.k(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const tmp tk = turbModel.k(); const volScalarField& k = tk(); - const tmp tnu = rasModel.nu(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; const scalar Cmu25 = pow025(Cmu_); 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 157b88731a..f4bdbc15f9 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*---------------------------------------------------------------------------* \ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -55,34 +55,18 @@ void nutkWallFunctionFvPatchScalarField::checkType() } -scalar nutkWallFunctionFvPatchScalarField::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 nutkWallFunctionFvPatchScalarField::calcNut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const tmp tk = rasModel.k(); + const turbulenceModel& turbModel = + db().lookupObject("turbulenceModel"); + const scalarField& y = turbModel.y()[patchi]; + const tmp tk = turbModel.k(); const volScalarField& k = tk(); - const tmp tnu = rasModel.nu(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; const scalar Cmu25 = pow025(Cmu_); @@ -125,7 +109,7 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField Cmu_(0.09), kappa_(0.41), E_(9.8), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(yPlusLam(kappa_, E_)) { checkType(); } @@ -160,7 +144,7 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField Cmu_(dict.lookupOrDefault("Cmu", 0.09)), kappa_(dict.lookupOrDefault("kappa", 0.41)), E_(dict.lookupOrDefault("E", 9.8)), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(yPlusLam(kappa_, E_)) { checkType(); } @@ -199,6 +183,23 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * 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()) @@ -214,17 +215,18 @@ void nutkWallFunctionFvPatchScalarField::updateCoeffs() tmp nutkWallFunctionFvPatchScalarField::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(); - tmp kwc = k.boundaryField()[patchI].patchInternalField(); - const tmp tnu = rasModel.nu(); + tmp kwc = k.boundaryField()[patchi].patchInternalField(); + const tmp tnu = turbModel.nu(); const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; + const scalarField& nuw = nu.boundaryField()[patchi]; return pow025(Cmu_)*y*sqrt(kwc)/nuw; } 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 37bfc3681b..03b2c3f4f2 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H @@ -78,9 +78,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; - //- Calculate the turbulence viscosity virtual tmp calcNut() const; @@ -159,6 +156,10 @@ 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 diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 1b4409ca10..223308f2f4 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -29,6 +29,8 @@ License #include "volFields.H" #include "addToRunTimeSelectionTable.H" #include "wallFvPatch.H" +#include "nutkWallFunctionFvPatchScalarField.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,23 +57,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 +81,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField kappa_(0.41), E_(9.8), beta1_(0.075), - yPlusLam_(calcYPlusLam(kappa_, E_)) + yPlusLam_(nutkWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); } @@ -135,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_(nutkWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)) { checkType(); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index dd3d7fd482..714a2a12f3 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/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/incompressible/RAS/include/nonLinearWallFunctionsI.H b/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H index f5be257291..90b21921b7 100644 --- a/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H +++ b/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H @@ -33,7 +33,11 @@ Description { labelList cellBoundaryFaceCount(epsilon_.size(), 0); - scalar yPlusLam = this->yPlusLam(kappa_.value(), E_.value()); + scalar yPlusLam = nutkWallFunctionFvPatchScalarField::yPlusLam + ( + kappa_.value(), + E_.value() + ); const fvPatchList& patches = mesh_.boundary(); diff --git a/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H b/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H index 74e4846db6..659b7fd4b8 100644 --- a/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H +++ b/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H @@ -32,7 +32,11 @@ Description { const fvPatchList& patches = mesh_.boundary(); - const scalar yPlusLam = this->yPlusLam(kappa_.value(), E_.value()); + const scalar yPlusLam = nutkWallFunctionFvPatchScalarField::yPlusLam + ( + kappa_.value(), + E_.value() + ); const volScalarField nuLam(this->nu()); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index 8a351126e5..3eb291f88d 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -26,6 +26,7 @@ License #include "turbulenceModel.H" #include "volFields.H" #include "surfaceFields.H" +#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -65,7 +66,8 @@ turbulenceModel::turbulenceModel U_(U), phi_(phi), - transportModel_(transport) + transportModel_(transport), + y_(mesh_) {} @@ -127,6 +129,11 @@ autoPtr turbulenceModel::New void turbulenceModel::correct() { transportModel_.correct(); + + if (mesh_.changing()) + { + y_.correct(); + } } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index a39482e439..dbd171af27 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -48,6 +48,7 @@ SourceFiles #include "surfaceFieldsFwd.H" #include "fvMatricesFwd.H" #include "incompressible/transportModel/transportModel.H" +#include "nearWallDist.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -83,6 +84,9 @@ protected: transportModel& transportModel_; + //- Near wall distance boundary field + nearWallDist y_; + private: @@ -167,6 +171,12 @@ public: return transportModel_; } + //- Return the near wall distances + const nearWallDist& y() const + { + return y_; + } + //- Return the laminar viscosity inline tmp nu() const { diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs index de6bdb62f7..1894803025 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs @@ -40,7 +40,7 @@ boundaryField lowerWall { - type nuSgsUSpaldingWallFunction; + type nutUSpaldingWallFunction; value uniform 0.0544766; } @@ -51,7 +51,7 @@ boundaryField "motorBike_.*" { - type nuSgsUSpaldingWallFunction; + type nutUSpaldingWallFunction; value uniform 0.0544766; } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict index e252c42dda..6569a100b7 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict @@ -53,16 +53,16 @@ functions { functionObjectLibs ( "libfieldFunctionObjects.so" ); type readFields; - fields ( p U ); + fields (p U); } streamLines { type streamLine; outputControl outputTime; setFormat vtk; - U U; + UName U; trackForward true; - fields ( p U ); + fields (p U); lifeTime 10000; nSubCycle 5; cloudName particleTracks; @@ -71,8 +71,8 @@ functions { type uniform; axis x; - start ( -1.001 1e-07 0.0011 ); - end ( -1.001 1e-07 1.0011 ); + start (-1.001 1e-07 0.0011); + end (-1.001 1e-07 1.0011); nPoints 20; } } @@ -84,7 +84,20 @@ functions surfaceFormat vtk; fields ( p U ); interpolationScheme cellPoint; - surfaces ( yNormal { type cuttingPlane ; planeType pointAndNormal ; pointAndNormalDict { basePoint ( 0 0 0 ) ; normalVector ( 0 1 0 ) ; } interpolate true ; } ); + surfaces + ( + yNormal + { + type cuttingPlane; + planeType pointAndNormal; + pointAndNormalDict + { + basePoint (0 0 0); + normalVector (0 1 0); + } + interpolate true; + } + ); } forces { @@ -98,10 +111,10 @@ functions rhoName rhoInf; log true; rhoInf 1; - liftDir ( 0 0 1 ); - dragDir ( 1 0 0 ); - CofR ( 0.72 0 0 ); - pitchAxis ( 0 1 0 ); + liftDir (0 0 1); + dragDir (1 0 0); + CofR (0.72 0 0); + pitchAxis (0 1 0); magUInf 20; lRef 1.42; Aref 0.75;