vibrationShellFvPatchScalarField.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) 2019-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::vibrationShellFvPatchScalarField
28 
29 Group
30  grpVibrationBoundaryConditions
31 
32 Description
33  This boundary condition provides a coupled acoustic pressure condition
34  between a primary region (3D mesh) and a vibration shell model (2D mesh).
35 
36 Usage
37  Example of the boundary condition specification:
38  \verbatim
39  <masterPatchName>
40  {
41  // Mandatory entries
42  type vibrationShell;
43 
44  // Inherited entries
45  ...
46  }
47  \endverbatim
48 
49  where the entries mean:
50  \table
51  Property | Description | Type | Reqd | Deflt
52  type | Type name: vibrationShell | word | yes | -
53  \endtable
54 
55  The inherited entries are elaborated in:
56  - \link mixedFvPatchField.H \endlink
57  - \link vibrationShellModel.H \endlink
58 
59 SourceFiles
60  vibrationShellFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef vibrationShellFvPatchScalarField_H
65 #define vibrationShellFvPatchScalarField_H
66 
67 #include "vibrationShellModel.H"
68 #include "mixedFvPatchFields.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class vibrationShellFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class vibrationShellFvPatchScalarField
80 :
81  public mixedFvPatchField<scalar>
82 {
83  // Typedefs
84 
85  //- The finite-area region model
87 
88 
89  // Private Data
90 
91  //- The vibration shell model
92  autoPtr<baffleType> baffle_;
93 
94  //- Dictionary
95  dictionary dict_;
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("vibrationShell");
102 
103 
104  // Constructors
105 
106  //- Construct from patch and internal field
108  (
109  const fvPatch&,
111  );
112 
113  //- Construct from patch, internal field and dictionary
115  (
116  const fvPatch&,
118  const dictionary&
119  );
120 
121  //- Construct by mapping given
122  //- vibrationShellFvPatchScalarField onto a new patch
124  (
126  const fvPatch&,
128  const fvPatchFieldMapper&
129  );
130 
131  //- Construct as copy setting internal field reference
133  (
136  );
137 
138  //- Return a clone
139  virtual tmp<fvPatchField<scalar>> clone() const
140  {
141  return fvPatchField<scalar>::Clone(*this);
142  }
143 
144  //- Clone with an internal field reference
146  (
148  ) const
149  {
150  return fvPatchField<scalar>::Clone(*this, iF);
151  }
152 
153 
154  // Member Functions
155 
156  //- Update the coefficients associated with the patch field
157  virtual void updateCoeffs();
158 
159  //- Write
160  virtual void write(Ostream&) const;
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 
171 #endif
172 
173 // ************************************************************************* //
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
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
vibrationShellFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, 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
A FieldMapper for finite-volume patch fields.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("vibrationShell")
Runtime type information.
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.