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-2021 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 thermalShellModel_H
72 #define thermalShellModel_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 
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
117  solidProperties solid_;
118 
119 
120 public:
121 
122  //- Runtime type information
123  TypeName("vibrationShellModel");
124 
125 
126  // Declare runtime constructor selection tables
127 
129  (
132  dictionary,
133  (
134  const word& modelType,
135  const fvPatch& patch,
137  ),
138  (modelType, patch, dict)
139  );
140 
141 
142  // Constructors
143 
144  //- Construct from type name and mesh and dict
146  (
147  const word& modelType,
148  const fvPatch& patch,
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 fvPatch& patch,
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
196  Foam::fa::options& faOptions() noexcept
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 // ************************************************************************* //
volFieldsFwd.H
vibrationShellModel
Intermediate class for vibration-shell finite-area models.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::regionModels::vibrationShellModel::solid
const solidProperties & solid() const noexcept
Return solid properties.
Definition: vibrationShellModel.H:227
Foam::regionModels::vibrationShellModel::pName_
word pName_
Name of the coupled field in the primary region.
Definition: vibrationShellModel.H:127
Foam::regionModels::vibrationShellModel::~vibrationShellModel
virtual ~vibrationShellModel()=default
Destructor.
Foam::solidProperties
The thermophysical properties of a solid.
Definition: solidProperties.H:54
Foam::regionModels::vibrationShellModel::w_
areaScalarField w_
Shell displacement.
Definition: vibrationShellModel.H:133
Foam::regionModels::vibrationShellModel::New
static autoPtr< vibrationShellModel > New(const fvPatch &patch, const dictionary &dict)
Return a reference to the selected model using dictionary.
Definition: vibrationShellModelNew.C:40
faOptions.H
Foam::regionModels::vibrationShellModel::pa_
const volScalarField & pa_
Primary region acoustic pressure.
Definition: vibrationShellModel.H:130
Foam::regionModels::vibrationShellModel::TypeName
TypeName("vibrationShellModel")
Runtime type information.
Foam::regionModels::vibrationShellModel
Definition: vibrationShellModel.H:118
Foam::regionModels::vibrationShellModel::faOptions_
Foam::fa::options & faOptions_
Pointer to faOptions.
Definition: vibrationShellModel.H:139
Foam::regionModels::vibrationShellModel::faOptions
Foam::fa::options & faOptions() noexcept
Return faOptions.
Definition: vibrationShellModel.H:221
Foam::regionModels::vibrationShellModel::vibrationShellModel
vibrationShellModel(const word &modelType, const fvPatch &patch, const dictionary &dict)
Construct from type name and mesh and dict.
Definition: vibrationShellModel.C:49
areaFieldsFwd.H
Forwards and collection of common area field types.
Foam::regionModels::vibrationShellModel::a_
areaScalarField a_
Shell acceleration.
Definition: vibrationShellModel.H:136
Foam::regionModels::vibrationShellModel::pa
const volScalarField & pa() const noexcept
Return primary region pa.
Definition: vibrationShellModel.H:203
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::regionModels::vibrationShellModel::w
const areaScalarField & w() const noexcept
Return shell displacement.
Definition: vibrationShellModel.H:209
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::regionModels::vibrationShellModel::solid_
solidProperties solid_
Solid properties.
Definition: vibrationShellModel.H:142
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::regionModels::vibrationShellModel::a
const areaScalarField & a() const noexcept
Return shell acceleration.
Definition: vibrationShellModel.H:215
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::areaScalarField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:53
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fa::options
Finite-area options.
Definition: faOptions.H:54
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::regionModels::regionFaModel
Base class for area region models.
Definition: regionFaModel.H:113
Foam::regionModels::vibrationShellModel::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve region.
Definition: vibrationShellModel.C:95
regionFaModel.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
solidProperties.H
Foam::regionModels::vibrationShellModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, vibrationShellModel, dictionary,(const word &modelType, const fvPatch &patch, const dictionary &dict),(modelType, patch, dict))
Foam::regionModels::vibrationShellModel::operator=
void operator=(const vibrationShellModel &)=delete
No copy assignment.
autoPtr.H