1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField
28 Calculate turbulent kinetic energy from the intensity provided as a
29 fraction of the mean velocity
31 Example of the boundary condition specification:
35 type turbulentIntensityKineticEnergyInlet;
36 U U; // name of velocity field
37 intensity 0.05; // 5% turbulence
38 value uniform 1; // placeholder
43 turbulentIntensityKineticEnergyInletFvPatchScalarField.C
45 \*---------------------------------------------------------------------------*/
47 #ifndef turbulentIntensityKineticEnergyInletFvPatchScalarField_H
48 #define turbulentIntensityKineticEnergyInletFvPatchScalarField_H
50 #include "inletOutletFvPatchFields.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class turbulentIntensityKineticEnergyInletFvPatch Declaration
59 \*---------------------------------------------------------------------------*/
61 class turbulentIntensityKineticEnergyInletFvPatchScalarField
63 public inletOutletFvPatchScalarField
67 //- Turbulent intensity as fraction of mean velocity
70 //- Name of the velocity field
73 //- Name of the flux field
79 //- Runtime type information
80 TypeName("turbulentIntensityKineticEnergyInlet");
85 //- Construct from patch and internal field
86 turbulentIntensityKineticEnergyInletFvPatchScalarField
89 const DimensionedField<scalar, volMesh>&
92 //- Construct from patch, internal field and dictionary
93 turbulentIntensityKineticEnergyInletFvPatchScalarField
96 const DimensionedField<scalar, volMesh>&,
100 //- Construct by mapping given
101 // turbulentIntensityKineticEnergyInletFvPatchScalarField
103 turbulentIntensityKineticEnergyInletFvPatchScalarField
105 const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
107 const DimensionedField<scalar, volMesh>&,
108 const fvPatchFieldMapper&
111 //- Construct as copy
112 turbulentIntensityKineticEnergyInletFvPatchScalarField
114 const turbulentIntensityKineticEnergyInletFvPatchScalarField&
117 //- Construct and return a clone
118 virtual tmp<fvPatchScalarField> clone() const
120 return tmp<fvPatchScalarField>
122 new turbulentIntensityKineticEnergyInletFvPatchScalarField
129 //- Construct as copy setting internal field reference
130 turbulentIntensityKineticEnergyInletFvPatchScalarField
132 const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
133 const DimensionedField<scalar, volMesh>&
136 //- Construct and return a clone setting internal field reference
137 virtual tmp<fvPatchScalarField> clone
139 const DimensionedField<scalar, volMesh>& iF
142 return tmp<fvPatchScalarField>
144 new turbulentIntensityKineticEnergyInletFvPatchScalarField
155 //- Update the coefficients associated with the patch field
156 virtual void updateCoeffs();
159 virtual void write(Ostream&) const;
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 } // End namespace Foam
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 // ************************************************************************* //