Loading...
Searching...
No Matches
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>
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
102
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 as copy setting internal field reference
136 (
139 );
140
141 //- Return a clone
142 virtual tmp<fvPatchField<Type>> clone() const
144 return fvPatchField<Type>::Clone(*this);
145 }
146
147 //- Clone with an internal field reference
149 (
151 ) const
152 {
153 return fvPatchField<Type>::Clone(*this, iF);
154 }
155
156
157 // Member Functions
158
159 // Evaluation
160
161 //- Calculate and return the advection speed at the boundary
162 virtual tmp<scalarField> advectionSpeed() const;
163
164
165 // IO
166
167 //- Write
168 virtual void write(Ostream&) const;
169};
170
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174} // End namespace Foam
175
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178#ifdef NoRepository
180#endif
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184#endif
185
186// ************************************************************************* //
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
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 &)
Construct by mapping given acousticWaveTransmissiveFvPatchField onto a new patch.
acousticWaveTransmissiveFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual tmp< scalarField > advectionSpeed() const
Calculate and return the advection speed at the boundary.
virtual tmp< fvPatchField< Type > > clone() const
Return a clone.
TypeName("acousticWaveTransmissive")
Runtime type information.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Clone with an internal field reference.
This boundary condition provides an advective outflow condition, based on solving DDt(W,...
advectiveFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
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.
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
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68