initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / wallFunctions / alphatWallFunctions / alphatWallFunction / alphatWallFunctionFvPatchScalarField.C
blobad2115cdb1b9df888344bbcf9d963a3fa98e8033
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
36 namespace compressible
38 namespace RASModels
41 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
43 alphatWallFunctionFvPatchScalarField::
44 alphatWallFunctionFvPatchScalarField
46     const fvPatch& p,
47     const DimensionedField<scalar, volMesh>& iF
50     fixedValueFvPatchScalarField(p, iF),
51     mutName_("mut"),
52     Prt_(0.85)
56 alphatWallFunctionFvPatchScalarField::
57 alphatWallFunctionFvPatchScalarField
59     const alphatWallFunctionFvPatchScalarField& ptf,
60     const fvPatch& p,
61     const DimensionedField<scalar, volMesh>& iF,
62     const fvPatchFieldMapper& mapper
65     fixedValueFvPatchScalarField(ptf, p, iF, mapper),
66     mutName_(ptf.mutName_),
67     Prt_(ptf.Prt_)
71 alphatWallFunctionFvPatchScalarField::
72 alphatWallFunctionFvPatchScalarField
74     const fvPatch& p,
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_),
93     Prt_(awfpsf.Prt_)
97 alphatWallFunctionFvPatchScalarField::
98 alphatWallFunctionFvPatchScalarField
100     const alphatWallFunctionFvPatchScalarField& awfpsf,
101     const DimensionedField<scalar, volMesh>& iF
104     fixedValueFvPatchScalarField(awfpsf, iF),
105     mutName_(awfpsf.mutName_),
106     Prt_(awfpsf.Prt_)
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 // ************************************************************************* //