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

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-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::turbulentIntensityKineticEnergyInletFvPatchScalarField
00027 
00028 Description
00029     Calculate turbulent kinetic energy from the intensity provided as a
00030     fraction of the mean velocity
00031 
00032     Example of the boundary condition specification:
00033     @verbatim
00034         inlet
00035         {
00036             type        turbulentIntensityKineticEnergyInlet;
00037             intensity   0.05;           // 5% turbulence
00038             value       uniform 1;      // placeholder
00039         }
00040     @endverbatim
00041 
00042 SourceFiles
00043     turbulentIntensityKineticEnergyInletFvPatchScalarField.C
00044 
00045 \*---------------------------------------------------------------------------*/
00046 
00047 #ifndef turbulentIntensityKineticEnergyInletFvPatchScalarField_H
00048 #define turbulentIntensityKineticEnergyInletFvPatchScalarField_H
00049 
00050 #include "fixedValueFvPatchFields.H"
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 
00057 /*---------------------------------------------------------------------------*\
00058           Class turbulentIntensityKineticEnergyInletFvPatch Declaration
00059 \*---------------------------------------------------------------------------*/
00060 
00061 class turbulentIntensityKineticEnergyInletFvPatchScalarField
00062 :
00063     public fixedValueFvPatchScalarField
00064 {
00065     // Private data
00066 
00067         //- Turbulent intensity as fraction of mean velocity
00068         scalar intensity_;
00069 
00070 public:
00071 
00072     //- Runtime type information
00073     TypeName("turbulentIntensityKineticEnergyInlet");
00074 
00075 
00076     // Constructors
00077 
00078         //- Construct from patch and internal field
00079         turbulentIntensityKineticEnergyInletFvPatchScalarField
00080         (
00081             const fvPatch&,
00082             const DimensionedField<scalar, volMesh>&
00083         );
00084 
00085         //- Construct from patch, internal field and dictionary
00086         turbulentIntensityKineticEnergyInletFvPatchScalarField
00087         (
00088             const fvPatch&,
00089             const DimensionedField<scalar, volMesh>&,
00090             const dictionary&
00091         );
00092 
00093         //- Construct by mapping given
00094         //  turbulentIntensityKineticEnergyInletFvPatchScalarField
00095         //  onto a new patch
00096         turbulentIntensityKineticEnergyInletFvPatchScalarField
00097         (
00098             const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
00099             const fvPatch&,
00100             const DimensionedField<scalar, volMesh>&,
00101             const fvPatchFieldMapper&
00102         );
00103 
00104         //- Construct as copy
00105         turbulentIntensityKineticEnergyInletFvPatchScalarField
00106         (
00107             const turbulentIntensityKineticEnergyInletFvPatchScalarField&
00108         );
00109 
00110         //- Construct and return a clone
00111         virtual tmp<fvPatchScalarField> clone() const
00112         {
00113             return tmp<fvPatchScalarField>
00114             (
00115                 new turbulentIntensityKineticEnergyInletFvPatchScalarField
00116                 (
00117                     *this
00118                 )
00119             );
00120         }
00121 
00122         //- Construct as copy setting internal field reference
00123         turbulentIntensityKineticEnergyInletFvPatchScalarField
00124         (
00125             const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
00126             const DimensionedField<scalar, volMesh>&
00127         );
00128 
00129         //- Construct and return a clone setting internal field reference
00130         virtual tmp<fvPatchScalarField> clone
00131         (
00132             const DimensionedField<scalar, volMesh>& iF
00133         ) const
00134         {
00135             return tmp<fvPatchScalarField>
00136             (
00137                 new turbulentIntensityKineticEnergyInletFvPatchScalarField
00138                 (
00139                     *this,
00140                     iF
00141                 )
00142             );
00143         }
00144 
00145 
00146     // Member functions
00147 
00148         //- Update the coefficients associated with the patch field
00149         virtual void updateCoeffs();
00150 
00151         //- Write
00152         virtual void write(Ostream&) const;
00153 };
00154 
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #endif
00163 
00164 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd