OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
00027 
00028 Description
00029     Calculate omega via the mixing length
00030 
00031     Example of the boundary condition specification:
00032     @verbatim
00033         inlet
00034         {
00035             type            turbulentMixingLengthFrequencyInlet;
00036             mixingLength    0.005;         // 5 mm
00037             k               k;             // turbulent k field
00038             value           uniform 5;     // initial value
00039         }
00040     @endverbatim
00041 
00042 SourceFiles
00043     turbulentMixingLengthFrequencyInletFvPatchScalarField.C
00044 
00045 \*---------------------------------------------------------------------------*/
00046 
00047 #ifndef incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
00048 #define incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
00049 
00050 #include "fixedValueFvPatchFields.H"
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 namespace incompressible
00057 {
00058 
00059 /*---------------------------------------------------------------------------*\
00060     Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
00061 \*---------------------------------------------------------------------------*/
00062 
00063 class turbulentMixingLengthFrequencyInletFvPatchScalarField
00064 :
00065     public fixedValueFvPatchScalarField
00066 {
00067     // Private data
00068 
00069         //- Turbulent length scale
00070         scalar mixingLength_;
00071 
00072         //- Name of the turbulent kinetic energy field
00073         word kName_;
00074 
00075 
00076 public:
00077 
00078     //- Runtime type information
00079     TypeName("turbulentMixingLengthFrequencyInlet");
00080 
00081 
00082     // Constructors
00083 
00084         //- Construct from patch and internal field
00085         turbulentMixingLengthFrequencyInletFvPatchScalarField
00086         (
00087             const fvPatch&,
00088             const DimensionedField<scalar, volMesh>&
00089         );
00090 
00091         //- Construct from patch, internal field and dictionary
00092         turbulentMixingLengthFrequencyInletFvPatchScalarField
00093         (
00094             const fvPatch&,
00095             const DimensionedField<scalar, volMesh>&,
00096             const dictionary&
00097         );
00098 
00099         //- Construct by mapping given
00100         //  turbulentMixingLengthFrequencyInletFvPatchScalarField
00101         //  onto a new patch
00102         turbulentMixingLengthFrequencyInletFvPatchScalarField
00103         (
00104             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
00105             const fvPatch&,
00106             const DimensionedField<scalar, volMesh>&,
00107             const fvPatchFieldMapper&
00108         );
00109 
00110         //- Construct as copy
00111         turbulentMixingLengthFrequencyInletFvPatchScalarField
00112         (
00113             const turbulentMixingLengthFrequencyInletFvPatchScalarField&
00114         );
00115 
00116         //- Construct and return a clone
00117         virtual tmp<fvPatchScalarField> clone() const
00118         {
00119             return tmp<fvPatchScalarField>
00120             (
00121                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
00122                 (
00123                     *this
00124                 )
00125             );
00126         }
00127 
00128         //- Construct as copy setting internal field reference
00129         turbulentMixingLengthFrequencyInletFvPatchScalarField
00130         (
00131             const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
00132             const DimensionedField<scalar, volMesh>&
00133         );
00134 
00135         //- Construct and return a clone setting internal field reference
00136         virtual tmp<fvPatchScalarField> clone
00137         (
00138             const DimensionedField<scalar, volMesh>& iF
00139         ) const
00140         {
00141             return tmp<fvPatchScalarField>
00142             (
00143                 new turbulentMixingLengthFrequencyInletFvPatchScalarField
00144                 (
00145                     *this,
00146                     iF
00147                 )
00148             );
00149         }
00150 
00151 
00152     // Member functions
00153 
00154         //- Update the coefficients associated with the patch field
00155         virtual void updateCoeffs();
00156 
00157         //- Write
00158         virtual void write(Ostream&) const;
00159 };
00160 
00161 
00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00163 
00164 } // End namespace incompressible
00165 } // End namespace Foam
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00168 
00169 #endif
00170 
00171 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd