1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 "alphaSgsWallFunctionFvPatchScalarField.H"
28 #include "fvPatchFieldMapper.H"
29 #include "volFields.H"
30 #include "addToRunTimeSelectionTable.H"
31 #include "wallFvPatch.H"
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 namespace compressible
42 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44 void alphaSgsWallFunctionFvPatchScalarField::checkType()
46 if (!isA<wallFvPatch>(patch()))
50 "alphaSgsWallFunctionFvPatchScalarField::checkType()"
52 << "Patch type for patch " << patch().name() << " must be wall\n"
53 << "Current patch type is " << patch().type() << nl
59 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
61 alphaSgsWallFunctionFvPatchScalarField::
62 alphaSgsWallFunctionFvPatchScalarField
65 const DimensionedField<scalar, volMesh>& iF
68 fixedValueFvPatchScalarField(p, iF),
75 alphaSgsWallFunctionFvPatchScalarField::
76 alphaSgsWallFunctionFvPatchScalarField
78 const alphaSgsWallFunctionFvPatchScalarField& ptf,
80 const DimensionedField<scalar, volMesh>& iF,
81 const fvPatchFieldMapper& mapper
84 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
89 alphaSgsWallFunctionFvPatchScalarField::
90 alphaSgsWallFunctionFvPatchScalarField
93 const DimensionedField<scalar, volMesh>& iF,
94 const dictionary& dict
97 fixedValueFvPatchScalarField(p, iF, dict),
98 Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85))
104 alphaSgsWallFunctionFvPatchScalarField::
105 alphaSgsWallFunctionFvPatchScalarField
107 const alphaSgsWallFunctionFvPatchScalarField& awfpsf
110 fixedValueFvPatchScalarField(awfpsf),
117 alphaSgsWallFunctionFvPatchScalarField::
118 alphaSgsWallFunctionFvPatchScalarField
120 const alphaSgsWallFunctionFvPatchScalarField& awfpsf,
121 const DimensionedField<scalar, volMesh>& iF
124 fixedValueFvPatchScalarField(awfpsf, iF),
132 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
134 void alphaSgsWallFunctionFvPatchScalarField::evaluate
136 const Pstream::commsTypes
139 const LESModel& lesModel = db().lookupObject<LESModel>("LESProperties");
141 const scalarField muSgsw
143 lesModel.muSgs()().boundaryField()[patch().index()]
146 operator==(muSgsw/Prt_);
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 alphaSgsWallFunctionFvPatchScalarField
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 } // End namespace LESModels
161 } // End namespace compressible
162 } // End namespace Foam
164 // ************************************************************************* //