MRFFreestreamVelocityFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::MRFFreestreamVelocityFvPatchVectorField
26 
27 Description
28  Freestream velocity condition to be used for a wall rotating with the
29  moving frame in an MRF (multi-reference frame) or SRF (single reference
30  frame) case.
31 
32  Given the free stream velocity in the absolute frame at time 0, the
33  condition applies the appropriate rotation transformation in time and space
34  to determine the current freestream velocity.
35 
36 Usage
37  \table
38  Property | Description | Required | Default value
39  freestreamValue0 | freestream velocity at t=0 | yes |
40  freestreamValue | freestream velocity at t | yes |
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  <patchName>
46  {
47  type MRFFreestreamVelocity;
48  freestreamValue0 (1 0 0);
49  freestreamValue uniform (1 0 0);
50  }
51  \endverbatim
52 
53 See also
54  Foam::freestreamFvPatchField
55  Foam::MRFVelocityFvPatchVectorField
56 
57 SourceFiles
58  MRFFreestreamVelocityFvPatchVectorField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef MRFFreestreamVelocityFvPatchVectorField_H
63 #define MRFFreestreamVelocityFvPatchVectorField_H
64 
66 #include "MRFPatchField.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class MRFFreestreamVelocityFvPatchVectorField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class MRFFreestreamVelocityFvPatchVectorField
78 :
79  public freestreamVelocityFvPatchVectorField,
80  public MRFPatchField
81 {
82  // Private Data
83 
84  //- Velocity of the free stream at time = 0
85  vector freestreamValue0_;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("MRFFreestreamVelocity");
92 
93 
94  // Constructors
95 
96  //- Construct from patch, internal field and dictionary
98  (
99  const fvPatch&,
101  const dictionary&
102  );
103 
104  //- Construct by mapping given MRFFreestreamVelocityFvPatchVectorField
105  // onto a new patch
107  (
109  const fvPatch&,
111  const fvPatchFieldMapper&
112  );
113 
114  //- Disallow copy without setting internal field reference
116  (
118  ) = delete;
119 
120  //- Copy constructor setting internal field reference
122  (
125  );
126 
127  //- Construct and return a clone setting internal field reference
129  (
131  ) const
132  {
134  (
136  );
137  }
138 
139 
140  // Member Functions
141 
142  // Evaluation functions
143 
144  //- Update the coefficients associated with the patch field
145  virtual void updateCoeffs();
146 
147 
148  //- Write
149  virtual void write(Ostream&) const;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Freestream velocity condition to be used for a wall rotating with the moving frame in an MRF (multi-r...
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
MRFFreestreamVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("MRFFreestreamVelocity")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::fvPatchFieldMapper.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49