1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 "alphatWallFunctionFvPatchScalarField.H"
31 #include "mutWallFunctionFvPatchScalarField.H"
32 #include "mutLowReWallFunctionFvPatchScalarField.H"
33 #include "epsilonWallFunctionFvPatchScalarField.H"
34 #include "kqRWallFunctionFvPatchField.H"
35 #include "omegaWallFunctionFvPatchScalarField.H"
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 namespace compressible
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 tmp<volScalarField> autoCreateAlphat
48 const word& fieldName,
55 mesh.time().timeName(),
62 if (alphatHeader.headerOk())
64 return tmp<volScalarField>(new volScalarField(alphatHeader, mesh));
68 Info<< "--> Creating " << fieldName
69 << " to employ run-time selectable wall functions" << endl;
71 const fvBoundaryMesh& bm = mesh.boundary();
73 wordList alphatBoundaryTypes(bm.size());
77 if (bm[patchI].isWall())
79 alphatBoundaryTypes[patchI] =
80 RASModels::alphatWallFunctionFvPatchScalarField::typeName;
84 alphatBoundaryTypes[patchI] =
85 calculatedFvPatchField<scalar>::typeName;
89 tmp<volScalarField> alphat
96 mesh.time().timeName(),
103 dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0),
108 Info<< " Writing new " << fieldName << endl;
116 tmp<volScalarField> autoCreateMut
118 const word& fieldName,
125 mesh.time().timeName(),
132 if (mutHeader.headerOk())
134 return tmp<volScalarField>(new volScalarField(mutHeader, mesh));
138 Info<< "--> Creating " << fieldName
139 << " to employ run-time selectable wall functions" << endl;
141 const fvBoundaryMesh& bm = mesh.boundary();
143 wordList mutBoundaryTypes(bm.size());
147 if (bm[patchI].isWall())
149 mutBoundaryTypes[patchI] =
150 RASModels::mutWallFunctionFvPatchScalarField::typeName;
154 mutBoundaryTypes[patchI] =
155 calculatedFvPatchField<scalar>::typeName;
159 tmp<volScalarField> mut
166 mesh.time().timeName(),
173 dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0),
178 Info<< " Writing new " << fieldName << endl;
186 tmp<volScalarField> autoCreateLowReMut
188 const word& fieldName,
195 mesh.time().timeName(),
202 if (mutHeader.headerOk())
204 return tmp<volScalarField>(new volScalarField(mutHeader, mesh));
208 Info<< "--> Creating " << fieldName
209 << " to employ run-time selectable wall functions" << endl;
211 const fvBoundaryMesh& bm = mesh.boundary();
213 wordList mutBoundaryTypes(bm.size());
217 if (bm[patchI].isWall())
219 mutBoundaryTypes[patchI] =
220 RASModels::mutLowReWallFunctionFvPatchScalarField::typeName;
224 mutBoundaryTypes[patchI] =
225 calculatedFvPatchField<scalar>::typeName;
229 tmp<volScalarField> mut
236 mesh.time().timeName(),
243 dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0),
248 Info<< " Writing new " << fieldName << endl;
256 tmp<volScalarField> autoCreateEpsilon
258 const word& fieldName,
263 autoCreateWallFunctionField
266 RASModels::epsilonWallFunctionFvPatchScalarField
275 tmp<volScalarField> autoCreateOmega
277 const word& fieldName,
282 autoCreateWallFunctionField
285 RASModels::omegaWallFunctionFvPatchScalarField
294 tmp<volScalarField> autoCreateK
296 const word& fieldName,
301 autoCreateWallFunctionField
304 RASModels::kqRWallFunctionFvPatchField<scalar>
313 tmp<volScalarField> autoCreateQ
315 const word& fieldName,
320 autoCreateWallFunctionField
323 RASModels::kqRWallFunctionFvPatchField<scalar>
332 tmp<volSymmTensorField> autoCreateR
334 const word& fieldName,
339 autoCreateWallFunctionField
342 RASModels::kqRWallFunctionFvPatchField<symmTensor>
351 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
353 } // End namespace compressible
354 } // End namespace Foam
356 // ************************************************************************* //