Loading...
Searching...
No Matches
vibrationShellModel.C
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
26\*---------------------------------------------------------------------------*/
27
28#include "vibrationShellModel.H"
29
30// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32namespace Foam
34namespace regionModels
35{
36
37// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38
41
42// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43
45(
46 const word& modelType,
47 const fvMesh& mesh,
48 const dictionary& dict
49)
50:
51 regionFaModel(mesh, "vibratingShell", modelType, dict, true),
52 w_
53 (
55 (
56 dict.getOrDefault<word>("ws", suffixed("ws")),
58 regionMesh().thisDb(),
61 ),
63 ),
64 a_
65 (
67 (
68 dict.getOrDefault<word>("as", suffixed("as")),
70 regionMesh().thisDb(),
73 ),
74 regionMesh(),
76 ),
77 // Only need/want mechanical solid properties
78 solid_(dict.subDict("solid"), solidProperties::MECHANICAL),
79 pName_(dict.get<word>("p")),
80 pa_(mesh.lookupObject<volScalarField>(pName_)),
82 (
83 Foam::fa::options::New(mesh, regionFaModel::areaName())
84 )
85{
86 if (faOptions_.optionList::empty())
87 {
88 Info<< "No finite area options present for area : "
89 << polyMesh::regionName(regionFaModel::areaName()) << endl;
90 }
91}
92
93
94// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
95
97{}
98
99
100// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101
102} // End namespace regionModels
103} // End namespace Foam
104
105// ************************************************************************* //
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Definition dictionary.C:441
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
word suffixed(const char *base) const
Return the concatenation of base and the suffix hint.
const word & areaName() const noexcept
The finite-area mesh name (extracted from dictionary).
const Time & time() const noexcept
Return the reference to the time database.
const faMesh & regionMesh() const
Return the region mesh database.
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.
vibrationShellModel(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
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.
const volScalarField & pa_
Primary region acoustic pressure [Pa].
virtual void preEvolveRegion()
Pre-evolve region.
areaScalarField w_
Shell displacement [m].
areaScalarField a_
Shell acceleration [m/s2].
The thermophysical, mechanical properties of a solid.
A class for handling words, derived from Foam::string.
Definition word.H:66
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
dynamicFvMesh & mesh
word timeName
Definition getTimeIndex.H:3
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
const dimensionSet dimAcceleration
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
dictionary dict