acousticWaveTransmissiveFvPatchField.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-------------------------------------------------------------------------------
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::acousticWaveTransmissiveFvPatchField
28
29Group
30 grpOutletBoundaryConditions
31
32Description
33 This boundary condition provides a wave transmissive outflow condition,
34 based on solving DDt(W, field) = 0 at the boundary \c W is the wave velocity
35 and \c field is the field to which this boundary condition is applied.
36 The wave speed is input in the BC.
37
38Usage
39 Example of the boundary condition specification:
40 \verbatim
41 <patchName>
42 {
43 // Mandatory entries (unmodifiable)
44 type acousticWaveTransmissive;
45 advectiveSpeed 50.0;
46
47 // Mandatory/Optional (inherited) entries
48 ...
49 }
50 \endverbatim
51
52 where the entries mean:
53 \table
54 Property | Description | Type | Reqd | Dflt
55 type | Type name: acousticWaveTransmissive | word | yes | -
56 advectiveSpeed | Advective speed value | scalar | yes | -
57 \endtable
58
59 The inherited entries are elaborated in:
60 - \link advectiveFvPatchField.H \endlink
61
62See also
63 - Foam::advectiveFvPatchFields
64
65SourceFiles
66 acousticWaveTransmissiveFvPatchField.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef acousticWaveTransmissiveFvPatchField_H
71#define acousticWaveTransmissiveFvPatchField_H
72
74
75// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76
77namespace Foam
78{
79
80/*---------------------------------------------------------------------------*\
81 Class acousticWaveTransmissiveFvPatchField Declaration
82\*---------------------------------------------------------------------------*/
83
84template<class Type>
85class acousticWaveTransmissiveFvPatchField
86:
87 public advectiveFvPatchField<Type>
88{
89 // Private Data
90
91 //- Advection speed value
92 scalar advectiveU_;
93
94
95public:
96
97 //- Runtime type information
98 TypeName("acousticWaveTransmissive");
99
100
101 // Constructors
103 //- Construct from patch and internal field
105 (
106 const fvPatch&,
108 );
109
110 //- Construct from patch, internal field and dictionary
112 (
113 const fvPatch&,
116 );
117
118 //- Construct by mapping given acousticWaveTransmissiveFvPatchField
119 //- onto a new patch
121 (
123 const fvPatch&,
125 const fvPatchFieldMapper&
126 );
127
128 //- Construct as copy
130 (
132 );
133
134 //- Construct and return a clone
135 virtual tmp<fvPatchField<Type>> clone() const
136 {
138 (
140 );
141 }
142
143 //- Construct as copy setting internal field reference
145 (
148 );
149
150 //- Construct and return a clone setting internal field reference
154 ) const
155 {
157 (
159 );
160 }
161
162
163 // Member Functions
164
165 // Evaluation
166
167 //- Calculate and return the advection speed at the boundary
169
170
171 // IO
172
173 //- Write
174 virtual void write(Ostream&) const;
175};
176
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180} // End namespace Foam
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184#ifdef NoRepository
186#endif
187
188// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190#endif
191
192// ************************************************************************* //
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:62
This boundary condition provides a wave transmissive outflow condition, based on solving DDt(W,...
acousticWaveTransmissiveFvPatchField(const acousticWaveTransmissiveFvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
virtual tmp< scalarField > advectionSpeed() const
Calculate and return the advection speed at the boundary.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
TypeName("acousticWaveTransmissive")
Runtime type information.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Construct and return a clone setting internal field reference.
This boundary condition provides an advective outflow condition, based on solving DDt(W,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73