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 "alphatWallFunctionFvPatchScalarField.H"
28 #include "fvPatchFieldMapper.H"
29 #include "volFields.H"
30 #include "addToRunTimeSelectionTable.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 namespace compressible
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 alphatWallFunctionFvPatchScalarField::
44 alphatWallFunctionFvPatchScalarField
47 const DimensionedField<scalar, volMesh>& iF
50 fixedValueFvPatchScalarField(p, iF),
56 alphatWallFunctionFvPatchScalarField::
57 alphatWallFunctionFvPatchScalarField
59 const alphatWallFunctionFvPatchScalarField& ptf,
61 const DimensionedField<scalar, volMesh>& iF,
62 const fvPatchFieldMapper& mapper
65 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
66 mutName_(ptf.mutName_),
71 alphatWallFunctionFvPatchScalarField::
72 alphatWallFunctionFvPatchScalarField
75 const DimensionedField<scalar, volMesh>& iF,
76 const dictionary& dict
79 fixedValueFvPatchScalarField(p, iF, dict),
80 mutName_(dict.lookupOrDefault<word>("mut", "mut")),
81 Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85))
85 alphatWallFunctionFvPatchScalarField::
86 alphatWallFunctionFvPatchScalarField
88 const alphatWallFunctionFvPatchScalarField& awfpsf
91 fixedValueFvPatchScalarField(awfpsf),
92 mutName_(awfpsf.mutName_),
97 alphatWallFunctionFvPatchScalarField::
98 alphatWallFunctionFvPatchScalarField
100 const alphatWallFunctionFvPatchScalarField& awfpsf,
101 const DimensionedField<scalar, volMesh>& iF
104 fixedValueFvPatchScalarField(awfpsf, iF),
105 mutName_(awfpsf.mutName_),
110 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
112 void alphatWallFunctionFvPatchScalarField::updateCoeffs()
114 const scalarField& mutw =
115 patch().lookupPatchField<volScalarField, scalar>(mutName_);
117 operator==(mutw/Prt_);
121 void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
123 fvPatchField<scalar>::write(os);
124 writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
125 os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
126 writeEntry("value", os);
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 makePatchTypeField(fvPatchScalarField, alphatWallFunctionFvPatchScalarField);
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace RASModels
137 } // End namespace compressible
138 } // End namespace Foam
140 // ************************************************************************* //