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

turbulentIntensityKineticEnergyInletFvPatchScalarField.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-2010 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::turbulentIntensityKineticEnergyInletFvPatchScalarField
00026 
00027 Description
00028     Calculate turbulent kinetic energy from the intensity provided as a
00029     fraction of the mean velocity
00030 
00031     Example of the boundary condition specification:
00032     @verbatim
00033         inlet
00034         {
00035             type        turbulentIntensityKineticEnergyInlet;
00036             intensity   0.05;           // 5% turbulence
00037             value       uniform 1;      // placeholder
00038         }
00039     @endverbatim
00040 
00041 SourceFiles
00042     turbulentIntensityKineticEnergyInletFvPatchScalarField.C
00043 
00044 \*---------------------------------------------------------------------------*/
00045 
00046 #ifndef turbulentIntensityKineticEnergyInletFvPatchScalarField_H
00047 #define turbulentIntensityKineticEnergyInletFvPatchScalarField_H
00048 
00049 #include <finiteVolume/inletOutletFvPatchFields.H>
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 namespace Foam
00054 {
00055 
00056 /*---------------------------------------------------------------------------*\
00057           Class turbulentIntensityKineticEnergyInletFvPatch Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 class turbulentIntensityKineticEnergyInletFvPatchScalarField
00061 :
00062     public inletOutletFvPatchScalarField
00063 {
00064     // Private data
00065 
00066         //- Turbulent intensity as fraction of mean velocity
00067         scalar intensity_;
00068 
00069         //- Name of the velocity field
00070         word UName_;
00071 
00072         //- Name of the flux field
00073         word phiName_;
00074 
00075 
00076 public:
00077 
00078     //- Runtime type information
00079     TypeName("turbulentIntensityKineticEnergyInlet");
00080 
00081 
00082     // Constructors
00083 
00084         //- Construct from patch and internal field
00085         turbulentIntensityKineticEnergyInletFvPatchScalarField
00086         (
00087             const fvPatch&,
00088             const DimensionedField<scalar, volMesh>&
00089         );
00090 
00091         //- Construct from patch, internal field and dictionary
00092         turbulentIntensityKineticEnergyInletFvPatchScalarField
00093         (
00094             const fvPatch&,
00095             const DimensionedField<scalar, volMesh>&,
00096             const dictionary&
00097         );
00098 
00099         //- Construct by mapping given
00100         //  turbulentIntensityKineticEnergyInletFvPatchScalarField
00101         //  onto a new patch
00102         turbulentIntensityKineticEnergyInletFvPatchScalarField
00103         (
00104             const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
00105             const fvPatch&,
00106             const DimensionedField<scalar, volMesh>&,
00107             const fvPatchFieldMapper&
00108         );
00109 
00110         //- Construct as copy
00111         turbulentIntensityKineticEnergyInletFvPatchScalarField
00112         (
00113             const turbulentIntensityKineticEnergyInletFvPatchScalarField&
00114         );
00115 
00116         //- Construct and return a clone
00117         virtual tmp<fvPatchScalarField> clone() const
00118         {
00119             return tmp<fvPatchScalarField>
00120             (
00121                 new turbulentIntensityKineticEnergyInletFvPatchScalarField
00122                 (
00123                     *this
00124                 )
00125             );
00126         }
00127 
00128         //- Construct as copy setting internal field reference
00129         turbulentIntensityKineticEnergyInletFvPatchScalarField
00130         (
00131             const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
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 turbulentIntensityKineticEnergyInletFvPatchScalarField
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 Foam
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 #endif
00169 
00170 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines