FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

turbulentMixingLengthFrequencyInletFvPatchScalarField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2006-2011 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
00026 
00027 Description
00028     Calculate omega via the mixing length
00029 
00030     Example of the boundary condition specification:
00031     @verbatim
00032         inlet
00033         {
00034             type            turbulentMixingLengthFrequencyInlet;
00035             mixingLength    0.005;         // 5 mm
00036             k               k;             // turbulent k field
00037             value           uniform 5;     // initial value
00038         }
00039     @endverbatim
00040 
00041 SourceFiles
00042     turbulentMixingLengthFrequencyInletFvPatchScalarField.C
00043 
00044 \*---------------------------------------------------------------------------*/
00045 
00046 #ifndef incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
00047 #define incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
00048 
00049 #include <finiteVolume/inletOutletFvPatchFields.H>
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 namespace Foam
00054 {
00055 namespace incompressible
00056 {
00057 
00058 /*---------------------------------------------------------------------------*\
00059     Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
00060 \*---------------------------------------------------------------------------*/
00061 
00062 class turbulentMixingLengthFrequencyInletFvPatchScalarField
00063 :
00064     public inletOutletFvPatchScalarField
00065 {
00066     // Private data
00067 
00068         //- Turbulent length scale
00069         scalar mixingLength_;
00070 
00071         //- Name of the flux field
00072         word phiName_;
00073 
00074         //- Name of the turbulent kinetic energy field
00075         word kName_;
00076 
00077 
00078 public:
00079 
00080     //- Runtime type information
00081     TypeName("turbulentMixingLengthFrequencyInlet");
00082 
00083 
00084     // Constructors
00085 
00086         //- Construct from patch and internal field
00087         turbulentMixingLengthFrequencyInletFvPatchScalarField
00088         (
00089             const fvPatch&,
00090             const DimensionedField<scalar, volMesh>&
00091         );
00092 
00093         //- Construct from patch, internal field and dictionary
00094         turbulentMixingLengthFrequencyInletFvPatchScalarField
00095         (
00096             const fvPatch&,
00097             const DimensionedField<scalar, volMesh>&,
00098             const dictionary&
00099         );
00100 
00101         //- Construct by mapping given
00102         //  turbulentMixingLengthFrequencyInletFvPatchScalarField
00103         //  onto a new patch
00104         turbulentMixingLengthFrequencyInletFvPatchScalarField
00105         (
00106             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
00107             const fvPatch&,
00108             const DimensionedField<scalar, volMesh>&,
00109             const fvPatchFieldMapper&
00110         );
00111 
00112         //- Construct as copy
00113         turbulentMixingLengthFrequencyInletFvPatchScalarField
00114         (
00115             const turbulentMixingLengthFrequencyInletFvPatchScalarField&
00116         );
00117 
00118         //- Construct and return a clone
00119         virtual tmp<fvPatchScalarField> clone() const
00120         {
00121             return tmp<fvPatchScalarField>
00122             (
00123                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
00124                 (
00125                     *this
00126                 )
00127             );
00128         }
00129 
00130         //- Construct as copy setting internal field reference
00131         turbulentMixingLengthFrequencyInletFvPatchScalarField
00132         (
00133             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
00134             const DimensionedField<scalar, volMesh>&
00135         );
00136 
00137         //- Construct and return a clone setting internal field reference
00138         virtual tmp<fvPatchScalarField> clone
00139         (
00140             const DimensionedField<scalar, volMesh>& iF
00141         ) const
00142         {
00143             return tmp<fvPatchScalarField>
00144             (
00145                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
00146                 (
00147                     *this,
00148                     iF
00149                 )
00150             );
00151         }
00152 
00153 
00154     // Member functions
00155 
00156         //- Update the coefficients associated with the patch field
00157         virtual void updateCoeffs();
00158 
00159         //- Write
00160         virtual void write(Ostream&) const;
00161 };
00162 
00163 
00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00165 
00166 } // End namespace incompressible
00167 } // End namespace Foam
00168 
00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00170 
00171 #endif
00172 
00173 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines