Loading...
Searching...
No Matches
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-2025 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::compressible::velocityFilmShellFvPatchVectorField
28
29Group
30 grpLiquidFilmBoundaryConditions
31
32Description
33 This boundary condition provides a coupled velocity condition between
34 a primary region (3D mesh) and a liquid-film model (2D mesh).
35
36Usage
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
111SourceFiles
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
124namespace Foam
125{
126
127/*---------------------------------------------------------------------------*\
128 Class velocityFilmShellFvPatchVectorField Declaration
129\*---------------------------------------------------------------------------*/
130
132:
133 public mixedFvPatchField<vector>
134{
135 // Typedefs
136
137 //- The parent boundary condition type
138 typedef mixedFvPatchField<vector> parent_bctype;
139
140 //- The finite-area region model
142
143
144 // Private Data
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 //- The liquid film model
156 autoPtr<baffleType> baffle_;
157
158
159 // Private Methods
160
161 //- Create film baffle (if required)
162 void create_baffle();
163
164
165public:
166
167 //- Runtime type information
168 TypeName("velocityFilmShell");
169
170
171 // Constructors
172
173 //- Construct from patch and internal field
175 (
176 const fvPatch&,
178 );
179
180 //- Construct from patch, internal field and dictionary
182 (
183 const fvPatch&,
185 const dictionary&
186 );
187
188 //- Construct by mapping given
189 //- velocityFilmShellFvPatchVectorField onto a new patch
191 (
193 const fvPatch&,
195 const fvPatchFieldMapper&
196 );
197
198 //- Copy construct with internal field reference
200 (
203 );
204
205 //- Copy construct
207 (
209 )
210 :
212 {}
213
214
215 //- Return a clone
216 virtual tmp<fvPatchField<vector>> clone() const
217 {
218 return fvPatchField<vector>::Clone(*this);
219 }
220
221 //- Clone with an internal field reference
223 (
225 ) const
226 {
227 return fvPatchField<vector>::Clone(*this, iF);
228 }
229
230
231 // Member Functions
232
233 //- Update the coefficients associated with the patch field
234 virtual void updateCoeffs();
235
236 //- Write
237 virtual void write(Ostream&) const;
238};
239
240
241// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
242
243} // End namespace Foam
244
245// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
246
247
248#endif
249
250// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
const DimensionedField< vector, volMesh > & internalField() const noexcept
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
This boundary condition provides a base class for 'mixed' type boundary conditions,...
mixedFvPatchField(const fvPatch &, const DimensionedField< vector, volMesh > &)
A class for managing temporary objects.
Definition tmp.H:75
velocityFilmShellFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
velocityFilmShellFvPatchVectorField(const velocityFilmShellFvPatchVectorField &pfld)
Copy construct.
virtual tmp< fvPatchField< vector > > clone(const DimensionedField< vector, volMesh > &iF) const
Clone with an internal field reference.
TypeName("velocityFilmShell")
Runtime type information.
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68