Merge branch 'upstream/OpenFOAM' into master
[freefoam.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / turbulentMixingLengthFrequencyInlet / turbulentMixingLengthFrequencyInletFvPatchScalarField.H
blobe271971574bd17e7eec0b2187e54d7598b2db2cd
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2006-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 Class
26     Foam::compressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
28 Description
29     Calculate omega via the mixing length
31     Example of the boundary condition specification:
32     @verbatim
33         inlet
34         {
35             type            compressible::turbulentMixingLengthFrequencyInlet;
36             mixingLength    0.005;         // 5 mm
37             k               k;             // turbulent k field
38             value           uniform 5;     // initial value
39         }
40     @endverbatim
42 SourceFiles
43     turbulentMixingLengthFrequencyInletFvPatchScalarField.C
45 \*---------------------------------------------------------------------------*/
47 #ifndef compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
48 #define compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
50 #include <finiteVolume/fixedValueFvPatchFields.H>
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 namespace Foam
56 namespace compressible
59 /*---------------------------------------------------------------------------*\
60     Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
61 \*---------------------------------------------------------------------------*/
63 class turbulentMixingLengthFrequencyInletFvPatchScalarField
65     public fixedValueFvPatchScalarField
67     // Private data
69         //- Turbulent length scale
70         scalar mixingLength_;
72         //- Name of the turbulent kinetic energy field
73         word kName_;
76 public:
78     //- Runtime type information
79     TypeName("compressible::turbulentMixingLengthFrequencyInlet");
82     // Constructors
84         //- Construct from patch and internal field
85         turbulentMixingLengthFrequencyInletFvPatchScalarField
86         (
87             const fvPatch&,
88             const DimensionedField<scalar, volMesh>&
89         );
91         //- Construct from patch, internal field and dictionary
92         turbulentMixingLengthFrequencyInletFvPatchScalarField
93         (
94             const fvPatch&,
95             const DimensionedField<scalar, volMesh>&,
96             const dictionary&
97         );
99         //- Construct by mapping given
100         //  turbulentMixingLengthFrequencyInletFvPatchScalarField
101         //  onto a new patch
102         turbulentMixingLengthFrequencyInletFvPatchScalarField
103         (
104             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
105             const fvPatch&,
106             const DimensionedField<scalar, volMesh>&,
107             const fvPatchFieldMapper&
108         );
110         //- Construct as copy
111         turbulentMixingLengthFrequencyInletFvPatchScalarField
112         (
113             const turbulentMixingLengthFrequencyInletFvPatchScalarField&
114         );
116         //- Construct and return a clone
117         virtual tmp<fvPatchScalarField> clone() const
118         {
119             return tmp<fvPatchScalarField>
120             (
121                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
122                 (
123                     *this
124                 )
125             );
126         }
128         //- Construct as copy setting internal field reference
129         turbulentMixingLengthFrequencyInletFvPatchScalarField
130         (
131             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
132             const DimensionedField<scalar, volMesh>&
133         );
135         //- Construct and return a clone setting internal field reference
136         virtual tmp<fvPatchScalarField> clone
137         (
138             const DimensionedField<scalar, volMesh>& iF
139         ) const
140         {
141             return tmp<fvPatchScalarField>
142             (
143                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
144                 (
145                     *this,
146                     iF
147                 )
148             );
149         }
152     // Member functions
154         //- Update the coefficients associated with the patch field
155         virtual void updateCoeffs();
157         //- Write
158         virtual void write(Ostream&) const;
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace compressible
165 } // End namespace Foam
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 #endif
171 // ************************ vim: set sw=4 sts=4 et: ************************ //