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