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/Optional entries
38  ...
39 
40  // Mandatory entries
41  vibrationShellModel <thermalShellModelName>;
42  p <pName>;
43 
44  solid
45  {
46  // subdictionary entries
47  }
48 
49  // Mandatory/Optional (derived) entries
50  ...
51  }
52  \endverbatim
53 
54  where the entries mean:
55  \table
56  Property | Description | Type | Reqd | Deflt
57  vibrationShellModel | Name of vibration-shell model | word | yes | -
58  p | Name of the coupled field in the primary <!--
59  --> region | word | yes | -
60  solid | Solid properties | dictionary | yes | -
61  \endtable
62 
63  The inherited entries are elaborated in:
64  - \link regionFaModel.H \endlink
65 
66 SourceFiles
67  vibrationShellModel.C
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef Foam_regionModels_vibrationShellModel_H
72 #define Foam_regionModels_vibrationShellModel_H
73 
74 #include "runTimeSelectionTables.H"
75 #include "autoPtr.H"
76 #include "areaFieldsFwd.H"
77 #include "volFieldsFwd.H"
78 #include "regionFaModel.H"
79 #include "faOptions.H"
80 #include "solidProperties.H"
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 namespace regionModels
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class vibrationShellModel Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class vibrationShellModel
94 :
95  public regionFaModel
96 {
97 protected:
98 
99  // Protected Data
100 
101  //- Name of the coupled field in the primary region
102  word pName_;
103 
104  //- Primary region acoustic pressure
105  const volScalarField& pa_;
106 
107  //- Shell displacement
109 
110  //- Shell acceleration
112 
113  //- Pointer to faOptions
115 
116  //- Solid properties
118 
119 
120 public:
121 
122  //- Runtime type information
123  TypeName("vibrationShellModel");
124 
126  // Declare runtime constructor selection tables
127 
129  (
132  dictionary,
133  (
134  const word& modelType,
135  const fvMesh& mesh,
136  const dictionary& dict
137  ),
138  (modelType, mesh, dict)
139  );
141 
142  // Constructors
143 
144  //- Construct from type name and mesh and dict
146  (
147  const word& modelType,
148  const fvMesh& mesh,
149  const dictionary& dict
150  );
151 
152  //- No copy construct
153  vibrationShellModel(const vibrationShellModel&) = delete;
154 
155  //- No copy assignment
156  void operator=(const vibrationShellModel&) = delete;
157 
158 
159  // Selectors
160 
161  //- Return a reference to the selected model using dictionary
163  (
164  const fvMesh& mesh,
165  const dictionary& dict
166  );
167 
168 
169  //- Destructor
170  virtual ~vibrationShellModel() = default;
171 
172 
173  // Member Functions
174 
175  // Access
176 
177  //- Return primary region pa
178  const volScalarField& pa() const noexcept
179  {
180  return pa_;
181  }
182 
183  //- Return shell displacement
184  const areaScalarField& w() const noexcept
185  {
186  return w_;
187  }
188 
189  //- Return shell acceleration
190  const areaScalarField& a() const noexcept
191  {
192  return a_;
193  }
194 
195  //- Return faOptions
197  {
198  return faOptions_;
199  }
200 
201  //- Return solid properties
202  const solidProperties& solid() const noexcept
203  {
204  return solid_;
205  }
206 
207 
208  // Evolution
209 
210  //- Pre-evolve region
211  virtual void preEvolveRegion();
212 };
213 
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 } // End namespace regionModels
218 } // End namespace Foam
219 
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 
222 #endif
223 
224 // ************************************************************************* //
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_
Pointer to faOptions.
solidProperties solid_
Solid properties.
areaScalarField w_
Shell displacement.
const volScalarField & pa_
Primary region acoustic pressure.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
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: Scalar.H:258
TypeName("vibrationShellModel")
Runtime type information.
const volScalarField & pa() const noexcept
Return primary region pa.
The thermophysical properties of a solid.
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
Macros to ease declaration of run-time selection tables.
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:80