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
26 alphaSgsJayatillekeWallFunctionFvPatchScalarField
29 Thermal wall function for turbulent thermal diffusivity based on the
30 Jayatilleke thermal wall function
33 alphaSgsJayatillekeWallFunctionFvPatchScalarField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
38 #define alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace compressible
51 /*---------------------------------------------------------------------------*\
52 Class alphaSgsJayatillekeWallFunctionFvPatchScalarField Declaration
53 \*---------------------------------------------------------------------------*/
55 class alphaSgsJayatillekeWallFunctionFvPatchScalarField
57 public fixedValueFvPatchScalarField
61 //- Turbulent Prandtl number
64 //- Von Karman constant
71 // Solution parameters
73 static scalar maxExp_;
74 static scalar tolerance_;
75 static label maxIters_;
78 // Private member functions
80 //- Check the type of the patch
84 scalar Psmooth(const scalar Prat) const;
86 //- Calculate y+ at the edge of the thermal laminar sublayer
96 //- Runtime type information
97 TypeName("alphaSgsJayatillekeWallFunction");
102 //- Construct from patch and internal field
103 alphaSgsJayatillekeWallFunctionFvPatchScalarField
106 const DimensionedField<scalar, volMesh>&
109 //- Construct from patch, internal field and dictionary
110 alphaSgsJayatillekeWallFunctionFvPatchScalarField
113 const DimensionedField<scalar, volMesh>&,
117 //- Construct by mapping given an
118 // alphaSgsJayatillekeWallFunctionFvPatchScalarField
120 alphaSgsJayatillekeWallFunctionFvPatchScalarField
122 const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
124 const DimensionedField<scalar, volMesh>&,
125 const fvPatchFieldMapper&
128 //- Construct as copy
129 alphaSgsJayatillekeWallFunctionFvPatchScalarField
131 const alphaSgsJayatillekeWallFunctionFvPatchScalarField&
134 //- Construct and return a clone
135 virtual tmp<fvPatchScalarField> clone() const
137 return tmp<fvPatchScalarField>
139 new alphaSgsJayatillekeWallFunctionFvPatchScalarField(*this)
143 //- Construct as copy setting internal field reference
144 alphaSgsJayatillekeWallFunctionFvPatchScalarField
146 const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
147 const DimensionedField<scalar, volMesh>&
150 //- Construct and return a clone setting internal field reference
151 virtual tmp<fvPatchScalarField> clone
153 const DimensionedField<scalar, volMesh>& iF
156 return tmp<fvPatchScalarField>
158 new alphaSgsJayatillekeWallFunctionFvPatchScalarField
169 // Evaluation functions
171 //- Evaluate the patchField
172 virtual void evaluate
174 const Pstream::commsTypes commsType=Pstream::Pstream::blocking
181 void write(Ostream&) const;
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 } // End namespace LESModels
188 } // End namespace compressible
189 } // End namespace Foam
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 // ************************************************************************* //