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 "alphaSgsWallFunctionFvPatchScalarField.H"
29 #include "fvPatchFieldMapper.H"
30 #include "volFields.H"
31 #include "addToRunTimeSelectionTable.H"
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 namespace compressible
42 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44 void alphaSgsWallFunctionFvPatchScalarField::checkType()
46 if (!patch().isWall())
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 =
142 lesModel.muSgs()().boundaryField()[patch().index()];
144 operator==(muSgsw/Prt_);
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 alphaSgsWallFunctionFvPatchScalarField
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 } // End namespace LESModels
159 } // End namespace compressible
160 } // End namespace Foam
162 // ************************************************************************* //