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::incompressible::RASModels::immersedBoundaryWallFunctionFvPatchField
28 Boundary condition for passive turbulence variables (U, k, q, R, nut)
29 when using wall functions on an immersed boundary patch
31 Apart form standard immersed boundary capability, the patch field allows
32 only some values to be fixed, as defined by the wall function calculation.
34 This is handled using the ibWallValue and ibWallMask arrays, corresponding
35 to the number of ibCells
37 The implementation of wall functions on an immersed boundary will fix
38 the values of k, epsilon, nut and tangential velocity in cells within
39 the log-law layer. For the cells in the laminar sublayer, k and epsilon
40 (omega) will be calculated using a zero gradient condition,
41 nut will be set to zero and the tangential component of the
42 velocity will be corrected.
45 Hrvoje Jasak, Wikki Ltd. All rights reserved
48 immersedBoundaryWallFunctionFvPatchField.C
50 \*---------------------------------------------------------------------------*/
52 #ifndef immersedBoundaryWallFunctionFvPatchField_H
53 #define immersedBoundaryWallFunctionFvPatchField_H
55 #include "fvPatchFields.H"
56 #include "immersedBoundaryFvPatchField.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 namespace incompressible
67 /*---------------------------------------------------------------------------*\
68 Class immersedBoundaryWallFunctionFvPatchField Declaration
69 \*---------------------------------------------------------------------------*/
72 class immersedBoundaryWallFunctionFvPatchField
74 public immersedBoundaryFvPatchField<Type>
78 //- Value to fix in IB cell
79 mutable Field<Type> wallValue_;
81 //- Indicator on values to fix
82 mutable boolList wallMask_;
87 // Protected Member Functions
89 //- Set IB cell values: contains data manipulation
90 virtual void setIbCellValues(const Field<Type>&) const;
95 //- Runtime type information
96 TypeName("immersedBoundaryWallFunction");
101 //- Construct from patch and internal field
102 immersedBoundaryWallFunctionFvPatchField
105 const DimensionedField<Type, volMesh>&
108 //- Construct from patch, internal field and dictionary
109 immersedBoundaryWallFunctionFvPatchField
112 const DimensionedField<Type, volMesh>&,
116 //- Construct by mapping given
117 // immersedBoundaryWallFunctionFvPatchField
119 immersedBoundaryWallFunctionFvPatchField
121 const immersedBoundaryWallFunctionFvPatchField&,
123 const DimensionedField<Type, volMesh>&,
124 const fvPatchFieldMapper&
127 //- Construct as copy
128 immersedBoundaryWallFunctionFvPatchField
130 const immersedBoundaryWallFunctionFvPatchField&
133 //- Construct and return a clone
134 virtual tmp<fvPatchField<Type> > clone() const
136 return tmp<fvPatchField<Type> >
138 new immersedBoundaryWallFunctionFvPatchField(*this)
142 //- Construct as copy setting internal field reference
143 immersedBoundaryWallFunctionFvPatchField
145 const immersedBoundaryWallFunctionFvPatchField&,
146 const DimensionedField<Type, volMesh>&
149 //- Construct and return a clone setting internal field reference
150 virtual tmp<fvPatchField<Type> > clone
152 const DimensionedField<Type, volMesh>& iF
155 return tmp<fvPatchField<Type> >
157 new immersedBoundaryWallFunctionFvPatchField(*this, iF)
163 virtual ~immersedBoundaryWallFunctionFvPatchField()
171 //- Access to value to fix in IB cell. Note non-const access
172 Field<Type>& wallValue() const;
174 //- Access to indicator on fixed values. Note non-const access
175 boolList& wallMask() const;
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace RASModels
182 } // End namespace incompressible
183 } // End namespace Foam
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 # include "immersedBoundaryWallFunctionFvPatchField.C"
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 // ************************************************************************* //