Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / turbulentMixingLengthFrequencyInlet / turbulentMixingLengthFrequencyInletFvPatchScalarField.H
blobd5acb7f5a037a3bce267a2fba263cbe0fff2f63d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2006-2011 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
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
19     for more details.
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 Class
25     Foam::compressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
27 Description
28     Calculate omega via the mixing length
30     Example of the boundary condition specification:
31     \verbatim
32         inlet
33         {
34             type            compressible::turbulentMixingLengthFrequencyInlet;
35             mixingLength    0.005;         // 5 mm
36             k               k;             // turbulent k field
37             value           uniform 5;     // initial value
38         }
39     \endverbatim
41 SourceFiles
42     turbulentMixingLengthFrequencyInletFvPatchScalarField.C
44 \*---------------------------------------------------------------------------*/
46 #ifndef compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
47 #define compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
49 #include "inletOutletFvPatchFields.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 namespace Foam
55 namespace compressible
58 /*---------------------------------------------------------------------------*\
59     Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
60 \*---------------------------------------------------------------------------*/
62 class turbulentMixingLengthFrequencyInletFvPatchScalarField
64     public inletOutletFvPatchScalarField
66     // Private data
68         //- Turbulent length scale
69         scalar mixingLength_;
71         //- Name of the flux field
72         word phiName_;
74         //- Name of the turbulent kinetic energy field
75         word kName_;
78 public:
80     //- Runtime type information
81     TypeName("compressible::turbulentMixingLengthFrequencyInlet");
84     // Constructors
86         //- Construct from patch and internal field
87         turbulentMixingLengthFrequencyInletFvPatchScalarField
88         (
89             const fvPatch&,
90             const DimensionedField<scalar, volMesh>&
91         );
93         //- Construct from patch, internal field and dictionary
94         turbulentMixingLengthFrequencyInletFvPatchScalarField
95         (
96             const fvPatch&,
97             const DimensionedField<scalar, volMesh>&,
98             const dictionary&
99         );
101         //- Construct by mapping given
102         //  turbulentMixingLengthFrequencyInletFvPatchScalarField
103         //  onto a new patch
104         turbulentMixingLengthFrequencyInletFvPatchScalarField
105         (
106             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
107             const fvPatch&,
108             const DimensionedField<scalar, volMesh>&,
109             const fvPatchFieldMapper&
110         );
112         //- Construct as copy
113         turbulentMixingLengthFrequencyInletFvPatchScalarField
114         (
115             const turbulentMixingLengthFrequencyInletFvPatchScalarField&
116         );
118         //- Construct and return a clone
119         virtual tmp<fvPatchScalarField> clone() const
120         {
121             return tmp<fvPatchScalarField>
122             (
123                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
124                 (
125                     *this
126                 )
127             );
128         }
130         //- Construct as copy setting internal field reference
131         turbulentMixingLengthFrequencyInletFvPatchScalarField
132         (
133             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
134             const DimensionedField<scalar, volMesh>&
135         );
137         //- Construct and return a clone setting internal field reference
138         virtual tmp<fvPatchScalarField> clone
139         (
140             const DimensionedField<scalar, volMesh>& iF
141         ) const
142         {
143             return tmp<fvPatchScalarField>
144             (
145                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
146                 (
147                     *this,
148                     iF
149                 )
150             );
151         }
154     // Member functions
156         //- Update the coefficients associated with the patch field
157         virtual void updateCoeffs();
159         //- Write
160         virtual void write(Ostream&) const;
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace compressible
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //