1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "backwardsCompatibilityWallFunctions.H"
28 #include "calculatedFvPatchField.H"
29 #include "alphatWallFunctionFvPatchScalarField.H"
30 #include "mutkWallFunctionFvPatchScalarField.H"
31 #include "mutLowReWallFunctionFvPatchScalarField.H"
32 #include "epsilonWallFunctionFvPatchScalarField.H"
33 #include "kqRWallFunctionFvPatchField.H"
34 #include "omegaWallFunctionFvPatchScalarField.H"
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace compressible
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 tmp<volScalarField> autoCreateAlphat
47 const word& fieldName,
54 mesh.time().timeName(),
61 if (alphatHeader.headerOk())
63 return tmp<volScalarField>(new volScalarField(alphatHeader, mesh));
67 Info<< "--> Creating " << fieldName
68 << " to employ run-time selectable wall functions" << endl;
70 const fvBoundaryMesh& bm = mesh.boundary();
72 wordList alphatBoundaryTypes(bm.size());
76 if (isA<wallFvPatch>(bm[patchI]))
78 alphatBoundaryTypes[patchI] =
79 RASModels::alphatWallFunctionFvPatchScalarField::typeName;
83 alphatBoundaryTypes[patchI] =
84 calculatedFvPatchField<scalar>::typeName;
88 tmp<volScalarField> alphat
95 mesh.time().timeName(),
102 dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0),
107 Info<< " Writing new " << fieldName << endl;
115 tmp<volScalarField> autoCreateMut
117 const word& fieldName,
124 mesh.time().timeName(),
131 if (mutHeader.headerOk())
133 return tmp<volScalarField>(new volScalarField(mutHeader, mesh));
137 Info<< "--> Creating " << fieldName
138 << " to employ run-time selectable wall functions" << endl;
140 const fvBoundaryMesh& bm = mesh.boundary();
142 wordList mutBoundaryTypes(bm.size());
146 if (isA<wallFvPatch>(bm[patchI]))
148 mutBoundaryTypes[patchI] =
149 RASModels::mutkWallFunctionFvPatchScalarField::typeName;
153 mutBoundaryTypes[patchI] =
154 calculatedFvPatchField<scalar>::typeName;
158 tmp<volScalarField> mut
165 mesh.time().timeName(),
172 dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0),
177 Info<< " Writing new " << fieldName << endl;
185 tmp<volScalarField> autoCreateLowReMut
187 const word& fieldName,
194 mesh.time().timeName(),
201 if (mutHeader.headerOk())
203 return tmp<volScalarField>(new volScalarField(mutHeader, mesh));
207 Info<< "--> Creating " << fieldName
208 << " to employ run-time selectable wall functions" << endl;
210 const fvBoundaryMesh& bm = mesh.boundary();
212 wordList mutBoundaryTypes(bm.size());
216 if (isA<wallFvPatch>(bm[patchI]))
218 mutBoundaryTypes[patchI] =
219 RASModels::mutLowReWallFunctionFvPatchScalarField::typeName;
223 mutBoundaryTypes[patchI] =
224 calculatedFvPatchField<scalar>::typeName;
228 tmp<volScalarField> mut
235 mesh.time().timeName(),
242 dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0),
247 Info<< " Writing new " << fieldName << endl;
255 tmp<volScalarField> autoCreateEpsilon
257 const word& fieldName,
262 autoCreateWallFunctionField
265 RASModels::epsilonWallFunctionFvPatchScalarField
274 tmp<volScalarField> autoCreateOmega
276 const word& fieldName,
281 autoCreateWallFunctionField
284 RASModels::omegaWallFunctionFvPatchScalarField
293 tmp<volScalarField> autoCreateK
295 const word& fieldName,
300 autoCreateWallFunctionField
303 RASModels::kqRWallFunctionFvPatchField<scalar>
312 tmp<volScalarField> autoCreateQ
314 const word& fieldName,
319 autoCreateWallFunctionField
322 RASModels::kqRWallFunctionFvPatchField<scalar>
331 tmp<volSymmTensorField> autoCreateR
333 const word& fieldName,
338 autoCreateWallFunctionField
341 RASModels::kqRWallFunctionFvPatchField<symmTensor>
350 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
352 } // End namespace compressible
353 } // End namespace Foam
355 // ************************************************************************* //