1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "backwardsCompatibilityWallFunctions.H"
29 #include "calculatedFvPatchField.H"
30 #include "nutWallFunctionFvPatchScalarField.H"
31 #include "epsilonWallFunctionFvPatchScalarField.H"
32 #include "kqRWallFunctionFvPatchField.H"
33 #include "omegaWallFunctionFvPatchScalarField.H"
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 namespace incompressible
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 tmp<volScalarField> autoCreateNut
46 const word& fieldName,
53 mesh.time().timeName(),
60 if (nutHeader.headerOk())
62 return tmp<volScalarField>(new volScalarField(nutHeader, mesh));
66 Info<< "--> Creating " << fieldName
67 << " to employ run-time selectable wall functions" << endl;
69 const fvBoundaryMesh& bm = mesh.boundary();
71 wordList nutBoundaryTypes(bm.size());
75 if (isType<wallFvPatch>(bm[patchI]))
77 nutBoundaryTypes[patchI] =
78 RASModels::nutWallFunctionFvPatchScalarField::typeName;
82 nutBoundaryTypes[patchI] =
83 calculatedFvPatchField<scalar>::typeName;
87 tmp<volScalarField> nut
94 mesh.time().timeName(),
101 dimensionedScalar("zero", dimArea/dimTime, 0.0),
106 Info<< " Writing new " << fieldName << endl;
114 tmp<volScalarField> autoCreateEpsilon
116 const word& fieldName,
121 autoCreateWallFunctionField
124 RASModels::epsilonWallFunctionFvPatchScalarField
133 tmp<volScalarField> autoCreateOmega
135 const word& fieldName,
140 autoCreateWallFunctionField
143 RASModels::omegaWallFunctionFvPatchScalarField
152 tmp<volScalarField> autoCreateK
154 const word& fieldName,
159 autoCreateWallFunctionField
162 RASModels::kqRWallFunctionFvPatchField<scalar>
171 tmp<volScalarField> autoCreateQ
173 const word& fieldName,
178 autoCreateWallFunctionField
181 RASModels::kqRWallFunctionFvPatchField<scalar>
190 tmp<volSymmTensorField> autoCreateR
192 const word& fieldName,
197 autoCreateWallFunctionField
200 RASModels::kqRWallFunctionFvPatchField<symmTensor>
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 } // End namespace incompressible
212 } // End namespace Foam
214 // ************************************************************************* //