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-2020 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 \*---------------------------------------------------------------------------*/
27 
28 #include "vibrationShellModel.H"
29 #include "faMesh.H"
30 #include "fvMesh.H"
31 #include "fvPatchFields.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace regionModels
38 {
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
43 
45 
46 
47 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
48 
50 {
52  {
53  return true;
54  }
55 
56  return false;
57 }
58 
59 
60 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
61 
62 vibrationShellModel::vibrationShellModel
63 (
64  const word& modelType,
65  const fvPatch& p,
66  const dictionary& dict
67 )
68 :
69  regionFaModel(p, "vibratingShell", modelType, dict, true),
70  pName_(dict.get<word>("p")),
71  pa_(p.boundaryMesh().mesh().lookupObject<volScalarField>(pName_)),
72  w_
73  (
74  IOobject
75  (
76  "ws_" + regionName_,
77  p.boundaryMesh().mesh().time().timeName(),
78  p.boundaryMesh().mesh(),
81  ),
82  regionMesh()
83  ),
84  a_
85  (
86  IOobject
87  (
88  "as_" + regionName_,
89  p.boundaryMesh().mesh().time().timeName(),
90  p.boundaryMesh().mesh(),
93  ),
94  regionMesh(),
96  ),
97  faOptions_(Foam::fa::options::New(p)),
98  solid_(dict.subDict("solid"))
99 {
100  if (!faOptions_.optionList::size())
101  {
102  Info << "No finite area options present" << endl;
103  }
104 }
105 
106 
107 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
108 
110 {}
111 
112 
114 {
115  return pa_;
116 }
117 
118 
120 {
121  return w_;
122 }
123 
124 
126 {
127  return a_;
128 }
129 
130 
132 {
133  return faOptions_;
134 }
135 
136 
138 {
139  return solid_;
140 }
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace regionModels
146 } // End namespace Foam
147 
148 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
vibrationShellModel
Intermediate class for vibration-shell finite-area models.
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::IOobject::AUTO_WRITE
Definition: IOobject.H:129
vibrationShellModel.H
Foam::fa::options::New
static options & New(const fvPatch &p)
Definition: faOptions.C:103
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::regionModels::defineTypeNameAndDebug
defineTypeNameAndDebug(KirchhoffShell, 0)
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::solidProperties
The thermophysical properties of a solid.
Definition: solidProperties.H:54
Foam::regionModels::vibrationShellModel::w_
areaScalarField w_
Shell displacement.
Definition: vibrationShellModel.H:142
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
faMesh.H
Foam::regionModels::vibrationShellModel::solid
const solidProperties & solid() const
Return solid properties.
Definition: vibrationShellModel.C:137
Foam::regionModels::vibrationShellModel::pa_
const volScalarField & pa_
Primary region acoustic pressure.
Definition: vibrationShellModel.H:139
Foam::regionModels::vibrationShellModel::faOptions_
Foam::fa::options & faOptions_
Pointer to faOptions.
Definition: vibrationShellModel.H:148
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::regionModels::vibrationShellModel::a_
areaScalarField a_
Shell acceleration.
Definition: vibrationShellModel.H:145
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::regionModels::defineRunTimeSelectionTable
defineRunTimeSelectionTable(thermalShellModel, dictionary)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
Foam::regionModels::vibrationShellModel::pa
const volScalarField & pa() const
Return primary region pa.
Definition: vibrationShellModel.C:113
Foam::regionModels::vibrationShellModel::solid_
solidProperties solid_
Solid properties.
Definition: vibrationShellModel.H:151
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:121
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::dimAcceleration
const dimensionSet dimAcceleration
Foam::fa::options
Finite-area options.
Definition: faOptions.H:54
Foam::regionModels::vibrationShellModel::read
virtual bool read(const dictionary &)
Read control parameters from dictionary.
Definition: vibrationShellModel.C:49
fvPatchFields.H
Foam::regionModels::regionFaModel::read
virtual bool read(const dictionary &dict)
Read control parameters from dictionary.
Definition: regionFaModel.C:68
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:109
Foam::regionModels::vibrationShellModel::a
const areaScalarField & a() const
Return shell acceleration.
Definition: vibrationShellModel.C:125
Foam::regionModels::vibrationShellModel::faOptions
Foam::fa::options & faOptions()
Return faOptions.
Definition: vibrationShellModel.C:131
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::IOobject::NO_READ
Definition: IOobject.H:123
Foam::regionModels::vibrationShellModel::w
const areaScalarField & w() const
Return shell displacement.
Definition: vibrationShellModel.C:119
Foam::IOobject::MUST_READ
Definition: IOobject.H:120