Merge branch 'upstream/OpenFOAM' into pu
[freefoam.git] / src / turbulenceModels / incompressible / RAS / derivedFvPatchFields / turbulentMixingLengthFrequencyInlet / turbulentMixingLengthFrequencyInletFvPatchScalarField.H
blob65d4894d79440e5357d37fa249f5571632657640
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::incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
27 Description
28     Calculate omega via the mixing length
30     Example of the boundary condition specification:
31     @verbatim
32         inlet
33         {
34             type            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 incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
47 #define incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
49 #include <finiteVolume/inletOutletFvPatchFields.H>
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 namespace Foam
55 namespace incompressible
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("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 incompressible
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************ vim: set sw=4 sts=4 et: ************************ //