vibrationShellModel.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-2022 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::regionModels::thermalShellModels::vibrationShellModel
28 
29 Description
30  Intermediate class for vibration-shell finite-area models.
31 
32 Usage
33  Example of the boundary condition specification:
34  \verbatim
35  <patchName>
36  {
37  // Mandatory entries
38  vibrationShellModel <word>;
39  p <word>;
40 
41  solid
42  {
43  // subdictionary entries
44  }
45 
46  // Inherited entries
47  ...
48  }
49  \endverbatim
50 
51  where the entries mean:
52  \table
53  Property | Description | Type | Reqd | Deflt
54  vibrationShellModel | Name of vibration-shell model | word | yes | -
55  p | Name of the coupled field in the primary <!--
56  --> region | word | yes | -
57  solid | Solid properties | dictionary | yes | -
58  \endtable
59 
60  The inherited entries are elaborated in:
61  - \link regionFaModel.H \endlink
62 
63 SourceFiles
64  vibrationShellModel.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef Foam_regionModels_vibrationShellModel_H
69 #define Foam_regionModels_vibrationShellModel_H
70 
71 #include "areaFieldsFwd.H"
72 #include "volFieldsFwd.H"
73 #include "regionFaModel.H"
74 #include "faOptions.H"
75 #include "solidProperties.H"
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 namespace Foam
80 {
81 namespace regionModels
82 {
83 
84 /*---------------------------------------------------------------------------*\
85  Class vibrationShellModel Declaration
86 \*---------------------------------------------------------------------------*/
87 
88 class vibrationShellModel
89 :
90  public regionFaModel
91 {
92 protected:
93 
94  // Protected Data
95 
96  //- Shell displacement
98 
99  //- Shell acceleration
101 
102  //- Solid properties
103  solidProperties solid_;
104 
105  //- Name of the coupled field in the primary region
106  word pName_;
107 
108  //- Primary region acoustic pressure
110 
111  //- Reference to faOptions
113 
114 
115 public:
116 
117  //- Runtime type information
118  TypeName("vibrationShellModel");
119 
121  // Declare runtime constructor selection tables
122 
124  (
127  dictionary,
128  (
129  const word& modelType,
130  const fvMesh& mesh,
131  const dictionary& dict
132  ),
133  (modelType, mesh, dict)
134  );
136 
137  // Constructors
138 
139  //- Construct from type name and mesh and dict
141  (
142  const word& modelType,
143  const fvMesh& mesh,
144  const dictionary& dict
145  );
146 
147  //- No copy construct
148  vibrationShellModel(const vibrationShellModel&) = delete;
149 
150  //- No copy assignment
151  void operator=(const vibrationShellModel&) = delete;
152 
153 
154  // Selectors
155 
156  //- Return a reference to the selected model using dictionary
158  (
159  const fvMesh& mesh,
160  const dictionary& dict
161  );
162 
163 
164  //- Destructor
165  virtual ~vibrationShellModel() = default;
166 
167 
168  // Member Functions
169 
170  // Access
171 
172  //- Return primary region pa
173  const volScalarField& pa() const noexcept
174  {
175  return pa_;
176  }
177 
178  //- Return shell displacement
179  const areaScalarField& w() const noexcept
180  {
181  return w_;
182  }
183 
184  //- Return shell acceleration
185  const areaScalarField& a() const noexcept
186  {
187  return a_;
188  }
189 
190  //- Return faOptions
192  {
193  return faOptions_;
194  }
195 
196  //- Return solid properties
197  const solidProperties& solid() const noexcept
198  {
199  return solid_;
200  }
201 
202 
203  // Evolution
204 
205  //- Pre-evolve region
206  virtual void preEvolveRegion();
207 };
208 
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 } // End namespace regionModels
213 } // End namespace Foam
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 #endif
218 
219 // ************************************************************************* //
static autoPtr< vibrationShellModel > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected model using dictionary.
dictionary dict
vibrationShellModel(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
virtual ~vibrationShellModel()=default
Destructor.
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Foam::fa::options & faOptions() noexcept
Return faOptions.
areaScalarField a_
Shell acceleration.
const solidProperties & solid() const noexcept
Return solid properties.
Foam::fa::options & faOptions_
Reference to faOptions.
solidProperties solid_
Solid properties.
areaScalarField w_
Shell displacement.
const volScalarField & pa_
Primary region acoustic pressure.
const areaScalarField & w() const noexcept
Return shell displacement.
dynamicFvMesh & mesh
Finite-area options.
Definition: faOptions.H:50
A class for handling words, derived from Foam::string.
Definition: word.H:63
const direction noexcept
Definition: scalarImpl.H:255
TypeName("vibrationShellModel")
Runtime type information.
const volScalarField & pa() const noexcept
Return primary region pa.
word pName_
Name of the coupled field in the primary region.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
declareRunTimeSelectionTable(autoPtr, vibrationShellModel, dictionary,(const word &modelType, const fvMesh &mesh, const dictionary &dict),(modelType, mesh, dict))
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
void operator=(const vibrationShellModel &)=delete
No copy assignment.
virtual void preEvolveRegion()
Pre-evolve region.
const areaScalarField & a() const noexcept
Return shell acceleration.
Forwards and collection of common area field types.
Namespace for OpenFOAM.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:72