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 "alphatWallFunctionFvPatchScalarField.H"
31 #include "mutWallFunctionFvPatchScalarField.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 (isType<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 (isType<wallFvPatch>(bm[patchI]))
148 mutBoundaryTypes[patchI] =
149 RASModels::mutWallFunctionFvPatchScalarField::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> autoCreateEpsilon
187 const word& fieldName,
192 autoCreateWallFunctionField
195 RASModels::epsilonWallFunctionFvPatchScalarField
204 tmp<volScalarField> autoCreateOmega
206 const word& fieldName,
211 autoCreateWallFunctionField
214 RASModels::omegaWallFunctionFvPatchScalarField
223 tmp<volScalarField> autoCreateK
225 const word& fieldName,
230 autoCreateWallFunctionField
233 RASModels::kqRWallFunctionFvPatchField<scalar>
242 tmp<volScalarField> autoCreateQ
244 const word& fieldName,
249 autoCreateWallFunctionField
252 RASModels::kqRWallFunctionFvPatchField<scalar>
261 tmp<volSymmTensorField> autoCreateR
263 const word& fieldName,
268 autoCreateWallFunctionField
271 RASModels::kqRWallFunctionFvPatchField<symmTensor>
280 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
282 } // End namespace compressible
283 } // End namespace Foam
285 // ************************************************************************* //