1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM 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 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField
29 Calculate turbulent kinetic energy from the intensity provided as a
30 fraction of the mean velocity
32 Example of the boundary condition specification:
36 type turbulentIntensityKineticEnergyInlet;
37 U U; // name of velocity field
38 intensity 0.05; // 5% turbulence
39 value uniform 1; // placeholder
44 turbulentIntensityKineticEnergyInletFvPatchScalarField.C
46 \*---------------------------------------------------------------------------*/
48 #ifndef turbulentIntensityKineticEnergyInletFvPatchScalarField_H
49 #define turbulentIntensityKineticEnergyInletFvPatchScalarField_H
51 #include "fixedValueFvPatchFields.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 /*---------------------------------------------------------------------------*\
59 Class turbulentIntensityKineticEnergyInletFvPatch Declaration
60 \*---------------------------------------------------------------------------*/
62 class turbulentIntensityKineticEnergyInletFvPatchScalarField
64 public fixedValueFvPatchScalarField
68 //- Name of velocity field
71 //- Turbulent intensity as fraction of mean velocity
77 //- Runtime type information
78 TypeName("turbulentIntensityKineticEnergyInlet");
83 //- Construct from patch and internal field
84 turbulentIntensityKineticEnergyInletFvPatchScalarField
87 const DimensionedField<scalar, volMesh>&
90 //- Construct from patch, internal field and dictionary
91 turbulentIntensityKineticEnergyInletFvPatchScalarField
94 const DimensionedField<scalar, volMesh>&,
98 //- Construct by mapping given
99 // turbulentIntensityKineticEnergyInletFvPatchScalarField
101 turbulentIntensityKineticEnergyInletFvPatchScalarField
103 const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
105 const DimensionedField<scalar, volMesh>&,
106 const fvPatchFieldMapper&
109 //- Construct as copy
110 turbulentIntensityKineticEnergyInletFvPatchScalarField
112 const turbulentIntensityKineticEnergyInletFvPatchScalarField&
115 //- Construct and return a clone
116 virtual tmp<fvPatchScalarField> clone() const
118 return tmp<fvPatchScalarField>
120 new turbulentIntensityKineticEnergyInletFvPatchScalarField
127 //- Construct as copy setting internal field reference
128 turbulentIntensityKineticEnergyInletFvPatchScalarField
130 const turbulentIntensityKineticEnergyInletFvPatchScalarField&,
131 const DimensionedField<scalar, volMesh>&
134 //- Construct and return a clone setting internal field reference
135 virtual tmp<fvPatchScalarField> clone
137 const DimensionedField<scalar, volMesh>& iF
140 return tmp<fvPatchScalarField>
142 new turbulentIntensityKineticEnergyInletFvPatchScalarField
153 //- Update the coefficients associated with the patch field
154 virtual void updateCoeffs();
157 virtual void write(Ostream&) const;
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace Foam
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 // ************************************************************************* //