Loading...
Searching...
No Matches
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-2025 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::regionModels::vibrationShellModel
28
29Description
30 Intermediate class for vibration-shell finite-area models.
31
32Usage
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 primary pressure field | word | yes | -
56 solid | Solid properties | dict | yes | -
57 as | Name of shell acceleration field | word | no | as (suffix)
58 ps | Name of pressure (source) on shell | word | no | ps (suffix)
59 ws | Name of shell displacement field | word | no | ws (suffix)
60 \endtable
61
62 Naming changes from 2506 and earlier:
63 \table
64 Keyword | Description | Keyword (old) | Deflt (old)
65 as | Acceleration (shell) | - | "as_" + regionName
66 ps | Pressure on shell | - | "ps_" + regionName
67 ws | Displacement (shell) | - | "ws_" + regionName
68 \endtable
69
70 The inherited entries are elaborated in:
71 - \link regionFaModel.H \endlink
72
73SourceFiles
74 vibrationShellModel.C
75
76\*---------------------------------------------------------------------------*/
77
78#ifndef Foam_regionModels_vibrationShellModel_H
79#define Foam_regionModels_vibrationShellModel_H
80
81#include "areaFieldsFwd.H"
82#include "volFieldsFwd.H"
83#include "regionFaModel.H"
84#include "faOptions.H"
85#include "solidProperties.H"
86
87// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88
89namespace Foam
90{
91namespace regionModels
92{
93
94/*---------------------------------------------------------------------------*\
95 Class vibrationShellModel Declaration
96\*---------------------------------------------------------------------------*/
97
99:
100 public regionFaModel
101{
102protected:
103
104 // Protected Data
105
106 //- Shell displacement [m]
108
109 //- Shell acceleration [m/s2]
111
112 //- Solid properties
113 solidProperties solid_;
114
115 //- Name of primary region acoustic pressure field
116 word pName_;
117
118 //- Primary region acoustic pressure [Pa]
119 const volScalarField& pa_;
120
121 //- Reference to faOptions
122 Foam::fa::options& faOptions_;
123
124
125public:
126
127 //- Runtime type information
128 TypeName("vibrationShellModel");
129
130
131 // Declare runtime constructor selection tables
132
134 (
135 autoPtr,
138 (
139 const word& modelType,
140 const fvMesh& mesh,
141 const dictionary& dict
142 ),
143 (modelType, mesh, dict)
144 );
145
146
147 // Constructors
148
149 //- Construct from type name and mesh and dict
151 (
152 const word& modelType,
153 const fvMesh& mesh,
154 const dictionary& dict
155 );
156
157 //- No copy construct
159
160 //- No copy assignment
161 void operator=(const vibrationShellModel&) = delete;
162
163
164 // Selectors
165
166 //- Return a reference to the selected model using dictionary
168 (
169 const fvMesh& mesh,
170 const dictionary& dict
171 );
172
173
174 //- Destructor
175 virtual ~vibrationShellModel() = default;
177
178 // Member Functions
179
180 //- Return the primary region presssure
181 const volScalarField& pa() const noexcept { return pa_; }
182
183 //- Return the shell displacement
184 const areaScalarField& w() const noexcept { return w_; }
185
186 //- Return the shell acceleration
187 const areaScalarField& a() const noexcept { return a_; }
188
189 //- Return faOptions
192 //- Return solid properties
193 const solidProperties& solid() const noexcept { return solid_; }
194
195
196 // Evolution
197
198 //- Pre-evolve region
199 virtual void preEvolveRegion();
200};
201
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205} // End namespace regionModels
206} // End namespace Foam
207
208// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209
210#endif
211
212// ************************************************************************* //
Forwards and collection of common area field types.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
dictionary()
Default construct, a top-level empty dictionary.
Definition dictionary.C:68
Finite-area options, which is an IOdictionary of values and a fa::optionList.
Definition faOptions.H:73
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Base class for area region models.
regionFaModel(const fvMesh &mesh, const word &regionType, const word &modelName, const dictionary &dict, bool readFields=true)
Construct from mesh and name and dict.
Intermediate class for vibration-shell finite-area models.
word pName_
Name of primary region acoustic pressure field.
solidProperties solid_
Solid properties.
const volScalarField & pa() const noexcept
Return the primary region presssure.
const areaScalarField & w() const noexcept
Return the shell displacement.
vibrationShellModel(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
TypeName("vibrationShellModel")
Runtime type information.
virtual ~vibrationShellModel()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, vibrationShellModel, dictionary,(const word &modelType, const fvMesh &mesh, const dictionary &dict),(modelType, mesh, dict))
const areaScalarField & a() const noexcept
Return the shell acceleration.
static autoPtr< vibrationShellModel > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected model using dictionary.
Foam::fa::options & faOptions_
Reference to faOptions.
vibrationShellModel(const vibrationShellModel &)=delete
No copy construct.
const volScalarField & pa_
Primary region acoustic pressure [Pa].
void operator=(const vibrationShellModel &)=delete
No copy assignment.
virtual void preEvolveRegion()
Pre-evolve region.
Foam::fa::options & faOptions() noexcept
Return faOptions.
areaScalarField w_
Shell displacement [m].
areaScalarField a_
Shell acceleration [m/s2].
const solidProperties & solid() const noexcept
Return solid properties.
The thermophysical, mechanical properties of a solid.
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
const direction noexcept
Definition scalarImpl.H:265
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68
Forwards and collection of common volume field types.