velocityFilmShellFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::compressible::velocityFilmShellFvPatchVectorField
28 
29 Group
30  grpLiquidFilmBoundaryConditions
31 
32 Description
33  This boundary condition provides a coupled velocity condition between
34  a primary region (3D mesh) and a liquid-film model (2D mesh).
35 
36 Usage
37  Example of the boundary condition specification:
38  \verbatim
39  <patchName>
40  {
41  // Mandatory entries
42  type velocityFilmShell;
43  liquidFilmModel <word>;
44 
45  // Optional entries
46  zeroWallVelocity <bool>;
47 
48  // Inherited entries
49  ...
50  active <bool>;
51  infoOutput <bool>;
52  U <word>;
53  pRef <scalar>;
54  T0 <scalar>;
55  deltaWet <scalar>;
56  h0 <scalar>;
57 
58  thermo
59  {
60  H2O;
61  }
62 
63  turbulence laminar;
64  laminarCoeffs
65  {
66  friction ManningStrickler; // Wall friction model
67  n 0.005; // Manning number
68  Cf 0.9; // Gas friction
69  }
70 
71  injectionModels
72  (
73  curvatureSeparation
74  );
75 
76  forces ();
77 
78  curvatureSeparationCoeffs
79  {
80  definedPatchRadii 0;
81  }
82 
83  region film;
84  value uniform (0 0 0);
85  }
86  \endverbatim
87 
88  where the entries mean:
89  \table
90  Property | Description | Type | Reqd | Deflt
91  type | Type name: velocityFilmShell | word | yes | -
92  liquidFilmModel | Film model | word | yes | -
93  zeroWallVelocity | Flag to fix zero U for primary flow <!--
94  --> | bool | no | true
95  U | Name of the primary U | word | yes | -
96  pRef | Reference pressure for thermo | scalar | yes | -
97  T0 | Film initial temperature | scalar | no | READ
98  thermo | Flow thermo | wordRes | yes | -
99  turbulence | Type of film turbulence model | word | yes | -
100  injectionModels | Lagrangian injection | | no | -
101  forces | Film force models | wordRes | no | -
102  deltaWet | Wet film thickness | scalar | no | 1e-4
103  h0 | Numerical minimum thickness | scalar | no | 1e-7
104  region | Name of the 2D region | word | yes | -
105  \endtable
106 
107  The inherited entries are elaborated in:
108  - \link liquidFilmBase.H \endlink
109  - \link mixedFvPatchFields.H \endlink
110 
111 SourceFiles
112  velocityFilmShellFvPatchVectorField.C
113 
114 \*---------------------------------------------------------------------------*/
115 
116 #ifndef velocityFilmShellFvPatchVectorField_H
117 #define velocityFilmShellFvPatchVectorField_H
118 
119 #include "liquidFilmBase.H"
120 #include "mixedFvPatchFields.H"
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 namespace Foam
125 {
126 
127 /*---------------------------------------------------------------------------*\
128  Class velocityFilmShellFvPatchVectorField Declaration
129 \*---------------------------------------------------------------------------*/
130 
132 :
133  public mixedFvPatchField<vector>
134 {
135  // Typedefs
136 
137  //- The finite-area region model
139 
140 
141  // Private Data
142 
143  //- The liquid film model
144  autoPtr<baffleType> baffle_;
145 
146  //- Dictionary
147  mutable dictionary dict_;
148 
149  //- Time index to evolve the film
150  label curTimeIndex_;
151 
152  //- Flag to set velocity to zero or film velocity
153  bool zeroWallVelocity_;
154 
155 
156 public:
157 
158  //- Runtime type information
159  TypeName("velocityFilmShell");
160 
161 
162  // Constructors
163 
164  //- Construct from patch and internal field
166  (
167  const fvPatch&,
169  );
170 
171  //- Construct from patch, internal field and dictionary
173  (
174  const fvPatch&,
176  const dictionary&
177  );
178 
179  //- Construct by mapping given
180  //- velocityFilmShellFvPatchVectorField onto a new patch
182  (
184  const fvPatch&,
186  const fvPatchFieldMapper&
187  );
188 
189  //- Construct as copy setting internal field reference
191  (
194  );
195 
196  //- Return a clone
197  virtual tmp<fvPatchField<vector>> clone() const
198  {
199  return fvPatchField<vector>::Clone(*this);
200  }
201 
202  //- Clone with an internal field reference
204  (
206  ) const
207  {
208  return fvPatchField<vector>::Clone(*this, iF);
209  }
210 
211 
212  // Member Functions
213 
214  //- Update the coefficients associated with the patch field
215  virtual void updateCoeffs();
216 
217  //- Write
218  virtual void write(Ostream&) const;
219 };
220 
221 
222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 
224 } // End namespace Foam
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 
229 #endif
230 
231 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
This boundary condition provides a base class for &#39;mixed&#39; type boundary conditions, i.e. conditions that mix fixed value and patch-normal gradient conditions.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
velocityFilmShellFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
TypeName("velocityFilmShell")
Runtime type information.
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.