immersedBoundaryVelocityWallFunctionFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
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 -------------------------------------------------------------------------------
8 License
9  This file is part of foam-extend.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::incompressible::RASModels::
26  immersedBoundaryVelocityWallFunctionFvPatchVectorField
27 
28 Description
29  Boundary condition for velocity when using wall functions
30  - uses tangential velocity as prescribed by the epsilon boundary condition
31  to enforce into the fit
32 
33 SourceFiles
34  immersedBoundaryVelocityWallFunctionFvPatchVectorField.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef immersedBoundaryVelocityWallFunctionFvPatchVectorField_H
39 #define immersedBoundaryVelocityWallFunctionFvPatchVectorField_H
40 
41 #include "fvPatchFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace incompressible
49 {
50 namespace RASModels
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class immersedBoundaryVelocityWallFunctionFvPatchVectorField Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public immersedBoundaryFvPatchVectorField
60 {
61  // Private data
62 
63  //- Tangential velocity value to fix in IB cell
65 
66  //- Wall shear stress
67  mutable vectorField tauWall_;
68 
69  //- Indicator on values to fix
70  mutable boolList wallMask_;
71 
72 
73 protected:
74 
75  // Protected Member Functions
76 
77  //- Set IB cell values: contains data manipulation
78  virtual void setIbCellValues(const vectorField&) const;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("immersedBoundaryVelocityWallFunction");
85 
86 
87  // Constructors
88 
89  //- Construct from patch and internal field
91  (
92  const fvPatch&,
94  );
95 
96  //- Construct from patch, internal field and dictionary
98  (
99  const fvPatch&,
101  const dictionary&
102  );
103 
104  //- Construct by mapping given
105  // immersedBoundaryVelocityWallFunctionFvPatchVectorField
106  // onto a new patch
108  (
110  const fvPatch&,
112  const fvPatchFieldMapper&
113  );
114 
115  //- Construct as copy
117  (
119  );
120 
121  //- Construct and return a clone
122  virtual tmp<fvPatchVectorField> clone() const
123  {
125  (
127  (
128  *this
129  )
130  );
131  }
132 
133  //- Construct as copy setting internal field reference
135  (
138  );
139 
140  //- Construct and return a clone setting internal field reference
142  (
144  ) const
145  {
147  (
149  (
150  *this,
151  iF
152  )
153  );
154  }
155 
156 
157  //- Destructor
159  {}
160 
161 
162  // Member functions
163 
164  // Access
165 
166  //- Access to tangential velocity value to fix in IB cell
167  // Note non-const access
169 
170  //- Return wall shear stress
171  const vectorField& wallShearStress() const;
172 
173  //- Access to wall shear stress in IB cell
174  // Note non-const access
175  vectorField& tauWall() const;
176 
177  //- Access to indicator on fixed values. Note non-const access
178  boolList& wallMask() const;
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace RASModels
185 } // End namespace incompressible
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallMask
boolList & wallMask() const
Access to indicator on fixed values. Note non-const access.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.C:257
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField
Boundary condition for velocity when using wall functions.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.H:55
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::tauWall_
vectorField tauWall_
Wall shear stress.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.H:65
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.H:120
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::setIbCellValues
virtual void setIbCellValues(const vectorField &) const
Set IB cell values: contains data manipulation.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.C:43
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallTangentialValue
scalarField & wallTangentialValue() const
Access to tangential velocity value to fix in IB cell.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.C:209
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
immersedBoundaryFvPatchFields.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallTangentialValue_
scalarField wallTangentialValue_
Tangential velocity value to fix in IB cell.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.H:62
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::immersedBoundaryVelocityWallFunctionFvPatchVectorField
immersedBoundaryVelocityWallFunctionFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.C:118
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallShearStress
const vectorField & wallShearStress() const
Return wall shear stress.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.C:191
fvPatchFields.H
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallMask_
boolList wallMask_
Indicator on values to fix.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.H:68
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::TypeName
TypeName("immersedBoundaryVelocityWallFunction")
Runtime type information.
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::~immersedBoundaryVelocityWallFunctionFvPatchVectorField
virtual ~immersedBoundaryVelocityWallFunctionFvPatchVectorField()
Destructor.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.H:156
Foam::incompressible::RASModels::immersedBoundaryVelocityWallFunctionFvPatchVectorField::tauWall
vectorField & tauWall() const
Access to wall shear stress in IB cell.
Definition: immersedBoundaryVelocityWallFunctionFvPatchVectorField.C:233
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51