1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "backwardsCompatibilityWallFunctions.H"
28 #include "calculatedFvPatchField.H"
29 #include "nutWallFunctionFvPatchScalarField.H"
30 #include "nutLowReWallFunctionFvPatchScalarField.H"
31 #include "epsilonWallFunctionFvPatchScalarField.H"
32 #include "kqRWallFunctionFvPatchField.H"
33 #include "RWallFunctionFvPatchSymmTensorField.H"
34 #include "omegaWallFunctionFvPatchScalarField.H"
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace incompressible
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 tmp<volScalarField> autoCreateNut
47 const word& fieldName,
49 const objectRegistry& obj
55 mesh.time().timeName(),
62 if (nutHeader.headerOk())
64 return tmp<volScalarField>(new volScalarField(nutHeader, mesh));
68 Info<< "--> Creating " << fieldName
69 << " to employ run-time selectable wall functions" << endl;
71 const fvBoundaryMesh& bm = mesh.boundary();
73 wordList nutBoundaryTypes(bm.size());
77 if (bm[patchI].isWall())
79 nutBoundaryTypes[patchI] =
80 RASModels::nutWallFunctionFvPatchScalarField::typeName;
84 nutBoundaryTypes[patchI] =
85 calculatedFvPatchField<scalar>::typeName;
89 tmp<volScalarField> nut
96 mesh.time().timeName(),
103 dimensionedScalar("zero", dimArea/dimTime, 0.0),
108 Info<< " Writing new " << fieldName << endl;
116 tmp<volScalarField> autoCreateNut
118 const word& fieldName,
122 return autoCreateNut(fieldName, mesh, mesh);
126 tmp<volScalarField> autoCreateLowReNut
128 const word& fieldName,
130 const objectRegistry& obj
136 mesh.time().timeName(),
143 if (nutHeader.headerOk())
145 return tmp<volScalarField>(new volScalarField(nutHeader, mesh));
149 Info<< "--> Creating " << fieldName
150 << " to employ run-time selectable wall functions" << endl;
152 const fvBoundaryMesh& bm = mesh.boundary();
154 wordList nutBoundaryTypes(bm.size());
158 if (bm[patchI].isWall())
160 nutBoundaryTypes[patchI] =
161 RASModels::nutLowReWallFunctionFvPatchScalarField::typeName;
165 nutBoundaryTypes[patchI] =
166 calculatedFvPatchField<scalar>::typeName;
170 tmp<volScalarField> nut
177 mesh.time().timeName(),
184 dimensionedScalar("zero", dimArea/dimTime, 0.0),
189 Info<< " Writing new " << fieldName << endl;
197 tmp<volScalarField> autoCreateLowReNut
199 const word& fieldName,
203 return autoCreateLowReNut(fieldName, mesh, mesh);
207 tmp<volScalarField> autoCreateEpsilon
209 const word& fieldName,
211 const objectRegistry& obj
215 autoCreateWallFunctionField
218 RASModels::epsilonWallFunctionFvPatchScalarField
228 tmp<volScalarField> autoCreateEpsilon
230 const word& fieldName,
235 autoCreateWallFunctionField
238 RASModels::epsilonWallFunctionFvPatchScalarField
248 tmp<volScalarField> autoCreateOmega
250 const word& fieldName,
252 const objectRegistry& obj
256 autoCreateWallFunctionField
259 RASModels::omegaWallFunctionFvPatchScalarField
269 tmp<volScalarField> autoCreateOmega
271 const word& fieldName,
276 autoCreateWallFunctionField
279 RASModels::omegaWallFunctionFvPatchScalarField
289 tmp<volScalarField> autoCreateK
291 const word& fieldName,
293 const objectRegistry& obj
297 autoCreateWallFunctionField
300 RASModels::kqRWallFunctionFvPatchField<scalar>
310 tmp<volScalarField> autoCreateK
312 const word& fieldName,
317 autoCreateWallFunctionField
320 RASModels::kqRWallFunctionFvPatchField<scalar>
330 tmp<volScalarField> autoCreateQ
332 const word& fieldName,
334 const objectRegistry& obj
338 autoCreateWallFunctionField
341 RASModels::kqRWallFunctionFvPatchField<scalar>
351 tmp<volScalarField> autoCreateQ
353 const word& fieldName,
358 autoCreateWallFunctionField
361 RASModels::kqRWallFunctionFvPatchField<scalar>
371 tmp<volSymmTensorField> autoCreateR
373 const word& fieldName,
375 const objectRegistry& obj
379 autoCreateWallFunctionField
382 RASModels::kqRWallFunctionFvPatchField<symmTensor>
392 tmp<volSymmTensorField> autoCreateR
394 const word& fieldName,
399 autoCreateWallFunctionField
402 // New wall functions for R. HJ, 14/Dec/2011
403 RASModels::RWallFunctionFvPatchSymmTensorField
413 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
415 } // End namespace incompressible
416 } // End namespace Foam
418 // ************************************************************************* //